Jump to content

Motion Sensor IF program


sceaton

Recommended Posts

I have a motion sensor that when tripped, turns on security lights around the house ("Coach Lights" & "Landscape Lights"). After 11pm, the lights are off and if someone walks by, I want the lights to come on for 5 minutes, then turn off.

 

However, lets say I'm having a party, turned the lights on manually and want them left on all evening. I don't want someone to walk by the motion sensor, fire the program and then have them turned off 5 minutes later.

 

Will this work:

 

Driveway Motion Program:

 

If
       From    Sunset  //Only run at night
       To      Sunrise (next day)
   And Status  'Coach Lights @ Front Door' is Off //Only run if the lights weren't already on
   And Receive X10 House Code 'B'  Unit Code '2' Command '3 - On' //run upon receipt of the x10 trigger

Then
       Set 'Coach Lights @ Front Door' On //turn on the coach lights
       Run program 'Turn On Landscape' //test and turn on landscape lights
       Wait  5 minutes 
       Set 'Coach Lights @ Front Door' Off

Finally
  - No Actions - (To add one, press 'Action')

 

Turn On Landscape Program:

If
       Status  'Landscape Lights - Front/Left' is Off //if the landscape lights weren't already on

Then
       Set  Scene 'Landscape Lights' On
       Wait  5 minutes 
       Set  Scene 'Landscape Lights' Off

Finally
  - No Actions - (To add one, press 'Action')

 

My only concern is that when the Then starts running, it makes the If FALSE. Does this then cause the program to immediately BREAK and jump to the finally, never turning the light off?

Link to comment

I think this is what you are looking for ...

 

If the 'Outdoor Light' is off between 11pm and sunrise, and the X10 motion sensor is tripped, the lights will come on for 5 minutes. If the light is already on, it does nothing.

 

 

If
       From    11:00:00PM
       To      Sunrise (next day)
   And X10 'B.2 - On (3)' is Received
   And Status  'Outdoor Light' is Off

Then
       Run program 'Security Lights'

Else
  - No Actions - (To add one, press 'Action')

 

Program 'Security Lights'

If
  - No Conditions - (To add one, press 'Schedule' or 'Condition')

Then
       Set 'Outdoor Light' On
       Wait  5 minutes 
       Set 'Outdoor Light' Off

Else
  - No Actions - (To add one, press 'Action')

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...