Go Off After Delay

Hello to all the wise Wyze gurus. I have a situation I can’t figure out. I hope you can guide me in the right direction.

I have lights in my shop (at home) that are connected to a Wyze smart plug. I have an automation set so that when I walk into the shop the shop lights come on – V4 person detection. What I’m trying to accomplish is for the lights to stay on until no person (or motion) is detected for 15 minutes and then they are turned off. That way, the lights come on when I walk into the shop and they go off about 15 minutes after I leave the shop.

I have tried and tried and I just can’t figure out how to make this happen. Does anyone have any suggestions?

1 Like

I do something similar in my home office using a V3Pro and Bulb group. But the exact same options are available for the V4 and plugs.

This is my automation:

The way this works is as expected:

  • As soon as a person is detected in that room, the light turns on. The “on for” timer starts to tick down…
  • Every time a new event detects a person, It restarts the timer. (Since events cannot last longer than 5 minutes, that means there is a new event at least once every 5 minutes, so just make sure you set your “on for” timer To be longer than 5 minutes to make sure that a new event gets triggered with still seeing the person in the room)
  • When there is no new event with a person detection within that timer period, Then the lights turn off after the timer finally expires.

In that image, I set my timer to 20 minutes and because I am often sitting relatively still in that room at a computer without a lot of movement for it to see. It can’t see my arms which are typing or moving the mouse, so my hands aren’t typically triggeringed the camera, it mostly needs to see my head or body move around to detect motion. So, there have been times where I have gone longer than 5 minutes or 10 minutes without significant head or body movement, which was causing my light to turn off on me until I waved my arm or moved my head to get it to turn back on. My solution was just to extend the timer a little bit and now it never accidentally turns off on me. I thought about repositioning the Cameron to be able to see me better, but I don’t really want the camera to watch my monitors since I have a lot of confidentiality and HIPAA data that I sometimes deal with, and since these are a cloud enabled cameras, I just don’t want them being able to possibly see that data so that I am totally in compliance of the confidentiality requirements for my clients. But in a garage or something that won’t be as big of a deal.

Anyway, I can confirm this works really well. I love it.

The only small downside is that sometimes it can take a few seconds before the lights turn on. So, sometimes I will just call out to Alexa or Google and tell them to turn the lights on. I also configured a Wyze contract sensor I can flip up or down to work like a light switch to manually turn the lights on or off. And, I have also connected everything through a smart button on a third-party platform that can also control the lights on or off in that room. So sometimes I will walk in and tap the smart button to turn on the lights immediately instead of wait for the couple of seconds for the camera to recognize that a person walked in. I mostly like this automation to make sure the lights automatically turn off whenever I leave the room for long enough.

Hope that helps. It works. I’ve been doing this for years now. It’s fantastic.

In some other rooms, I use other things instead of the camera person detection. I have some Aqara presence sensors which control the Wyze bulbs in my kitchens, And those are fairly accurate. I also have Ikea motion sensors that control the Wyze lights in my stairs and hallway. Sensors are way faster at controlling the lights than Camara person detection, but they’re much more complicated and somewhat less precise.

Visitors are always extremely impressed that lights are automated in so many places as they walk around my house. I highly recommend it.

1 Like

Thank you so much! It works perfectly. It seems like I forgot to look at the simplest approach first.

3 Likes

That’s great to hear! Thanks for the follow-up to confirm :+1:

2 Likes

I was thinking about how many times this rule will turn on the smart plug. If I’m puttering around in my shop for a couple of hours, it might “hit” the smart plug a hundred times. That is not a real problem, but I wondered if there was a way to only turn it on once and turn it off once. I came up with a 2-rule solution that I probably will not use, but I think it’s interesting. Rule one says if person is detected, turn on smart plug, but only if smart plug is currently off. Rule two says if person is detected, wait 15 minutes and then turn the smart plug off. The smart plug is only turned on once and then turned off once. Interesting, but not really any better than the simple 1-rule solution.

How did you add a second condition to a single Wyze Automation?

Yep, you’re right. My bad. :blush:

1 Like

I asked out of genuine curiosity. I know that adding conditions to Automations has been a community request in the Wishlist for a while, but I’m not aware of any way to do that currently (though I think I’ve seen mentions of work-arounds that use Plugs as logical switches to act as a condition), so I wondered if maybe you’d figured out some novel Automation scheme.

Anyway, thanks for the clarification! I guess we’ll just keep wishing for conditional operations in Automations! :+1:

To be honest, a friend who uses Wyze stuff told me about that extra wrinkle and I believed him. I should have tried it myself before I posted about it.

1 Like

