X10 Community Forum

🖥️ActiveHome Pro => Plug-ins => Smart Macros => Topic started by: bilyth on July 21, 2008, 03:48:45 PM

Title: Simple way around macro timer conflicting with module timer?
Post by: bilyth on July 21, 2008, 03:48:45 PM
I have a module that controls an aquarium light. I have the module set on a timer to turn on between 7:55-8:05 during which time the automatic feeder will feed the fish.

I also wanted to have the light come on 30 min before dusk & remain on for 3 hours then turn off. The way I managed this is i created a macro that simply turns on, delays for 3 hrs, then goes off & setting a timer to this macro as 30 min before dusk.

Now, however. The macro timer is turning on within that 7:55-8:05 pm window such that the module timer turns the light off at 8:05pm for the rest of the night.

Is there a simple way to fix this issue (or do things differently). It's not a huge deal..& probably will only be a problem for few weeks. I could just changed the 30min pre dawn to say..20 min..but i'd rather have a set up where i don't have to adjust things around depending on time of year.

One solution i think is possible is to instead- create a looping "on" macro every few minutes..so even if the module timer turns it off..eventually the looping macro will turn it back on for x hours...but it seems like too much of a pain to set up..i might as well just change the pre-dawn time period.

thanks.
Title: Re: Simple way around macro timer conflicting with module timer?
Post by: Puck on July 21, 2008, 04:01:57 PM
You could place your 7:55-8:05 in a macro to be called from a timer as well, and use a status flag to prevent it from running if the 30 minutes before dusk macro is currently running.

Only problem would be when the 30 minutes before dusk appears within the 7:55-8:05 time frame. To get around this, you could use separate ON (7:55) & OFF (8:05) macros triggered by timers and just have the OFF one not run if the 30 minutes before dusk occurs prior to 8:05 (via a status flag).
Title: Re: Simple way around macro timer conflicting with module timer?
Post by: bilyth on July 21, 2008, 10:14:21 PM
You could place your 7:55-8:05 in a macro to be called from a timer as well, and use a status flag to prevent it from running if the 30 minutes before dusk macro is currently running.

Only problem would be when the 30 minutes before dusk appears within the 7:55-8:05 time frame. To get around this, you could use separate ON (7:55) & OFF (8:05) macros triggered by timers and just have the OFF one not run if the 30 minutes before dusk occurs prior to 8:05 (via a status flag).


Thanks! I think that will work. I made the changes..so basically a macro for ON & a macro for OFF with condition that flag "x" is off. I also changed the 3 hr light macro to set a flag at the beginning & then clear it at the end. So, the OFF macro should not trigger if the flag is set...

i'll see how it works tomorrow. thanks!