Two motion detectors - one light

Started by hrafn, August 29, 2009, 08:04:30 AM

Previous topic - Next topic

hrafn

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  >*<

Dan Lawrence

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

dave w

#2
 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.

"This aftershave makes me look fat"

Puck

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.

hrafn

Quote from: Dan Lawrence 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.
Nope, one is around a corner from the other.

Quote from: dave w 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.
Each sensor has it's own unique address.

Quote from: Puck 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.
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.

Quote from: Puck on August 29, 2009, 03:47:36 PM
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.

Puck

Quote from: hrafn on August 29, 2009, 04:34:21 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

hrafn


SMF spam blocked by CleanTalk