Xiaomi Zigbee Door/Window Sensor, Motion Sensor, & Smart Button Device Type [beta]

Lol, that’s an interesting way to connect them, but for the price we get them for I am not gonna complain. Just patiently waiting to receive them.

Hi all, got my Xiaomi sensors :slight_smile:
The contact sensor connected with no problem (pushing the pinhole a couple of times).

But what about the temperature sensor? It has a button on its side. I have pushed it as crazy, holding it (resetting) but with no luck.

How do I pair the temperature sensor to ST?

I understand, it’s a long thread. See post 150

2 Likes

Thank you. Temperature sensors works great :slight_smile:

Finally got the contact sensor to pair correctly. Gave it one last try last night and it finally started sending battery updates every hour over night. No clue what I did different but glad it works now!

Is there a dth for the motion sensor with battery yet?

I found that any sensor that does not pair properly the first time, worked subsequently if you click reset multiple times after pairing. Battery updates appear to be a good sign that things are working as the ones that have dropped off in the past never did update battery state.

I have put together a version of device handler for the motion sensor with battery state for my own use primarily but you can pull it from here if you want. Could do with some tidying up but works well enough for me.

https://github.com/a4refillpad/temp/blob/master/xiaomi-motion-sensor-with-heartbeat.groovy

EDIT: Fixed bug pointed out in post 405/409

1 Like

Thanks! It does throw an error in logging when hitting the configure button:
Error groovy.lang.MissingMethodException: No signature of method: script1483070835590253929443.swapEndianHex() is applicable for argument types: (java.lang.String) values: [D052A844AE8B0001] @ line 157

I’m also getting 103% battery, so that’s a little strange.

It’s kind of first bash, will need to tidy up when I get some time. Not seen anything above 100% battery for all of mine so far which is odd.

1 Like

That’s normal. I got 100+ a couple times. Just remember that the battery reported value is ±10%

Must be my frantic clicking of the reset pin in order to get mine to pair that has caused all my battery states to be a lot lower then! LOL

1 Like

@a4refillpad that method is missing from your DHT. You can get the method from my DHT here

1 Like

Replied before scrolling down.

Does yours stop falling off after an hr of inactivity with this DH? I’m using it and it fell off just now.

Falling off is nothing to do with the DH. I found that all of my 10 fell off right at the beginning. If you look further up the thread you’d find me frantically clicking reset. Seems that resolved it for me eventually. Took a while, and I’m still convinced there’s some hidden sequence of events but I’ve not been able to nail it yet as I’ve run out of unpaired devices now.

The smart button DH has a feature which checks the battery level at least once an hr. I think that is why the smart button never falls off. Is there any way to incorporate that into the DH of the motion sensor?

No, the event comes from the device not from the DH. The DH just parses it and displays the event. My motion sensors all show the same every hour. Your device sounds like it just hasn’t paired properly.
Here’s a screenshot of events for one of my xiaomi motions.

In fact my DH even exposes the hidden zigbee check ins which are not usually displayed.

For ZigBee, you send a configure message to the device to report on attribute changes. This happens during the device pairing. In the configure message you set a minimum and maximum reporting time. I’m guessing in the button DH the maximum reporting time for battery level is set to 1 hour. Therefore the device reports it hourly.

As a new user, would you suggest buying these door/window and motion sensors? I like the price, but unsure if they are worth the hassle. Trying to keep my costs at a minimum right now but would love to cover my home entry points.

Thanks

Justin

Very early days yet with these. As you can see in the earlier parts of the thread, many people thought they had success and then gave up on them. It appears that things have improved with the latest hub firmware updates, but some people including myself had a lot of difficulty getting it to stay connected too.
Seems very hit and miss and also, sadly, there’s no guarantee a future update doesn’t revert it back to being useless again.
If you’re happy taking the risk then it can be rewarding as the quality of the brand is undeniably worth the money.

I initially got 1 temp and 1 motion sensor as a test to see if they would connect and work with my setup. So far it has been rock solid for over 9 days (been using Logging app to monitor the temperature). I live in a 3 story townhouse with the hub in the middle floor and ST outlet/repeaters on each floor so I think the signal is pretty good.

My advice would be to start slow with these and then slowly build out but it shouldn’t be backbone as they aren’t officially supported and might not have proper ZHA protocol.

For my setup I have official ST contact and motion sensors on exterior doors for security but plan on using the xiaomi for interior bedroom doors automation and such.

The motion and the temperature/humidity sensors are the most appealing to me due to the size cost and humidity sensors are hard to come by now.