[Edge] Driver for Aqara Switches and Remotes

Ok, no problem. I’ll clean up that log tonight, but I can’t test the device again until later on Saturday or Sunday.

1 Like

please let me know if it works.

Hi @veonua, I haven’t done any additional testing since my dth is working really well, including the child device. For now I’m going to wait. Thanks for your assistance.

ok, I’ll remove the fingerprints then

1 Like

Thanks for the driver, @veonua . It works perfectly for my Aqara QBKG23LM (1-gang, with neutral) and QBKG24LM (2-gang with neutral).

Would you consider adding support for QBKG26LM (-3-gang with neutral) ?

Hi,
but where is the button to install Aqara button …
I found nothing in the list of drivers to install …

It is difficult to develop blindly. QBKG26LM is unlike anything I have at home.

search for Xiaomi Switch

Thank you …

1 Like

Anybody have any luck pairing the WXKG01LM? I’ve removed the device handler, removed the button from the IDE, and still cannot pair with the driver. it connects to the hub but will not find the driver. Is there a step I am missing?

is it model: “lumi.sensor_switch”, deviceJoinName: “Original Xiaomi Button” ?

the one is hard to pair. As far as I remember you have to

  • remove device from St and reset the device (start new link)
  • start searching for devices nearby in the app
  • start pairing (only once per session)
  • keep a device awake by tapping the link button every several seconds.

It can take several attempts to pair it.
Kudos to @ygerlovin for this trick, without him I almost give up my older Xiaomi sensors and button.

2 Likes

Thanks for the info. The trick is in step 4. I was able to pair two buttons successfully. Your contributions are very much appreciated.

How can I find and select your driver for WXKG01LM. In any case, it cannot be found in the Type List. I followed your Invition Link and approved it and installed the driver

(Community) Edge drivers are not in the Type List. These devices can be found via “Scan nearby”

1 Like

So I tried it now half the day and get the button just not displayed as a thing. Only if I create it manually with an old groovy device handler. But then it cannot be controlled.

I have some information on some of the other Aqara switches. I’ll try to compile it into some sort of table, which I can send you, if you wish.

Thank you, Aonghus.
Technical information is not the biggest issue here. Lack of tech-savvy volunteers is.
The ST platform does not provide the ability to get remote logs, and many preparation steps need to be done manually on the user’s site. Without having devices and seeing only snippets of logs it is very hard to move forward.

I would recommend removing or disabling the old DTH drivers.
@1mike4many have you had issues like this? Maybe you can recommend something how to add a device.

Here is what worked for me with the button Remove the device, either through the app or IDE.Remove the device handler because it will find the device handler before the driver. Add device with scan nearby. Hold the reset button in until the blue light is lit for about three seconds, then release the button. It will flash once, then three times if pairing to hub is successful. (this will be the catchall message in the hub event log)… Now press the reset button and it should flash twice. Continue pressing the reset button between double flashes and eventually the device will show up. It took me more than a dozen presses of the reset button before it finally completely paired.
With the motion sensor, do the same thing except the pairing light will flash two times then three.
The temp/humidity sensors seemed to pair the easiest.

Also rebooting the hub after removing the device might help.

3 Likes

Fair enough!
I’ve tried your DTH on QBKG04LM & QBKG23LM. In both cases I seem to be getting spurious ‘held’ actions. With QBKG04LM it is happenng every 8 minutes, with QBKG23LM every 90 minutes. They are real in the sense that I can use them to trigger an automation.

2021-12-14T11:33:29.654521483+00:00 INFO Xiaomi Switch <ZigbeeDevice: 1a81bd02-a3c4-49ac-945f-e7140e0a5af1 [0x4C5E] (Office Switch)> sending Zigbee message: < ZigbeeMessageTx || Uint16: 0x0000, < AddressHeader || src_addr: 0x0000, src_endpoint: 0x01, dest_addr: 0x4C5E, dest_endpoint: 0x04, profile: 0x0104, cluster: OnOff >, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x00, seqno: 0x00, ZCLCommandId: 0x00 >, < ReadAttribute || AttributeId: 0x0000 > > >

2021-12-14T11:33:30.584708858+00:00 INFO Xiaomi Switch <ZigbeeDevice: 1a81bd02-a3c4-49ac-945f-e7140e0a5af1 [0x4C5E] (Office Switch)> received Zigbee message: < ZigbeeMessageRx || type: 0x00, < AddressHeader || src_addr: 0x4C5E, src_endpoint: 0x04, dest_addr: 0x0000, dest_endpoint: 0x01, profile: 0x0104, cluster: OnOff >, lqi: 0xFF, rssi: -62, body_length: 0x0008, < ZCLMessageBody || < ZCLHeader || frame_ctrl: 0x08, seqno: 0x14, ZCLCommandId: 0x01 >, < ReadAttributeResponse || < AttributeRecord || AttributeId: 0x0000, ZclStatus: SUCCESS, DataType: Boolean, OnOff: false > > > >

2021-12-14T11:33:30.598833025+00:00 INFO Xiaomi Switch Executing ZclClusterAttributeValueHandler: cluster: OnOff, attribute: OnOff

2021-12-14T11:33:30.602082525+00:00 WARN Xiaomi Switch old button held false

2021-12-14T11:33:30.606147483+00:00 INFO Xiaomi Switch <ZigbeeDevice: 1a81bd02-a3c4-49ac-945f-e7140e0a5af1 [0x4C5E] (Office Switch)> emitting event: {“state_change”:true,“attribute_id”:“button”,“state”:{“value”:“held”},“capability_id”:“button”,“component_id”:“main”}

2021-12-14T11:33:30.616795983+00:00 DEBUG Xiaomi Switch QBKG04LM Wall Switch (No Neutral, Single Rocker) device thread event handled