Xiaomi & Aqara Devices - Pairing & Keeping them connected

Sorry to repeat the news from my other thread, but this one is important and shouldn’t be missed…


Both my original xiaomi temp humidity sensors are still sending updates. It’s been 6ish hours since the hub update. Great work!


More good news:

When I checked on all of my Xioami sensors this morning, everything is still connected.

Even better, the Hubitat hub started passing on the status reports from my “Original” & Aqara Door/Window contact sensors, Aqara Leak sensor, Aqara Motion sensor, “Original” button, and 2-panel wall-mount switch, which is evidenced from regular battery state events from all of these devices, either every 50 or 60 minutes. I’m not sure why it took over 2 hours after pairing for that to start happening, but the fact that they are still connected and reporting is a very good sign that they will no longer be dropping their connection with the Hubitat.

I’m going to leave all of my Xioami sensors in the same room as the Hubitat hub for a few days, and if they remain connected, move them to more distant locations. I don’t have any other Zigbee devices that are routers (repeaters) so I don’t currently have a way to test if Xioami sensors will work in that kind of mesh topography along with the Hubitat. Hopefully someone else with Xioami sensors who does also have Zigbee router-capable devices can report here with their findings.

1 Like

that update happened about the middle of pairing all my devices and not sure all which where paired on the new vs old update. But I did have to re-pair my temp/humidity late last night after the update (they were initially paired on the old update) and re-pair late last night on the new update, they have stayed connected now over 14 hours now. Motion sensors I am not sure on which update they were paired half stayed paired over 14 hours but have now re-paired them on the new update so will see.
note: to re-pair I removed the devices and then re-added them.
Great news if they stay paired

I just paired a Xioami round button to Hubitat. It paired as a Device; when I push the button it produces the logging below (is there a button driver to try?). I’ve mapped the mesh with my XStick and see that it is routing through an Iris SmartPlug. I’ll let you know if it stays paired.

Xiaomi Button 6, parse description: read attr - raw: 4D3C0100060800001001, dni: 4D3C, endpoint: 01, cluster: 0006, size: 08, attrId: 0000, encoding: 10, value: 01

For me, the Hubitat chose my new Xioami Door/Window device driver when I paired my Xiaomi “original” button and I can check the Events to make sure it’s still connected and sending reports, but since the “Device” device handler produces log messages, you could keep your Log window open to watch for that. If left idle, it should send a “status report” message every 60 minutes which will look like this:

read attr - raw: 81470100003002FF4C0600100121BA0B21A813240100000000215D062058, dni: 8147, endpoint: 01, cluster: 0000, size: 30, attrId: FF02, encoding: 4C, value: 0600100121BA0B21A813240100000000215D062058

If the Iris SmartPlug can pass on all messages and allow Xioami devices to remain connected, that would be awesome. Thank you for the feedback, and let us all know how it does. I do wish the Hubitat could give ZigBee mesh routing information. I’m going to have to get a ZigBee sniffer myself.

Not yet. But I have already done all the testing I need to make it. The big problem is how to approach the functionality of the device driver, considering that the button’s hardware supports multi-clicks, and sends unique messages for double to quadruple-clicks.

Please refer to my Xiaomi device driver forum thread for more detailed information on my findings with the round button. I’m hoping to get other user’s input on what they’d like from the device driver before I sit down to complete it.

After about an hour it stopped logging button presses. I put the hub in add mode and did a short press which produced 4 blinks, then this was logged (subsequent presses produced the shorter log entry as in my prior post; I’ll give it a couple of hours to see if it drops off again):

2018-02-25 14:44:37.871:debugXiaomi Button 6, parse description: read attr - raw: 7DB10100003002FF4C0600100021EC0B21A8012400000000002182002063, dni: 7DB1, endpoint: 01, cluster: 0000, size: 30, attrId: FF02, encoding: 4C, value: 0600100021EC0B21A8012400000000002182002063

dev:2442018-02-25 14:44:37.818:debugXiaomi Button 6, parse description: read attr - raw: 7DB10100002C050042126C756D692E73656E736F725F737769746368, dni: 7DB1, endpoint: 01, cluster: 0000, size: 2C, attrId: 0005, encoding: 42, value: 126C756D692E73656E736F725F737769746368

So, weird thing here. Of my two round Xiaomi Temperature Humidity Sensors (I’m just gonna start calling them RXTHS from now on) one is still reporting temperature and humidity every .5C change or so, and battery reports every hour. The other one is only reporting battery, hasn’t reported a temperature or humidity change in 2 hours. Maybe the temperature has been stable enough not to report anything, but that seems unlikely.

2 of my 3 Aqara Temperature/Humidity fell asleep as well just stopped reporting after 14 hours. I pushed the pairing button a bunch of times to wake them up and off they went.
I did move them to their locations so maybe just to far away but SmartThings work in these locations but maybe Hubitat can not do the distance. Will put them back there and see how they do.
The third one is closer to the hub and it is still working fine.
All of the motion sensor are still working fine as well but they are still sitting on my desk next to the hub.

