Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[PROGRAMMING] Always On From - To

Featured Replies

Posted

Hi,

 

I am trying to program so that the light is always ON From - To time. So if someones turns off, it would turn back ON automatically. I was able to accomplish this with two programs but is it possible to do this in one program?

 

Thanks!

Hi dpark-

 

Try this:

 

If 
    From 6:00 pm
    To 8:00 pm
 And 
     Status MyLight is not On

Then
  Set MyLight On

 

Edit as necessary. The reason for "is not On" is just in case this is a dimmer. Anything less than full on will make this program set the light full on. If this is a relay type switch, you could say "is Off" instead.

 

 

-Xathros

  • Author

Yes, that is basically what I did but I would also like to turn the light off automatically after 8:00pm.

 

If I add Else statement there to turn the light off, it just loops - on and off when I hit off switch. :)

 

So I created another program for "off hours" and added Then to turn it off. I was hoping to do this in one program.

 

Thanks!

dpark-

 

We COULD do it in one program:

If
    From 6:00 pm
    To 8:00 pm
 And
     (
     Status MyLight is not On
      or
     Status MyLight is On
     )
Then
  Set MyLight On

Else
  Set MyLight Off

* * * BUT * * *

This program will run True (Then) at 6pm and anytime between 6pm and 7:59:59 when the switch status changes forcing the light ON and False (Else) at 8pm and anytime the switch status changes between 8pm and 5:59:59pm the next day forcing the light off.

 

I actually do something like this for my back yard flood lights. It they are turned on during daylight hours I force them right back off. During dark hours I have a 15 minute timer (Optional - disable with a Fast On - re-enable with an Off) to turn them back off.

 

-Xathros

  • Author

I'm doing this for my porch lights so this will work!

 

Thanks!

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.