Jump to content

Sunset OR later


Steven

Recommended Posts

Posted

I want to turn on a light (run a program) at 30 minutes after sunset, or 7:00 p.m., whichever is later.

 

That is, during the summer, I want the light to turn on 30 minutes after sunset, but during the winter, I want to wait until 7:00 p.m.

 

I would think something like:

 

Time is Sunset + 30 minutes

And Time is 7:00:00PM

 

would be what I want, but I think that will result in the program never running (unless sunset is exactly 6:30 p.m.)

Posted

Why not change the program to

 

 

If

Time is Sunset + 30 minutes

Or Time is 7:00:00PM

 

Then

Set 'Indoor / Dining Room / Dining Room Chandelier' On

 

Else

- No Actions - (To add one, press 'Action')

Posted

Using an OR would not get the desired result:

 

During the summer, the Dining Room would turn on at 7:00PM, while the sun in still shining.

 

During the winter, the Dining Room would turn on at 5-thirty or so, which is too early for dinner.

 

I did find a solution. I have 2 sets of 2 programs (total of 4). The first set is one program called "Sunset+30", which has:

 

If

Time is Sunset + 30 minutes.

Then

Wait 2 hours

Set 'Dining Room' On

 

The second program has:

 

If

Time is 7:00 PM

And Program 'Sunset+30' is True

Then

Set 'Dining Room' On

 

The "Set 'Dining Room' On" in the first program does nothing, but it has to be there, or the 'Wait' won't happen (from what I have read).

 

The second program turns the light an 7:00 p.m., but only if Sunset was at least 30 minutes ago. (Assuming Sunset happens after 4:30, which it always does here.)

 

Next, I'll make another set of programs that will turn the light on at Sunset + 30 minutes, but only if the 7PM program is running.

Posted

Thank you! I got it down to 3 programs. The first has only an if:

 

If  From Sunset + 30 minutes To 12:00:00AM (next day)

 

The next also has only an if:

 

If From 7:00:00PM To 12:00:00AM (next day)

 

The program that controls the light has this if:

 

If ( Time is 7:00:00 PM And Program 'Sunset+30' is True ) Or ( Time is Sunset + 30 minutes And Program 'After 7:00' is True )

 

Problem solved!

Posted

What about one program with this If statement:

 

If
       Time is Sunset  + 30 minutes
   And From     7:00:00PM
       To      11:59:00PM (same day)
    Or Time is  7:00:00PM
   And From    Sunset  + 30 minutes
       To      11:59:00PM (same day)

Then
 Set 'Dining Room' On

Else
  - No Actions - (To add one, press 'Action')

 

Haven't tested it, but logically it should work, right?

Posted

I have a similar program. It works but you will need to isolate to two sections like this:

 

If 
    (
           Time is Sunset  + 30 minutes 
       And From     7:00:00PM 
           To      11:59:00PM (same day) 
    )
 Or (
           Time is  7:00:00PM 
       And From    Sunset  + 30 minutes 
           To      11:59:00PM (same day) 
    )

Then 
 Set 'Dining Room' On 

Else 
  - No Actions - (To add one, press 'Action') 

 

 

RLav

Posted

Thanks! The nested 'And' within the 'Or' worked exactly as expected. I used parenthesis just to make sure the grouping is what I want.

 

Next, a similar question: I have an old X10 Sundowner that sends an X10 "On" message when the ambient light level drops. I already use that to turn on the living room light.

 

We have a Time-Of-Use meter from our electric company. This means that we pay a lower rate for electricity after 6:00 p.m., and on the weekends. Therefore, I would like to postpone turning on the garden lights until 6:00 p.m., if it gets dark before that. The first part is easy:

If
       X10 'B4/On (3)' is Received
 And From      6:00:00PM
       To         11:59:00PM (same day)

 

However the second part I don't know. I want to turn the lights on at 6:00 p.m. if the X10 'On' is received earlier.

 

I'm guessing that for this I will need a second program to keep track of the state of the X10 Sundowner. Something like:

If
       X10 'B4/On (3)' is Received
 And X10 'B4/Off (11)' is not Received

 

Am I thinking right?

Posted

A program to track the status of the X10 B4 signal would work. You would want to reset the program at midnight, or you could let the Sundowner reset it if it sends an X10 "Off" at sunrise.

 

The other option is to purchase the X10 add-on module. Then you could track the status of the X10 B4 address in the ISY and put a Status condition in your program. In this scenario, you would have an if statement much like above:

 

If 
    ( 
           X10 'B4/On' is Received 
       And From     6:00:00PM 
           To      11:59:00PM (same day) 
    ) 
 Or ( 
           Time is  6:00:00PM
       And Status X10 'B4' is On 
    ) 

Guest
This topic is now closed to further replies.

×
×
  • Create New...