[RELEASE] Xiaomi Aqara Mijia Sensors and Switches Driver

I’m finding that the leak sensor is dropping off. I’ve repaired it a few times. Have just tried it again now. Once paired, if I press the top of the leak sensor I can see battery information appear in the logs - but this info isn’t appearing on the “events” tab of the device. Odd. @chirpy ?

dev:11212021-03-03 08:02:37.991 infoLeak sensor 1 voltage changed to 3.01 volts

dev:11212021-03-03 08:02:37.990 infoLeak sensor 1 battery changed to 100%

dev:11212021-03-03 08:02:37.985 debugProcessing Xiaomi data (cluster:0000, attrId:0005, encoding:42)

dev:11212021-03-03 08:02:37.980 debugIncoming data from device : read attr - raw: 71900100007C050042156C756D692E73656E736F725F776C65616B2E61713101FF42220121BD0B0328120421A8010521590006240000000000082104020A2171B0641000, dni: 7190, endpoint: 01, cluster: 0000, size: 7C, attrId: 0005, encoding: 42, command: 0A, value: 156C756D692E73656E736F725F776C65616B2E61713101FF42220121BD0B0328120421A8010521590006240000000000082104020A2171B0641000

dev:11212021-03-03 08:01:53.902 debugIncoming data from device : catchall: 0104 0001 01 01 0040 00 7190 00 00 0000 0B 01 0682

dev:11212021-03-03 08:01:50.182 debugIncoming data from device : catchall: 0000 8021 00 00 0040 00 7190 00 00 0000 00 00 1000

The events should only update if there is a change in the state of the event (this is the HE preferred way). The fact you are seeing it in the logs does mean it is working as expected :smiley:

1 Like

I was going to say, if you re-pair the device (but do not remove the device from HE) and once done, hit Configure on the device page, that usually sorts these devices out.

1 Like

Thank you @chirpy for your effort and great work.

4 Likes

I added an Aqara door and window sensor (MCCGQ11LM). When I add that switch to the HE alexa skill, the alexa app shows that as a temp sensor, and not a open/close sensor.

Known issue? Workaround?

(the sensor works fine in hubitat FWIW)

That's a side-effect of using a combined driver, unfortunately. The simplest workaround might be to create a Virtual contact sensor and use that on alexa and then map the physical device to the virtual device using Rule Machine.

1 Like

Not sure if the original Xiaomi button is supported fully. Seems to work but I do get this:
dev:3492021-03-15 22:59:44.148 errorjava.lang.NullPointerException: null on line 316 (parse)

dev:3492021-03-15 22:58:04.115 errorjava.lang.NullPointerException: null on line 316 (parse)

That's odd. That line number in the latest driver would suggest that there's no value in the Hold Duration preference setting. Try hitting "Configure" on the drivers page and then make sure Hold Duration is set (default is 1) and Save Preferences.

Will do. I'll keep an eye on the logs to see if it helps.
Thanks

1 Like

Does Xiaomi Aqara Motion Sesnor report lux when there is no motion detected?
Looking for a motion sensor that can also be used as lux sensor.

I'm afraid not. It only reports lux when motion is detected.

1 Like

I have my Inovelli’s 4in1 setup to report lux every 5 minutes.

2 Likes

Since the update today my aqara devices are loosing connection, anyone has similar issues?

All mine are happy and present. I wonder if your zigbee mesh has been upset after the upgrade and reboot and needs to settle down? I'd watch it for 24 hours to see if it improves. Is it only the Xiaomi sensors playing up?

2 Likes

One of my six temp / humidity sensors went offline this morning when I did the update.

My single motion sensor is still online as well.

One door sensor didnt report for some time since update, but it started to report later without any intervention.

30 Aqara devices + 5 repeaters.
8 devices switching from present to not present and back, some no connection on different repeaters.
After restart my 5 Ikea repeaters the devices came back online. As mentioned by you, It looks the mesh was a upset indeed.

1 Like

I did have one motion sensor ignore me this morning but it was reporting "present".
It's been dead ever since 8:21. I re-paired it and it rejoined as previously joined so we'll see. The other devices I have checked so far are working.

1 Like

Hue motion sensor

1 Like

I've had a the odd Zigbee device ignore me since my last update, but they were both Sonoff devices. These things do seem fickle at times.

1 Like