Please login or register.

Login with username, password and session length

Author Topic: Two motion detectors - one light  (Read 9288 times)

hrafn

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Two motion detectors - one light
« on: August 29, 2009, 08:04:30 AM »

Please help a newbie...

I have two motion sensors, one at the top of my outside stairs, and one at the bottom. 
I need to control a single set of low voltage lights so that they turn on when motion is
detected on either sensor, then wait 15 minutes, and finally turn off.  Simple enough, right?

What I need, however, is the 15 minute delay to start from the time the last sensor is
triggered.  For example:  I am at the top of the stairs (upper sensor is triggered) and I fool
around for 13 minutes, then go down the stairs (lower sensor is triggered).  The lights turn
off 2 minutes later rather than the desired 15 minutes. 

Hope I am not  >*<
Logged

Dan Lawrence

  • Hero Member
  • *****
  • Helpful Post Rating: 68
  • Posts: 3991
Re: Two motion detectors - one light
« Reply #1 on: August 29, 2009, 09:23:17 AM »

I'm wondering if the 2 motion detectors are too close together?  They may be interfering with each other.
Logged
I don't SELL this stuff... BUT I sure do ENJOY using it!!!

dave w

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 139
  • Posts: 6116
Re: Two motion detectors - one light
« Reply #2 on: August 29, 2009, 10:36:17 AM »

 I don't use AHP but try this:
Both motion sensors should be on seperate HCUC. Set a flag (or use  vitural modules) when either MS is triggered. Reset each flag with a 15 minute timer. Use conditionals to keep the light ON until BOTH flags have reset.

« Last Edit: August 29, 2009, 01:04:48 PM by dave w »
Logged
"This aftershave makes me look fat"

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Two motion detectors - one light
« Reply #3 on: August 29, 2009, 03:47:36 PM »

Welcome to the forum hrafn.

My first question when reading this is why would you want the lights to turn off based on an elapsed time after motion is detected as opposed to an elapsed time after no motion has been detected? If you add a delay and then an off signal inside the on macro, you cannot prevent it from turning the light off when you don't want it to.

As dave w has suggested, use different X10 addresses for each motion sensor so they can have their own macros. I recommend using 2 flags (one for each motion sensor) and have each macro take control of the light by setting its flag and clearing the other motion sensor's flag.

Set the desired off delay for each motion sensor and use their off signals to trigger macros as well. These off signal macros will first check to see if its assigned flag is set (i.e. still in control) before it turns off the light.

You probably also want to throw another condition in there so the lights only come on at night.
Logged

hrafn

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: Two motion detectors - one light
« Reply #4 on: August 29, 2009, 04:34:21 PM »

I'm wondering if the 2 motion detectors are too close together?  They may be interfering with each other.
Nope, one is around a corner from the other.

I don't use AHP but try this:
Both motion sensors should be on seperate HCUC. Set a flag (or use  vitural modules) when either MS is triggered. Reset each flag with a 15 minute timer. Use conditionals to keep the light ON until BOTH flags have reset.
Each sensor has it's own unique address.

Welcome to the forum hrafn.

My first question when reading this is why would you want the lights to turn off based on an elapsed time after motion is detected as opposed to an elapsed time after no motion has been detected? If you add a delay and then an off signal inside the on macro, you cannot prevent it from turning the light off when you don't want it to.
Okay, how do I do that?  I am using Stanley motion sensors (without the lights) similar to the PR511 or PHS01.  The MS will send an ON signal and an OFF signal (if using the built in delay).  I am only using the ON signals.

You probably also want to throw another condition in there so the lights only come on at night.
Thanks.  I already have that.  I assumed that was understood...

Thanks for the help.
Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Two motion detectors - one light
« Reply #5 on: August 29, 2009, 05:22:16 PM »

Okay, how do I do that?  I am using Stanley motion sensors (without the lights) similar to the PR511 or PHS01.  The MS will send an ON signal and an OFF signal (if using the built in delay).  I am only using the ON signals.

Set the motion sensors to the off delay you want. Then these macros will hand control back and forth to the most current motion sensor triggered.

Macro1: MS1 ON
If Flag 1 is cleared and Nighttime
 Set Flag 1
 Clear Flag 2
 Turn light ON

Macro2: MS2 ON
If Flag 2 is cleared and Nighttime
 Set Flag 2
 Clear Flag 1
 Turn Light ON

Macro3: MS1 OFF
If Flag 1 is set
 Clear Flag 1
 Turn Light OFF

Macro4: MS2 OFF
If Flag 2 is set
 Clear Flag 2
 Turn Light OFF
Logged

hrafn

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 3
Re: Two motion detectors - one light
« Reply #6 on: August 29, 2009, 05:34:12 PM »

Got it !!!  Many thanks.
Logged
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.