Narrative:
AHP 3.206
Runs from the interface or PC (users choice), however some people have reported problems when using Flags spanning between the interface Macros & PC Macros.
Suggestion: where ever the majority of your Macros that you plan to use this Flag reside, store these Macros & Timer in the same location.
Q: Why would you want to make a Macro with a timer to set a Flag for daytime / nighttime when those condition options are already available?
A: Because: 1) Flag conditions take less time to process than time conditions. 2) If you use it by itself it only uses 1 of the 3 Macro conditions allowed (time conditions require 2); if you are using other Flag conditions, then it usually slips right in without adding another condition.
1) Create a dummy appliance switch: A2 Daytime
2) Create the following 2 Macros:
Macro Name:
DaytimeON
Trigger:
A2 ON
Action(s):
Set Flags [2]
Macro Name:
DaytimeOFF
Trigger:
A2 OFF
Action(s):
Clear Flags [2]
3) Create a Timer for switch A2: to turn ON at Dawn & OFF at Dusk Daily.
Additional notes:
At Dawn, the Timer turns switch A2 ON and triggers the associated Macro DaytimeON; this Macro Sets Flag 2.
At Dusk, the Time turns switch A2 OFF and triggers the associated Macro DaytimeOFF this Macro Clears Flag 2.
Now in any macros you write and want it to only execute during the daytime, use the Flag Condition to check if Flag 2 is Set. For nighttime macros, check for Flag 2 to be Cleared.
As with all examples, the Names, X10 Addresses and Flag numbers used are changeable.
This is a simple Macro; and as your other Macros become more complex, a single flag representing daytime & nighttime helps a lot with the limited number of conditions per Macro.
As I add more Macro examples to this section, most of them will reference this Flag 2 in their conditions.