Jump to content

Motion Sensor IF program


sceaton

Recommended Posts

Posted

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?

Posted

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')

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...