Of all the Xiaomi sensors I have, the temp/humidity ones are the biggest PIA. They are the only one I had to use the catchall method on. Once paired they have been rock solid for almost a year now. Keep the faith!
Wouldn’t let me post anymore yesterday…
I have them all reset but they are still not showing anything.
I used the device handler by A4refillpad for these.
They are all saying updated 10 hours ago…but do not show any temp/humidity or anything else on my phone either…
If your using my DHs we are making changes several times a day. Several of us working on it now. Some changes are breaking things but we are trying to improve then. Be patient please and update often if things are not working.
Yeah I cannot get even one of them to show anything at all… this is all I get but I have to push the button the sensor to get it:
LRS unknown is read attr - raw: 8AA5010000240500420E6C756D692E73656E736F725F6874, dni: 8AA5, endpoint: 01, cluster: 0000, size…
If you don’t push the button nothing ever happens… so I have to be doing something wrong there’s just no way 4 of them are not working…
qu: does anyone find these sensors have a large dwell time.
seems to take forever to change state
Yes like mine have NEVER shown up? LOL After 4 days I’m about ready to just toss em…
It shows that a command from the app was sent but the hub doesn’t react to it at all…so basically it’s not sending any data…
One thing I noticed with yours is the offset setting is required for the device to report.
If I update or change the DH, I need to go back in the config and set something for an offset. It won’t take “0”, but will accept “-0”. If you leave it blank the device doesn’t seem to ever report.
Aside from that, it’s been working pretty well for the past few days. Let me know if you want me to test a new version, I have your repo added to my ST.
Are you using the latest DH? This should be fixed.
It was from a couple days ago. I just updated it and will re-test. I see the battery scaling is a little better…
You said you’re trying to connect the round temp / humidity sensors to your hub right? Those are the Xiaomi (“original”) Temp / Humidity sensors.
You also said that you’re using the device handler by A4refillpad for them. So, you got the device handler code from here, correct?
I am double-checking on this because that message you copied:
LRS unknown is read attr - raw: 8AA5010000240500420E6C756D692E73656E736F725F6874, dni: 8AA5, endpoint: 01, cluster: 0000, size…
is not a message that the A4refillpad device handler would generate in the Live Logging window of the IDE.
So where are you seeing that message?
Also, are you using a SmartThings v2 hub, or another type of ST hub?
I am using a ST Hub US V2
I am using the original round temp sensors yes.
It says they were ONLINE but show nothing in the app for any of them after hours of waiting…
as for the info at this point I have no idea where I found that… I’m so confused and frustrated at the moment.
SO apparently I’m doing something wrong here…
I push the sensor on the button the light flashes it actually flashes 4 times then delay one more time…
I go to the App on my phone and search for device.
I push the button the sensor again and it shows up in the Hub event list as a catchall
I then go in the IDE and create the device using the 4 digit/letter code 7th group from the left
I then go back into the app on my phone and go back, then I see it there…
I have left it like that and it shows none of the reading and I have also hit add device again and it finds the device and I say OK.
I hit the device and it still shows nothing…
so apparently I am doing something very wrong here…
I have the same issue .
Sensor 02 unknown is read attr - raw: DFE90104031C000029E203140028FF100029D926, dni: DFE9, endpoint: 01, cluster: 0403, size: 1C, attrId: 0000, encoding: 29, value: 26d9290010ff28001403e2
All was working well until I reset hub
I used a4refillpad/Xiaomi code
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.
@veeceeoh
This is a brilliant and concise post for pairing these devices.
I do not want to steal your thunder as you have done all the hard work.
Would it be possible to create a new thread titled something like “How to pair Xiaomi Devices”. A Guide. DO NOT POST ON THIS THREAD." Or something similar.
People keep asking the same question over and over again and if they could either find it or be pointed to it would be great.
As I said I think it would be a good idea and I do not want to take any credit for your sterling work.
Just a thought and thanks.
Thanks, @bobbles.
Actually, @ArstenA has copied pretty much my same explanation as this into the first post of his ST Community thread focused on using Xiaomi devices with the more updated Xiaomi device handler repository that he’s maintaining on GitHub.
However, if he prefers this text explanation over my previous one, he’s welcome to paste that in instead!
I’d just like to hear some feedback as to whether this helps other people, because I went through many many pairing attempts with the Xiaomi sensors I have in order to come up with this set of steps.
In any event, I have ordered 3 other Xiaomi devices - including one that I haven’t seen anyone using with SmartThings yet - and have 100% confidence that I’ll be able to get them paired and working with my ST hub. Time will tell, though!
I really do appreciate such a detailed how to!
Unfortunately it’s not working [app never finds it]…
I did the catchall and it’s not working either [Shows nothing in the app]…
It cannot find the device pairing it normally and if I add it won’t show any info even though in the hub events it shows all kinds of temps and humidity readings…just not on the app.
I have never seen anything that would suggest that it’s
Thank you @veeceeoh for the information.
I am still in the same boat as @cowboysdude.
However when i changed the Type to : Temperature Sensor from @bspranger - xiaomi-aqara-temperature-humidity-sensor code and guess what it shows temperature and humidity on the app .
So i am not sure why it doesn’t show up in the app when i use xiaomi-aqara-temperature-humidity-sensor code by @bspranger
Thank you…tried that and I still cannot get anything to work or show… I’m afraid these 4 sensors are about to meet my 4x4 and a hammer… a week of this is insane. I’m literally sitting 10’ from the hub and my router in another room completely… so I have NO idea why this isn’t working.
If your Temp/Humidity sensor is the circular-shaped one, then the @bspranger - xiaomi-aqara-temperature-humidity-sensor code found here is the not the correct device handler. It’s for the Aqara Temp/Humidity sensor, which is shaped like a square with rounded corners.
So it sounds like the @bspranger Aqara device handler is working - is it?
Okay, I can’t explain why you’re not able to get a proper pairing with the “Add a Thing” method, but it sounds like something is missing when you’re doing the “catchall” method.
If you are seeing temp / humidity reports in the hub events, that means it’s paired, but not added as a device correctly.
Can you post a screenshot for what you see for one of the sensors in your SmartThings mobile app?