Plau Posted December 17, 2013 Posted December 17, 2013 I have something like that : If From Sunset To Sunrise (next day) And $sAlarmZ14_GarageDoorPaco is 1 Or $sAlarmZ13_GarageDoorHoney is 1 Then Enable Program 'Garage Scene HallWay' Wait 5 minutes Disable Program 'Garage Scene HallWay' Else - No Actions - (To add one, press 'Action') and an other : Program 'Garage Scene HallWay' If $sAlarmZ3_GarageDoorHouse is 1 Then Set Scene '1st Floor / Entrance Ceiling' Fade Up Set Scene '1st Floor / Entrance HallWay' Fade Up Wait 4 minutes Set Scene '1st Floor / Entrance Ceiling' Fade Down Set Scene '1st Floor / Entrance HallWay' Fade Down Else - No Actions - (To add one, press 'Action') First issue is with the program 'Garage Scene HallWay' he turn light on, but never turn off the scene!!! Second issue is the first program, he works for enable the 2nd program but never disable it after time elapsed !
LeeG Posted December 17, 2013 Posted December 17, 2013 When the statements after a Wait are not executed it means the If condition changes while in the Wait. The ISY terminates the Wait, reevaluates the If and executes the Else clause because the If is now False. The statements after the Wait never get executed. There is also a problem with the If clause independent of the above. It needs some parens. If From Sunset To Sunrise (next day) And ( $sAlarmZ14_GarageDoorPaco is 1 Or $sAlarmZ13_GarageDoorHoney is 1 ) Then Enable Program 'Garage Scene HallWay' Wait 5 minutes Disable Program 'Garage Scene HallWay' Else - No Actions - (To add one, press 'Action') A simple solution is to put the above into two programs. The Then section invokes Program 2 which has the Enable/Wait/Disable. There are other approaches as well.
Plau Posted December 20, 2013 Author Posted December 20, 2013 Ok now I have 3 program If From Sunset To Sunrise (next day) And ( $sAlarmZ14_GarageDoorPaco is 1 Or $sAlarmZ13_GarageDoorHoney is 1 ) Then Enable Program 'Garage Door House Contact' Wait 1 minute Else Disable Program 'Garage Door House Contact' If $sAlarmZ3_GarageDoorHouse is 1 Then Run Program 'Scene HallWay' (Then Path) Else - No Actions - (To add one, press 'Action') If - No Conditions - (To add one, press 'Schedule' or 'Condition') Then Set Scene '1st Floor / Entrance Ceiling' Fade Up Set Scene '1st Floor / Entrance HallWay' Fade Up Wait 15 seconds Set Scene '1st Floor / Entrance Ceiling' Fade Down Set Scene '1st Floor / Entrance HallWay' Fade Down Else Set Scene '1st Floor / Entrance Ceiling' Fade Down Set Scene '1st Floor / Entrance HallWay' Fade Down It's working but if the door garage close before I open the door ($sAlarmZ3_GarageDoorHouse), the program 'Garage Door House Contact' doesn't start !
Recommended Posts