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:

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