f11 Posted January 16, 2008 Posted January 16, 2008 I want to turn a light on: - if today is M,T,W,T AND - if the time is 6:50AM AND - if sunrise today isn't earlier than 7:10AM Maybe I just need more (or probably less) coffee, but I just can't seem to wrap my head around how the 3rd condition could be written within the available ISY syntax. Basically, I don't want to turn on the light if sunrise is just 20 minutes away from the fixed time. Can anyone offer a suggestion? Its probably a case of not yet fully grasping the many ways ISY programming can be done. Thanks for your patience and help! Rod Quote
Chris Jahn Posted January 16, 2008 Posted January 16, 2008 For the simple case of turning a light on at 6:50AM, and off at Sunrise: Turn Light On/Off: If On Mon, Tue, Wed, Thu From 6:50:00AM To Sunrise (same day) Then Set 'My Light' On Else Set 'My Light' Off In your case, you do not want the light to come on if its only going to be on for 20 minutes or less. You need two programs for this: Turn Light On: If On Mon, Tue, Wed, Thu From 6:50:00AM To Sunrise - 20 minutes (same day) Then Set 'My Light' On Else - No Actions - (To add one, press 'Action') Turn Light Off: If On Mon, Tue, Wed, Thu Time is Sunrise And Status 'My Light' > Off Then Set 'My Light' Off Else - No Actions - (To add one, press 'Action') Quote
f11 Posted January 17, 2008 Author Posted January 17, 2008 In regard to the TO sunrise conditional "sunrise - 20", if the time this evaluates to is earlier than the FROM conditional fixed time, does the whole IF section evaluate to FALSE, which then runs the ELSE option[/b]? Quote
Chris Jahn Posted January 17, 2008 Posted January 17, 2008 If the TO is earlier than the FROM then it will never change TRUE or FALSE, and will not run either the THEN or ELSE path. In the normal case where the TO is later than the FROM, the schedule evaluates TRUE when the FROM time is reached (Runs THEN path), and FALSE when the TO time is reached (Runs the ELSE path). Quote
f11 Posted January 17, 2008 Author Posted January 17, 2008 AH!! I see... So to summarize what I think I understand: - the Schedule evaluates to TRUE when the FROM conditional is TRUE and the TO conditional evaluates as later than the FROM conditional, and therefore initiates the THEN action - the Schedule stays TRUE until the TO conditional evaluates as TRUE and later than the FROM conditional, at which time the Schedule goes FALSE, and therefor initiates the ELSE action - whenever the TO time conditional evaluates as earlier than the FROM time conditional, even if the FROM conditional evaluates as TRUE, then the Schedule does not toggle its logical state (is this right?) Thanks! Rod Quote
Chris Jahn Posted January 17, 2008 Posted January 17, 2008 AH!! I see... So to summarize what I think I understand: - the Schedule evaluates to TRUE when the FROM conditional is TRUE and the TO conditional evaluates as later than the FROM conditional, and therefore initiates the THEN action - the Schedule stays TRUE until the TO conditional evaluates as TRUE and later than the FROM conditional, at which time the Schedule goes FALSE, and therefor initiates the ELSE action - whenever the TO time conditional evaluates as earlier than the FROM time conditional, even if the FROM conditional evaluates as TRUE, then the Schedule does not toggle its logical state (is this right?) Thanks! Rod Yes, all three of your points are correct. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.