Xiaomi Mi Air Purifier 3H

xiaomi_miio is not working for Xiaomi Mi Air Purifier 3H - zhimi.airpurifier.mb3. Please, make an integration for it.

1 Like

Any news for this?
It seems to. be supported as told on github but HA still tells me
“ERROR (MainThread) [homeassistant.components.xiaomi_miio.fan] Got exception while fetching the state: {‘code’: -5001, ‘message’: ‘command error’}”

From what i can see the changes are waiting to be merged.
https://github.com/home-assistant/home-assistant.io/pull/12653

Hi All. I’ve got a Mi Air Purifier 3H with very last firmware 2.0.5.0009.
I’ve tried in thousand ways to get this token, but I couldn’t get it noway.
Iv’ve used an older version of mi Home app in order to joinn the device, but during the procedure of addiction, the app said that it could not add the extension, and there is noway but close the addiction.
any ideas to get this token from my purifier?
thanks in advance for kind help.

Use this Russian “hacked” version of mi home app. It can show tokens of pretty much any device :slight_smile:


I did that, and then removed the app and went back to the original.

1 Like

Hi Ilmisu. I had the same issue with the 3H. I managed to get the token doing the following.

1/ Remove the Smarthome directory from your internal file system on you mobile (or rename it to be safe)

2/ Install latest version and register your device until the end. For 3H use a European location as it won’t show up if you register it against the Chinese Xiaomi service. I used Germany. You should be able to acces your Air purifier and control it properly.

3/ Check it but you still won’t have any Smarthome directory as the latest version of the Xiaomi Home does not use it anymore.

4/ Uninstall Xiaomi Home completely from your device using Google Play

5/ Install manually the APK for version 5.4.54 (you can google to find it)

6/ Launch it on your device and log in against European Service with the same login you used previously (no “Germany” in this version). You should now see the same list of devices showing up in Xiaomi Home. Don’t try to access the Air Purifier as it will not work, the plugin is not working with this version of Xiaomi Home. Just make sure you see the Air Purifier listed that’s all.

7/ Close Xiaomi Home completly

8/ Check you local storage on your device. You should now find a file there SmartHome/log/plug_DeviceManager/year-month-date.tx file Make sure you use the file in this location. There is another one in the directory above with the same name but it is useless.
Inside this file you should have the list of all registered devices in Xiaomi Home with their respective tokens.

9/ You can then upgrade your Xiaomi Home app from Google play and use it to control your Air Purifier.

Please be aware that I am still not able to control the Air Purifier from within Home Assistant as I get a 5001 error code, but this seems related to the xiaomi-miio component and underlying python-miio latest corrections not beeing merged yet into the 107.7 version of Home Assistant. But it should be working soon. I have tried accessing it from my workstation using the token I got with the above procedure and mirobo pyhton script and I manage to communicate with it.

As a reminder keep in mind that every time you reinitialize your device WiFi, a new token is generated and you have to do all this procedure again from start… So keep the 5.4.54 APK on your device as you may need it again to get a token.

1 Like

Hi, thanks a lot for your kind help, I recovered the token, so let’s wait the proper integration in HA.
Thanks once again.

Also followed the above using an old APK - waiting for this integration to be added. Was hoping it would be in 108, but alas.

Ok folks the integration has been added on 108 and it works. Give it a try and the issue may be closed.

Not seeing it added in docs? Still getting 5001 command error. Trid to specify ‘mb3’ model, does not recognise.

This is weird.

Try to install the xiaomi miio sources from github as a custom component. I named my xiaomi_miio_air_purifier.

I named the directory inside the custom directory xiaomi_miio_air_purifier and the same name in my configuration.yaml

  • platform: xiaomi_miio_air_purifier
    host: 192.168.0.xx
    token: mytoken
    name: Air Purifier
    model: zhimi.airpurifier.mb3

But I removed this reference to custom component after 108 upgrade and used the xiaomi-miio integration directly and it still worked.

1 Like

I have this message “Invalid config for [fan.xiaomi_miio]: value is not allowed for dictionary value @ data[‘model’]. Got ‘zhimi.airpurifier.mb3’.”
Home Assistant ver. 108.3. Where is the problem?

I got this error if i specify the model:
model: zhimi.airpurifier.mb3

Invalid config for [fan.xiaomi_miio]: value is not allowed for dictionary value @ data[model]. Got zhimi.airpurifier.mb3. (See /config/configuration.yaml, line 747). Please check the docs at https://www.home-assistant.io/integrations/xiaomi_miio

if I dont specify the model i get a different error but still doesnt work.

nothing to do, I also own a 3h but it doesn’t work, by mistake:

Invalid config for [fan.xiaomi_miio]: value is not allowed for dictionary value @ data[‘model’]. Got ‘zhimi.airpurifier.mb3’. (See ?, line ?).

Anyone that can verify that the 3H is now working with home assistant? I want to buy one but if it is not working with home assistant I’ll go for the 2S instead.

I think it is still not working, but I think as weel that buy a lower version just because the higher one is still not integrated it is not a good idea…:wink: I’ll be patient till this integration will be deployed.

I’ve just buyed the 3h and checking the integration with hassio I’m landed in this thread.

It seems that support for this model has been pushed in the repository few weeks ago but is yet to be included in a stable hassio release.

I think we have to wait a few more days.

can you explain if you mention the or not and if yes what kind of model?
thank you

not working