The Vera Community forums have moved!

General => General => Topic started by: geekydaddy on June 26, 2018, 02:47:21 pm

Title: stoping a scene
Post by: geekydaddy on June 26, 2018, 02:47:21 pm
Ok, I have this setup, when light switch comes one then turn off in 30 minutes. Simple scene.

So light switch turns on, scene triggers and wait for 30 minutes.

So this is my issue.

Within this 30 minutes, the light switch is turned off manually let's say after 20 minutes. Then let's say 5 minutes later the light switch turns on again, which triggers another instance of the scene and waits 30 minutes. Now 5 minutes passes and the first instance of the scene is finished waiting and turns off the light switch. Still needing light, the person turns on the light switch which now triggers a another instance of the scene. By now Scene 1 is done, Scene 2 has about 25 minutes left of waiting and Scene 3 has 30 minutes of waiting. So 25 minutes passes and the light switch turns off from Scene 2, then 5 more minutes passes and scene 3 sends to the command to turn off the light switch but it's off already.

Is there a way that when the light switch is turned off manually that the scene which was triggered when the light switch turn on would stop?
Title: Re: stoping a scene
Post by: jswim788 on June 26, 2018, 02:57:13 pm
You can't stop a scene.  But you could make the delay scene call a second scene which has some checks to see what the state of the switch is (or any other sensor) and act accordingly.

But this seems like a case where the DelayLight plugin would work: http://forum.micasaverde.com/index.php/topic,60498.0.html
Title: Re: stoping a scene
Post by: kev b on June 26, 2018, 06:10:34 pm
Countdown Timer can also do what you want- start the timer when the switch is turned on, and cancel the timer when the switch is turned off.
Title: Re: stoping a scene
Post by: rigpapa on June 26, 2018, 06:12:55 pm
DelayLight will also handle this gracefully, and will preserve the timing over Luup/Vera restarts.
Title: Re: stoping a scene
Post by: RichardTSchaefer on July 01, 2018, 12:40:31 pm
You can also use PLEG and/or PLTS  to handle this.
Lots of examples out there.