Logic Machine Forum
Script with delay and interrupt it. How? - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: Script with delay and interrupt it. How? (/showthread.php?tid=1658)



Script with delay and interrupt it. How? - legolas2069 - 16.10.2018

Hi! I'm triying to do the next:

Variables: Trigger, group address B, group address C.

I have a trigger, when this trigger switchs ON, B must switch ON inmediatly and C must switch ON with a delay of 3 minutes. Also, when the trigger switchs to OFF, C must switch OFF inmediatly and B must switch OFF with a delay of 10 minutes.I don't know how to do when I change the trigger value under the 3 or 10 minutes delay time.

Any way I can achieve this?

Thanks in advance.


RE: Script with delay and interrupt it. How? - Daniel - 16.10.2018

Hi
Use 3 scripts:
1 - event script with if else statement which will immediately switch on of one group and if off other group.
2 - resident script which will switch on C after a delay you can convert this example https://forum.logicmachine.net/showthread.php?tid=1354&pid=8181#pid8181
3 - another resident script which will switch off B with delay.
BR