Here is the official LATEST Xiaomi Zigbee Sensor Device Handlers.
These are developed originally from @a4refillpad
The device handlers are located in GitHub here:
or can be brought in via the GitHub integration by using these settings:
These sensors are very sensitive. Drop offs are usually a result of the Xiaomi sensor trying to repeat through a zigbee router. They do not handle it well. Therefore when pairing you need to make sure all other zigbee routing devices are off and that the device is pairing directly to the hub.
Also interference on the 2.4 frequency band can be an issue. I had to move my wifi channels so they did not interfere with my zigbee. There are many devices on the 2.4 range (baby monitors, cordless phones, bluetooth, wifi, etc). These can all aid in the sensors dropping.
Very Good Notes from @veeceeoh
Besides Aqara Door/Window sensors, I also have some Xiaomi “original” Door/Window Sensors, and one Aqara Leak Sensor, and the information above also applies to to those sensors as well, from my experience.
Some additional information based on my experience and research.
When you hold the reset button down, as soon as the LED flashes, the device has been completely reset and goes into pairing mode. 3 seconds is about right from everything I’ve seen, but really what you should do is hold the reset button in until the LED flashes and then stop pressing the reset button. This should all of course be done after you’ve selected “Add A Thing” in your SmartThings mobile app.
After that initial LED flash, there is a pause, and then you’ll either see the LED flash once (a long flash), or it will blink 3 times (short flashes).
If the LED flashes once, pairing was unsuccessful, and you should short-press the reset button to “wake up” the sensor to try pairing again. The LED will blink as you short-press the button, and after a pause it will either flash once (a long flash) or quickly blink 3 times. If it flashes only once, short-press the button again, and repeat until you see the LED quickly blink 3 times.
When the LED blinks 3 times, the pairing process has started, and you will see a “catchall” message appear in the hub event log in IDE (in My Hubs → List Events, not in the Live Logging window).
Then, if you already have installed a correctly working Device Handler for the Xiaomi device in your IDE, a zbjoin message should appear in the hub event log shortly after the catchall message, and that’s when you’ll see the device show up in your SmartThings app, ready to be renamed.
However, because these are battery-powered “sleepy” ZigBee devices, the pairing process may not complete, so the best advice (based on a post by Ted Tolboom on this Athom home-automation thread) is to continue short-pressing the reset button every 5 seconds, even after you see the LED blink 3 times, until the pairing process is complete (and you see the device appear in your SmartThings mobile app.)
Following the procedures I’ve explained above, I have had 100% success in correctly pairing 4 Aqara Door/Window sensors, 4 “original” Xiaomi Door/Window sensors, and a Aqara leak sensor again and again in numerous tests. With my v2 hub, none of these sensors have dropped their connections.