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.

Simple light timer - not turning off?

Featured Replies

Posted

I set up a simple program to turn a light on daily to appear as though someone is home.

 

I set the

If

from 5:30 pm

for 2 hours

then

 

The light comes on, but after 2 hours it doesn't turn off. I'm a bit confused at to the logic here. Would turn light off go in the else?

Yes. ISY programs are event driven.

 

If

from 5:30 pm

for 2 hours

then

else

  • Author

That works fine. So I assume when the 2 hours "for" time expires, the ISY triggers another event and runs the program again, this time evaluating the else?

 

Now what if that lamp is part of another scene, I want that lamp to come on if I am not home, stay on for two hours, then turn off. That's working great.

 

However, if I am at home, and am running one of my usual lighting scenes, and that lamp is on as part of that scene, I really don't want it turning off randomnly in two hours.

 

There doesn't appear to be an "else if"... how could I accomplish this? Or, should I set a condition in the upper folder, would that catch the second event and not run the "off" event?

So I assume when the 2 hours "for" time expires, the ISY triggers another event and runs the program again, this time evaluating the else?

 

Yes. This is generally consistent for all programs. Conditions are triggers. One needs to understand how each condition triggers a program evaluation. Once triggered, it will either evaluate True (run then path) or False (run else path).

 

However, if I am at home, and am running one of my usual lighting scenes, and that lamp is on as part of that scene, I really don't want it turning off randomnly in two hours.

 

Well, then, you will have to decide how to tell the ISY that you are home. I use a keypad button. I have experimented around with using cell phone location. Perhaps motion sensors? Garage door status? However you decide to do it, you would have to update your program:

 

if

I am away

and

time from 530

for 2 hours

then....

  • Author

Yeah, I'll have to experiment.

 

I have my motion sensors setup to trigger text and email notifications. Usually when I get home I used my cell phone and mobilelync to run an "I'm home" program. I could tie into that.

 

I'm curious as to your cell phone location implementation...

 

Something trigger from my cell phone present on my wifi would be neat.

  • Author

Ha I think I answered my own question... I never noticed mobilelinks location feature before.

Ha I think I answered my own question... I never noticed mobilelinks location feature before.

 

Yes, I think that is a unique capability to the iOS version of mobilinc. With Android, one can use the tasker app, now integrated with mobilinc, to initiate such triggers.

 

I am not entirely sure if the iOS version allows location based on proximity to certain wifi networks, but tasker does this.

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.