Jump to content

help with a program for my dog :)


jon102034050

Recommended Posts

Posted
12 hours ago, jon102034050 said:

However, it doesn't take into account if I want to cancel the wait early by pressing the switch manually, which should turn off the lights and cancel the wait.

 

You can create a third program that checks in the IF whether the switch is switched off.  In the THEN portion of the program STOP Deck 2.  That will cancel the WAIT because the whole program is stopped.  You could also set the switch off in the THEN but shouldn't have to because the only way the third program gets run is if the switch has been switched off.

Posted
1 hour ago, kclenden said:

You can create a third program that checks in the IF whether the switch is switched off.  In the THEN portion of the program STOP Deck 2.  That will cancel the WAIT because the whole program is stopped.  You could also set the switch off in the THEN but shouldn't have to because the only way the third program gets run is if the switch has been switched off.

ahhhhh - I believe this is exactly what I was looking for!   Will test this out later when I'm home.

Posted

Yes, the even continues to run, but I have never seen a problem with turning off a light that is already off.

Continuing your scenario, let's say someone opens the door during the countdown (at 22:09:45 in this case).  The first program triggers again, in turn calling the second program.  If that second program was already running, calling it will halt the execution and restart it from zero.  So, whenever you open the door, whether the light is on or off, you will get a fresh countdown.

"Wait" and "Repeat" actions can (and will) be interrupted when a program triggers.  If a program is in the middle of a wait condition and something happens that causes a trigger of the program, the program halts (does not continue to end), re-evaluates, and carries out the action based upon the new evaluation.  This particular feature of ISY is a topic of MANY threads.

Guest
This topic is now closed to further replies.

×
×
  • Create New...