X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: frustrated123 on May 20, 2010, 02:45:02 PM

Title: macro triggered by motion sensor.....need help!
Post by: frustrated123 on May 20, 2010, 02:45:02 PM
I want to trigger a macro when a motion sensor detects motion........should be simple but i'm having trouble.
Should the address of the motion sensor be the address in the "trigger" field??
Something isn't working right.
btw.........i have 2 motion sensors, placed in diff parts of the house......they each show up as having diff addresses in AHP
i want to use each for a diff macro, obviously.
thx for your help!
Title: Re: macro triggered by motion sensor.....need help!
Post by: Mel99 on May 20, 2010, 03:00:38 PM
I have a simple macro that turns a light on when someone enters the room -

Motion sensor - M1
Lights - M4


Lights on Macro
Trigger - M1
'On' button selected
Lights M4 On

This macro does other things in the room, but the above does work.


Another macro turns the lights off when the motion sensor sends the off signal

Lights off Macro
Trigger M1
'Off' button selected
Lights M4 Off

Post a sample of your code, it might help troubleshoot.

Hope this helps.

Mel
Title: Re: macro triggered by motion sensor.....need help!
Post by: glacier991 on May 22, 2010, 03:55:14 PM
What kind of motion sensor are you wanting to use? I think that is the first Q. If is it a ActiveEye, hawkeye or something similar where you set the address and unit code, it's pretty straightforward. If it is a security sensor, then that is a different approach. Those use "Security" as the trigger and then you select the sensor from a drop down pick list in your macro maker.
Title: Re: macro triggered by motion sensor.....need help!
Post by: oeginc on September 04, 2010, 09:43:51 AM
I am trying to do the same thing as the OP (I believe), I want a set of lights (currently controlled by an appliance module) to come on when I enter the office, stay on for as long as I am in the office, and then shut off when I leave the office.

When using the MS16a, I created a set of macros (exactly like Mel99 did above) and it was working great.  I have since switched my sensors around a little bit and I'm now using MS14a sensors.  The MS14's don't appear to have the delay that the MS16's did (which essentially said "If I detect motion, delay for x minutes from now then shut off" and since it kept detecting motion within that timeframe, the lights didn't shut off until motion was NOT detected for more than x minutes.  EXACTLY what I wanted...

With the MS14's however, it appears that they send an ON signal when motion is detected followed immediately by an OFF signal.  I tried a macro that would turn on the appliance module when motion detected, wait 5 minutes and then turn it off, however my lights would blink on and off (It appears that the "delay" doesn't get reset when motion is detected, it just keeps delaying and the new motion causes a new copy of the macro to run so eventually I have several of the same macro running, motion gets detected and turns the lights on, then the delay finishes and turns the lights off almost immediately).

Title: Re: macro triggered by motion sensor.....need help!
Post by: dave w on September 04, 2010, 10:05:26 AM
I am trying to do the same thing as the OP (I believe), I want a set of lights (currently controlled by an appliance module) to come on when I enter the office, stay on for as long as I am in the office, and then shut off when I leave the office.

The MS14's don't appear to have the delay that the MS16's did (which essentially said "If I detect motion, delay for x minutes from now then shut off" and since it kept detecting motion within that timeframe, the lights didn't shut off until motion was NOT detected for more than x minutes.  EXACTLY what I wanted...




ftp://ftp.x10.com/pub/manuals/ms13a-ms14a-is.pdf

MS14 delay is programmable.
Title: Re: macro triggered by motion sensor.....need help!
Post by: jvar on September 08, 2010, 04:36:22 PM
Help for newbee's on macro's controlled by motion sensor's ........
First -program your motion sensor to send it's off at 4 hours or more .( we want the off macro to control the off time . )
macro ?4 on  , condition ( check that the status of the light you want to turn on  must be off for the macro to run.
this keeps the macro from running again after the light turns on. ( make sure if you use more than one condition for the macro to run that the light status in the first entry .) I set flag 12 in a dusk macro and use that flag if i only want the macro to run at night. ( don,t forget to reset flag in the dawn macro ) here is a working set of macro's to give you the idea.
Macro B4 ON
conditions:  light c3 off , flag 12 set
turn C3 ON , end program
for the macro that turns the light off when you leave .
Macro B4 OFF
onditions: light c3 on , flag 12 set
program: C3 OFF , end program    note: C is the monitored house code & make sure the motion sensor is set in a place where it will only see motion when you enter and leave only , but not while you are in the room . Hope this helps JVAR