Xiaomi motion sensor hack

I just did it today. He says in the ST forum that it has not had a noticeable effect after a year of use. I'm going to run the one I modded for a while and see if there's a change before I mod the others. My intention for the one I modded today is to run it off a 3v supply, so I'm not concerned with power drain for this particular one.

I wouldn't want the battery life to be shortened on my other Xiaomi sensors though. I'll probably leave it from now until I get back from Oregon in mid April. If it's the same, then I'll go ahead and mod the others. If there's significant battery drain after 6 months, I may remove it. The good thing is, it's even easier to remove the modification.

Oh, and there's a warning from @JDRoberts too. Something to consider.

1 Like

Thanks for the info, a year sounds good, I will try with one tomorrow.

1 Like

I don't believe people need a so sensitive motion sensor.
Ideally a 30secs would be ideally but I can't think of any use case where I use a 5sec motion sensor.

That’s not an option with this sensor though. So I’ll take 5sec over 60sec personally.

I do have a very good use for the faster reset time. Going to use this at my front door to alert me and record video. This will allow me to trick Wyze into giving me several 12 second clips per event, instead of just one.

I’ll use Rule Machine to control the notification part, so I won’t get more than one per event.

1 Like

Excellent example, I just installed a Wyze cam in my front porch to help the ring doorbell. Could you add a little more info how to trick the wyze? IFTTT?

I did the mod in 5 minutes, pretty easy

1 Like

Yes, IFTTT. Right now I am getting a clip from the Wyze cam itself, and then when somebody presses my doorbell, I get another video clip. And if they press it again, I get another.

Not perfect, and there are some IFTTT delays. However it seems to be fast enough to do the job most of the time. Haven’t put it into service yet, so maybe it’s not going to work like I think, but it should be based on my experience with the doorbell.

1 Like

Thanks, I saw in the events that the motion sent the active state every 5 seconds but the inactive state still sent at 60 seconds, maybe using a triggered rule still works.

Still need to play with that part myself. Let me know what you learn.

I just created a triggered rule to test but unfortunately it will not trigger the rule again until the motion inactive state is sent at 60 seconds.
what other scenario can I do to test it?

Did you try setting a five second inactive timeout in the device details?

{Edit]
Just got back from a client's office. Tried that and it works. So @Somel, there's your answer for a custom timeout. You can adjust the settings in the device driver to be between 5 seconds and whatever you want. So if you enter 30 seconds, unlike before where it didn't actually go active again for 61 seconds, it will now go inactive in 30 seconds if that's what you enter in the driver and then immediately go active again when motion is detected.

I feel so dumb sometimes, I changed the setting and works great. Thanks

1 Like

Wow! This works incredibly well. I just setup an IFTTT trigger. It will keep queuing up the clips in Wyze. So you can essentially have free constant recording of events if you want. I'm going to limit it to 20 seconds. It seems to average around that amount of time before the clip is available in the Wyze app following detection. So I don't want to fill my events queue with more clips than are necessary per event.

This is exciting. I'm really looking forward to picking up my Google Home Hub now. So I'll implement this to also automatically show me the front door as soon as motion is detected by using Google Assistant Relay. This is awesome. I'm essentially getting the benefits of a Ring Doorbell, at the cost of a Wyze cam, a Xiaomi motion sensor, and a little bit of modification.

Maybe these sensors are different, but my understanding with motion sensors is that they are always testing for motion. The change is how often they turn on the radio to report motion. Once motion is detected, the radio is turned on, the motion event is reported, the radio is turned off and a countdown timer is set. If no further motion is detected and the countdown timer reaches zero, the radio is turned on. lack of motion is reported, and the radio is turned off. If motion is continually detected, the internal countdown timeout will keep getting reset and the radio remains off until motion stops and the countdown time reaches zero.

Sounds plausible. I don't really know what's going on with the radio. What I do know is it's either active or inactive in the driver. Thankfully @veeceeoh added the capability to manually force the driver to reset motion to inactive with a custom value.

Since the factory hardware of these motion sensors doesn't allow anything less than 60 seconds, it would have made sense for him to set a default timeout in the driver of 60 seconds. So if you mod the motion sensor and don't enter anything to override the timeout in the device details, then you will get 60 seconds to inactive. You obviously cannot get less than a five second timeout, even with the hardware hack, but you can get the driver to reset to inactive in 5 seconds by simply entering that in the device details.

If you don't hack the sensor and you enter 5 seconds in the device details, the driver will return to inactive in 5 seconds, but the hardware will not be able to report anything for another 55 seconds. So this is an incredibly useful hack thanks to @veeceeoh adding that capability. My hat's off to him once again!

1 Like

As long as it does something useful and battery life isn't obnoxious it can't be bad. I have Zwave motion sensors that have a test mode that set the countdown timer to 10 seconds. I made use of that for a while. Some of my motion sensors have had the batteries last almost 4 years. The one on test mode lasted for just about 1 year. I didn't think that was too bad.

1 Like

All depends on cost of the battery I suppose. From an ecological point of view, less battery consumption is a good thing. As the author of the hack said, he had it running for a year with no noticeble effect, so that's encouraging.

The one at my front door will have a 3 volt supply anyway because of our cold Winter temperatures in Toronto. The others in my house are going to need to last at least a year to satisfy me. I don't really need faster than 60 seconds for the other sensors, or at least I have not thought of a scenario yet where it would be useful. However, this is proving to be so useful for my intentions with the front door camera, that I'm going move forward with that setup.

Since the mod is so simple to install and remove, I'll mod one more and use it as my benchmark for the battery life testing.

So I am a few hundred miles north of you in Minneapolis, Minnesota. Cold here too. My motion sensors use the CR123 3-volt battery and one of them is in an unheated shed. That one has a 3-year-old battery.
I was born in Toronto so please say hello for me.

1 Like

LOL. To whom should I say hello? Doug Ford? :wink:

Yes, he's my father. Perhaps some flowers on his grave if that is OK.

1 Like