Control plug by multiple motion sensors?

There are two hallways to go to my living room.
I want to put a motion sensor at each hallway.
If a motion sensor senses motion, then turn on a plug.
If BOTH motion sensors clears for more than 15 minutes, then turn off a plug. <== How can I set this rule?

Unfortunately, currently you cannot join Motion Sensors together to do this. This has been requested to group sensors together and perform actions like this.

@carverofchoice and myself have been trying to figure out a way.

2 Likes

For the record, I have a similar need. I determined I couldn’t do this with Wyze, but I can with YoLink. You can set automations in the YoLink app such that a plug or switch will turn off only if both motion sensors show no motion.

Yes, thank you for your post. The more examples we have of how this would be useful, the better. I didn’t think about a 2 hallway situation like this. Great example for why this feature is needed.

Yeah we used to be able to do this with Wyze sensors in Home Assistant, until sensors got banished from it. :sob:

I was doing it with the Wyze Sensors in HA before the developer pulled the Sensor integration. :man_shrugging:

I do know why, so I understand.

I have a shop with overhead lights. Too large for one motion sensor so having two that only turn off the lights when both are showing no motion is needed. As I said, couldn’t do it with Wyze but YoLink is easy.

1 Like

Thanks @WildBill, didn’t know we could do that.

This is likely not the same as what the OP asked, but let me spill anyway. I added a 20’ strip of LED lights that are tacked down along a single side of the 14 steps from up to down stairs. At the top, I added a wifi plug into an outlet. And at both the top and bottom of the first step up/down, I set a Wyze Sense V1 motion sensor. The sensor triggers to turn on the LED light strip, stays on for 40 seconds, and off. This requires two separate Alexa routines, one UP and one DOWN. Sure, sure, my presence seen on the second sensor whether down or up, also turns the lights on for 40 seconds, usually actually extending the light on for 15 seconds or so.

Summed up. Two independent Alexa routines, each triggered by a Wyze motion sensor turns the lights one. And 40 seconds later, off. Works for me.

And this sharing of how-to use stuff is fun, a lot of fun. Thanks for the thread.

I had to ask YoLink support how to do it:

I want the switches to turn off when neither of the motion sensors has detected motion for 20 minutes. I don’t see anyway to set this up with automations, alarm strategies nor YoLink control. How can this be accomplished?

You can set the “time to enter no motion state” to 20 minutes, then set up automation:

when motion sensor 1 - no motion detected,
then add behavior - filter - motion sensor 2 - no motion detected,
add behavior - switch - turn off.

I’ve got a couple of Alexa routines that turn stuff on. and then “a reverse”, a separate routine that uses the same trigger, but “not detected” to turn stuff off after x minutes. Point being sometimes it takes two. One to turn something on, and another to turn same off.

I’m running similar scenarios across numerous areas of my house. A motion sensor triggers the plug on, but instead of using the same sensor’s trigger “Has been clear for” to turn off, you need to use the plug’s trigger for “Has been on for” to turn off when using multiple sensors. You can have as many sensors as you need to serve as the trigger for plug on. The reason this works is that each subsequent sensor’s trigger to turn on an already turned on plug resets the plug trigger’s timer to turn off.

Your hallway motion sensors (2) to plug scenario is the same as my office motion sensors (2) to plug scenario. As long as there is motion in my office (either of 2 sensors) the plug with attached light stays on. 15 minutes past the most recent detection from either sensor and the plug with attached light turns off.

Create a Rule/Trigger for one hallway:

Create a Rule/Trigger for the other hallway:
Screenshot_20220607-230300_Wyze

Create this Rule/Trigger for your Plug:

Notes:

  • Set you Plug trigger to a minimal time to test your setup. Minimum time needs to be greater than the natural motion sensor clear cycle. I set mine to 2 minutes for testing and change it to 15 minutes when testing is complete.

  • You can run this multiple triggers type of automation using a variety of trigger source types; contact/entry sensor, motion sensors, climate, leak, person detection, etc. and apply them to numerous action types.

  • If you have problems, please post screenshots of your 3 triggers.

2 Likes

Oh wow, this sounds like a great work around. I didn’t realize that each trigger resets the timer. I thought the timer was based on the amount of time the plug was on, not based on the last action. Do the bulbs and lamp sockets work the same way? If not, I might just have to buy a bunch of plugs and have the lights controlled based on the plug timer…but otherwise if bulbs and lamp sockets timers also work based on this same method, you may have solved a long time problem with a pretty great work around! I’ve been dying for a solution from Wyze for this for years now…

1 Like

It’s not really a workaround… it’s the way it works/as designed to accommodate this common use case. :+1:

Yes, any device that has a “has been X for Y time” timer running gets a timer reset when triggered on/off by any device. At least it does today. Hopefully, no one breaks it. :grin:

Wyze needs to publish this automation stuff. I only stumble on this stuff because I have all day and night to play. :rofl:

2 Likes

@Seapup said: As long as there is motion in my office (either of 2 sensors) the plug with attached light stays on. 15 minute”

The 4th gen of Echo including Echo Dot has a “People are detected” sensor in the device, the Echo and Dot. Does not need a separate sensor.

What I have read about this is, People detected remains “on” until “People are not detected”. This different from motion or motion detection, no motion detected.
I’ve tried to create some routines and am not certain yet, but looks like “when I stay” detected, the routine does turn something off when “people are not detected.

Yes, it still requires a Routine to turn it on, and another routine to turn it off. But the difference is we don’t have to wave our hand or move to trigger the Off to not turn stuff off. Again, still trying to 100 verify, but looks real promising.

This could eliminate the need for some motion sensors that want “motion” or else.
And we can set a window for “people detected’ to occur. It ignores “people” outside the window.

