aLf Posted February 28, 2009 Posted February 28, 2009 I have the following program; If ( From Sunset To Sunrise (next day) ) And Control 'Garage Lantern S' is switched Fast On Then Set 'Garage Lantern S' On Set 'Garage Lantern W' On Wait 2 seconds Set 'Driveway Septic' On Wait 2 seconds Set 'Woodshed' On Set 'South Entry Lantern' On Else - No Actions - (To add one, press 'Action') I would expect it to show FALSE and it does until I use it, then turns TRUE. After I return the switches to OFF, it still shows TRUE! Here is the normal way to turn it off; If ( Control 'Garage Lantern S' is switched Off Or Control 'Garage Lantern S' is switched Fast Off ) Then Set 'Garage Lantern S' Off Set 'Garage Lantern W' Off Wait 2 seconds Set 'Driveway Septic' Off Wait 2 seconds Set 'Woodshed' Off Wait 2 seconds Set 'South Entry Lantern' Off Else - No Actions - (To add one, press 'Action') For you Guru's, I use this to turn on several lights on the driveway at once rather than having to go around to 4 seperate switches. Any help, suggestions or a better way to do would be appreciated. Thanks, aLf
gregoryx Posted February 28, 2009 Posted February 28, 2009 I may not be the "guru", but I'm pretty sure that first program will only be "evaluated" if 'Garage Lantern S' is switched Fast On. Any other action will not cause it to be evaluated.
MikeB Posted February 28, 2009 Posted February 28, 2009 Not sure I quite understand, but the initial program will change to true if, during the specified time periods, the 'Garage Lantern S' switch is turned FAST ON (double-tap ON). When do you want it to go false, when you turn the 'Garage Lantern S' switch off? If so, you could try changing the IF statement to: If ( From Sunset To Sunrise (next day) ) And Control 'Garage Lantern S' is switched Fast On And Control 'Garage Lantern S' is not switched Off
aLf Posted March 4, 2009 Author Posted March 4, 2009 Program 2 stays True all day long! Not sure if that is right. aLf
Sub-Routine Posted March 4, 2009 Posted March 4, 2009 Yes, it will be True all day but will not be triggered until one of the other conditions is met because of using Ands. Each change in condition will cause a reevaluation. At that time it will run the Then or Else and stay True or change False. Rand
Sub-Routine Posted March 4, 2009 Posted March 4, 2009 Is this the code you are referring to? If ( From Sunset To Sunrise (next day) ) And Control 'Garage Lantern S' is switched Fast On And Control 'Garage Lantern S' is not switched Off Yes, it will be True all day but will not be triggered until one of the other conditions is met because of using Ands. Each change in condition will cause a reevaluation. At that time it will run the Then or Else and stay True or change False. During the time that the Schedule is True: When 'And Control 'Garage Lantern S' is switched Fast On ' the program will trigger True and run the Then Actions. When 'And Control 'Garage Lantern S' is not switched Off' will interrupt the program when that switch is pressed off and will run the Else. Rand
aLf Posted March 4, 2009 Author Posted March 4, 2009 Rand: No. The second one to turn OFF is the one that stays TRUE all day. aLf
Sub-Routine Posted March 4, 2009 Posted March 4, 2009 aLf, Add the Sunset/Sunrise condition to program 2 if you need the program to change to False during the day. If From Sunset To Sunrise (next day) And ( Control 'Garage Lantern S' is switched Off Or Control 'Garage Lantern S' is switched Fast Off ) Rand
Recommended Posts