Please login or register.

Login with username, password and session length

Author Topic: One Shot Macro  (Read 6246 times)

bsmurph

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
One Shot Macro
« 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:(
Logged

dbemowsk

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 428
    • PHP Web Scripting
Re: One Shot Macro
« Reply #1 on: February 07, 2010, 11:38:01 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.
Logged
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.

bsmurph

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Re: One Shot Macro
« Reply #2 on: February 08, 2010, 06:48:27 PM »

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.... 
Logged

dbemowsk

  • Hero Member
  • *****
  • Helpful Post Rating: 21
  • Posts: 428
    • PHP Web Scripting
Re: One Shot Macro
« Reply #3 on: February 08, 2010, 07:11:08 PM »

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.
Logged
Dan Bemowski
Owner of PHP Web Scripting LLC
Programmer of RemoteWatch X10
User of any X10 products I can get my hands on.
 

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