Jump to content

X10 driveway motion program


MikeB

Recommended Posts

Posted

I have a wireless X10 motion that I'd like to use for my driveway lights.

 

The motion sensor will send X10 B1 ON when it is dark outside and motion is detected. It will send X10 B1 OFF when no motion is detected for 1 minute, but I'm ignoring the OFF command.

 

I created a program to do the following:

 

If
       X10 'B1/On (3)' is Received
   And Status  'FoyerControls1A-Driveway' is Off

Then
       Set  Scene 'Driveway' On
       Wait  5 minutes 
       Set  Scene 'Driveway' Off

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

 

 

I included the "And Status 'FoyerControls1A-Driveway' is Off" because I don't want this program to run if the driveway lights are already on.

 

The program runs when motion is detected, the driveway lights go on, but the program then ends and the lights never go off. I believe this is because once the lights go on, the 2nd IF statement is no longer true.

 

Is this correct?

 

If so, can anyone think of a way around this?

 

Thanks!!!

Posted

Hi Mike,

 

You can use two programs to accomplish this. Basically by running a separate program, it won't be stopped like the 'Then' would be when the condition changes.

 

Program 1:

If 
       X10 'B1/On (3)' is Received 
   And Status  'FoyerControls1A-Driveway' is Off 

Then 
       Run Program 'Program 2'

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

 

Program 2:

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

Then 
       Set  Scene 'Driveway' On 
       Wait  5 minutes 
       Set  Scene 'Driveway' Off 

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

Posted

I have three lights I'd like to "check" before I cycle on and off:

 

Coach Lights

Flood Lights

Landscape Lights

 

So If any one of 3 motion sensors (B2, B4, B6) is tripped, I'd like to turn all three of these lights on, wait 5 minutes and turn them off, ONLY if they weren't ALREADY on.

 

So, can I move the status check to the sub-program(s), like this:

 

(Master) Program Motion Tripped:

If
       X10 'B2/On (3)' is Received
    Or X10 'B4/On (3)' is Received
    Or X10 'B6/On (3)' is Received

Then
       Run program 'Cycle Coachlights'
       Run program 'Cycle Floods'
       Run program 'Cycle Landscape'

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

 

Program Cycle Coachlights:

If
       Status  'Coach Lights @ Front Door' is Off

Then
       Set  Scene 'Alarm Coach Lights' On
       Wait  5 minutes 
       Set  Scene 'Alarm Coach Lights' Off

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

 

Program Cycle Floods:

If
       Status  'Outside Floods @ Master Door' is Off

Then
       Set  Scene 'Alarm Floods' On
       Wait  5 minutes 
       Set  Scene 'Alarm Floods' Off

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

 

Program Cycle Landscape:

If
       Status  'Landscape Lights - Pool' is Off

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

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

 

?

 

If all of the conditionals must be checked before the "actions" program is run, this gets to be a lot of programs cascaded together to make this happen. If the above will work, then it stays pretty clean.

 

Thanks!

Posted

I don't think that will work because, for example, the instant you set "Alarm Coach Lights" ON, the status of "Coach Lights @ Front Door" is no longer OFF, and the sub-program will stop running.

Posted

ahhh ... yes, I see.

 

I guess I'll end up with multiple programs "listening" for the same X10 signal to run. I assume this is okay? Three programs will be triggered to start at the same time ... will they play nicely trying to send their commands simultaneously?

Posted

When you 'Run' a program explicitly from another program, it does not test the conditions of the program being run, instead, it immediately sets the Program to True and runs the the 'Then' actions (or sets the Program to False and runs the 'Else' actions if you used 'Run Else'). If you explicitly 'Stop' a program, the program 'Then' or 'Else' actions are stopped, but the program True/False state is not changed.

 

Having mulitple programs listen for the same X10 signal (or any other event) is fine; its designed for this.

 

Getting a barrage of commands all at once is fine, again, its designed for this. We put the commands on a queue, and just run the commands one by one until the queue is empty.

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.


×
×
  • Create New...