Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| ms_overriding_with_switch [2012/01/22 03:41] – [What's Needed] mattb | ms_overriding_with_switch [2026/04/07 18:27] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== 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 [[wiki: | ||
| + | |||
| + | **Note**: you can't use [[insteon_links|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 [[motion_sensor_basics|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 (" | ||
| + | |||
| + | ==== 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 '' | ||
| + | - Press the '' | ||
| + | - Name the variable " | ||
| + | - Set the value of the " | ||
| + | |||
| + | ==== Create the Trigger Events ==== | ||
| + | Now, we want to create several triggers: one that changes the value of the variable " | ||
| + | |||
| + | === Defining the Light Turned ON trigger === | ||
| + | - Select '' | ||
| + | - Press the '' | ||
| + | - Name the trigger '' | ||
| + | - If you are using an Insteon switch: | ||
| + | - Select '' | ||
| + | - Select your switch' | ||
| + | - Select '' | ||
| + | - If you are using an X10 switch: | ||
| + | - Select '' | ||
| + | - Select your switch' | ||
| + | - Select '' | ||
| + | - Choose the '' | ||
| + | - Select '' | ||
| + | - Select " | ||
| + | - Select the '' | ||
| + | - Click the '' | ||
| + | |||
| + | === Defining the Light Turned OFF trigger === | ||
| + | - Select '' | ||
| + | - Press the '' | ||
| + | - Name the trigger '' | ||
| + | - If you are using an Insteon switch: | ||
| + | - Select '' | ||
| + | - Select your switch' | ||
| + | - Select '' | ||
| + | - If you are using an X10 switch: | ||
| + | - Select '' | ||
| + | - Select your switch' | ||
| + | - Select '' | ||
| + | - Choose the '' | ||
| + | - Select '' | ||
| + | - Select " | ||
| + | - Select the '' | ||
| + | - Click the '' | ||
| + | |||
| + | === Defining the Motion Detected trigger === | ||
| + | - Select '' | ||
| + | - Press the '' | ||
| + | - Name the trigger '' | ||
| + | - Select '' | ||
| + | - Select your motion sensor' | ||
| + | - Select '' | ||
| + | - Choose the '' | ||
| + | - Select '' | ||
| + | - Select '' | ||
| + | - Select the name of your switch from the '' | ||
| + | - Click the '' | ||
| + | |||
| + | === Defining the Motion Stopped trigger === | ||
| + | - Press the '' | ||
| + | - Name the trigger '' | ||
| + | - Select '' | ||
| + | - Select your motion sensor' | ||
| + | - Select '' | ||
| + | - Choose the '' | ||
| + | - Select the '' | ||
| + | - Select " | ||
| + | - Select the "is false" radio button | ||
| + | - Choose the '' | ||
| + | - Select '' | ||
| + | - Select '' | ||
| + | - Select the name of your switch from the '' | ||
| + | - Click the '' | ||
| + | \\ | ||
| + | That's it. So, let's review what this solution does. If you turn the light on via the switch, it sets " | ||
| + | |||
| + | 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. | ||