Please login or register.

Login with username, password and session length

Author Topic: Purge pending Macros in a new macro  (Read 5343 times)

dabunsey

  • Newbie
  • Helpful Post Rating: 0
  • Posts: 4
Purge pending Macros in a new macro
« 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?
Logged

KDR

  • Hero Member
  • *****
  • Helpful Post Rating: 53
  • Posts: 758
    • Home Automation Chat
Re: Purge pending Macros in a new macro
« Reply #1 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
Logged
Note: "Guests" may read the X10 forum , but you must register to post!

When I'm online you can find me in the Home Automation Chat Room!

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Purge pending Macros in a new macro
« Reply #2 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
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Purge pending Macros in a new macro
« Reply #3 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.
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 282
  • Posts: 10497
  • I don't work for X10, I use it successfuly!
Re: Purge pending Macros in a new macro
« Reply #4 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 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.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

steven r

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 74
  • Posts: 2189
  • Halloween with X10
Re: Purge pending Macros in a new macro
« Reply #5 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.
  • At 2:00 M2 ON is triggered.
  • At 2:45 you change your mind and send a "M3 ON" to "cancel" the pending "ALL OFF"
  • At 2:50 you start a new M2 ON countdown
  • Since the first M2 ON macro hasn't expired it will still trigger M3 ON macro at 3:00. Since the second M2 ON macro has set flag 2 again, M3 ON macro will do an "ALL OFF"

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.
Logged
BVC let's me tell my camera where to go!
:) Murphy is my beta testing pal. He helps me find problems whether I like it or not. :)
 

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