@cowboysdude & @busybeee:
Well, we’re all doing something wrong here, because these sensors were never meant to be used with a SmartThings hub!
Anyhow, yes these sensors do require some patience, and there is definitely a sequence of how things should be done in order to get them paired. People seem to have all kinds of opinions based of the hoops they’ve jumped through that luckily got their sensors working for them.
Me, I like working with facts, and the best facts are to look at what the manufacturer Xiaomi gives as instructions on how to pair their sensors with their own hub. That’s because what the sensors do when you press the long-press or short-press the reset button does not change.
So I did a bunch of searching and research, and the best explanation of the the functions of the reset button and the meaning of the LED flashes was from a manual for the Aqara Door/Window sensor. I have posted about this manual and the best method for pairing Xiaomi sensors in this post.
I have some Aqara Door/Window sensors, and also some of the “original” Xiaomi Door/Window sensors, and one Aqara Leak Sensor. And I have paired all of them to my v2 hub using the normal “Add a Thing” method in the SmartThings mobile app, and I believe you should be able to do that too. Failing that, you can use the “catchall” method, but the order of steps that you gave is not quite correct.
It’s in my post that I linked to above, but I’ll repeat the steps again here:
Install the device handler in SmartThings IDE, and I highly suggest using the one from @ArstenA in the bspranger Xiaomi Device Handlers for SmarthThings GitHub repository. The direct link to @ArstenA’s device handler for the Xiaomi (“original”) Temp/Humidity Sensor is here. Copy & paste that code completely replacing the code you have from a4refill, save, and make sure to click Publish -> For Me.
In the IDE, click on My Hubs, which should take you to a page showing information about your hub, scroll down to “Events” and click the “List Events” link. That takes you to the hub event log page, which is the only log where you will see the “catchall” message followed by a “zbjoin” message when Xiaomi devices have paired correctly.
In the SmartThings mobile App, go to the Things list, and press “Add a Thing”.
On one of your Temp/Humidity sensors push and hold the reset button until you see the LED blink (Xiaomi says hold the reset button for 3 seconds), and then release the button. After a short bit of time, the LED will flash AGAIN - either once (a long flash), or 3 times (3 rapid flashes).
If the LED flashed 3 times, then the Xiaomi sensor is telling you it has linked to the SmartThings Hub, but the pairing process still needs to be completed. Refreshing the Hub Events Log page would reveal a “catchall” message from the device. I have done loads of testing and confirmed the catchall message happens the first time you see the LED blink 3 times.
If the LED flashes only once, the Xiaomi sensor has not linked to the SmartThings Hub yet.
In BOTH situations, you will need to short-press the reset button a number of times, until the Xiaomi sensor shows up in your SmartThings mobile app ready to be renamed.
Regardless of whether you saw the LED flash once or 3 times in step 4, you should SHORT-press the reset button. The LED will blink when you push it, then wait a bit of time, and then flash again - either ONCE, meaning the device still hasn’t linked to your hub, or 3 times, meaning the device is confirming that it has joined the hub. On my Xiaomi “original” Door/Window sensors, those 3 flashes when I short-press the reset button sometimes look like 2 flashes, then 1 flash. Your sensor may do the same. Don’t worry. The important thing is that if the sensor is still not linked to the hub, it will be one long flash.
If you have seen the LED do 3 flashes, then repeat step 6 (short-press reset, wait for 1 or 3 flashes, then short-press again, etc) until you see the device appear in your SmartThings mobile app, ready to be renamed. If you refresh the Hub Events Log page, you will see a “zbjoin” message in addition to the “catchall” message. The “zbjoin” message tells you that the device has correctly paired with your hub, and when you look at the details for that Xiaomi device in IDE, it will display the device’s Zigbee Id.
However, if you have not yet seen the LED do 3 flashes, repeat step 6 until you DO see 3 flashes, and then continue repeating step 6 until the device appears in your SmartThings mobile app ready to be renamed. In either case, I would give up after about 2 minutes of repeating step 6, cancel “Add a Thing” in your mobile app, and try going back to step 3.
If you have tried two or three times, and haven’t seen the device show up in your SmartThings mobile app, then by all means, use the “catchall” method. But even after the LED flashes 3 times, I still recommend short-pressing the reset button again and again (Step 6) for AT LEAST one minute. Then look for your sensor’s Network ID in the “catchall” message and manually add it as a device in the IDE. The reason for doing the short-presses is because the sensor needs to be kept “awake” to complete the pairing process with your ST hub.
A couple of extra notes:
• After the sensor is paired, if you short-press the reset button on an “original” Xiaomi sensor (like yours), it doesn’t actually do anything. The message is intended only as an announcement message for the Xiaomi hub, but on the SmartThings hub, it sees it as a “read attr - raw:” and doesn’t know what to do with that. On the Aqara devices, however, the announcement message also includes the battery voltage, so most of @ArstenA’s device handlers are set up to read that voltage and immediately update your reported battery percentage.
• The battery percentage will NOT display for you newly paired Xiaomi sensor for 60 minutes if it’s an “Original” Xiaomi devices, or 50 minutes if it’s an Aqara device. This is just because the ST hub doesn’t catch that information until the devices first check-in. The other status attributes (open/close, dry/wet, temp/humidity, motion detected, etc.) should start working immediately, though some people have reported it can take a bit of time for environmental type status reports to start coming in. If you are using one of @ArstenA’s device handlers and don’t see the battery percentage displayed within 60 minutes of pairing, then that’s a sign that something didn’t work right during pairing. It’s unlikely for that to happen if the “Add a thing” method was successful, but I would not be so surprised by it if you had to use the “catchall” method to pair.
• Generally speaking, if the pairing process didn’t complete successfully (again more likely if you had to use the “catchall” method), then a Xiaomi Sensor won’t stay connected much longer than 2 hours. If you’ve made it past the 2 hour mark and it’s still connected and checking in, then it will likely (but not 100% guaranteed) continue to stay connected.