Xiaomi Mi Air Purifier (Xiaomi Mi IO)

I don’t have such a device… so yes indeed, until someone finds the right properties to query this is indeed the best.

As far as I can see from the screenshot it gets most properties. You can look in the mi-home app and see what is missing (meaning you see it in the screen but not in OH). based on that, might be able to guess the property name.

Take a look at the database for the examples, may devices have similar properties.

If you are good in reading java, you can try to decompile the mihome plugin for your device and see what commands are send. An alternative to that is trying to wireshark the communication, decrypt it and it will also give the commands the app sends.

Hi Marcel,

thanks for letting me know, I will test a bit in the next days and see if any important values and commands change by testing other models.
So far so good :slight_smile: Thanks for your work btw.

Cheers,
Henning

1 Like

any plans to add “zhimi.airpurifier.ma4” ? tried with ma1 and ma2 but no response on PaperUI>control Panel

Any way to pull Temperature in Fahrenheit, or do I need a rule to convert them all?

Hi! I bought a Mija Smart humidifier (https://www.gearbest.com/humidifiers/pp_009272908423.html). I tried to connect it with Mi IO binding. I was able to get the token from the andoid app. Now the item is online, but I cannot control it, as it seems the binding doesn’t recognize is. It writes the id is “deerma.humidifier.mjjsq” How can I use it with openhab? Could you please help me?

How did you get this to work?
My 2S gets detected by Paper UI as zhimi.airpurifier.mc1 thing (like yours), but it doesn’t return any values to the channels.
Same happens when I configure it through the things file. The thing gets detected and set to “ONLINE”, but none of the connected items get any values…
My thing file looks like this:

Thing miio:basic:07FC1DF2 "Blasi" [ host="192.168.178.65", token="xxx", deviceId="07FC1DF2", model="zhimi.airpurifier.mc1"]

Any idea on what could be the issue here?

1 Like

Hi @marcel_verpaalen

regarding product database, there is few mistake,
with zhimi.airmonitor.v1, usb_state should be string or number

and cgllc.airmonitor.b1 is also wrong, currently only available raw_command is “get_air_data” and “info”
and return value is:

Please kindly have a look and see will this info can help you upate on databse

{'co2e': 1070, 'humidity': 36.79999923706055, 'pm25': 80.30000305175781, 'temperature': 24.600000381469727, 'temperature_unit': 'c', 'tvoc': 4.798298358917236, 'tvoc_unit': 'mg_m3'}

I discover while if I keep polling by “get_air_data”, sometimes will halt, no value return, than poll info will make it resume

Does anyone know why miio keep having item discovery in PaperUI Inbox, the popup items is already add manually by input at xiaomi.things,
Is there anywhere that I have made mistake?

Thing miio:vacuum:012345678 "Mi Robot Vacuum" @ "LivingR" [host="192.168.1.2", model="rockrobo.vacuum.v1", refreshInterval=30.0, deviceId="012345678 ", token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
Thing miio:basic:012345678 "YeelightS-Kitchen" @ "Terrace" [host="192.168.1.3", model="yeelink.light.strip1",refreshInterval=30.0, deviceId="012345678 ", token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]

This is also a problem for me. Some device shows up in the Inbox every time, even I have added all my Xiaomi devices as things (I think this has nothing to do with things files, because I’m using PaperUI to manage my Things and the problem is there…).

@rkrisi @hamwong Bindings (not just miio) supporting autodiscovery will scan for devices even it configured through text files.
That is the reason for the “Ignore” button in PaperUI. Just hit them for all devices where you have text files configured.

You may try to search the forum for disable discovery if ignoring them won’t work.
To my knowledge the binding itself is not really controlling how this piece is working, it is part of the OH framework.

Like @zsbagyura i own a Mija Smart humidifier with the model String “deerma.humidifier.mjjsq”. I can already control the device via python/miiocli. How can i contribute in order to get the device supported by the miio binding?

I wish to share my experience. My boyfriend is practicing smoking in the house, but I can’t stand the smell of it. Air fresheners couldn’t solve this issue for me. So then I decided to try air purifier - and you know what? It works! If someone here looking an air purifier for similar purposes, check this article - I personally fine with Blueair Blue Pure. This device have only one disadvantage: when you begin using it, it leaves some chemical smell at the start, but later it will be stabilized.

Hi Marcel, thanks for response, reasons for ask here is because other binding don’t have this issue, like yeelight, wemo, orvibo, they all just show once and once things added to OH, it won’t show up again, that’s the place I am curious.

as currently I put all miio and mihome things into thing file,and I remember long time ago with one of the version, I add devices by paperUI and don’t have inbox issue, I am wonder does this issue cause by my config issue

Should not be, but in the past we did see some issues indeed that way. For sure it does not like if the modelid is missing, that is sure creating problems.

My personal way is I add the things in the paperUI, but the items/channels I do with textfile config.
That limits the amounts of clicks & typo’s and still have the advantages of discovery and easy modifying of settings

Hi,

I have zhimi.airpurifier.mb3 (Mi Air Purifier 3/3H). Any chance to add support for this device? As I understood Xiaomi made some changes in protocol. Python-miio implementation:
https://github.com/rytilahti/python-miio/pull/585

I’ve made a PR to a similar device you have, if you wish I can add your device to the database and build a jar so you can check it

Hi @skvalex
sure, I would love to have a test on it, please share the jar with me once available

@hamwong Here it is: https://drive.google.com/open?id=1nnhjuG1kWei7RdLn3CI7pUBoxEdDQd-p

Can you also check the following command:

miio protocol call <DEVICE_IP> get_prop [\"battery\",\"pm25\",\"co2e\",\"tvoc\",\"tvoc_unit\",\"humidity\",\"temperature\",\"temperature_unit\"]

I have download your jar, but haven’t got time to test it yet, by the way, the command you provide won’t work, only 2 valid command is “get_air_data” and “info” , miio only work with get_air_data, info won’t work

miio protocol call 192.168.0.2 get_air_data
 INFO  Attempting to call get_air_data on 192.168.0.2

 INFO  Device found, making call

 INFO  Got result:
{
  "co2e": 9999,
  "humidity": 38.400001525878906,
  "pm25": 79.30000305175781,
  "temperature": 27.299999237060547,
  "temperature_unit": "c",
  "tvoc": 9.99899959564209,
  "tvoc_unit": "mg_m3"
}

P.S. above co2e and tvoc is valid as airmonitor b1 is sensitive to alcohol, this value was affected by Whisky.