[OBSOLETE] Xiaomi Sensors and Button (beta)

I’m guessing that a Scene isn’t quite what you think it is. A scene is a group of settings for lights and switches (on/off, dimmer, colour etc) that can be applied together. You can trigger a scene from a routine or the Smart Lighting app and maybe some other places I am not yet aware of, but a scene doesn’t have any trigger in itself. So you wouldn’t expect to have a door sensor in the scene.

I like these, please let us know if it works out


Hey guys

I have a few of these sensors and for some reason all of them stopped reporting on the same day around the same time. On August 17th my door and motions sensors all stopped working. I have tried to reboot the hub as well as remove the batteries on the sensor but there is no change.

Any ideas? Any way for me to see if there were any changes to smartthings hub at that time?



1 Like

Let me know if it works when u get it please

Hey guys this thread is packed I’ve looked through and Google too.
I have a couple of the xiaomi sensors (humidity and motion)installed the Dh’s and used the pairing process and they connect fine. When I use the catchall method by the time I go to input the code my device has already been added by smartthings within the app from searching for devices…so my humidity and motion sensors are connected could be an hour could be 5 hours then they disconnect…I delete them and add again and again…same result I’ve left them beside the hub and no change…am I doing something wrong…just to note when I first connected my humidity sensor it stayed connected for about a month or so which was earlier in the year.

I’ve started work on a DTH for this new Xiaomi device, as discussed over on this thread. Although it’s not exactly the right term, I’m going to stick with calling it the Aqara Vibration Sensor, because it will be too confusing to call it a motion sensor when there’s already a Xiaomi (PIR-style) Motion Sensor. It does detect motion, just physical motion of the sensor itself rather than detecting motion of other objects by visual means.

The Aqara Vibration Sensor can detect three types of motion:

  1. Tilt (likely using an accelerometer)
  2. Vibration
  3. Free fall (a drop of at least 3 inches)

Also, there are 3 levels of sensitivity which the sensor can be set to.

People using other Home Automation platforms are still working on reverse-engineering the non-standard way in which Xiaomi has implemented these functions, and I don’t have one of these sensors (yet!) so it may take a little while to complete a fully finished and functional DTH.

I will post here again when I have an initial beta release of the DTH to share, but after that I plan to post further updates on this thread: Original & Aqara Xiaomi Zigbee Sensors (contact, temp, motion, button, outlet, leak, etc)

I have one of the temperature sensors that is in use in a freezer - it is showing values of 120 degrees rather than -20… as soon as it went to zero the next reading was 100.

is this an issue with the handler or the device?

The issue is with the device handler - which one are you using?

I’m using the a4refillpad one

Here is my how to

1 Like

The method to calculate the temperature in that device handler is incorrect for negative values.

You should try using the much more up-to-date device handler from the bspranger/Xiaomi GitHub repository. Also, there is a SmartThings forum thread dedicated to those newer updated device handlers for Xiaomi Zigbee sensors & buttons:

Great, that works a treat

1 Like


I was using my >Xiaomi motion sensor for a while and it was working with no issues.
Today I noticed that it showed as "unavailable " on the mobile app.
It actually shows the motion states but shows up as unavailable.
When I check on the IDE its state is HUB_DISCONNECTED

I then removed the sensor from hub and re-paired with the catchall method.
The Network ID has changed but it still shows motion states. However it still shows up as “unavailable”

What’s wrong ? How can I solve this ?

this issue got solved after a reboot of the hub.
but isn’t it weird ?

I saw another recent thread where others experienced this. They seemed to think it had to do with their beta hub firmware.

I’m expecting a shipment of these sensors soon… hopefully everything will still work in ST by the time they arrive.

Do you have the device health feature enabled?

My experience is that is doesn’t work correctly with Xiaomi devices due to the different way they check in as compared to other Zigbee devices. Device Health lists them as “unavailable” when they are actually still connected and working fine.

Unless you have a real need for the Device Health feature, I’d recommend turning it off if you’re bothered by the “unavailable” status on Xiaomi devices.

1 Like

I run a number of original non Aqara Xiaomi sensors (motion, temp and door) and have device health turned on. None of then report as unavailable. I am using the original a4refillpad DTHs for all of them.

Perhaps you’re one of the lucky ones. I should mention that I didn’t have the “unavailable” Device Health status all of the time - just a number of times. When I looked for information about it at the time (late last year), what I found was that Device Health only officially supports devices that use SmartThings DTH code.

Having worked extensively on the bspranger/Xiaomi DTHs, I can say that the code of setting up the device health check time interval is exactly the same as it is in the a4refillpad DTHs.

Based on recent troubles that people have been having, though, I think maybe it might be a good idea to remove that code completely until SmartThings announces formal support of Device Health for devices using custom DTH code.

SmartThings has publicly admitted troubles with Device Health last week, and they claim that everything is resolved now:

Also, from the SmartThings Status page:

@tommyincville Please forgive my ignorance, but (If you would share it) I would like to use your refined “Humidity focused” xiaomi humidity sensor code. I can only find reference to it and cannot find anywhere that I can copy and paste the entire code from. Can I use it? of so, will you email it to me or post it so I can copy it? Please advise (either way).

Warmest Regards,

Could someone help me out regarding the original xiaomi button. Obviously there is something I am missing/not understanding here; I paired the button successfully but when I add the “smart lightning” in the classic app and select it as a dimmer I can only change between “turn on” and “turn on and set level”. The set level seems to be a static value.
I would love to be able to long press it and have the levels go up and down. Is this possible?
I am trying to change the dimming levels on an ikea trådfri bulb.