[OBSOLETE] Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)

This is the only solution I found as well.

Before changing the device handler to include that line in the code, I just want to make sure that adding the Contact Sensor capability won’t cause any issues, because the temp-humidity sensor doesn’t actually have that capability.

After some help. I have sensor a few round the house all working fine. I had a spare one that I just added to SmartThings, found it added all ok. But when I open the sensor it doesn’t detect it’s open. And if I force it open it’s fine, but when I put them back together it still says it closed unless I force it close.
I have removed them a few times and re-Installed it and still same issue.

Anyone got any advise on how I can get it to work correctly. Don’t understand why it’s being like this!?

Hi @veeceeoh, thanks for your great work. I have a WXKG11LM button (aq2 version), using your latest DTH (1.42b) on V2 hub (25.26 FW). When i press the button the action doesn’t show in the tile, instead, shows in the last event section. Am i doing something wrong?

Hi guys, are there any known Device Handlers for the Xiaomi Aqara Air Conditioning Companion ?

I have Smartthings Hub v1, and have 30 odd Xiaomi devices added to this setup using the a4refillpad DTH - they all work great. I am now trying to add two additional Aqara Motion Sensors to the setup but i cannot for the life of me get them connected. I have followed all the helps topics, hold for 3 seconds, wait press again - replaced batteries, but still nothing showing up in CatchAll.

Would you know how i could troubleshoot this?

I too have temp reading as 190 degrees. May be I am sending this from hell! :wink:
I have shifted to THIS DTH and it is working perfect.

I just wanted to let you know that I am working on changing the virtual app tile button behavior in the Xiaomi Button WXKG01LM device handler to match the other button device handlers.

All three device handlers will display “App Pressed” in the main tile when the virtual button is pressed in the SmartThings “Classic” mobile app, and generate a button 1 pushed event.

ALSO, the update to all three device handlers will allow the virtual button to be pressed as often as liked, with no need to wait for the display to clear to “Released”.

AND, the method for the timer to automatically clear the app tile display to “Released” will be changed to function that hopefully fixes the issues you’ve experienced with it taking 15-30 seconds to clear to “Released”.

It’s really important to understand that for physical button interactions the tile display is only giving the user visual feedback. Many button device handlers don’t show anything in the mobile app tile display when the button is pressed, but these Xiaomi / Aqara device handlers include a mechanism to give visual feedback which is completely separate from the events that are generated for different physical button interactions.

So even if the UI tile display isn’t working 100% due to cloud execution timing issues, the events to use for automations will still work as expected.

Please see my explanation above. The SmartThings “Classic” mobile app tile display for different types of button actions is separate from the generation of events. Some users have been reporting issues with the tile display, and I suspect it is related to the code being run “in the cloud.” The most important thing is that the events will still work as expected, based on all my testing.

I am currently working on an update to all the button device handlers which should hopefully help reduce or eliminate the issues with the button status tile display.

There are a number of reasons why this could be happening. To help troubleshoot, I have some questions:

  • How far is the problematic door/window sensor from your SmartThings Hub?
  • How many ZigBee devices are connected to your hub?
  • Are you using any ZigBee devices which are mains-powered, not battery-powered (i.e., ZigBee devices that plug into the wall)?

No. That is a Wi-Fi device, so there won’t be any device handlers released in this thread, which only focuses on Xiaomi / Aqara ZigBee devices. There is only one solution I know of which allows use of Xiaomi / Aqara WiFi devices with SmartThings, called Mi Connector.

I this same question elsewhere in your own thread and also the FAQ on ZigBee direct connection thread, and the best answer I can give is the same as you got on that thread:

