SmartThings Community

[RELEASE] Xiaomi Sensors and Button (beta)

dth_motionsensor
dth_remotes
dth_sensors

(Tran Duc) #2210

I think it’s the same for all xiaomi sensors so here’s my way pairing them:

  1. Reset the device: hold the reset button for a few seconds, led will blink a few times then stop, hold for some more seconds then release the button.
  2. Add a new thing from ST app
  3. This may be tricky: short press the reset button for some times, if it quick blinks 2 times followed by another 3 times, keep short pressing it after that 3 times blink and you’ll get it discovered. If it doesn’t blink in that sequence, do whatever you like, short press, long press (but not too long or it will reset), smash that reset button until you get that 2 quick blinks followed by 3 quick blinks, you’ll get that eventually. That sequence is the only thing you need to get it discovered :slight_smile:
    Wish u luck!

(John Wade) #2211

Thank you for the help I’ve tried BOTH and neither work…I’ve tried variations of both and nothing is working they will not connect to the hub.


(Bob) #2212

Have you tried the catchall method?


(John Wade) #2213

Honestly this is my first go around so I have no idea how to even do that…


(Bob) #2214

Catchall method.
From the app start "Add a thing"
Press and hold the button on the temp sensor until you get 3 flashes
When complete make sure that when you press the button the device give you two flashes on the LED, if not repeat step 2 until that happens.
Using the IDE look at the logs, not the live logging but the hub log (select hub, then select events)
Look for a catchall event at the same time as you pressed and held the button. You will see something like this:
catchall: 0104 0000 01 01 0100 00 B46D 00 04 115F 0A 01 01FF4231641000032814983900000000953900000000
Make a note of the device ID, in the case above it’s B46D (7th set of chars from the left)
Return to the IDE and manually add a device.
Enter the details and when asked select "Temperature Sensor and make sure you set the Zigbee and network id to the same value you found in step 6.
That should work. The main issue I had was that I was looking


(Bob) #2215

Post 457.


(John Wade) #2216

OK added it that way now to see if it actually shows me anything :slight_smile: Not sure how long it takes…

BUT Thank you so much for that info!


(Bob) #2217

Just keep pushing the button and refreshing the events page in the IDE as the page does not automatically refresh.


(John Wade) #2218

I’m seeing it when I update the events in the hub but not showing in the app on my phone…and OH Thank you…what you told me I did in 4 minutes for all 4 of them LOL I’ve been hours trying to get this working…

HUGE Thanks!


(Bob) #2219

Now you need to manually define the devices in the ide and use the code that you see for the network I’d.


(John Wade) #2220

Ok now a trick question…apparently I have 2 of the sensors with the same id…I used catchall and it is right…


(Bob) #2221

No. Perhaps the device was found but did not show up in the ST app when you were doing add a thing and pressing the button.
Try deleting the one you manually configured and see if the other one is working OK.


(John Wade) #2222

OK I’ll work on that today and see what I can do :slight_smile:

Probably just going to have to start over but at least I know how to do it now!

They haven’t updated in the last 35 minutes…


(Keith G) #2223

Sorry, been busy for the last couple days. I would have pointed out @ArstenA’s code:

if (temp > 100) {
    temp = 100.0 - temp
}

…but you found it!

So what about the Celsius to Fahrenheit code you came up with - does it work now? And did you put in a pull request on GitHub?


(John Wade) #2224

Well deleting them was a bad choice now I can’t get any of them connected again… :roll_eyes: Beyond frustrated.


(Bob) #2225

Reset them again. Hold the button in for 5 ish seconds and the blue LED flashes.


#2226

I was using the handler directly from A4refillpad’s github. I switched over to the one in @ArstenA’s github. It’s based off the original A4 one, but a few changes to handle colder temps and better battery reporting. I don’t know how I didn’t find this in my original searches. :blush:

I’m using his now for my Xiaomi motion sensors too.


(Simon) #2227

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!


(John Wade) #2228

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…


(Brian Spranger) #2229

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.