Auto lights off, 10 after tripped

Trying to get my lights to turn off 10 minutes after last motion in my bathroom. I used to do this earlier with PLEG, but i think Reactor looks so awesome so i will try to move over to that instead!

Tried to do it in Vera Scenes at first, but the problem there is that if someone leaves the bathroom and turns off the light, and walks in again and turns on the light lets say 9 minutes after first visit, the Vera timer will shut of the light after 1 minute. Guess that’s because Vera does not get a new timestamp every time the motion sensor stops detecting motion. PLEG managed this fine and solved this issue.

My question now is could Reactor do ut? Start counting down (and start all over again) when a sensor detects motion? So after last motion, 10 minutes until lights off? And gives me 10 new minutes if tripped?

Regards Jonas

While you could probably do this with Reactor using the sustained conditions, there is probably a better way… Take a quick look at another awesome plugin by Rigpapa called DelayLight. Essentially it lets you set two distinct timers for a light, one when the light is turned on by a tripped by motion sensor and one when the light is manually turned on or off. I think it will solve your issue in a much cleaner/neater fashion. I use a combination of Reactor and DelayLight all over my house and it has made my setup much more stable/reliable.

Sebby’s right, DelayLight is a good “canned” approach, with some features you may like later once you’ve solved the first problem. But the direct Reactor approach is to watch the Status variable on the light/switch, and use the “sustained for” option to create an “off” trigger. The options are exposed by clicking the downward pointing arrow next to the value input field on the service condition you create.

Alright guys, il guess i have to take a look at DelayLight, big thanks!

ahh 5 minutes after “installation” i have 4 lights controlled by motion sensors and timers that “restarts” when new motion … !!! AWSOME! I have struggeled with this s*hit for over a year with Vera/PLEG and your app dit it in a sec!!! You who created ControlLight and Reactor should get payed from Vera, awsome!

Ha! That comment is payment enough.

Will donate when i get my paypal going !

I’m a newbie, but I did this with just the native Vera Plus U17, no plug-in. I added a scene with a trigger of motion detected, action to turn on light immediately, and a delay action to turn the same light off after 15 minutes. It’s for the master bathroom, so I went further and added 3 time restricted scenes to do the same thing, except that at night it turns lights on to 10%, evening to 40% and daytime to 100%. It works great! The timers reset when continued motion is detected, so no problem with lights going out while still in the room. That is unless you sit for more than 15 minutes! I did the same thing in the basement. I can be down there for an hour and the lights stay on, but 15 minutes after I leave, the lights are out.

For whatever reason I don’t seem to need a plug-in to do any of this?

[quote=“bradkw, post:8, topic:205575”]I’m a newbie, but I did this with just the native Vera Plus U17, no plug-in. I added a scene with a trigger of motion detected, action to turn on light immediately, and a delay action to turn the same light off after 15 minutes. It’s for the master bathroom, so I went further and added 3 time restricted scenes to do the same thing, except that at night it turns lights on to 10%, evening to 40% and daytime to 100%. It works great! The timers reset when continued motion is detected, so no problem with lights going out while still in the room. That is unless you sit for more than 15 minutes! I did the same thing in the basement. I can be down there for an hour and the lights stay on, but 15 minutes after I leave, the lights are out.

For whatever reason I don’t seem to need a plug-in to do any of this?[/quote]

Strange, thats not how Vera handles the Timer in my house. And i know many people complaining about the same thing.

I re-checked my scenes and actually did it a bit different than I posted… sorry!
I did not use a delay off in the same scene. Instead I created a separate “off” scene called “Bath delay off.” The trigger is “Whenever Bath Motion stops detecting motion whether is armed or disarmed” and the only action is a delay action "Wait for 15m and then turn off bath light.

Maybe this makes more sense. :slight_smile:

[quote=“bradkw, post:10, topic:205575”]I re-checked my scenes and actually did it a bit different than I posted… sorry!
I did not use a delay off in the same scene. Instead I created a separate “off” scene called “Bath delay off.” The trigger is “Whenever Bath Motion stops detecting motion whether is armed or disarmed” and the only action is a delay action "Wait for 15m and then turn off bath light.

Maybe this makes more sense. :)[/quote]

Makes sense and works just fine. You will notice that with the Vera, there will be many ways to do things. The reason we love the plugins that Rigpapa has done is that they maintain state through reloads of the engine (which happen more often than you think), so in your current setup, if you walk into the bathroom, the light kicks on, but if the engine reloads between the time you leave the bathroom and your timer kicks off, your shut off scene will not run