[RELEASE] Xiaomi Drivers with Health Status and Zigbee2MQTT

Hold doesn't seem to work. Push and double tap work as it should though.

@birdslikewires Do you think it’s possible to get Hold working on my 11LM buttons using the 12LM driver?

If it’s sending the right messages, yes. Can you turn on the debug and trace logs, press and hold and send the log output here?

I hope this helps. Let me know if you need anything else.

Log

@birdslikewires Do you need any other info for getting hold to work?

Someone on here once said that they were still waiting for the 36 hour days they'd ordered from Amazon to arrive. I think my order is also still outstanding. :wink:

There's an updated version of the WXKG12LM driver which now contains support for the WXKG11LM. It's pointless maintaining them separately now given the r2 has the hold and release function; the reason to keep them separate was to avoid presenting functionality that the device didn't support, but if that now involves maintaining three almost identical drivers then my principles can go jump.

To try this out, first make sure you are running HPM v1.8.7. Then check for updates and install the WXKG12LM update. If you've installed manually you will now need to add my library code like this:

  • Download library.zip
  • Install using Developer Tools > Bundles > Import ZIP

Then you can update the WXKG12LM code to v1.04.

Clearly I don't have a WXKG11LMr2 to test with, so please check that the hold, release and level values are being updated as expected.

2 Likes

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: