Jump to content

Fixed Time AND Sunrise Conditional


f11

Recommended Posts

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

Link to comment

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')

Link to comment

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).

Link to comment

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

Link to comment
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.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...