One Shot Macro

Started by bsmurph, February 07, 2010, 11:15:14 PM

Previous topic - Next topic

bsmurph

How do you make a one shot Macro????

P1 Motion trigger B4
Kitchen lights on 30%
delay 30 sec..
Brighten 15%
delay 30 sec.
Brighten 15%
Rub my eyes and say good morning

Works great until P1 is triggered again then it starts all over again!!!!?
How can I make it only trigger one time?

Thanks Murph! B:(

dbemowsk

Quote from: bsmurph on February 07, 2010, 11:15:14 PM
How do you make a one shot Macro????

P1 Motion trigger B4
Kitchen lights on 30%
delay 30 sec..
Brighten 15%
delay 30 sec.
Brighten 15%
Rub my eyes and say good morning

Works great until P1 is triggered again then it starts all over again!!!!?
How can I make it only trigger one time?

Thanks Murph! B:(

Try using an if-then condition with a flag

if flag (whatever flag # you choose, 1 - 16) off and P1 Motion trigger B4
    set flag (whatever flag # you choose) on
    Kitchen lights on 30%
    delay 30 sec..
    Brighten 15%
    delay 30 sec.
    Brighten 15%

At a later time, set flag (whatever flag # you choose) off.  Using the flag lets you choose when the macro will run based on the status of the flag.

Dan B.
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.

bsmurph

I tried to do it with another Marco that time out in 1hr and reset the flag but it seemed like it only timed for ten minutes and restarted. Maybe I will have one reset the flag only when the B4 switch is turned OFF.... 

dbemowsk

If you are running the macro with a timer, just set another timer that will run a second macro to reset the flag one hour after running the one shot macro.  Unless the B4 switch is a transmitting switch, AHP may not recognize it if it is manually turned off.

Dan B.
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.

SMF spam blocked by CleanTalk