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.

Please help with simple program (hidden door sensor turning on lights for 10 minutes)

Featured Replies

Posted

Here is my current program

 

If

status "entry door sensor" is on

Then

Set scene "hall light switch" on

Wait 10 minutes

Set scene "hall light switch" off

 

 

What happens is the lights will come on but never turn off. I have same problem with similar program with garage door sensor and lights so I am sure I am just doing it wrong. It seems as soon as i close door after opening it kills the program so never completes.

 

thanks 

Does the light turn off if you don't close the door? Are the sensor and hall light members of a scene?

Rather than "status" as a condition, use "control".

 

If

Control "entry door sensor" is turned on

Then

Same.....

IF it helps here is something that works for me in a similar arrangement .. for some reason the else statement makes some difference which I got from similar suggestions here.

 

 

Hallway Auto Light - [iD 0021][Parent 0001]
 
If
        From    Sunset  +  1 minute
        To      Sunrise -  1 minute (next day)
    And Status  'Front-Door / Front Door-Opened' is On
 
Then
        Set Scene 'Hallway Auto Light' On
 
Else
        Wait  2 minutes 
        Set Scene 'Hallway' Off

The problem with your program is that when the door is closed the status of the door sensor changes which causes the program to start again from the beginning. Since the door is closed the "else" portion of your program is executed. Since it's empty, it just ends.

 

If your door sensor is an Insteon device you can use the "if control" statement as mentioned above. If it is a Z-Wave sensor then you'll need two programs:

 

if

   Status "entry door sensor" is on

then

   Run Program "turn light on" (if or then)

else

 

 

Program "turn light on"

 

if

then

   Set Scene "turn hall light" On

   Wait 10 mins

   Set Scene "turn hall light" Off

else

 

I would have thought that if the door is closed you'd want the light off anyway, in which case you can simply turn the light off in the "else" clause.

 

If

   status "entry door sensor" is on

Then

   Set scene "hall light switch" on

   Wait 10 minutes

   Set scene "hall light switch" off

Else

   Set scene "hall light switch" off

Edited by andyf0

  • Author

Thanks for the replies everyone. Using "control" worked. 

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.