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

Just ordered one from Aliexpress…
20$ and 14-20 days delivery to Denmark…
Planning to use it to control my bathroom ventilator - last device to get automated here for a 100% smart room… :blush:

1 Like

(Except for the toilet) :stuck_out_tongue_winking_eye:

1 Like

Thank you! After trying the new DTH I now have a useful Aqara double switch that I have in my Gazebo controlling the fan and the lights! Up until now this switch has sat in the closet for nearly a year doing nothing because I couldn’t get the two buttons to be recognized independently! I really appreciate the effort you’ve put into getting this code updated and working so well!

2 Likes

I’ve been trying to get a xaiomi door/window sensor to pair with my UK V2 hub. I’ve followed the instructions and have seen the zbjoin appear in the event log but it’s not showing up in the “add a thing” page on the app. Any suggestions?

New here. Can’t seem to find for the life of me how one actually integrates github thing to smartthings. I don’t see github in the ST app!

Which mobile app are you using - the SmartThings “Classic” app or the new Samsung Connect app? The “classic” app should be when pairing Xiaomi / Aqara devices.

If you are using the “classic” app, then there’s a way to manually add the device with information from the zbjoin event. I’d need to see a screenshot of the event details to walk you through it.

Hi, and welcome! GitHub integration is accomplished when logged into your hub’s Groovy IDE (Integrated Development Environment). The IDE is a webpage that you log into, either from a computer or mobile device, rather than an app.

I’d suggest reading through this FAQ:

And SmartThings’s official documentation on GitHub integration is here.

1 Like

Thanks for the response. I’ve managed to add it manually since posting that. FYI I was using the classic app.

I updated to latest dth and now the temp for the zigbee outlet is showing 170 degrees. Any idea why this is now inaccurate?

Can someone explain this code to me?
def tempValue = zigbee.parseHATemperatureValue("temperature: " + (convertHexToInt(descMap.value) / 2), "temperature: ", tempScale) + (tempOffset ? tempOffset : 0)

I changed it to
def tempValue = (convertHexToInt(descMap.value) / 2) + (tempOffset ? tempOffset : 0)

and it seems more accurate now I think. Although I still need to confirm the offset…

I had this problem as well with Xiaomi Relay module. I know it is a switch module but it also show the temperature (a small bonus…). I did not change anything in the DTH and after few days it repaired by it self and showed the correct temperature.
I had also a problem with Alexa saying that this device is not responding after turning on or off the light. This problem also disappear after few days and now she just says OK…

I need some help with a bunch of new window sensors I bought from china:


I already had 2 of them working with the aqara device handler from bspranger, but when I tried to pair the new sensors all I managed was to create “thing” devices , which would not even report if the switch was on or off
I manage to get them working by adding the standard xiaomi window device handler , again from bspranger, but currently battery levels are not detected
Has anybody have been able to check these new sensors and develop a new device handler for them?

Thanks

Actually, forget my last entry: it seems now I can see battery levels, on smartthings, so all it required was some time ( 1 hour or more) to get the data

1 Like

Hello, I bought 2 Xiaomi aqara buttons and one of them instead of reporting the event single-clicked / pushed reports the battery status.

model: lum.sensor_Switch.aq2 (WXKG11LM orig)
I have a v2 hub

The event triggered by pressing the button

I hope someone can help me. Thanks in advance.
Francois

So, one of the buttons works correctly, and the other doesn’t?

My guess is that there is a hardware problem with the one sending a battery status instead of button push message.

Your screenshot shows the correct message for battery status, so the device handler is working correctly.

Maybe the small reset button (used for pairing) is stuck?

Hi all.

Are there any know issues with a smartthings + Xiaomi device handler?

I can seem to search and add devices (temp and door sensors) they show online. But i get no temp reading or any other activity…

Using the latest bspranger/Xiaomi

Hub v2
f/w 000.025.00032

Thank Keith. I didn’t see any problem with the pairing button. I removed the battery and reinstalled/repaired and still have the issue. I seems that the button is rebooting or something. I think there is an hardware issue with it.

You might want to try a completely new battery.

As of May 16, all my Xiaomi motion sensors and aqara flood sensor went offline simultaneously, and I can’t get them back online. Has anyone experienced something similar? I’ve tested my sensors haven’t run out of batteries, and I have Hub v2 (US) w/ Firmware 25.00032 / Zigbee v2.8.3 / Z-wave v6.04. I have also tried “repair z-wave network” from iPhone app.

I’ve been using A4refillpad’s DH for more than a year without any issues until last month.

Any suggestion?

Yep, mine did
I just tried one contact sensor first

This worked for me…
Did not remove anything from smart things
I just reset the contact sensor by holding in the reset button with a pin until I got the three flashes and then just stuck the app into ‘add’ thing and clicked the button every 3 seconds and it showed up after a little while

I have had 2 moisture sensors go offline recently and the above method works but I have found that the 3 times I have done this (in a row) the sensors drop off 2 days later.
The old method of removing and re-adding, which is more painful with routines/WebCore, seems to be more effective for me.

There are a number of reasons why Xiaomi / Aqara devices might go offline, but the DH (device handler) is not one of them. For all of them to go offline simultaneously, it’s likely because of either the hub being down for some hours or some kind of interference to the hub’s Zigbee network.

Xiaomi / Aqara motion sensors are ZigBee devices. Z-Wave is a completely different standard, and SmartThings hubs have a separate Z-Wave and ZigBee radios that operate separate mesh networks. So repairing the Z-Wave network will do absolutely nothing to help with ZigBee device issues.

If you were originally able to pair the motion sensors using the “normal” Add a Thing method, then you should be able to manually re-join them to your hub’s ZigBee network. Just go through the pairing process without removing them from your hub’s device list. So start Add a Thing in the mobile app, long-press the reset button on the motion sensor until the LED blinks, wait for the LED to blink again, and if it flashes several times the motion sensor should be connected again. If the LED flashes only once, then short-press the reset button, wait for the LED to flash, again watching for it to flash several times, and if it flashes once, keep short-pressing the reset button until the response is several flashes.

If you originally used the so-called “catchall” method, then the motion sensors will need to be removed from your device list and paired again as “new” devices. If you’re not sure which method you used, I’d try manually re-joining them first (as explained in the above paragraph) and if that doesn’t work, then remove them from the device list and pair as new devices.



If any Xiaomi / Aqara device is dropping off the network some hours / days later, then they are probably connecting to the SmartThings Hub via an “incompatible” ZigBee repeater device.

ZigBee repeater devices are most AC-powered ZigBee devices, with the exception of some smart bulbs such as Singled bulbs. Repeaters are normally helpful, because the extend the range and reliability of a ZigBee network, but unfortunately Xiaomi / Aqara devices don’t follow the ZigBee standards 100% and in cases where their network connection is dropped, they don’t rejoin as requested by the repeater as all other ZigBee compliant devices do.

So, do you have any AC-powered ZigBee devices?



There are no known issues with the latest Xiaomi Temp-Humidity Sensor device handler like what you’re describing.

What messages are you seeing for the Temp-Humidity Sensor in the Live Logging window of the IDE?

1 Like