Overriding a Motion Sensor OFF when a switch is pressed
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.
What's Needed
- A motion sensor - any type will do
- A switch that controls the light - any Insteon switch or any 2-way X10 switch will work
Configure the Motion Sensor
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:
- For an Insteon motion sensor: “After a delay of X minutes from when the module last sent OFF”
- For an X10 motion sensor: “After delay of X minutes from when the module last sent ON”
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.
Create an override Variable
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.
- Select
Variable Listfrom theWindowmenu - Press the
New…button at the top of the Variable List window - Name the variable “MotionSensorOverride”
- Set the value of the “MotionSensorOverride” to “false”
Create the Trigger Events
Now, 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.
Defining the Light Turned ON trigger
- Select
Trigger Action Listfrom theViewmenu - Press the
New…button at the top of the main window - Name the trigger
Light Turned ON - If you are using an Insteon switch:
- Select
Insteon Command Receivedfrom the triggerTypepopup - Select your switch's name from the
Devicepopup - Select
Onfrom theReceived:popup
- If you are using an X10 switch:
- Select
X10 Command Receivedfrom the triggerTypepopup - Select your switch's name from the
Devicepopup - Select
Onfrom theReceived:popup
- Choose the
Actiontab - Select
Modify Variablefrom the actionTypepopup - Select “MotionSensorOverride” from the
Variablepopup - Select the
Set to trueradio button - Click the
OKbutton
Defining the Light Turned OFF trigger
- Select
Trigger Action Listfrom theViewmenu - Press the
New…button at the top of the main window - Name the trigger
Light Turned OFF - If you are using an Insteon switch:
- Select
Insteon Command Receivedfrom the triggerTypepopup - Select your switch's name from the
Devicepopup - Select
Offfrom theReceived:popup
- If you are using an X10 switch:
- Select
X10 Command Receivedfrom the triggerTypepopup - Select your switch's name from the
Devicepopup - Select
Offfrom theReceived:popup
- Choose the
Actiontab - Select
Modify Variablefrom the actionTypepopup - Select “MotionSensorOverride” from the
Variablepopup - Select the
Set to falseradio button - Click the
OKbutton
Defining the Motion Detected trigger
- Select
Trigger Action Listfrom theViewmenu - Press the
New…button at the top of the main window - Name the trigger
Motion Detected - Select
Device State Changedfrom the triggerTypepopup - Select your motion sensor's Device name from the
Devicepopup - Select
Becomes Onfrom the popup below the Device's name. - Choose the
Actiontab - Select
Control Light / Appliancefrom the actionTypepopup - Select
Turn Onfrom theActionpopup - Select the name of your switch from the
Devicepopup - Click the
OKbutton
Defining the Motion Stopped trigger
- Press the
New…button at the top of the main window - Name the trigger
Motion Stopped - Select
Device State Changedfrom the triggerTypepopup - Select your motion sensor's Device name from the
Devicepopup - Select
Becomes Offfrom the popup below the Device's name. - Choose the
Conditiontab - Select the
if variableradio button - Select “MotionSensorOverride” from the popup of variable names
- Select the “is false” radio button
- Choose the
Actiontab - Select
Control Light / Appliancefrom the actionTypepopup - Select
Turn Offfrom theActionpopup - Select the name of your switch from the
Devicepopup - Click the
OKbutton
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.