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.

  1. Select Variable List from the Window menu
  2. Press the New… button at the top of the Variable List window
  3. Name the variable “MotionSensorOverride”
  4. 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

  1. Select Trigger Action List from the View menu
  2. Press the New… button at the top of the main window
  3. Name the trigger Light Turned ON
  4. If you are using an INSTEON switch:
    1. Select INSTEON Command Received from the trigger Type popup
    2. Select your switch's name from the Device popup
    3. Select On from the Received: popup
  5. If you are using an X10 switch:
    1. Select X10 Command Received from the trigger Type popup
    2. Select your switch's name from the Device popup
    3. Select On from the Received: popup
  6. Choose the Action tab
  7. Select Modify Variable from the action Type popup
  8. Select “MotionSensorOverride” from the Variable popup
  9. Select the Set to true radio button
  10. Click the OK button

Defining the Light Turned OFF trigger

  1. Select Trigger Action List from the View menu
  2. Press the New… button at the top of the main window
  3. Name the trigger Light Turned OFF
  4. If you are using an INSTEON switch:
    1. Select INSTEON Command Received from the trigger Type popup
    2. Select your switch's name from the Device popup
    3. Select Off from the Received: popup
  5. If you are using an X10 switch:
    1. Select X10 Command Received from the trigger Type popup
    2. Select your switch's name from the Device popup
    3. Select Off from the Received: popup
  6. Choose the Action tab
  7. Select Modify Variable from the action Type popup
  8. Select “MotionSensorOverride” from the Variable popup
  9. Select the Set to false radio button
  10. Click the OK button

Defining the Motion Detected trigger

  1. Select Trigger Action List from the View menu
  2. Press the New… button at the top of the main window
  3. Name the trigger Motion Detected
  4. Select Device State Changed from the trigger Type popup
  5. Select your motion sensor's Device name from the Device popup
  6. Select Becomes On from the popup below the Device's name.
  7. Choose the Action tab
  8. Select Control Light / Appliance from the action Type popup
  9. Select Turn On from the Action popup
  10. Select the name of your switch from the Device popup
  11. Click the OK button

Defining the Motion Stopped trigger

  1. Press the New… button at the top of the main window
  2. Name the trigger Motion Stopped
  3. Select Device State Changed from the trigger Type popup
  4. Select your motion sensor's Device name from the Device popup
  5. Select Becomes Off from the popup below the Device's name.
  6. Choose the Condition tab
  7. Select the if variable radio button
  8. Select “MotionSensorOverride” from the popup of variable names
  9. Select the “is false” radio button
  10. Choose the Action tab
  11. Select Control Light / Appliance from the action Type popup
  12. Select Turn Off from the Action popup
  13. Select the name of your switch from the Device popup
  14. Click the OK 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.

ms_overriding_with_switch.txt · Last modified: 2019/01/26 00:10 (external edit)
 

© Perceptive Automation, LLC. · Privacy