I’ve got a 4th gen Dot in my bathroom. I walk in between 6 pm and 12 am, and it turns on Bathroom light, Shower light, bedroom light, night stand lamp, and TV. Gonna try “people not detected with a new routine soon.

@carverofchoice said: I didn’t realize that each trigger resets the timer.
I’ve not seen this behavior. I will need to review/test it. Maybe its unique to your sensors. But chance, just in case, what sensors are you using.

@Seapup said: Yes, any device that has a “has been X for Y time” timer running gets a timer reset when triggered on/off by any device. At least it does today. Hopefully, no one breaks it.

Wyze needs to publish this automation stuff.

Agree and I hope you are right about ‘At least it does today and hopefully no one breaks it.”

I need to focus on this to see if the stuff I have works this way too.

I’ve been running this type of automation with every type of Wyze sensor (even old v1 sensors tied to HMS Hub) and most of the cam AI types as the input triggers. It’s a compact, scalable, flexible and cost-effective solution where the input triggers don’t require electrical outlets.

1 Like

I’m going to disagree and definitely call it a workaround because using a group of motion sensors as a single sensor would be superior and the way [I think] most people will want it to work (any sensor senses motion then the group is still “on”, only if ALL sensors are clear for X amount of time, then the light turns off), and I’ll give an example from my testing today to demonstrate this.

With your workaround, I can set the light to stay on for 2 minutes after motion is sensed by any sensor.
The problem is that if my sensor senses continual motion for more than 2 minutes, then the light turns off, even though the sensor is still actively sensing motion. So I was in my kitchen, and triggered the pantry bulb to turn on, but then 2 minutes later the light shut off on me because one of the the pantry motion sensors never stopped sensing motion from me…therefore I was left in the dark because there was no NEW trigger within that time frame. I had to hide from the sensor for at least 30 seconds so it would turn off, then walk back in front of it.

If I could have used motion sensors in a group, then I could have a rule that says if all motion is cleared from all sensors for 2 minutes (or whatever length of time), THEN turn off the bulb, I would never have been in the dark. That makes the sensor group “has cleared for X time” method vastly superior, and the other method simply a workaround (to me), since it’s possible to have lights shut off on you if you have constant motion for the entire period. That’s a serious flaw…the current method requires periods of no motion for at least 30 seconds so the motion will clear, followed by NEW motion to start a new trigger. That is definitely not a common use case IMO.

BUT, it is a pretty good work around. As it relates to my kitchen, instead of having a single sensor cover the entire kitchen and risk having it have constant motion for the entire bulb on timer period…I can set up motion sensors to only cover small angles, and reduce sensitivity so they are harder to trigger, thus causing more breakage in motion sensing and more triggering events more often. I will of course also increase the bulb timer time from 2 minutes to a much longer interval, in the hopes to give sensors more chances to fail sensing motion for the entire interval, but have enough breakage for 30 seconds to clear before re-sensing motion again.

Not an idea solution for automating lighting in a room (compared to being able to use "has cleared for X amount of time all sensors in that room), but it is a BIG improvement over what I have been doing up to now, so I am EXTREMELY grateful you shared it with me. This is something I can work with and use successfully! Very excited about learning how to do this!

1 Like

OH! This is actually a brilliant solution and superior to using motion sensors! This might be perfect solution to my automation issues! Whereas a motion sensor has no limit to how long it can detect motion, a Camera event is limited to 5 minutes. So if I simply set Camera to turn on the lights when it detects a person, and then set the bulb timer for longer than 5 minutes, then as long as there is a person in the room, it will continually keep the lights on because the camera will send a new trigger AT LEAST every 5 minutes, and cameras can cover the entire room AND they’re more sensitive than motion sensors, AND potentially cheaper than the amount of motion sensors that would be required to surround an entire big room. THIS is a brilliant solution!

2 Likes

Yes! It sure would be nice to use sensor groups as a trigger. :+1: I’m not holding my breath. :expressionless:

For a large space, just reposition, separate the sensors and adjust sensitivity. In my 20’ x 30’ office, I have motion sensors at opposing corners set at 90 degree angles to each other. The only time the plug shuts off is when I fall asleep in my chair, leave the room or lose power. It’s like commercial occupancy sensor light switches with the advantage of being able to better position the PIR sensors. For small spaces like closets, pantry, 1/2 bath, etc., I use only one motion sensor and use the “Has been clear for” trigger to turn bulbs off.

We sure have drifted this topic. The OP’s use case is turn on a plug if either of 2 hallway sensors detects motion and turn plug off if both sensors are clear for 15 minutes.

1 Like

I do use that for exterior use cases. I don’t keep cams running indoors, but if you do, Person, Pet and general motion work well as triggers. The only bug I’ve found is Person Detection from a non-Lamp Socket v3 cam triggering a Lamp Socket. Socket crashes.

I forgot to say… if you need an instant trigger, like indoor lighting, don’t use cam AI as the input to your automation. You’ll get frustrated with the cloud latency (delay). Using cam AI for the 2nd half of “turn off” automation works fine as instant response isn’t critical.

1 Like

Sensors in a group. Thanks, I had not thought of that before now. That is very clever.

@carverofchoice, @Seapup, are you guys using Alexa routines? They want us to ask them for features in routines. I have chatted with support a couple of times. They are liberal about adding requests to lists.

@carverofchoice, the kitche light… you are controlling the light on/off, not controlling a kitchen smart switch? Just want one light bulb in that part?

There’s a good chance the people detection feature in the Echo/Echo Dot may help us and eliminate a sensor, triggering faster.

I tried Alexa and Google. I abandoned both. My life is much happier now without the frustration of unexpected, unsolicited relinking and rebuilding.

1 Like