Please login or register.

Login with username, password and session length

Author Topic: Overnight macros  (Read 6284 times)

Mike79

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Overnight macros
« on: November 03, 2011, 01:39:04 PM »

All,

I have read, on this forum, that I might run into an issue with a conditional macro with "time range" if it involves after midnight. I want to turn on outside lights brighter than normal after 10pm to dawn if motion is present. I also want to use a flag that will stop the macro from running if I have guests leaving after 10pm. SO with that said, my macro conditions need flag status and after 10pm and before dawn, but I can't find a scheme that will allow 3 "ands". The closest one is flag set and "if time is between" but will that work if set to 10pm and dawn?

Thanks
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Overnight macros
« Reply #1 on: November 03, 2011, 01:54:12 PM »

I know there were some issues early on with conditional times crossing midnight, but from what others tell me, that was resolved a long time ago.

There are a few ways to solve this:
1) Try the "if time is between" condition (Which uses two of the three slots) along with the flag condition. You could always test to see if that works. That is probably the simplest way to go. Just make sure to set the condition to be "between 10:00 PM and DAWN," and not "Between DAWN and 10:00 PM".

2) Create two macros, triggered by the same housecode/unitcode combination. AHP will automatically turn them into a set of If-Then-Else conditions, and you can re-arrange the tabs to adjust the order of operations. The first one would be "if time is after 10:00 pm AND flag is set (or not set - easier to use the flag ONLY when you want to bypass the normal activity - create a macro to set the flag when needed, and clear it after the guests leave). The second macro would be "if time is before DAWN, and flag is set (or not set - see above). both macros will do the same thing (brighten the lights, etc), but only one of them will run, at most. If neither one has all TRUE conditions (like during the day, or if you set the flag to indicate you have company), then nothing will happen.

3) Create a few macros:
a. Sets a flag (ex: flag 2) (called from a timer at 10 PM)
b. Clears the same flag (#2) (called from a timer at DAWN)
c. Macro that turns the light up to full brightness, sounds the alarm, turns on the coffeemaker, etc (called from the motion sensor, has a condition that the flag (#2) is SET.
You could then use a PalmPad or some other method to run macro "b" to clear the flag if you have company coming, and re-set it when they leave.
If you want to get really fancy, you could have macro "a" have a condition of its own, and only run if a different flag (ex: #3) is OFF. that way, you could have a macro to set flag #3 ON at 6 PM (before the company arrives), and not have to remember to run macro "b" after 10 PM.

Good luck.
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Overnight macros
« Reply #2 on: November 03, 2011, 01:57:07 PM »

I forgot to add:
If you use a flag condition to indicate the time is between 10 pm and midnight, then you can have other macros that also use this as a condition (other lights, chimes, coffeemaker, etc).

I'm sure there are plenty of other ways to do it that are MORE complicated than these, but couldn't think of any offhand. ;)
Logged

Mike79

  • Jr. Member
  • **
  • Helpful Post Rating: 0
  • Posts: 13
Re: Overnight macros
« Reply #3 on: November 05, 2011, 11:16:37 AM »

Noam or anyone,

This is the results of the test. I followed your 1st way to fix the issue and the following is what I have setup. I use a remote to turn (c16) on or "set" flag 2 via c16 macro. C16 off "clears" the flag 2. I have all my macros for each motion detector look to see if flag 2 is "set" before turning on flood lights. I checked the lights after 10pm by setting off the motion detectors and the lights came on. I then, by remote, turned off C16 to "clear" the flag 2. I then set off the motion detector's and the lights didn't come on.  :) After midnight I tested and the floods did come on without changing the flag 2 (I have to assume that the flag was still cleared from two hours earlier).

My question is...

The macro I used to set or clear the flag that you helped me with is just for that set or clear. So after midnight is not an issue.  If the motion sensor worked after midnight it is like the flag was set after midnight or the motion macros for each motion detector is the issue. Those motion macros look for "flag 2 set, and if the time is between 10pm and dawn. Could it be the motion macros, the flag set or clear macro, or the flag just getting reset after midnight? I don't know how to check flag status since there was no activity in the monitor at midnight.

Thanks
Logged

Noam

  • Community Organizer
  • Hero Member
  • ***
  • Helpful Post Rating: 51
  • Posts: 2818
Re: Overnight macros
« Reply #4 on: November 05, 2011, 08:07:13 PM »

You can check flag status any time by pressing F3 in AHP, which opens the status page. You should see the flag status listed there.
Logged
 

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