Xiaomi Mi Air Purifier (Xiaomi Mi IO)

Please check the doc for your device.
You will need to know the model string to lookup the device

Thank you. According to Mitoolkit it is: zhimi.humidifier.ca1
I have to downgrade Mi Home app to be able to retrieve token…
I didn’t know that so many devices are supported and well described. Really great job.
Should I upgrade Mi IO binding? I have a version from beginning o the year which I use continuously for a vacuum cleaner and air purifier. OH2.2 here.

I have the token and thing is “online” in Paper UI. It was found as “miio Generic” not “miio Basic”.
I set manually Device Model String to: “zhimi.humidifier.ca1” in Paper UI
But I can see only 2 channels and Humidifier is not present in Control part of Paper UI.

Edit 2.
I did upgrade to OH 2.3 but now Xiaomi MI IO Binding is gone and I can’t find it in the add-ons part of Paper UI. Marketplace is installed and configured “include bindings” and “alpha”.
Where I can find the binding?
Edit 3.
Marketplace was corrupted. It is well known bug for 2.2 to 2.3 upgrade. Solution is on this forum.
After fix Binding changed type to “Basic device” and now I can see all data in Control part of Paper UI.

Edit 4
Almost everything works. I can share my sitemap with colors.
To do:
1.mapping works except “medium” I can’t find the correct text.
2. motorspeed works in Paper UI but doesn’t in the app. There have to be something with numbers.
3. usedhours shows strange numbers like -596523. No idea how to fix this right now.

		Group item=G_humidifier icon="my_humidifier"{
		Switch item=mode label="[]" icon="none" mappings=[auto=Auto, silent=Silent, medium=Medium, high=High]
		Switch item=power
		Text item=humidity valuecolor=[<=40="#cc0033",>40="#1cac78",>60="#7cb9e8"]
		Text item=setHumidity valuecolor=[<=40="#cc0033",>40="#1cac78",>60="#7cb9e8"]
		Text item=temperature valuecolor=[<=18="#7cb9e8",>18="#1cac78",>23="#cc0033"]
		Text item=depth valuecolor=[<=10="#FF0000",10="#FFFF00",>30="#1cac78"]
		Switch item=buzzer
		Switch item=dry
		Text item=usedhours
		Text item=motorspeed
		Switch item=childlock

Please add european Air Purifier 2s - zhimi.airpurifier.mc1

Hi Marcel,

Amazing how you get the Xiaomi devices talking to openhab. I’m a big fan and can finally get in touch now.
Just for the details, I live in a smoggy environment and own some Xiaomi devices that measure and clean the air in the house. Your binding offers me a great overview when and when not to go outside with my kids (taken from the outside measurements). So “Thanks!”.

Now my questions :slight_smile:
After successfully have added some Xiaomi Air Purifier 2 models I now went ahead and added a Xiaomi Air Purifier 2S. This one does not seem to be be properly discovered and have a challenges getting the binding to talk properly with the new 2S model.
Most I tried can be found here: Xiaomi Robot Vacuum Binding

Quick summary of my efforts:
Discovery mechanism: miio discover (nodeJs). Output:
Device ID:
Model info: Unknown
Token: ???
Support: Unknown
Note: Device ID and Address where properly filled. Just deleted for this example.

Using a token of another older air purifier I’ve tried the following models:

All coming back with the well known “Padding” issue in the log.
When opening the “Thing” in Openhab, all channels are properly shown and the Items are linked. The device is online. Every try has been performed with deleting the device, and adding it. Never just changing the config.

Binding version from market place is the 1.0 version. Openhab used is 2.3.0-1

It would be great if you could support me. Let me know if I can provide any information you need to pinpoint the issue.

Thanks in advance!

Each device had it own token, I think your need to find the token from your new device (of you are on Android that means downgrading your app)
Device ID and address don’t need token, hence that works, padding error is happening mostly in case of wrong tokens

thanks for the quick notice.

I understand the token is the missing part, however the “mii discovery” method (Miio command line tool described here: https://www.home-assistant.io/components/vacuum.xiaomi_miio/#retrieving-the-access-token) did not reveal the token for the new device. The “???” was the exact literal output of that discovery. IOW no token was discovered :frowning: This method worked fine with the older Purifier 2, hence tried to use that token as suggested in this other post.

npm update -g did not fix the mii disovery either and the token output remains “???”

I’ve no access to an android device at this time, but will try to search one to try your suggestions.
Any other suggestions welcome.

That method indeed is not supported anymore by most devices. (Oh binding also should get the token that way if the device supports it).

Found an old android lying around. Went through the process and could abstract the token. Thanks a lot!!!

But, then we come to the point that it says: “Database entry for model ‘zhimi.airpurifier.mc1’ cannot be found.”
Also the channels are very incomplete (SSI, BSSI, etc)
This comes back to the earlier support request for this device from @11131.

Do you have a nightly/snapshot I can test (if this is the right question to ask)?
Thanks in advance for your support.

Can you try to override the model as you did earlier and experiment which one is most similar.
Then I can add it to the db


Baseline: IP and token added with default Model ID
Mi IO Device model Mi Air Purifier mc1 (zhimi.airpurifier.mc1) identified as: miio:unsupported, thingtype miio:basic. Does not matches thingtype miio:unsupported. Unexpected, unless unless manual override.
Very basic

This model Id is used with the older Xiaomi Air Purifier 2.
Clean! As you mentioned before. This was due to the wrong token. Now with the proper token the Padding messages are not given (in the 5 minutes timeframe I was checking)
Same as Xiaomi Air Purifier 2 (so would vote this is the mode Id closest to the new 2S)
Even stronger, now with the new token the data from the channel can actually be used. I got my items configured and data is coming in properly.

Edit: It seems that not all items are receiving proper data with this model Id used for the 2S. Missing are e.g. purifyvolume and usedhours. The channels are shown in the Thing though.

I suppose only the zhimi.airpurifier.mc1 needs to be added to the db, with the channels copied from zhimi.airpurifier.m1.

Let me know if I need to offer more info.

it is added now with the channels of m1. Should be available in the market for updating in approx 40 min
note, best to delete your thing and let it be discovered again to ensure it is being picked up well.

That worked like a charm.
Done and dusted.
Thanks a lot for your work!!

Working perfect on my side as well.
Xiaomi Air Purifier 2
Thanks again @marcel_verpaalen


After upgrading from OpenHab 2.3 to 2.4, my purifiers started to beep randomly every few hours or so. Sounds pretty much like a mode switch. Was there new behavior introduced to sync states between OH and the devices? I don’t mind in the living room, but it’s kinda less cool in the bed room. :slight_smile:

If there’s something new done in handling them, then it turns out it might be crashing the firmware. My two purifiers are different hardware and firmware revisions, and one stops quickly and then restarts. The beeping isn’t some mode setting but apparently the firmware restarting.

I reverted to the 2.3.0 version of the binding and the beeping(/crashing?) has stopped.

There was an update in the 2.4 version recently (week or 2 ago) that addressed this issue. every 1000 refreshes I reset the id, seems some devices did not like that the id started again from 0.

Is that update on the market? I’ve reverted to the 2.4.0 binding and it still happens.