[OBSOLETE] Xiaomi Sensors and Button (beta)

you are using an old device handler, new one is https://github.com/bspranger/Xiaomi/tree/master/devicetypes/bspranger

1 Like

I highly suggest using the newer Aqara-specific DTH from the bspranger/Xiaomi GitHub repository:

A big update was released just yesterday, and I personally worked on overhauling the DTH code for both the Aqara / “original” Xiaomi Temp/Humidity sensors. I have an Aqara T/H sensor myself, and everything works beautifully (including correct Celsius readings in your freezer!) Plus there are extra features not available with the older DHs.

More information about the update here.

1 Like

Bummer! Thanks for the info though.

Yep, that solved it. :slight_smile:
Thanks!

1 Like

So, these xiaomi sensors, do they still not work with smarthings hub V1?

As far as we know they still only work with the v2 hub.

1 Like

A massive thank you for all of the work done and contributions to make these devices work.

Today I received 2 buttons, 2 motion sensors and a door sensor and they are all now up and functioning in Smartthings. The whole bundle was incredibly cheap, less than the cost of 1 average smart bulb in the UK.

Pairing was a bit tricky but using the recommended “repeatedly press the button with a paperclip” method. they all eventually paired even at the opposite side of the house to the Smartthings hub.

Fingers crossed they remain stable.

I have about 8 more square and round Temp sensors. Selling them cheap. Let me know if you are interested. I am in the US. Can’t keep them paired. A few of them have some writing on them and most of them have new batteries. PM if you are interested. Had 12 and 4 have already been spoken for.

Hello, I am using your DH on xiaomi outlet. I read that is added heartbeat to monitor connectivity health of outlet.
But if I remove it , status doesnt change.It looks online. When I remove samsung outlet after 1 day it goes offline on the app. Is there a way to check connectivity or status (via core maybe)?? thanks a lot

I don’t believe we have made any changes to the outlet DH since @a4refillpad created it.

I personally do not own a Xiaomi outlet to develop/test the outlet.

@ArstenA or @veeceeoh

Are the latest DTH mods integrated into the repository at:

bspranger
Xiaomi
master

? Because I have that but never see any updates.

Yes, they are.

Because I have been working on the Xiaomi DTHs code so much, I haven’t enabled GitHub Integration with the bspranger/Xiaomi repository. I just enabled it, and if I click 02%20PM and select “Xiaomi (master)” I see this:

However, the only way to get the color indication that there is an GitHub repository update or change is when the device handlers have the repository assigned to them, like this:

With the GitHub Repository assigned to each device handler that you’re using, then you should see a color change for any updates / changes, as explained here on the ST Developer Docs.

For me, because I have just assigned the bspranger/Xiaomi repository to a few device drivers, I am seeing them listed in blue, which means my local IDE copies have been edited, and don’t match the repository version:

In this case, I can’t use the “Update from Repo” feature, because the conflict has to be resolved manually. To do this, I click the magnifying glass icon, which gives me a side by side comparison view of the local copy of the device handler code next to the copy on the repository. Then I can click the “Overwrite local version” button and it will sync from the GHitHub repository. After this, the color of the text for that device handler will be black until there is a change / update of the device handler on the GitHub repository.

I will monitor if this is working the next time we update any of the device handlers, but as far as I can tell, it’s working the way its supposed to.

Sorry for any information you already knew (I thought it might help others) and I hope this helps!

Great step-by-step. I knew a little but the complete explanation is very helpful. Thanks.

Hi Guys,

Hi guys

Just lost all my config and need to rebuild. Smarthings apparently is unable to restore the hub (according to support).

However I can’t seem able to re add my Xiaomi devices. They are not pairing. They are not even showing up on the hub logs (catchall).

Any clue?

Have you reset them to factory default first?

Think so…
I have held the button on each of them for 5+ seconds and I have also tried repeatedly press the button several times

So for the motion sensors (I’m not an expert on the others - this works for both original and Aqara)

  • hold down button for maybe 8-9 seconds - it might, might not do blinking
  • when you let go, it should give you a single blink
  • press button again, it should start blinking fast
  • keep holding until fast blink is over - then let go - you should be in reset

If it then blinks three times slowly, or three fast + two fast - it’s not reset. (The former is “I’m pairing”, the latter is “I’m paired”).

Also - if you’re really trying to repair from scratch - make sure the “original” device is not present in your device list.

Hey @veeceeoh - I actually didn’t know about the magnifying glass showing a side-by-side on the blue italic ones - so I’ve learned something new though I’ve been in here so much! Thanks!

1 Like

The LED does not flash randomly - it’s telling you what is going on.

You only need to hold the reset button until you see the LED flash. Then you can let go. There will be a short delay, but the LED will flash again: 3 short blinks if it has paired to ST, and one longer flash if it was unsuccessful. If unsuccessful, short-press the reset button again, wait for the LED - watch for 3 blinks or one long flash, and if one long flash, short-press again, etc., until you see three short blinks. If you’ve been doing that for over a minute, go back to full reset: start at the top of this paragraph.

Please see my post from January with more detailed instructions (including an explanation from Xiaomi that I found online).

all paired thanks. had to reset the hub.
Only thing that I was not able to pair was a Philips hue bulb that was connected direct to ST.
Only device are these 2 lamps:/ thanks Guys

2 Likes