Can I connect xiaomi 2H air purifier to my smartthings system?

Hi, i’ve bought 2 air purifiers from Xiaomi. it’s the 2H model (https://www.mi.com/global/mi-air-purifier-2h). I was wondering if I could integrate it into smartthings and trigger simple automations and recieve particle sensor information in the smartthings app?

I see there is a thread here Mi Connector (Xiaomi and Yeelight) about connecting/bridging xiaomi devices into smartthings, but to me it sounds extremly overly complicated to be running a local mock server on a raspberry pi, when all I want to do is turn it on/off with automations? Does anybody here have experience with this device?

It’s wifi, so you’ll either need to have cloud to cloud integration between ST and the Mi hub/bridge, or write a smartapp that uses Mi’s API (if that exists).

Alright, so technically it would be possible to integrate it directly with a custom smart app? But none exist already?

Could 2 cloud integration sounds like a good option too, where should I look for this ?

Technically yes, as long as someone is willing to take the time, although the pi solution looks pretty good. Also, this only works with the Classic app until the new app can support custom attributes and commands.

When going to add a new device, you should see a list brands/companies that have this in place with ST. What you need may not be listed, but this list grows all the time with newly added brands. You can contact the company and request they integrate with ST, but they may not want to. This method will also help ensure that these devices work with the new app.

I have one of those Air Purifiers and it works flawlessly with the Mi Connector. You just need an RPi for it and the whole thing is Docker containeraised.
Make sure to have a router with option to assign fix ip to the purifier otherwise it would cause problems when the IP changes.
The Mi Connector gives all information what you would see in the Mi app.

Well okay, I might be giving that rpi solution then a try… I do have an old pi 1 laying around that’s not really doing anything… would that be sufficient for running the docker container?

Might be, ask the author in the other topic. I use an RPi3.

@emmanuelglover, Xiaomi did. Philips did with selected models. Samsung has connected models as well.
But you need to check the model for Wifi connectivity.
And of course, only some has integration to SmartThings.

I have one of those Air Purifiers and it works flawlessly with the Mi Connector. You just need an RPi for it and the whole thing is Docker containeraised.
Make sure to have a router with option to assign fix ip to the purifier otherwise it would cause problems when the IP changes.

Hi There I have now decided to go with this solution. However I am running into a problem and I was wondering if you could explain what you did to get your purifier added?

When I am in the Mi Connect app → Manage Device → Search Device
I see this:

It immediately finds these two records. But they are red and I am unable to register them because the checkbox is disabled. How did you manage to add your device ?

There is an Auto/Manual button somewhere. Set it to Manual and try it again. (I am not sure why it is red.) And I haven’t fiddled with it for a long-long time.

1 Like

Hmmm can’t seem to toggle on manual. The button that says [auto] is also disabled.

The error (red) might be because the ip is wrong, I believe I searched once before assigned fixed ip. now the devices are showing 192.168.1.3 and 192.168.1.4 in the Mi Connect app, while they are actually on 192.168.1.130 and 192.168.1.131… can’t figure out to reset this, I event went as far as connecting to the mariadb but there is only one table called “tb_monitor” with 0 records. This saved data also does not appear in any files saved in /docker/mi-connect

Settings/Settings- Top drop down, change it to manual and Register.

I just wanted to write you, assign fixed IPs to them by MAC and DHCP settings in your router. It cannot track changing IPs.

Thanks. Found it. However it doesn’t seem to change much when mode is manual. I can click the “add” button but I was also able to do so when it was on mode: auto. The add dialog is not very helpful it takes an ip (which i have) and a token (which I don’t have)

I assigned them to 192.168.1.130 and 192.168.1.131 in the DHCP settings in my router. When I scan with ip scanner I can see that they are in fact assigned to those ips. But when i search in Mi Connect app it still shows the old ips.

The logs shows:

2020-06-17 07:14:46 info: Error: Could not connect to device, token needs to be specified[192.168.1.3] id=288021996
2020-06-17 07:14:46 warn: Find Device Manually but nothing token!!! >> 288021996
2020-06-17 07:14:47 warn: Finded >> But Mi-Connector can’t get token from this device!!! id(288021996)
2020-06-17 07:14:47 warn: Find Device Manually but nothing token!!! >> 292238486
2020-06-17 07:16:04 warn: Find Device Manually but nothing token!!! >> 292238486
2020-06-17 07:16:04 warn: Find Device Manually but nothing token!!! >> 288021996
2020-06-17 07:27:18 warn: Find Device Manually but nothing token!!! >> 288021996

I’m kinda suspecting that my device is some different model/version that isn’t compatible with the device handler.

Wild guess here. Could it has something to do with the fact that they are currently connected to the Mi Home app ?

My device is connected to the Mi Home app as well. So, it shouldn’t be the issue.

Try to post your questions in the other topic.

1 Like

Sure I’ll do that. Thanks a lot for all your assistance!

1 Like

I saw, that you’ve managed to add them to the Mi Connector. :+1:

Yes! :slightly_smiling_face: I posted the steps that I followed in order to get them added and recognized in the original thread.

1 Like

There is also another solution: for switching on/off you can use Simulated Alexa Switch.
I found it here (in Danish, but don’t worry: the important things are in English) https://youtu.be/3Ng5sT8Sp8c