Delay Motion ON if switch was manually turned off

Hi,

What is the best way (and how to) perform the following:

If motion is detected -> turn lights on
If no motion for 10 minutes -> turn lights off
If switch is manually turns off -> don’t turn the lights back on if motion is detected for at least 15 seconds.

I’m trying to figure out the best way to preform the last action as my lights turn back on after I manually shut them off when I leave the room

Thanks!

1 Like

I would do it with a local variable and a delay.

Triggers:

  1. Physical OFF (<-- this assumes you have a device that reports PHYSICAL button presses correctly/differently than digital on/off!!!)
  2. Motion "changed"

Actions/conditions:
If (physical off) then

  1. Cancel delay actions
  2. Set local variable to true/delay/whatever
  3. Set local variable to false/no/whatever with Delay 00:XX:YY (cancellable)

else-if (Motion=Active AND variable=false/no/whatever) then

  1. Cancel delay actions
  2. turn on lights

else-if (Motion=Inactive)

  1. turn off lights with delay of XX (cancellable)

end if

1 Like

Do you know that this is because the motion sensor was inactive when you turned off your lights, then became active and caused the problem you noticed? I'm asking both because this is an unusual setup (motion sensors in a room, properly placed, should "see" you in at least most parts of the room, so if your switch is indeed inside the room, then it should remain "active" as you turn off the switch and not be a problem--this would only be if it was"inactive" at the time when you turned off the switch, and then became "active" later--and most motion sensors have a timeout period for changing to "inactive" from "active" of at least 10-15 seconds but often a minute or more, so this is unlikely) and because if you haven't verified this, what you want may either not solve your problem or is certainly at least not the best way to approach it (you're sure there's no other app/automation causing it?).

Perhaps you've already verified this, but I figured it was worth asking before you went too far.

Another thought, since I think (?) you are using GE Motion switch/dimmer, would be to extend the inactive time (parameter 15). Then it should just just show ACTIVE longer before resetting to inactive.

Default is 20s (which I would have thought was long enough for what you describe, but I guess not?), but it can be changed to something much longer if desired.

That parameter is NOT exposed in the in-box driver, though. You would have to use the Basic Z-Wave Tool to change it, or use my user driver (which does expose the setting).

Here is how it looks in my user driver. I only exposed a few set values, techincally you can input numbers between 45s and 27 minutes, too. If you need something longer than 45s but less than 27m I could add a few more settings (or change it to a number entry field - but there is a reason I didn't do that....).
51%20AM

1 Like

@JasonJoel & @bertabcd1234 thanks for the info/assistance! So this is for the GE Motion Switch but I also have some motion sensors on Konnected that don’t seem to have much of a timeout period. I’ll try adjusting the parameter on the motion switches with @JasonJoel driver and hopefully it will do the job!

I plan to extend this to a door contact sensor as well - if I turn off a switch while exiting a room I don’t want the lights to turn back on if I just manually turned off the lights but opened the door (to exit).

Makes sense. The "code" I laid out in post 2 should get you in the ballpark of a good RM rule for that.

1 Like

So my GE switch seems to immediately report motion inactive when the switch is manually turned off (even if motion is still active).

That's interesting. I'll take a look on some of mine when I am at home/have time and see if mine do the same. There are many quirks in some of the GE/Jasco firmware revs, so it certainly is possible!

If that's the case, then you would likely need to do the code based workaround.

Can I ask one thing....If the lights are turned off by motion, do you want them to be able to be turned on immediately by motion or does the same 15 second timeout apply? Because if the latter, then the problem gets a WHOLE lot simpler.

Also, it will not matter how long your timeout lasts....one any type of timeout blocks the first detection of motion, you either have to wait until the sensor goes from active to inactive and then back to active again....or you have to include whatever vehicle you are using to induce the timeout ending as a trigger for the rule. Otherwise, it is not going to pick up on the trigger of the motion being active. Furthermore, you have to consider how long it takes for your motion sensor to go inactive in the design of your automation. If your motion sensor has a 30 second timeout, then a 15 seconds delay is not going to work. The motion sensor might still be active when the 15 second delay ends.

I assumed the former, but you are right.... If they are OK with the delay being active after off in ALL cases, it is a very simple rule.

Maybe....but it will still be complicated by several other factors.

I found, for me, the easiest way to accomplish this was when i manually turn off the lights, wait until all motion sensors in an area go inactive before allowing the "rule" to turn the lights back on. This caught the situation that I had where the area was covered by 2 sensors and after turning the lights off manually and walking out of the room the sensor on the far side of the room that had gone inactive would sometimes be tripped, causing the lights to come back on.

Waiting for both to go inactive before re-enabling the "rule" was much more practical a solution than trying to negotiate static timeouts.

I see your point.

I guess it all depends on how long of a static timeout you'd be willing to live with. As long as it was longer than the longest of the motion sensors + walking time it should work ok that way, and be a very simple rule.

If not, you would need to do something more elegant, like you did.

I don't know about elegant...it was just a lot easier since the only way that i was guaranteed that the motion being detected was "new" motion was after both sensors had gone to inactive. Plus, the Iris motion sensors only have a 30 second timeout so we aren't talking a hug wait.

Plus, I live alone. There's no real chance of someone else walking into the kitchen after I turn the light off and walk out of the room. That, above all else, makes this more a solution for a kitchen. :slight_smile:

1 Like

I just tried a newly purchased GE motion switch and it doesn’t have this issue. The older switch also has the same issue on ST. Can the firmware be manually updated?

UPDATE: And I might add a contact sensor (same concept though...if the light is manually turned off don’t turn on the lights even the door opens within the specified timeout period).

Nope. GE/Jasco don't usually provide the firmware to end users (I've asked at least a dozen different times). You could submit a support ticket with them and see if that has changed, though...

Basically I want to prevent the lights from turning back on for a certain time period after I manually turned them off. So I think the latter is fine. How does this simpler setup look like?

Do they update via ST though? I would think of any of the hubs out there, they would be the most likely candidate.

Not that I know of.

That's kinda funny. What's the point of developing firmware updates if you're not going to send them to anybody. Seems like kind of a big miss on their part.

The switch was actually on ST for a year. Didn’t get any updates to resolve this