[RELEASE] Xiaomi Drivers with Health Status and Zigbee2MQTT

Everything has been updated to amalgamate the '11LM and '12LM wireless mini switch drivers now.

If you're using the WXKG11LM driver please update and switch your driver to the "Xiaomi Aqara Wireless Mini Switch WXKG11LM / WXKG12LM" one when convenient.

No resets or configuration button presses required, it'll just keep on going.

Hold works after the update. Thank you very much for implementing that into the driver!

1 Like

Good stuff!

Actually seems as though there's a firmware bug in the ones I have too, which makes them report their model as lumi.sensor_swit instead of lumi.sensor_switch.aq3. Suspiciously the truncated version is exactly 16 characters.

I had thought this was somehow my fault, but the model name is read by Hubitat and the raw Zigbee frame only contains lumi.sensor_swit as 6c 75 6d 69 2e 73 65 6e 73 6f 72 5f 73 77 69 74. So this one's not on me.

Instead, the driver just catches the shortened name as well as the full length. Matching works fine.

Ever seen this error it comes right after that Warning "tell the developer" you once told us to ignore. If this looks like something related to link failure back to the hub (like a broken path due to errant repeating) that might fit a situation I'm cleaning up after...otherwise it might be something that's been there that I just now noticed.

Thanks

Received : endpoint: null, cluster: null, clusterId: 0006, attrId: null, command: 00 with value: null and 9 bits of data: [D4, FD, FF, 04, 01, 01, 19, 00, 00]

I've seen this before, it's a ZigBee Device Object (ZDO) match descriptor request and according to the ZigBee Cluster Library Specification the command is used to discover an upgrade server, if I'm reading it correctly.

Driver updated to gracefully skip the messages and use the new library code bundle.

4 Likes

OK, so... that is the device saying "hey, any new firmware for me out there on a compatible hub"
and this likely came up when I took the battery out/in to shake the device into taking a new repeater path.

Just checked....it doesn't give up.....that msg is still popping up this morning. Gotta upgrade the driver.

And now I'm thinkin,
"hey, i've seen an option switch on some driver screens for ZDO and had no clue", sooo need to look how those are set.

OK, what am I doing wrong in the importation of your code or was that line 8 not as intended?

You need to install the library. I assumed you’d installed through HPM, that does the library install automatically.

Add this through the bundle installer (under Dev menu on the left).

1 Like

Waiting for HE to adopt & incorporate that under the platform as a means to encourage and facilitate 3rd party contributions. HPM is a utility that ought not be a third party App.

But my protest is probably just silent self punishment.

HE has said they are not going to do this, so it will be a long fruitless wait for you. Just install HPM.

Yeah, I hear yah.

But while I haven't been around here as long as you guys, I think I have seen some slightly different attitude towards a number of things that make HE life easier. So I'm not sure I'd "bet on never" for something like this coming under their umbrella.

Warning Warning Warning - A TAD OFF TOPIC

Got a notification in HPM that there is an update available for this one, but when updating I get an error that thers something wrong on "h**ps://raw.githubusercontent.com/birdslikewires/hubitat/master/xiaomi/drivers/xiaomi_mijia_smart_light_sensor_gzcgq01lm.groovy".
Tried to do a repair as well without luck.

Sorted it out.. One should read the post more thouroughly before rattling the cage bars... :grin:

1 Like

Ah, was it a HPM version issue by any chance? :grin:

After I installed the new library, everything worked. I had just installed the drivers through HPM in the past, so this was new to me.

Hmm, that's a little odd - if you've installed through HPM and are up to date (HPM v1.8.7 or later) then it should update and repair perfectly, without installing the library by hand.

Just tested here, it is working for me. Let me know if there are any further troubles.

1 Like

I had the same thing happen, with the same driver & I'd already updated HPM.
I ran a "repair" on HPM which rolled it back a couple of versions, re-updated it and then the Aqara update installed OK.

Thanks, how strange. A repair should always fetch the latest version from GitHub, so how it rolled you back I have no idea.

I have quite a few other drivers to update, but this library thing is very new in HPM. I’ll keep an eye on it.

Made some fairly substantial updates to these drivers, switching them to the new library methods, squashing a few little bugs and generally sprucing them up.

The drivers can now detect when they've been updated and will automatically check that their configuration is correct without you having to fire up each device and hit "Configure". Because that would be tiresome.

Note! Because of this, the first message received from a device will trigger the error "Cannot parse message, encoding type is null." This will immediately correct itself and you won't see the error again unless there is a genuine problem.

4 Likes

1 Like