“Conditions” for MACROS
Flags & Monitored Devices
“Is that light On or Off?” “Is my garage door closed?” “Did my son raid my liquor cabinet?”
There are times when you want to know the status of a module or if an event has taken place. With the standard AHP setup you can keep track of, and query the system for answers.
There are three (3) functionalities for monitoring the status of things (not counting 2-way modules). They are “FLAGS”, devices on “Monitored” HouseCoded (H/C), and sensors installed as “Security Devices.”
There are 16 FLAGS available for each CM15A connected to your system. They’re numbered 1 through 16, and their status is either “SET” or “CLEAR”. Only MACROs can change the status of flags. The dialog boxes for flags allow you to Check, Set, or Clear the status of any number of the 16 flags at the same time.
When using FLAGS for CONDITIONS in a macro (remember, you can have only 3 conditions) FLAGS are evaluated in groups of up to 16. E.g., you can create a macro that has the condition:
IF FLAGs 1, 3, 5, and 11 are SET
Action: Do something
EndIf
Or you could test only 1 flag:
If FLAG 1 is SET
Action: Do Something
EndIf
Or you can use 2 of the 3 conditionals, as in:
If FLAGS 1, 2, 4, and 7 are SET
AndIF FLAGs 3,5, and 12 are CLEAR
Action: Do something
EndIf
The action of the macro can include SETting or CLEARing flags; again in groups of up to 16 at a time.
Action: SET Flags 8, 9 and 10
FLAGS cannot “cause” an action, they can be used only as conditions.
MONITORED HouseCode –
Monitored modules can do both – they can be used as conditions, AND they can initiate an action via MACROs.
In AHP, under TOOLS, there’s an item named “Hardware Configuration.” The hardware it’s referring to is the CM15A.
The ON-or-OFF state of up to 16 modules assigned to a single H/C is maintained and stored within the CM15A. That “MONITORED” H/C is set by you the user. By default, AHP selects the H/C to which the majority of modules are addressed, and every time you download to the CM15A, if your selected H/C is not the one most used, the software prompts you to allow it to change to the one most used. (That’s a prompt I’d like to be able to turn OFF)
Any module that can be addressed can be monitored. Lamps only report (for condition purposes) On or Off – not their DIM status.
For example – Suppose you had a motion sensor “H2” triggering a macro to turn on a room light “L1” – and “L” is the monitored H/C. You wouldn’t want the macro to clutter the powerline with un-needed PLCs, so you can use the state of L1 as a condition.
Macro Name: Den Light by Motion
Trigger: H2-ON – Sent whenever the Motion Sensor H2 senses motion
Condition: If L1 (Hall Light) is OFF
Action: Set L1-On to 47% (Turn on the light and DIM it to 47%)
EndIf
EndMacro Den Light by Motion
Security Devices –
With the OnAlert plugin, you gain not the ability to trigger macros by the security motion detectors and other sensors, but you also can use their status as a condition in a macro. To use them as a trigger, they have to be installed; to use their state as a condition, you must check the box to install them as a Security Device [add pic] when you do the install.
As a trigger:
Macro Name: Hall Light by Motion
Trigger: HallMotionSensor – Motion Detected – Sent whenever the Motion Sensor (MS10A) triggers
Action: Set L1-On to 47% (Turn on the light and DIM it to 47%)
EndIf
EndMacro Hall Light by Motion
As a condition:
Macro Name: Chime by Back Door
Trigger: H3-On (BackDoor EagleEye)
Condition: If BackDoor is CLOSED (DS10A installed as a Security Device)
Action: Set L2-On (Sound Chime)
EndIf
EndMacro Chime by Back Door