Narrative:AHP 3.228
Runs from the interface or PC (users choice).
The following macros can be used to detect the direction on motion and turn on the appropriate light. This setup uses 2 motion detectors (one at the top of a staircase and the other at the bottom).
I use this setup to temporarily turn on my downstairs hallway light or my upstairs hallway light. I use the motion sensors OFF signals (set to 2 minutes) to turn off the light. My hallway lights are not normally left on for long term lighting, that is why I have the macros turn them off after 2 minutes.
The following Modules are used:UpstairsHallLight: wall switch
DownstairsHallLight: wall switch
UpstairsMotion: L13
DownstairsMotion: L15
The following Status Flags are used:Flag 2: When Cleared (OFF) indicates nighttime (see:
Daytime / Nighttime Timer Flag Macro)
Flag 7: Set (ON) when motion is detected Upstairs
Flag 8: Set (ON) when motion is detected Downstairs
Create the following 6 Macros: * Macro 1 Name: UpstairsMotion1
Trigger: L13 ON
Condition(s): Flag Status Off - 2, 7, 8
Action(s): Set Flags [7]
* Macro 2 Name: UpstairsMotion2
Trigger: L13 ON
Condition(s): Flag Status Off - 2, 7
Flag Status On - 8
Action(s): Turn UpstairsHallLight ON
Set Flags [7]
Macro 3 Name: UpstairsMotionOFF
Trigger: L13 OFF
Condition(s): Flag Status On - 7
Action(s): Turn UpstairsHallLight OFF
Clear Flags [7]
** Macro 4 Name: DownstairsMotion1
Trigger: L15 ON
Condition(s): Flag Status Off - 2, 7, 8
Action(s): Set Flags [8]
** Macro 5 Name: DownstairsMotion2
Trigger: L15 ON
Condition(s): Flag Status Off - 2, 8
Flag Status On - 7
Action(s): Turn DownstairsHallLight ON
Set Flags [8]
Macro 6 Name: DownstairsMotionOFF
Trigger: L15 OFF
Condition(s): Flag Status On - 8
Action(s): Turn DownstairsHallLight OFF
Clear Flags [8]
Notes:* These 2 macros will form an ELSE
** These 2 macros will form an ELSE