Please login or register.

Login with username, password and session length

Author Topic: Controling light with motion detector not triggering macro multiple times???  (Read 2185 times)

Ericmil8

  • Newbie
  • Helpful Post Rating: 5
  • Posts: 3

I'm having issues with coming up with a macro used with motion sensors. this is what i would like to do with the macro.

when motion is detected (A15) i would like lights (P4) on to 100% for 30 seconds, then Dim to 25% for 30 seconds then turn off. However if motion it detected again i would wait the 30 seconds from then, then dim and then 30 seconds later turn off.

the issue I'm having right now is if the trigger is detected again(A15) before the macro is done it starts running a second copy of the macro. so there are Multiple dim and off commands being generated.

Any ideas?
« Last Edit: August 10, 2009, 05:46:20 PM by Ericmil8 »
Logged

hawk1

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 625

There are probably many ways to do this.  But to start with the problem your having right now:  Use a flag status in your macro.  Something like this: (doesn't have to be exactly like this, just an example)

A15-trigger
check flag status clear-condition
set flag 2
P4 on
delay 30 sec
dim P4 25%
delay 30 sec
P4 off
clear flag 2

that should keep it from firing again.  Then you can work on the other stuff.
Logged
koopr@sstelco.com, I don't know what I'm doin but I'm havin fun doin it!
 

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