Running two macros with one trigger

Started by thejfk, October 11, 2008, 02:07:09 PM

Previous topic - Next topic

steven r

Quote from: thejfk on October 12, 2008, 02:22:32 AM
...
Macro 1: Driveway lights A2-A3 triggered by eagle eye A10 from dusk to dawn
Macro 2: living room lights triggered by A10 from 8:00pm to 11:00pm...
...
Ok I'd recommend a macro (A10) with two elses. I'll leave the coding to you but basically you need to make 3 tests in this order.

  • If the time is between 8:00pm to 11:00pm and  is between dusk to dawn. - Then turn on the driveway lights and the living room lights.
  • Else If time is between 8:00pm to 11:00pm.  - Then turn on living room lights.
  • Else If time is from dusk to dawn - Then turn on driveway lights.
Do NOT start any of them with a delay.
That should work as well as keep it simple.
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. :)

thejfk

Thanks Steven.
I set it up the way you suggested and it works fine,but I found another glitch(I'm sure you guys already know)
On the driveway lights only (skipping the else's and living room lights altogether)
I used 2 conditions..."after dusk AND before dawn" The activity monitor showed the A10 trigger but no activation of the A3-A4 lights.
When I changed to 1 condition "between dusk and dawn" everything works fine.
I switched back and forth several times to confirm this and every time I got the same result...apparently "after dusk and before dawn" is not the same as "between dusk and dawn"

steven r

Quote from: thejfk on October 12, 2008, 11:10:08 PM
...apparently "after dusk and before dawn" is not the same as "between dusk and dawn"
I have to think it through each time. It helps if you realize AHP makes it's calculations based on a day being from 12:00:01am to 12:00:00pm so "after dusk and before dawn" never happens in the same day. Actually I'm not sure if midnight starts or ends the day but you get the idea. I stay away from using midnight in any of my timers.
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. :)

SMF spam blocked by CleanTalk