MarkDFW Posted April 15, 2020 Share Posted April 15, 2020 I created a very basic program and to me it looks like I have an issue with WAIT command. After some testing and simplifying my program (to find the culprit) I concluded that WAIT command does not work as I expected. If '1 Entry motion' Status is On Then Set '1 entry hall' On Wait 10 minutes Set '1 entry hall' Off Else - No Actions - (To add one, press 'Action') So... I notice that this program would work only if WAIT time is less than 30 seconds (??) Any clue why? Thanks in advance! Link to comment
dbuss Posted April 15, 2020 Share Posted April 15, 2020 24 minutes ago, MarkDFW said: I created a very basic program and to me it looks like I have an issue with WAIT command. After some testing and simplifying my program (to find the culprit) I concluded that WAIT command does not work as I expected. If '1 Entry motion' Status is On Then Set '1 entry hall' On Wait 10 minutes Set '1 entry hall' Off Else - No Actions - (To add one, press 'Action') So... I notice that this program would work only if WAIT time is less than 30 seconds (??) Any clue why? Thanks in advance! Try using Control rather than status in the "If " statement of your program and set your motion sensor so it sends only "On" signals. Link to comment
lilyoyo1 Posted April 15, 2020 Share Posted April 15, 2020 As stated, use control. By using status, the sensor must be "on" for in order to trigger the wait. It works at 30 seconds because it's probably within the timeout period before the sensor changes to off Link to comment
KeviNH Posted April 15, 2020 Share Posted April 15, 2020 The key phrase from the Wiki is "The program's conditions are reevaluated each time a Wait statement is encountered" IOW, when the Wait time concludes, the If clause is re-tested; if it is now false, execution of the Then statements is aborted and any Else statements are executed. Link to comment
larryllix Posted April 15, 2020 Share Posted April 15, 2020 4 hours ago, KeviNH said: The key phrase from the Wiki is "The program's conditions are reevaluated each time a Wait statement is encountered" IOW, when the Wait time concludes, the If clause is re-tested; if it is now false, execution of the Then statements is aborted and any Else statements are executed. The phrase is incorrect and should have read. "The program's conditions can be reevaluated each time a Wait statement is encountered" Unless some trigger is involved, nothing is re-evaluated anywhere. ISY is a trigger based engine from end to end. Link to comment
MarkDFW Posted April 15, 2020 Author Share Posted April 15, 2020 THANK you for your help. I understand the issue now Link to comment
KeviNH Posted April 16, 2020 Share Posted April 16, 2020 3 hours ago, larryllix said: The phrase is incorrect and should have read. "The program's conditions can be reevaluated each time a Wait statement is encountered" Unless some trigger is involved, nothing is re-evaluated anywhere. ISY is a trigger based engine from end to end. I tried testing with an Integer variable, and it worked as you said -- conditions were not re-evaluated after a wait. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.