Jump to content

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


DAlba

Recommended Posts

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 

Posted

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

Posted

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
Posted (edited)

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
Guest
This topic is now closed to further replies.

×
×
  • Create New...