Jump to content

Program to turn on at sunset and then off at a specific time?


eyost

Recommended Posts

Posted

Hi all,

 

I currently have a program that will turn a device on at sunset and then wait four hours before turning them off. What I would like to do is to have the device to turn on at sunset and then off at a specific time. This sounds to me like a nested IF statement or an IF statement within the ELSE statement but I can't seem to determine how to add it.

 

Any thoughts on the best way to accomplish this or do I need to call another program for the Off?

 

Thanks for any help.

 

Ed

Posted

You can do

If
        From    Sunset 
        To      10:21:00PM (same day)
 
Then
        Set 'Front Room / Front Rm Lamp' On
 
Else
        Set 'Front Room / Front Rm Lamp' Off
 

You might need a "timer" program in case someone turns off the light while the program is between sunset and stipulated time to turn it back on

Posted

You can do

If
        From    Sunset 
        To      10:21:00PM (same day)
 
Then
        Set 'Front Room / Front Rm Lamp' On
 
Else
        Set 'Front Room / Front Rm Lamp' Off
 

You might need a "timer" program in case someone turns off the light while the program is between sunset and stipulated time to turn it back on

 

Ahh - now I see how this works. Good thing is that the device is plugged into an outdoor ApplianceLinc so it is a far chance that someone would turn of the device; only thing would be a power outage.

 

Thanks so much!

 

Ed 

Posted (edited)

Another thing to think about, from a safety perspective, is your house appearing too predictable when the lights go off at exactly the same time every night. You can use a randomized 'wait' command before the Set Off to have that vary over a period you specify:

Wait 15 minutes (Random)
Set 'Front Room / Front Rm Lamp' Off
Edited by paulbates
Posted

 

Another thing to think about, from a safety perspective, is your house appearing too predictable when the lights go off at exactly the same time every night. You can use a randomized 'wait' command before the Set Off to have that vary over a period you specify:

Wait 15 minutes (Random)
Set 'Front Room / Front Rm Lamp' Off

Excellent point; I will implement the wait command/

Guest
This topic is now closed to further replies.

  • Recently Browsing

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

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.5k
×
×
  • Create New...