Macro triggered again while is already running

Started by TomG, February 03, 2005, 10:16:52 PM

Previous topic - Next topic

TomG

I was not able to find a response in the
documentation to this - what is the
behaviour if a macro is triggered again
while is in progress:
a) the new trigger is ignored
b) a "new instance" of the macro is started
c) it gets restarted and current in
progress run abandoned?

If anybody has the answer I would
appreciate to know how it would work.

My specific example is a macro that does:
1) turn light on
2) wait 10 minutes
3) turn light off
In case above is triggered by a motion
sensor it will probably be triggered and re-
triggered as long as somebody is in the
room.
Should I expect that the light goes off 10
minutes after the 1st trigger or 10 minutes
after the last.

Henri T

Use a flags with smart macros ...

Example :

When the macro is triggered:
- test if flag 5 has a OFF status
Set the flag 5 ON
turn light on
wait 10 minutes
turn light off
At the end
clear the flag 5
Thank you !
:) Automation is funny with X10 Gadgets ! ;)

TomG

Thank you for the suggestion. But I want
the light to be turned off not 10 minutes
from the 1st trigger but 10 minutes from
the last trigger (last time movement was
detected).
From what I observed it seems that once the
macro is started it even if the triggering
event is happening it will not result in
the macro being restarted.

Anybody else can confirm that is the case?

SMF spam blocked by CleanTalk