Please login or register.

Login with username, password and session length

Author Topic: Simple way around macro timer conflicting with module timer?  (Read 5623 times)

bilyth

  • Full Member
  • ***
  • Helpful Post Rating: 2
  • Posts: 63

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.
Logged

Puck

  • Advanced Member
  • Hero Member
  • ******
  • Helpful Post Rating: 171
  • Posts: 1799
Re: Simple way around macro timer conflicting with module timer?
« Reply #1 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).
Logged

bilyth

  • Full Member
  • ***
  • Helpful Post Rating: 2
  • Posts: 63
Re: Simple way around macro timer conflicting with module timer?
« Reply #2 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!
Logged
 

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