SmartThings v2 and v3 hubs have a limit of 32 ZigBee end devices, and very likely the v1 hub is the same. The only way to get past that limit is to use ZigBee routers (also known as "repeaters) which are most mains-powered ZigBee devices (except some ZigBee bulbs).

Unfortunately, the vast majority of ZigBee router devices are incompatible with Xiaomi / Aqara devices, either resulting in them dropping off the network or messages not getting passed on to the hub. However, IKEA sells a Trådfri Smart Outlet which has been confirmed to work just fine with Xiaomi / Aqara devices. In fact I use one myself, with no issues. That said, to my knowledge, nobody with a v1 hub has tried using a Trådfri Smart Outlet with Xiaomi / Aqara devices, so I can’t make any promises!

I have seen that DTH and plan to examine how it parses the temperature report data to improve the DTH available in the GitHub/bspranger/Xiaomi DTH collection.

1 Like

Thanks. Btw, it was by no means meant to ridicule, rather in a lighter vein. Your work is really appreciated and the Button’s dth (new one with multiple button#s) is working great.

1 Like

Thanks for the reply. As for the questions you asked:

  • is on the first Floor where my hub is on the ground floor it’s right above and 2 meters across. But I have another sensor a foot away which works ok.

  • when you say how many. Not sure what you would count as a few handlers that allow me to control ring doorbell, Kasa plugs, and some other but then I had sensors in questions and hue lights. So sorry to sure what the answer to this is.

  • most of mine are batteries bar one which is main powered. But I have checks the battery with it though.

Even though the non-working sensor is a foot away from working one, I have read reports from people that have had similar troubles, and fixed them by adding a ZigBee device that can act as a router (or “repeater”). ZigBee routers act similar to a WiFi extender, allowing end devices to connect to the hub via the router instead of directly to the hub, which might have a weaker signal due to distance / interference. Another reason why ZigBee routers can be useful is that SmartThings hubs have a limit of 32 ZigBee end devices connected directly to the hub. This is why I asked how many ZigBee devices you are using.

Most mains-powered ZigBee devices (except some ZigBee bulbs, like Sengled bulbs), which is why I asked if you have any mains-powered ZigBee devices. However, the vast majority of ZigBee router devices are incompatible with Xiaomi / Aqara devices, either resulting in them dropping off the network or messages not getting passed on to the hub. IKEA sells a Trådfri Smart Outlet ($10 US if bought at an IKEA store) which has been confirmed to work just fine with Xiaomi / Aqara devices.

It is also possible that the problematic sensor is defective. I would suggest moving it to the same room as the hub and test if it’s working in that location. Also if you do find that you have any ZigBee router devices, try pairing it again in the same room as the hub, because just moving it won’t necessarily force it’s connection to move from the router to directly to the hub.

Thanks for the information and it’s quite handy having a read what you said. For the IKEA outlet sounds a easy thing to get round but just don’t want to add another brand to the house but I’ll keep that idea in my back pocket if I need it down the line.
As you said it might be a duff sensor which after everything you said I’m thinking the same as I took right next to the hub and reinstalled it again and still no joy when it opens. So I have added a few more sensors for a project I was going to do. So I’ll nab one of those and see if it works where it needs to go. If the same happens there then I may have to bite the bullet and by the Ikea outlet to help. Thanks again for the help. Always good to know someone there to help when need

1 Like

It never hurts to try a fresh battery. Especially if you didnt install the last one yourself recently.

Tired the new battery and it worked. But I did notice the housing for the battery was lose. Managed to tighten it up and boom. Sensor works now when open and closed. So something simple sorted it out.

Just got to sort out aqara humidity sensor that just appears like this:

1 Like

Exact same thing for me !

Battery housing in Aqara open close sensor is not very durable. I have broken one of my open close sensors just when I took the battery off. One of the housings metal legs broke and after that there was contact issues. Weird thing was that it worked one month perfectly after I adjusted housing so that battery was tight enough. Then it went offline again and started to flash led constantly. Pushed housing down and that fixed it for couple of months. After that it started to do it more often and finally it stayed online just couple of days before going offline again.
So be careful if you remove battery.

@skenny16 & @tango87dr

If any Xiaomi / Aqara device pairs as a “Thing”, then you will need to manually assign the correct custom device handler (DTH) to that device.

If you need instructions on how to assign a different DTH to a device, please see this post by the ever-helpful @JDRoberts:

The name of the DTH you want to assign is “Xiaomi Aqara Temperature Humidity Sensor”:


Please note that the battery percentage may not be displayed for 1-2 hours, because Xiaomi / Aqara devices only sent a battery report every 50-60 minutes, depending on the model.


Go the round original button how come in the smart lighting app it’s still only shows pushed and held how do I get double etc?

Read post 1323 in this thread… :wink:

Not entirely 100% sure how it answers my question sorry

I think he meant post 1242. See it. Install new DTH for round button and you will have multi-button capabilities.