Xiaomi Mi Air Purifier - solution

@akhilmagotra I think indeed the database was wrong for some devices.
Fixed it now. Should be available in about 20min on the market place. Just uninstall the binding and reinstall it.
Let me know if that fixes it for you

Thanks alot!!!. Its working for me now.

Hi, thank you for your binding!
What did I do wrong? If I install the binding out of the market place (same with the linked jar file). I found my air purifier in the inbox and can add it as a new thing but the token is just “FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF”

That’s the log (event and openhab)
==> /var/log/openhab2/events.log <==
2017-10-12 19:20:35.164 [InboxAddedEvent ] - Discovery Result with UID ‘miio:basic:03404101’ has been added.
==> /var/log/openhab2/openhab.log <==
2017-10-12 19:20:35.163 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing ‘miio:basic:03404101’ to inbox.
==> /var/log/openhab2/events.log <==
2017-10-12 19:20:35.409 [ExtensionEvent ] - Extension ‘market:binding-3499123’ has been installed.
2017-10-12 19:20:46.729 [InboxRemovedEvent ] - Discovery Result with UID ‘miio:basic:03404101’ has been removed.
2017-10-12 19:20:46.742 [ThingAddedEvent ] - Thing ‘miio:basic:03404101’ has been added.
2017-10-12 19:20:46.843 [hingStatusInfoChangedEvent] - ‘miio:basic:03404101’ changed from UNINITIALIZED to INITIALIZING
2017-10-12 19:20:46.877 [hingStatusInfoChangedEvent] - ‘miio:basic:03404101’ changed from INITIALIZING to OFFLINE (CONFIGURATION_ERROR): Token required. Configure token

@Sedrah You need indeed to obtain your token for en/decryption of the communication. pls read the first topic wrt to how to obtain the token from an android backup. If you have IOS there is an alternative way somewhere in the middle of the topic.

@marcel_verpaalen thank you! I misunderstood your post where you announced the binding - my bad :wink: I used the aholstenson/miio device manager to discover my device and it works perfect for me. Now I get an “Online” Status. I will test more later.
I know there was a android tool to do this but at the moment I’m blind and can’t find it anymore.

Check the Xiaomi Robot Vacuum Binding
Follow the link to the mi toolkit

Hi I am facing one small issue regarding temperature readings. It’s displays 23.1 as 230.1 with or without any formatting.

I guess as 231 correct?

Yes

yes, I still need to implement the conversion for the temperature.
Will do so in the next update.

3 Likes

Thanks :slight_smile:

22 Oct Release

  • Vacuum - new switch channel for on/off to allow alexa integration @Multisaft7
    note this new channel (actions#vacuum) is marked advanced, hence hidden in paperUI by default.
    Note, this will start vacuum when switched on, goes to dock on switching off. For status updates, it will also switch to on when doing spot cleaning
    Note: I removed the on/off values from the command channel again, as there is now a proper switch channel
  • vacuum - reset consumables channel. This new channel allows you to reset your consumables (e.g. the sensor usage time)
  • airpurifiers - fix temperature reading (/10) @BOFH90 @shorty707 @akhilmagotra
3 Likes

Thanks a lot for updating temperature formatting. I confirm its working now.

Hi I have a question about Mi WiFi only plug socket. I am able to add this as things. But it shows four channels for this device.
Power
Mode green
Current
Temperature

Out of these I am able to read Power and Temperature, but I am not able to read Mode green and current and I am also not sure about there use. Please suggest.

Please pm me your log files (with the binding in log debug) see first topic how to do that. From start of the binding until at least 2 refreshes.

There are multiple versions of the plug, so maybe yours don’t have these options. It may also be firmware version related.
One good hint is if the regular Xiaomi app has these options.

@marcel_verpaalen unfortunately the binding with AirPurifier himi-airpurifier-m2-miio67362375 is still not working for me 100% :frowning:
Switching the device is working, but no other values, eg temperature are showing.
The device itself was recognized automatically by the add-on. Then i created an item temp with the right channel but the value is 0 all the time.
If i´m trying to read the value by the cli, then i get the right temperature.
Additional, every time i´m opening the “Thing” view i get an error in the js logs that the endpoint rest/things/miio:basic:0403DE47/is not reachable (404).

Any idea?

[UPDATE: Switching LED is also working. Weird :thinking: Looks like that Numbers and Strings are not working]

@eugenluft from your description it seems you are running oh2.1. pls use oh2.2 snapshot for the binding to work.
Seems the binding is not compatible with 2.1

Yeah, that´s true but with 2.2 i can add my airpurifier as a thing my and it showing that the the device is online (after the token is entered), but the channel list is empty and the the device name is a little bit strange Xiaomi Unsupported Mi IO device. Weird…

@eugenluft what is the model string you are seeing in the binding.
You could try to delete the thing, and let it be discovered again.

Not all types are supported, but if it is a model that is not supported, you could try to override the model with a similar model code in the configuration.

@marcel_verpaalen

So, I deleted the thing and re-searched for it:

zhimi-airpurifier-m2_miio67362375
Xiaomi Unsupported Mi IO device
miio:unsupported:0403DE47

Then i tried to change the model to miio:basic,miio.generic` but without success:

[INFO ] [ing.miio.handler.MiIoAbstractHandler] - Mi IO Device model zhimi.airpurifier.m2 has model config: miio:basic. Unexpected
unless manual override

I also tried to add the thing manually as a basic device, but same result :frowning: