Here's a scenario that comes up from time to time: you have a motion sensor that turns on/off a light, but you want it to NOT turn off the light when you turn the light on via the switch. There are many ways to accomplish this and we'll walk you through one example here. The level of difficulty of this how-to is moderate because of the number of parts that make up the solution.
Note: you can't use INSTEON links for this solution, so if you have your motion sensor linked directly to the switch controlling the light, you should remove those links before you get started.
First thing we want to do is configure the motion sensor correctly. In this case, we want Indigo to maintain an ON/OFF state for it. Select the Auto-Off duration accordingly:
Obviously, set X to be the number of minutes you want the delay to be. For an INSTEON motion sensor, you may also use the first option (“Immediately when OFF is received from module”) if you already have your motion sensor set up to do the appropriate delay.
The next thing you'll do is create a variable that will help you determine whether the switch was used manually to turn on the light. This will be used later when determining whether to turn the light off when the motion sensor goes off.
Variable List
from the Window
menuNew…
button at the top of the Variable List windowNow, we want to create several triggers: one that changes the value of the variable “MotionSensorOverride” to “true” when the light switch is turned ON manually, one that changes the value of the variable “MotionSensorOverride” to “false” when the light switch is turned OFF manually, one that triggers when the motion sensor goes ON and another that triggers when the motion sensor goes off.
Trigger Action List
from the View
menuNew…
button at the top of the main windowLight Turned ON
INSTEON Command Received
from the trigger Type
popupDevice
popupOn
from the Received:
popupX10 Command Received
from the trigger Type
popupDevice
popupOn
from the Received:
popupAction
tabModify Variable
from the action Type
popupVariable
popupSet to true
radio buttonOK
buttonTrigger Action List
from the View
menuNew…
button at the top of the main windowLight Turned OFF
INSTEON Command Received
from the trigger Type
popupDevice
popupOff
from the Received:
popupX10 Command Received
from the trigger Type
popupDevice
popupOff
from the Received:
popupAction
tabModify Variable
from the action Type
popupVariable
popupSet to false
radio buttonOK
buttonTrigger Action List
from the View
menuNew…
button at the top of the main windowMotion Detected
Device State Changed
from the trigger Type
popupDevice
popupBecomes On
from the popup below the Device's name.Action
tabControl Light / Appliance
from the action Type
popupTurn On
from the Action
popupDevice
popupOK
buttonNew…
button at the top of the main windowMotion Stopped
Device State Changed
from the trigger Type
popupDevice
popupBecomes Off
from the popup below the Device's name.Condition
tabif variable
radio buttonAction
tabControl Light / Appliance
from the action Type
popupTurn Off
from the Action
popupDevice
popupOK
button
That's it. So, let's review what this solution does. If you turn the light on via the switch, it sets “MotionSensorOverride” to true, signaling that the switch turned the light on (regardless of whether the light was already on). If you turn the light off, it sets MotionSensorOverride“ to false, signaling that the switch hasn't turned the light on. When Indigo sees that the motion sensor is detecting motion, it turns the light on. Here's the crucial step: when Indigo sees that motion is no longer being detected, it turns the light off only if the light wasn't turned on by the switch (by checking MotionSensorOverride”). Otherwise it just skips turning the light off.
One point about this solution: you must turn the light OFF via the switch if you turned it on via the switch. Otherwise, the motion sensor will never turn it back off.