X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: mrfixup on April 12, 2011, 07:03:38 PM

Title: Can you cancel a macro with another macro?
Post by: mrfixup on April 12, 2011, 07:03:38 PM
I have a bathroom exhaust fan remotely ducted to my shower. I've written a smart macro to control the fan with the shower (I have a flow switch in the cold water line).  Here's my question - When the shower starts, I have the macro always turn the fan off. When it stops, it waits 2 minutes and then turns the fan on for 20 minutes. However, if the shower is turned on again, the fan will stop as planned. When you stop the shower, the macro triggers again and the 2min delay and 20 minutes start over. How do I stop the first shutdown macro from running after the second shutdown macro is started?
Title: Re: Can you cancel a macro with another macro?
Post by: bkenobi on May 03, 2011, 12:23:04 PM
You might have to use a flag and check that the flag isn't still set during your delay so that it doesn't run the macro you are trying to keep from running.  Puck wrote a nice example that I'm planning on using for a chime delay (so the chime only runs once every xx minutes rather than every detected motion).

http://forums.x10.com/index.php?topic=14775.0