Keeping a light from being left on all day

Very new to the forum and Vera, so be gentle.

Okay, so here is the deal. My wife is bad about leaving lights on, so I created a scene that would turn off a given light one hour after it was turned on. It works great, except let’s say I turn the light on at 7am, then off at 7:30. My wife comes into the room at 7:55 and turns it back on. The scent then turns if off at 8.

I first researched a way to stop the scene when the light was turned off, but can’t find any way to do that. Now I am thinking that there is another way to accomplish what my scene does, except be able to have it stop if the light is turned off before the time is satisfied.

Any help in either direction would be most helpful.

Using a VeraLight.

First, you can’t “stop a running scene”. Scenes fire instantly. You can’t stop one after it has fired. That’s why you have the problem that you do.

If you replace your scene with a Program Logic Event Generator(PLEG) plugin, then you can eliminate this issue. With PLEG you can easily configure it to only turn Off an hour after the last time it turned On.

A simple progression LightOn; Now > 1:00:00 will only turn Off the light one hour after the last turn On. Then you can go on to add presence detection with a motion sensor or something similar and further enhance the control of the light, turning On automatically and then Off again after a period of inactivity.

If you don’t want to go Pleg (and I suggest that you do) you could just install the timer plugin and do it with that.
When the light goes on, start your 1 hour timer. If the light turns off, reset the timer. If the timer times out, turn off the light.
This is fine for a one off but if you want lots of lights controlled like this go for Pleg as suggested.

Thanks to both of you. I added the PLEG and did my first programming. Now I have a new problem I can’t seem to get past.

I set the delay to shut off the light in 10 seconds so I could test my programming without having to wait too long. I went to the switch and turned the light on, waited, the light stayed on.

I then went back to my computer and tried the same thing using the web interface. When I use the web interface or a scene to turn on the light, the PLEG works great. When I use the switch, nothing.

I also noticed that when I use the switch, the icon on the web interface (and my iPhone) does not change to show that the light is on. It is like the Vera can talk to the switch, but the switch does not talk back to the Vera. So, if the PLEG does not see the light come on (when using the switch) it does not activate.

What am I doing wrong?

You’re not doing anything wrong. The switch you are using most likely doesn’t have a feature called instant status. What that means is the system has to poll the switch before it knows you turned on the light. Poll times and frequency vary, so you’ll need to plan at least a few minutes of lag time from when you flip the switch to when it’s updated in vera.

The good news is that when vera polls and finds the light is on, it will then do the timing and turn off. Not having instant status just means a delay. Of course if you turn it off before it is polled then no problem.

Great! Thanks!! Glad to know it is not my “logic”. PLEG looks great and I’m excited about the future possibilities.

I think there are Vera settings regarding polling rates. I have pretty much left everything at the default until I figure out what it means.
I’ll do a search and see what I can find.

Do not mess with the Polling settings … It does not work as one expects … and reducing the poll interval will reduce the stability of your Vera.

If you really need instant access from a few switches … change those switches to ones that support instant status.

If your switches support association, make sure vera is included in the main association group (read the manusl for the switch). This can help speed up vera polling the device. It gets a message to say the switch has changed state and polls to investigate. Not as good as instant status but it helps for my case.

I turn polling completely OFF on my Leviton switches as the polling seems to actually cause comm issues. I also have Neighbors manually programmed as it does not pick these up correctly, ever.

What switch brand and model are you using? It’s possible that the switch may support it but it isn’t currently enabled.

I am in the UK and use TKB switches. No instant status but the switches are double paddle where the second paddle controls other z-wave devices by association. They have a group for the load switch too which I use to tell Vera that ‘something’ has happened. Vera then polls to find out what.
Of course you cannot set never poll or Vera wil not poll and she wil not poll if she has just done a routine poll. Not perfect but never a ‘long’ delay.