Room Lighting: Activate lights only after x seconds of motion, not immediately

I have a Room Lighting automation which activates a light when a motion sensor detects motion:

The light activates immediately upon motion as expected, but I would like to modify this automation to activate the light only if there is still motion detected 5 seconds after motion was initially detected.

The motion sensor is a Samsung SmartThings GP-U999SJVLBAA Zigbee device. When it detects motion it shows motion : active for 10 seconds, then goes back to motion: inactive.

I don't see any options in Activate Lights Options:

Is this possible with Room Lighting, or should I switch to Rule Machine?

Or would what I'm trying to do be impossible with this sensor given that it only goes back to motion: inactive after 10 seconds?

1 Like

There is a delay Activation setting under Activation Options.

Screen Shot 2022-09-04 at 12.51.53 PM

Hi @bravenel!

If I put 5 seconds for Delay Activation it makes it so that the light still turns on, but only 5 seconds later.

Basically, what I'm trying to do is this: If the motion sensor detects motion, don't turn the lights on. Only turn them on if I am still there after 5 seconds. Don't turn them on at all if I leave the motion sensor's coverage area within 1-4 seconds.

Example use case: if I pop in to my shower stall to get something and am gone within 2 seconds, I don't need the light on. If I step into the shower stall and am still there 5 seconds later, I'm probably taking a shower and not just popping in to get something, in which case turn the light on.

2 Likes

You would have to do that timing in Rule Machine using a Stays option on the motion trigger. It could flip a Hub Variable to fire Room Lights.

But, most motion sensors have a cycle time of 15 to 60 seconds, so they will always still be active after 5 seconds.

4 Likes

I have to say I don't really understand this usage - I'd hate to have to wait 5 seconds for light - especially if I'd just popped in to get something. Don't you need to see what you're getting? If it's light enough to do that you probably don't need the light on for your shower either

Basically, what I'm trying to do is this: If the motion sensor detects motion, don't turn the lights on. Only turn them on if I am still there after 5 seconds.

There'll be some dependency on the specifics of your motion detector, but I think what you're attempting may be impossible. When the detector signals motion it keeps the "motion" flag active for a preset period but isn't actually continuing to monitor over that time - over that period you could be doing a quick in-and-out or star jumps and the detector wouldn't be able to tell the difference. The detector drops back to "no motion" after the period, then will start monitoring again (possibly immediately, possibly after a longer delay) and potentially re-raise "motion".

This is to prevent continual motion in front of the detector both spamming the network and running the batteries down with a high frequency of motion notifications.

Some sensors allow the dead period between detections to be configured - if your sensor does, and the period can go short enough, you might be able to do what you're after.

Ok so in this bathroom there are three different light switches, which control:

  • Vanity light above the sink (turns on immediately on any motion in room)
  • Shower light (turns on immediately on motion in shower)
  • Ceiling light + exhaust fan (turns on immediately on motion in shower)

I said "light" but It's the last switch that I actually want to be able to only come on after sustained motion, because the exhaust fan is pretty loud. I only want this to come on if I'm actually taking a shower.

The wiring here is weird - I've always felt that the shower light and exhaust fan should be wired together, not the ceiling light and exhaust fan, given that you'd only ever need to use the exhaust fan if taking a shower. I had an electrician in for other work and I asked him about re-wiring the switches so that the shower light and fan are together, and he said it can't be done at the switch, he'd have to open the ceiling and it's not worth it.

Understood. Yeah, this sensor does not have a configurable dead period - it's fixed to 10 seconds.

I will play around with Rule Machine to see if I can use the 10 second dead period instead. Basically something like: if motion goes to active from inactive within 1-2 seconds of having been active then turn on the switch.

This is not very likely to be reliable for what you want. Consider what happens when you do go into the shower to take a shower: the motion may stay active for some time. You may not get the inactive followed by active right away, so the fan may never come on. It would be easy enough to tell by just looking at the logs for the motion sensor in different sequences of entering/leaving shower.

Some motion sensors have humidity sensors, and you could trigger a fan from a rise in humidity.

Some electricians who work on new houses seem to lack certain key ingredients of intelligence -- such has why the heck would you put the fan on the ceiling light switch? My setup is similar, but fortunately my fan is on its own switch, right next to the shower light switch, and both are right by the entry to the shower. So if I'm just putting something away, not taking a shower, I often just turn off the fan by its switch because I don't want the noise either.

1 Like