AHP 3.304
OnAlert plugin required
Runs from the pc
These macros will turn on my living room ceiling light (if it is off) when the front door is opened and it is nighttime. Then it will turn the light off 10 seconds after the door is closed. If the light was already on prior to the front door opening, then I didn't want the light to turn off when the door is closed. In other words, if the light is on when the door is opened, no need to turn it on. And is the light was already on I don't want the light to turn off when I close the door.
I'm using a DS10A door/window sensor programmed in the console and ahp using the trigger event to turn the light on and the close event to turn the light off. Because I'm using the security sensor the whole process of macros must run from the pc. Also, since you cannot use conditions in macros triggered by security devices, I'm using a phantom appliance module.
Phantom Module:
P1 using AM486
Macro 1:
Frt Door Open Light On
Trigger & Conditions:
Front Door Zone 1 - Sensor Triggered
Actions:
Turn Phantom Module P1 ON
Macro 2:
Frt Door Closed Light Off
Trigger & Conditions:
Front Door Zone 1 - Sensor Closed
Actions:
Turn Phantom Module P1 OFF
Macro 3:
Frt Door Open Light On 2
Trigger & Conditions:
P1 On and
Module Status Off - F9 and
It's nighttime
Actions:
Set Flags [1]
Turn Living Room Ceiling Light ON
Macro 4:
Frt Door Closed Light Off 2
Trigger & Conditions:
P1 Off and
Flag Status On - 1
Actions:
Wait for 10 Seconds
Turn Living Room Ceiling Light OFF
Clear Flags [1]