[Deprecated] Xiaomi / Aqara ZigBee device drivers (possibly may no longer be maintained)

That's what I did and I don't regret it. It was cheaper for me to buy a new hubitat hub dedicated to the devices + a few Ikea repeaters than it was to replace the Xiaomi devices.

One thing you could try is to unplug any "bad" repeaters during pairing of the Xiaomi devices. This will force them to either connect directly to the hub or to go through a "good" repeater. That should at least keep them online for a little bit, and if you paired them near the ST hub (as many on that forum recommend), that could be why you didn't have problems there (the other being that the hubs' radios have different characteristics and it's possible ST's radio was stronger and more appealing even if you paired in-place). This isn't a guarantee: Zigbee devices will re-evaluate routes and change if they think one is better, but I haven't seen a Xiaomi device of my own ever do this (other say they have), so you might at least have a little luck that way.

But if you want to not worry about it at all, I'd definitely recommend replacing the devices. Iris v2 motion sensors might still be available in a lot of 10 for $55 on eBay if you're able to find them anymore, but unfortunately other devices (and even these when they they were new) tend to be a bit more expensive, one of the allures (besides their generally small size) of Xiaomi devices, I suppose.

1 Like

Yeah well said. I'll have to either invest or get lucky with finding some Iris ones thanks

Or, if you have patience, you could wait to see what happens in the next month when the new Aqara devices (Zigbee 3.0 compliant?) come out. If they are as inexpensive as past models and are repeater agnostic, it could be a game-changer for a lot of folks.

I wasn't aware thanks! Will look them up!

1 Like

I only have 1 but it's been connected for probably 6 months now and never dropped. I also have a couple of xbees but I think the leak sensor is connected directly to the hub, not through an xbee repeater.

I also have done problematic xiaomi devices with my 3asmart devices as repeaters. Drives me crazy.

Let's start a club. Ha. Keen to find out if the new ones will resolve the issues. It's not clear.

Looked at this, but it still talks about “T1” devices. Those aren’t the new (3.0) ones right?

From the various articles I've read, it appears so. Here is another link.

Thanks for the info, guess I’ll be spending some on new xiaomi’s soon.

1 Like

Oh, at most a second, but really less than a second. It results in a slight lag when used in a lighting automation. I could do a test to compare them though!

However, Iris V1 Motion Sensors don't have a light / lux sensor. It's important to understand that even with the Aqara sensor, the lux reporting capability is limited, because it's only reported just after motion detection is reported (and is restrained by the sensor's 60 second "cool down" time on motion detection). You mentioned you have "Xiaomi motion sensors" and if those are really the Xiaomi model then they don't have any light / lux sensor at all.

Well, because the Hubitat and SmartThings hubs have different ZigBee radios, the Zigbee mesh network routing topography is likely different, which means that end devices would likely "choose" a different parent (either the hub itself or a repeater) when you moved over to Hubitat. That could then reveal that some of your ZigBee repeater devices aren't "friendly" with your Xiaomi / Aqara devices.



I only have one myself, and it is the device that most frequently drops its connection, though it has remained connected for up to 6 months without interruption. Just based on everything I've read, the leak sensor has the most connection issues. I should also point out I have the "original" revision of the Aqara Leak sensor with the contacts that are screw heads. The "new" revision has button-face contacts that can't be unscrewed.

Perhaps the connection issues are due to interference from the metal parts? I'd love to try cracking mine open and add more of an antenna lead, but that would of course ruin it's use as a leak sensor because it needs to be waterproof!



My foggy crystal ball says most of us won't be able to get any of the new ZigBee 3.0 certified Aqara devices in our hands until the end of the year, or even early next year.

Yes the T1 devices are the ZigBee 3.0 certified ones. There are also some I've seen with "S2" added to the name which will be ZigBee 3.0.

1 Like

Thanks!
Have to say that the "old" sensors have been working flawlessly for the last couple of years on ST, and the last 2 weeks on HE. No issues at all, since i improved the mesh.

2 Likes

Has anyone had event logs show nothing for 24 hours on the aqara motion sensors ?

Mine are still triggering events but nothing recent in events. Main status page of device shoes active state etc..

Edit. Turns out it wasn't just this device. All devices stopped logging events a restart fixed it. Also foijd my hub slowed down to a halt yesterday and had to restart to get it responsive in the web interface

This might be a stupid question, but is there a way to reduce the number of decimals for temperature readings? I just updated to the latest driver, and that one has two decimals compared to one for the older driver and for my other temp sensors.

It's purely cosmetic tbh, looks rather stupid on the dashboard with two decimal values. Especially when the precision in the sensor probably is a long way from such a precise reading. :slight_smile:

1 Like

I can add a preference to set the number of decimals for temperature, humidity, etc. readings (0, 1, or 2), but for now the only way to change it (globally) to 0.1 precision output is to edit line 129 of the code from:

temp = temp.round(2)

to

temp = temp.round(1)

I agree, and will probably make the default 0.1 precision (tenths).

3 Likes

@veeceeoh Have you noted any recent changes to the Aqara motion sensors? I just added a new one that is acting flakey (either slow or refusing to go active until the pairing button is pressed a few times) on HE, but performing perfectly when I pair with my Aqara hub.

Is there any info I can get you to help determine if there's yet another HW version to contend with?

I haven't read any reports from users that would lead me to believe there has been any hardware revision (other than the yet-to-be-released new certified ZigBee 3.0 T1 version).

To my knowledge, every hardware revision change came with a new ZigBee model designation, so that would be the way to check. Have a look in the device details page for the motion sensor, near the bottom. The Aqara Motion Sensor's ZigBee model is lumi.sensor_motion.aq2. Note that sometimes the model text gets truncated or the correct length isn't correctly determined during the pairing process so it may show up either too short (e.g., lumi.sensor_mot) or with superfluous garbage characters at the end.

The behavior you are describing sure sounds like ZigBee mesh issues (weak signal or an "unfriendly" repeater), or possibly due to a dying battery.

Also, has the motion sensor in question been "hacked" to detect motion every 5 seconds?

Yes, it's a lumi.sensor_motion.aq2. I just finally got it working (for now anyway). Seems like I might have just finally gotten a flakey one. Not something I'm used to. So far all of their devices have worked perfectly with HE. I'm sure this would pass their QC since it does pair easily and works as expected with the Aqara Hub.

It did not have the 5 second hack, but the other one in my kitchen did have the hack, and was working fine, so I decided to try it on this one too. What I found out is it will not go inactive at all when paired with the Aqara Hub if it's been hacked. It needs your driver settings to set it inactive after a time period.

Usually, after the hack is applied, I can set them anywhere between 5 seconds and whatever I want. But for some reason, this one will stay inactive if I don't enter something in the inactive time-out field, and it will flip back and forth between active and inactive if I enter 5 seconds. Once I enter 4 seconds in the inactive time-out field, it seems to now be working fine.

So for now, it looks like I can work with this one. I have a few more coming that I can replace this with if needed. I can always remove the hack and use it somewhere else paired to the Aqara Hub.