X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: dabunsey on December 03, 2006, 11:58:53 PM

Title: Purge pending Macros in a new macro
Post by: dabunsey on December 03, 2006, 11:58:53 PM
How can I purge pending macros with a global "all codes off" macro?  If outstanding macros with an hour delay until "on" is still active and I want a global all units off (for several housecodes) command not to be overridden by the outstanding delayed macro, I would need to issue a "Purge delayed Macros" command at the beginning of the Global "All Units Off" macro.  How can I accomplish this?
Title: Re: Purge pending Macros in a new macro
Post by: KDR on December 04, 2006, 05:38:45 AM
dabunsey You can't issue a purge all running macros from another macro. In AHP under tools there is a menu selection called "Purge Delayed Macro Events". Selecting this will stop all time delayed macros that are running. Hope this helps
Title: Re: Purge pending Macros in a new macro
Post by: Tuicemen on December 04, 2006, 09:46:11 AM
Even if you could add a purge macro at the beginning of a macro it would also purge that one  so the "All lights off" command would never execute! ;) :D ;D
Many new users have problems writing macros and is many cause by not following logic!
This become even more nnoticeablewhen adding elses! ::) :( ;)
Creating macros is programing although simple programing! ;) :D
As one smart man once told me think it was -Bill-(of BXVC) "programing : you can't tell it to throw a ball with out telling it to pick up the ball first"[/b]
As KDR stated: you can purge but not within a macro
It would be like telling it " Drop the ball, now throw it!" [/color] ;) :D ;D
If x10 does add this option for AHP macros (and I doubt they will) it would have to be placed at the end of a macro string! ;) :D ;D
Title: Re: Purge pending Macros in a new macro
Post by: steven r on December 04, 2006, 01:03:14 PM
Even if you could add a purge macro at the beginning of a macro it would also purge that one...
While that would still be useful for many of the applications on my wish list, AHP just doesn't and most likely can't be programmed to do this.
dabunsey: The best "work around" is to use flags. I believe there have already been some good examples here. If you don't find any that help, let us know and maybe we can come up with an example.
Title: Re: Purge pending Macros in a new macro
Post by: Tuicemen on December 04, 2006, 01:35:41 PM
steven r:
True there are many work arounds posible but one to stop all macroc before running one can't be done! As yet!
How ever you can wait untill all macros have finish before running one with the use of flags & or dummy modules!

dabunsey: use the Advanced Search  (http://www.x10community.com/forums/index.php?action=search;advanced) when looking for macro examples then if not successful post exactly what your trying to do as steven r suggested.
Someone will have an idea for a work arround macro.
Title: Re: Purge pending Macros in a new macro
Post by: steven r on December 04, 2006, 03:05:38 PM
Ok here's a starting idea...

Prep: Make a dummy module M3

M2 ON macro (triggers on M2 on)
set flag 2 ON
delay 60 min
M3 ON (turns on dummy modal M3 on triggering M3 ON macro)

M3 ON macro (triggers on M3 on)
if flag 2 ON
ALL OFF
set flag 2 OFF

M4 ON macro ("cancels" pending "ALL OFF")
clear flag 2

This is far from a perfect solution, however. It work better in situations with shorter times. i.e. Longer times allow more potential for multiple count down macros such as "M2 ON" above.

The above will respond to earlier macros if a later macro is started.
e.g.

Multiple flags could help with multiply "count down macros" but for me it's more trouble than it's worth. My shut down macro dims key lights first. If I still get caught in the dark, one of my LED night lights will guide me to a switch.