If you are moving around in the garage, then there is a good chance that the recording will continue for 5 minutes straight. After that, a new event will start since 5 minutes is the maximum limit for an event recording. This means that It will likely restart the timer every 5 minutes. However, I don’t think that it actually sends a turn-on command to the plug every 5 minutes or with every event. We have done some other similar testing with Wyze device automations pushing on commands multiple times while the device is already on, and subsequent on commands do not actually get processed or recognized in the API. So it’s not doing anything to the plug repeatedly when it resets the timer. From what I can tell, all it actually does is reset the automation countdown timer in the cloud. So for the most part I wouldn’t worry about it. I believe the plug technically only turns on once and subsequent actions are just resetting the timer in the cloud. In some ways it’s doing exactly what you thought up, but instead the check for on/off is done automatically on the backend instead of stated explicitly. Basically, instead of explicitly checking the power status with every event, it just refreshes the timer. Functionally the same thing.

But there are a lot of us that are totally on board with your thoughts about Wyze updating their automation rules to support conditional operators exactly like you proposed. We intend to continually nag them about that because it’s basic par for the course when it comes to automations. It’s crazy they don’t support it yet.

Since you are really into this stuff, I think you might either already know this or find it interesting. My rule is very simple. Detect a person, turn on a smart plug for 15 minutes. That’s it. Simple. But it has a yellow error symbol on it. The rule works flawlessly. I’ve tested and retested it. I dug into the reasons for the error symbol and finally determined that it is because in my account, I have both Cam Plus and Cam Plus Lite shown. It’s getting confused. If I change the rule to detect motion vs person, no error. Change it back to person, error. I guess it’s a bug?

1 Like

That is strange and interesting. You’re the first person to mention something like that.

I would go test it myself, but I have Cam Unlimited, so all of my cameras are locked onto that and I can’t test with my Cam Plus Lite anymore.

It does sound like an unintended bug. I’m glad that it still seems to work okay.

Does your account show you have Cam Unlimited and Cam Plus Lite, even though all your cameras are locked in Unlimited? Or is your Lite account gone? If your account still shows both, like mine does, you can test this potential bug. If your account no longer shows Lite, then you can’t test it.

1 Like

Yes.

Ah, I see. For some reason I was thinking you have both, but when you assigned it to CPLite it gave the error. You’re saying that’s irrelevant and it’s still doing this even when the cam is actually on Cam Plus.

Okay, I will try to remember to test this on a plug when I get back home.

Can you tell me which plug model you are seeing this on? WLPP1 (v1) or WLPP1CFH-1 (v2)? I have both of those (and the black outdoor plug too), just so I can test with the same model.

Just to clarify, you are saying the automation itself has a yellow error symbol on lot l it in the app, right?

I’m not sure how to tell which indoor plug I have. I see a plug version 3.6.1 in the app and an activation date of Nov 2019 if that helps. When I bring up the automations page, the yellow error symbol is visible without opening the automation. Here’s the test I did. I did not change to CPLite. I just changed the rule to detect motion vs person and the error symbol went away. I changed the rule back to detect a person and the error symbol came back. This is repeatable. I assumed (perhaps wrongly) that it was a conflict between the two services. Maybe not. There is an anomaly though. While the rule seems to work flawlessly, the plug turns on for no apparent reason occasionally - like once or twice a day and never goes off until I notice it and turn it off. I can see in the rule history that the rule did not fire and I don’t see anything causing the plug to come on.

Yes, that means it’s the original plug, version 1. :+1:

I just tried with multiple cameras and plugs and couldn’t replicate this.

That is strange. This also doesn’t happen to me.

Perhaps there is something weird with that particular plug. If you have a second one, consider swapping them (put a different one in your shop) and see if you get different results. If so, the plug is funky for some reason.

You could also consider trying to reset it to factory settings and see if it works normally after that.

Do you maybe have the Plug (and your other Wyze stuff) integrated with any third-party systems like Amazon Alexa or Google Home which could be switching the Plug on via routine, accidental taps, or voice command misinterpretation?

I refer to this:

1 Like

I factory reset the old Gen 1 plug and replaced it with a brand new Gen 2 plug. I deleted and redid the very simple rule and it still works perfectly - on with person detection and off after 15 minutes of no person detection. And I still have the yellow error message. I looked at all my other rules and that smart plug is not in any other rule, but the camera is. The camera is in rules that turn cameras on and off and turn camera notifications on and off. I don’t see anything that could conflict with the simple shop rule.

I use Alexa to turn stuff on and off, but only by voice. I don’t have any rules (that I know of) setup in Alexa. I just replaced the plug this afternoon, so I don;t know whether the new plug is going to be turning on unexpectedly yet. I’ll monitor it tonight and tomorrow and let you know.

1 Like

I’m 10 days out from changing the plug. The rule is still working flawlessly. The plug is not turning on for no reason. And until today, the I still had the two yellow error messages. Today the yellow error messages went away. I haven’t changed anything in 10 days. Huh. I guess all’s well that ends well. :slightly_smiling_face:

1 Like