This is exactly the behavior I was experiencing before I applied Hub 698 update. Now, it’s been connected and still working 17 hours later.

I assume you’re running on the new .698 update, so the other thing I did that may have help was to remove all of my Xiaomi devices and Reset the ZigBee Stick (in Settings > Zigbee Information). If you do the same just be aware that all Zigbee devices will lose their connection, and need to be rejoined (though they will still be in the Devices list, so that should just involve using the “Discover Devices” mode and putting the devices in pairing mode).

That is the “status report” and your button’s voltage data is present. I’ve boldfaced it. It’s big-endian so the value is 0BEC, which is equal to 3052, divided by 1000 to give us 3.052 Volts.

That message is another kind of announcement message. ZigBee Cluster 0000 is for “Basic” information about the device, and Attribute ID 0005 of cluster 0000 is for the Model Identifier.

If you take the value 126C756D692E73656E736F725F737769746368 and convert it to ASCII text, it’s lumi.sensor_switch.

Don’t worry about sending more of the read attr - raw: messages for the button, as I’ve already got all of that from mine. Really what I’d like to help get working for you is the connection, seeing as my button is staying connect while your is not for some reason.

By they way, I’ve posted all of my findings on the button over here, and would love any input on what you think would be a good way to set up the device drivers’ output of the messages received from the button.

Thanks again for sharing feedback!

1 Like

I’m not convinced of that. I’ve seen long periods of no temp/humidity reports from the two that I have. Also, just last night, with the two of them side by side (for testing the new Hub 698 update) the log showed that they did not track their reporting identically.

These are not scientific instruments, I figure, and each one will report a little differently from the next (though generally they are within +/- 1 or 2 degrees C and +/- 1 to 3 percent humidity of each other).

You’re right. 3 hours later, it sent another temp/humidity update.

I would have to guess that the mesh signal strength of the USB-based ZigBee radio that Hubitat chose to use with their hub is perhaps not as strong as the ZigBee radio inside ST’s v2 hub. I have read a couple of user reports which seem to indicate this. There are a lot of factors that affect signal strength, of course, so it’s not necessarily just as simple as that.

Certainly the general advice here would be to consider adding mains-powered ZigBee devices that act as routers (repeaters) such as the Iris SmartPlug mentioned by @Tony, some posts above. However on SmartThings forum, there have been quite a few reports of repeaters not working well with Xiaomi devices. That still needs to be tested for the Hubitat, and we’ve only just possibly seen an improvement in the devices staying connected as of yesterday - so some time and more testing is needed to be surer about it all.

1 Like

After another hour it again became unresponsive, so I unplugged the Iris plug it was routed through and waited a bit. I did not push the pairing button on the Xiaomi; so its only possible route to the Hubitat was a direct connection. After a few minutes I pressed the button and sure enough it produced a log entry-- it had reconnected to the hub on its own. And within an hour or so after that I saw the battery report-type entry logged.

I expect it will stay paired (I am indeed on .698); if so this will be consistent with what I have experienced with my other 5 buttons that have been paired to SmartThings. They stay paired, but only if you ensure they are not initially paired through Zigbee routers. Luckily they seem to have decent range (at least I haven’t had any problems in the locations I’ve used them in my house).

I’ll keep an eye on it and post an update if it loses its connection.

1 Like

Thanks. I upgraded my hub to latest, removed the sensor, updated the driver and repaired the sensor again. Fingers crossed it stays connected. Will let you know!

I have read this as well, and it’s definitely important information to know when working with Xiaomi products and Zigbee routers. Thanks.

@veeceeoh unfortunately mine dropped shortly after pairing it. Its the round temp/humidity sensor and it’s sitting on top of the cabinet which contains the Hubitat hub.

The round button I paired yesterday afternoon is still sending hourly logs. Based on what I’ve seen, if there are any Iris repeaters nearby, even if the Xiaomi device is closer to the Hubitat it will likely wind up routing through one of them instead. I saw this with the SmartThings hub as well; I had an Iris plug located in the same cabinet as the ST hub and when I mapped the mesh it wound up with 4 child devices and the ST hub (inches away) had none.

Hi Keith, I got my hub plugged in and registered. I have not done anymore yet.

I have a separate Vlan for my IOT stuff and I think I want my hubitat on the 2nd floor and my ST in the basement to get better zigbee network coverage.

Therefore I need to program the cheap netgear device to support my vlan. Trouble is it only supports vlans 1-5 or something silly and I am using other vlans.

Once I get my LAN figured out I will start to connect my hubitat to my ST and put some Xiaomi sensors on the hubitat.


Welcome. Glad you’re here Brian.

Download the Hubitat app