Xiaomi Aqara Zigbee Switch DTH--help needed

That is not the correct DTH code for the battery-powered Aqara Wireless Smart Wall Switch model WXKG02LM. You gave the link to the DTH for the small Aqara Button (models WXKG11LM/ WXKG12LM). I would appreciate it if you could remove that link from your post because it will confuse people.

I will copy the part of announcement post that I linked to with information on the new Aqara Wireless Smart Light Switch DTH here:

~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~

[RELEASE] Aqara Wireless Smart Light Switch DTH v0.9.2

For 2016 & 2018 revisions of the 1-button WXKG03LM and 2-button WXKG02LM

This new device handler (DTH) was split off from the “old” Aqara Button DTH in order to best support the two revisions of the one and two-button Aqara Wireless Smart Light Switches. The code has been written so that this device handler can be used with any firmware version, but for users with hub running on Hub Firmware 25.26 or higher, all three actions of the older 2016 revision two-button model WXKG02LM are now recognized: left, right, and both button(s) pushed.

All users of Aqara Wireless Smart Switches are highly encouraged to start using this DTH immediately! You may discover you have more button actions available to make use of in Smart App automations than with the old DTH.

The new Aqara Wireless Light Switch DTH code can be found here.

If you were are already using the old Aqara Button DTH with a paired Aqara Wireless Light Switch, you will need to change to this new DTH. Log into your hub’s Groovy IDE, go to the “My Devices” tab, click on the name of your Aqara Wireless Light Switch in the “Display Name” column, scroll all the way down and click the “Edit” button. Click the pop-up list next to "Type: ", select “Xiaomi Aqara Wireless Switch”, and then click the “Update” button. IMPORTANT: After updating to the new DTH, open the preference settings for your button in the SmartThings “Classic” Mobile App and then press “Save”. This will check your button model and set up the correct number of buttons available for automations.

For instructions on how to check which revision of Aqara Wireless Light Switch you have, please see this post.

Model WXKG03LM (1-button) Function Chart

Action 2016 revision 2018 revision
Single press button 1 pushed button 1 pushed
Hold * button 1 held
Double-click button 2 pushed

Model WXKG02LM (2-button) Function Chart

Action Side 2016 rev (old FW) * 2016 rev (new FW) 2018 revision
Single press Left button 1 pushed button 1 pushed button 1 pushed
Single press Right button 1 pushed button 2 pushed button 2 pushed
Single press Both button 1 pushed button 3 pushed button 3 pushed
Hold ** Right button 1 held
Hold ** Right button 2 held
Hold ** Right button 3 held
Double-click Left button 4 pushed
Double-click Right button 5 pushed
Double-click Both button 6 pushed

* Note about 2016 revision of 2-button model WXKG02LM : For users with SmartThings Firmware 24.x or lower, all three button actions (left/right/both pressed) pass on the same button pressed message to the DTH, so there’s no way to tell which button(s) were pressed, and so only button 1 pushed events are generated. With Firmware 25.21 or higher, the three different button actions are recognized.

** Notes about the hold function : Both of the 2018 revision of the two models send a “held” message when the button(s) have been held for 400 milliseconds. This timing is hardware-based and cannot be changed, but if the button(s) are held for more than 10-15 seconds the device will go into pairing mode, so be careful! No button release message is sent by any of the Aqara Wireless Light Switches.

Detailed Change List

version 1.4.1b

  • Initial release

version 1.4.2

  • changed device definition name to get GitHub Integration working correctly

This new improved device handler code is open source and free .
But if it has helped you, a coffee / beer donation is always very much appreciated!
PayPal: 37544ab59e07a5c90719f07501453cae3ed7b043 Venmo: @KeithPG

~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~

That new DTH for models WXKG02LM & WXKG03LM linked above is from me, actually. Because bspranger has switched to a different home automation hub solution, I am maintaining and updating the collection of Xiaomi / Aqara DTHs in his GitHub repository.

Anyhow, my advice is to start over by pairing the WXKG02LM again, and if it still appears as a thing, manually change to the correct driver (the one above) and stop worrying about it.

The way the hub matches a DTH to the device being paired is this:

The DTH code contains a line called a “fingerprint” which includes some data about the basic capability set and the ZigBee model ID. In the case of the WXKG02LM, the ZigBee model ID is different between the 2016 and 2018 revisions. If you actually have the 2018 revision, then the ZigBee model ID is lumi.remote.b286acn01. For detailed information on how to check the revision of a Aqara Wireless Light Switch see this post.

With Xiaomi / Aqara devices, I have personally experienced and read about cases where the ZigBee model ID wasn’t correctly transmitted and the match to the fingerprint in the correct DTH failed. That doesn’t mean the device isn’t working, however.

What I highly recommend doing is removing the switch from your hub and then pair it again, and if it gets added as a “Thing”, immediately change the assigned DTH.

If you need instructions on how to assign a different DTH to a device, please see this post by the very helpful SmartThings community member @JDRoberts:

For models WXKG02LM & WXKG03LM the name of the DTH you want to assign is “Xiaomi Aqara Wireless Switch”:

If you are using a SmartThings v2 o v3 hub with Hub Firmware 25.26 or higher, then two-button functionality is now working great for both the 2016 and 2018 revisions of model WXKG02LM.

If you have any troubles getting it working, please let me know. It would be much better to ask in the bsbranger

1 Like