Jump to content

Lights on at sunset or a specific time


Go to solution Solved by paulbates,

Recommended Posts

Posted

Had started this topic earlier, but stopped due to a software glitch.  That glitch has been fixed, but the topic has been closed out.

Before closing out, I had received certain programming suggestions, but I was not able to make any work for me.

I'm looking to have lights turn on at the earlier of sunset or 6pm, whichever comes sooner, and turn off at 10pm (or so).

  • Solution
Posted

Here is the "On" program

If
        Time is Sunset 
     Or Time is  6:00:00PM
 
Then
        Set 'Lighting Premise / Premise Lights' On
 
Else
   - No Actions - (To add one, press 'Action')

 

Here is the off program, I use something simila

If
        Time is  9:50:00PM
 
Then
        Wait  13 minutes  (Random)
        Set 'Lighting Premise / Premise Lights' Off
 
Else
   - No Actions - (To add one, press 'Action')

This one will start running at 9:50pm, and wait a random amount of time for up to 13 minutes and then shut the lights off. You can tweak that however you want.

If you're interested, I can dig out the link to a post where I put lamp post light sensor in a project box with an insteon on/off micro module. It's Velcro'd inside on a window facing out and "switches on" around dusk.. this solves the problem of it being cloudy and dark sooner than dusk.

  • Like 1
Posted

You can do it one program if you like.

interupt - [ID 017E][Parent 0093]

If
        From    Sunset 
        To      10:00:00PM (same day)
     Or From     6:00:00PM
        To      10:00:00PM (same day)
 
Then
        
        // what you want to happen at either sunset and 6pm
 
 
Else
        
        // what you want to happen at 10pm.
 
 

This program triggers at 3 different times.  6pm, sunset, and 10pm.  At 6pm and at sunset it will run true, and at 10pm it will run false.  If it is externally triggered it will be true when the time is between sunset and 10pm as well as 6pm and 10pm, so if only one of those is true, the whole thing will be true.

The fact that the program runs true twice per day would typically not matter.  If sunset is after 6pm, then the lights will be on already when it runs true the second time at sunset and nothing will change.  The on command will be sent out, but presumably they will already be on, so nothing ends up happening.  It will matter if whatever the program is doing in the then clause is an event that does not hold the same state until the second trigger.  It would almost certainly not apply to lights, but perhaps if you want it to sound a horn once per day at either sunset or 6pm, whichever is first, then it will end up sounding a horn twice, once at each time.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...