# Xiaomi Aqara Switch Great Deal no DH?

**URL:** <https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072>\
**Category:** Deals\
**Created:** [July 7, 2017, 8:27am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072 "2017-07-07T08:27:13Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sergio\_Ferreira](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/sergio_ferreira/32/93643_2.png) [@Sergio\_Ferreira](https://community.smartthings.com/u/Sergio_Ferreira)\
**Post date:** [July 7, 2017, 8:27am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/1 "2017-07-07T08:27:13Z")

</div>

There is a great deal for the Xiaomi wall switch:

> **[Xiaomi WXKG02LM Aqara Smart Light Switch Wireless Version -$15.31 Online...](https://www.gearbest.com/alarm-systems/pp_610095.html)**
>
> Just US$15.31 + free shipping, buy Xiaomi WXKG02LM Aqara Smart Light Switch Wireless Version online shopping at GearBest.com.

But it looks no one has yet a working DH

---

<div class="post-metadata">

**Author:** ![tmleafs](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/tmleafs/32/39837_2.png) [@tmleafs](https://community.smartthings.com/u/tmleafs)\
**Post date:** [July 7, 2017, 9:57am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/2 "2017-07-07T09:57:05Z")

</div>

See my post here

> [@Xiaomi Aqara Smart Light Switch Wireless Version (Not Wired)](https://community.smartthings.com/t/xiaomi-aqara-smart-light-switch-wireless-version-not-wired/91658):
>
> Can someone confirm they have successfully added these to smartthings and if so which DH are you using They are battery powered and can be stuck any where. Single version WXKG03LM [http://www.gearbest.com/access-control/pp\_626696.html](http://www.gearbest.com/access-control/pp_626696.html) Double version WXKG02LM [http://www.gearbest.com/alarm-systems/pp\_610095.html](http://www.gearbest.com/alarm-systems/pp_610095.html) Cheers

No replies

I have ordered a single and double should be here 7-20 days.

Some discussion here

> [@Xiaomi Aqara light switches - no neutral required?](https://community.smartthings.com/t/xiaomi-aqara-light-switches-no-neutral-required/78101):
>
> Came across these in another thread (off-topic from the main thread), thought I’d post here as may be of interest and I’m selfishly interested if one of you guys wanted to have a look and feedback slight_smile Xiaomi appear to have added some Zigbee switches to their product line recently. The community have had some good success getting Xiaomi: temp/humditysensor contact sensor cube (7 button remote) motion sensor appliance plugs working, often by trial and error. The kit is well made, cheap and it generally looks very good (the motion sensor is tiny). If you’re interested in that have a look here: Anyway back to the the switches. @KellyDarren pointed me at these: [https://www.aliexpress.com/store/product/In-Stock-2016-Xiaomi-Aqara-Smart-Light-Control-ZiGBee-Wireless-Key-and-Wall…](https://www.aliexpress.com/store/product/In-Stock-2016-Xiaomi-Aqara-Smart-Light-Control-ZiGBee-Wireless-Key-and-Wall-Switch-Via-Smarphone/2338199_32747242617.html)

and about a DH

> [@Xiaomi Aqara Zigbee Switch DTH--help needed](https://community.smartthings.com/t/xiaomi-aqara-zigbee-switch-dth-help-needed/82072):
>
> I just purchase a few units of Xiaomi Aqara Zigbee Switch for development. Plan to replace all my Broadlink TC2 switch with it. I am in the process of writing a device handler for it and having trouble getting the cluster information during join process for this device. I can only see the bunch of raw message in the hub log after the add device process completed. Most of them does not look valid except for the first raw message. raw:F4690000158D00013E6CC2, dni:F469, errorCode:00, ieee:00158D00013E6CC2 Which appear to be Device Network ID and Zigbee ID I keep reseting the switch and somehow the following message appear in the hub log, ep\_cnt:2, ep:01 02 desc: 01 0104 019A 00 01 0000 00 desc: 02 FC01 019A 00 00 00 It appear to have two endpoint with a generic cluster 0x000…

---

<div class="post-metadata">

**Author:** ![daniionescubrasov](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/daniionescubrasov/32/68416_2.png) [@daniionescubrasov](https://community.smartthings.com/u/daniionescubrasov)\
**Post date:** [September 3, 2017, 8:50pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/3 "2017-09-03T20:50:40Z")

</div>

Does anyone ordered, receive and make this babies work?

---

<div class="post-metadata">

**Author:** ![Tiago\_Goncalves](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@Tiago\_Goncalves](https://community.smartthings.com/u/Tiago_Goncalves)\
**Post date:** [September 4, 2017, 1:43pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/4 "2017-09-04T13:43:52Z")

</div>

I received one last week. But when I tried to adapt a DH to this version. When you press one of the two button you receive always: “on/off: 1” from both, so you cannot differentiate left or right button from the info received. Other issue you don’t receive info when button is released, So you cannot have a button held position.

---

<div class="post-metadata">

**Author:** ![SuperMouseDV](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@SuperMouseDV](https://community.smartthings.com/u/SuperMouseDV)\
**Post date:** [November 16, 2017, 4:26am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/5 "2017-11-16T04:26:06Z")

</div>

I just got one of these. Wanting to use to control the Ceiling fan once I get the right control to it.  
If this works (hoping the firmware update helps make these show up better) Ill do this for 4 fans in my  
home in total…  
Any Progress on this Switch. I love its size and feel (got the 2 button version)

---

<div class="post-metadata">

**Author:** ![lincolnw](https://avatars.discourse-cdn.com/v4/letter/l/90ced4/32.png) [@lincolnw](https://community.smartthings.com/u/lincolnw)\
**Post date:** [December 12, 2017, 5:34am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/6 "2017-12-12T05:34:14Z")

</div>

Just checking in on this thread.  
I have the wireless two button ([https://www.aliexpress.com/item/Xiaomi-Smart-home-Aqara-Smart-Light-Control-ZiGBee-Wireless-Key-switch-and-Wall-Switch-Via-Smarphone/32761798246.html](https://www.aliexpress.com/item/Xiaomi-Smart-home-Aqara-Smart-Light-Control-ZiGBee-Wireless-Key-switch-and-Wall-Switch-Via-Smarphone/32761798246.html)).  
It’s a really nice looking switch.  
Hoping to get it up and running.

Cheers, L

---

<div class="post-metadata">

**Author:** ![Zipppy83](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zipppy83](https://community.smartthings.com/u/Zipppy83)\
**Post date:** [January 17, 2018, 8:26am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/7 "2018-01-17T08:26:15Z")

</div>

> [@tmleafs](#):
>
> WXKG02LM

Any news? i have 2 botton version, and doesn’ t run. can you link the DHT or some istructions?

---

<div class="post-metadata">

**Author:** ![adam\_walker](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@adam\_walker](https://community.smartthings.com/u/adam_walker)\
**Post date:** [January 17, 2018, 9:05am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/8 "2018-01-17T09:05:46Z")

</div>

I don’t think it will be possible for smartthings to know which button is pressed. The back end system is doing something to prevent recognition of which button is pressed.

---

<div class="post-metadata">

**Author:** ![adam\_walker](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@adam\_walker](https://community.smartthings.com/u/adam_walker)\
**Post date:** [January 17, 2018, 9:06am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/9 "2018-01-17T09:06:19Z")

</div>

My understanding is this is a fundamental issue, that can’t be fixed at this point.  
Hope to be proved wrong…

---

<div class="post-metadata">

**Author:** ![Zipppy83](https://avatars.discourse-cdn.com/v4/letter/z/6de8d8/32.png) [@Zipppy83](https://community.smartthings.com/u/Zipppy83)\
**Post date:** [January 18, 2018, 8:37am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/10 "2018-01-18T08:37:56Z")

</div>

Please can you link me your DHT device code.  
Thanks

---

<div class="post-metadata">

**Author:** ![mckenph](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/mckenph/32/117410_2.png) [@mckenph](https://community.smartthings.com/u/mckenph)\
**Post date:** [January 22, 2018, 8:11pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/11 "2018-01-22T20:11:39Z")

</div>

Try this DTH to see if it works. I had Brian add something in this DTH that will help.

> <https://github.com/bspranger/Xiaomi/blob/master/devicetypes/bspranger/xiaomi-aqara-button.src/xiaomi-aqara-button.groovy>

---

<div class="post-metadata">

**Author:** ![babbahotep](https://avatars.discourse-cdn.com/v4/letter/b/85e7bf/32.png) [@babbahotep](https://community.smartthings.com/u/babbahotep)\
**Post date:** [February 3, 2018, 7:58pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/12 "2018-02-03T19:58:34Z")

</div>

bump ? any news here ?

---

<div class="post-metadata">

**Author:** ![nychan](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/nychan/32/71511_2.png) [@nychan](https://community.smartthings.com/u/nychan)\
**Post date:** [March 16, 2018, 3:41pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/13 "2018-03-16T15:41:38Z")

</div>

Bought the one button version working perfect with the aqara button DTH above

---

<div class="post-metadata">

**Author:** ![veeceeoh](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/veeceeoh/32/96174_2.png) [@veeceeoh](https://community.smartthings.com/u/veeceeoh)\
**Post date:** [March 17, 2018, 7:18pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/14 "2018-03-17T19:18:49Z")

</div>

Currently, it is impossible to make a DH that allows the ST hub to recognize both buttons of the two-button WXKG02LM model.

The technical reason for this is that the SmartThings ZigBee attribute report message parser strips out what is known as the endpoint number value. The two-button WXKG02LM model uses a different endpoint number for the left button press, right button press, and both-button press. The DH only receives all of those messages as coming from _one_ button.

Until SmartThings changes the way it handles ZigBee attribute reports with different endpoint numbers, the two button functionality of the WXKG02LM model will never work.

---

<div class="post-metadata">

**Author:** ![maxtay](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/maxtay/32/74361_2.png) [@maxtay](https://community.smartthings.com/u/maxtay)\
**Post date:** [May 24, 2018, 10:37am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/15 "2018-05-24T10:37:55Z")

</div>

What about a child device handler like the DH developed for multiple relays Sonoff control?

---

<div class="post-metadata">

**Author:** ![jhamstead](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jhamstead/32/38969_2.png) [@jhamstead](https://community.smartthings.com/u/jhamstead)\
**Post date:** [May 24, 2018, 10:57am UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/16 "2018-05-24T10:57:16Z")

</div>

You can talk to different endpoints if you send the raw ZigBee messages instead of using the built in functions. It’s a pain but it is possible.

---

<div class="post-metadata">

**Author:** ![veeceeoh](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/veeceeoh/32/96174_2.png) [@veeceeoh](https://community.smartthings.com/u/veeceeoh)\
**Post date:** [May 24, 2018, 4:14pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/17 "2018-05-24T16:14:23Z")

</div>

> [@jhamstead](#):
>
> You can talk to different endpoints if you send the raw ZigBee messages instead of using the built in functions. It’s a pain but it is possible.

Not such a pain, but it doesn’t work with Xiaomi’s battery powered buttons / devices because in mine and others’ testing they ignore `Zigbee.readAttribute` commands.

So all the device handler has to work with are the attribute report messages sent by the device, which are stripped of endpoint data by ST’s main Zigbee parser.

> [@maxtay](#):
>
> What about a child device handler like the DH developed for multiple relays Sonoff control?

The child device scheme only works if the device will work with `Zigbee.readAttribute` commands, and the only Xiaomi devices that will recognize those are the _mains powered_ Aqara light switches (models QBKG11LM & [QBKG12LM](https://community.smartthings.com/t/original-aqara-xiaomi-zigbee-sensors-contact-temp-motion-button-outlet-leak-etc/113253/790)) and the [Aqara Curtain Motor](https://community.smartthings.com/t/xiaomi-curtain-dth-partially-openable/126972).

---

<div class="post-metadata">

**Author:** ![jhamstead](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jhamstead/32/38969_2.png) [@jhamstead](https://community.smartthings.com/u/jhamstead)\
**Post date:** [May 24, 2018, 4:22pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/18 "2018-05-24T16:22:23Z")

</div>

Take a look at the NYCE DTH below. You can do everything manually, such as read attributes and bind to them with raw commands. With the raw commands you can specify different endpoints.

You’d send raw:

```
st rattr
st wattr
zdo bind

```

> <https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/master/devicetypes/smartthings/nyce-motion-sensor.src/nyce-motion-sensor.groovy>

---

<div class="post-metadata">

**Author:** ![veeceeoh](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/veeceeoh/32/96174_2.png) [@veeceeoh](https://community.smartthings.com/u/veeceeoh)\
**Post date:** [May 24, 2018, 4:29pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/19 "2018-05-24T16:29:32Z")

</div>

> [@jhamstead](#):
>
> Take a look at the NYCE DTH below. You can do everything manually, such as read attributes and bind to them with raw commands. With the raw commands you can specify different endpoints.

Yes, but that’s an NYCE device. The Xiaomi battery-powered device ignore read attribute commands, whether sent using ST’s `zigbee.readAttribute` call or the raw commands. @a4refillpad’s older DTH’s attempted to use raw commands to no avail.

The other issue is even if you could poll the devices, it’s just adding further latency on cloud-executed code, which is not so good for button devices.

EDIT: I’m not trying to be argumentative - all of your suggestions are well-appreciated, but I and other people have spent loads of time trying to get read / write attribute commands to work, both on the ST platform and other HA platforms. Xiaomi just made the devices somewhat limited in their Zigbee functionality.

---

<div class="post-metadata">

**Author:** ![jhamstead](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/jhamstead/32/38969_2.png) [@jhamstead](https://community.smartthings.com/u/jhamstead)\
**Post date:** [May 24, 2018, 4:36pm UTC](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072/20 "2018-05-24T16:36:09Z")

</div>

I see. I misunderstood thinking that you could use readattribute on the first button but not others because of endpoint issues.

I’m guessing even the lower level parse return method strips endpoint data?

[Next page](https://community.smartthings.com/t/xiaomi-aqara-switch-great-deal-no-dh/92072.md?page=2)
