Xiaomi Mi Air Purifier (Xiaomi Mi IO)

of course I can test it

See here the PR. If you can please test the json file for your device and share a debug log of the refresh and feedback the results (which channels work, which not) . See the binding readme oh how to add the json file to your system.

Marcel,
Thanks for quick response!
I updated OH to latest snapshot #2155 and received same error.
Then I downloaded zhimi.airpurifier.ma4-miot.json and copied it to /srv/openhab-conf/misc/miio directory. These did not helps - same errors as before.
So, I manually changed inside Thing properties ā€œDevice Model Stringā€ to ā€œzhimi.airpurifier.ma4-miotā€ and now received an error:
[WARN ] [io.internal.handler.MiIoBasicHandler] - Database entry for model 'zhimi.airpurifier.ma4-miot' cannot be found.
and no any channels in things configā€¦
Can you give me ā€œdetailedā€ inf which files I have to copy and where? May be I missed somethingā€¦

No need to change the model string to zhimi.airpurifier.ma4-miot. It will look for the model string in the id section of the file (at the very beginning).
As you have already the file, can you try replace the - with _ in the channel name. so "channel": "pm2.5-density", should become "channel": "pm2.5_density", and edit your thing (as that will trigger the binding to apply the new json file)

Hello

Had a similar problem with ā€œAir Purifier 3Hā€.

I upgraded to OH3.1 #2159.

The problem is gone.

Thanks a lot!

Jan

Hi Marcel,
Recently Iā€™ve purchased several different devices as per my room needs.
I see that youā€™ve already added support for the air purifier 3C (mb4). Thank you for that!
I guess we need to wait for it to get merged and it should be available in OH 3.1, right?

Just wandered if you can add two more devices to the official device DB? Iā€™ve triggered discovery for them. Sharing the files here. Unfortunately the generator couldnā€™t create a jsondb file for the bigger purifier but it was able to create JSON for the humidifier. Please let me know if I can help further.
If you need a github issue just let me know. I guess I can make it there tooā€¦
test-deerma.humidifier.jsq-20210215-170653.txt (80.4 KB) test-zhimi.airpurifier.vb2-20210215-174145.txt (23.7 KB)

Cheers,
Konstantin

Would you mind adding request for these 2 devices on github, that helps keeping track of all the requests.
I think purifier vb2 will be pretty easy to add. I recall the deerma huidifier had some oddities that made it difficult to add at the time.

Sure. Iā€™ll add the requests. Where do you want them? In your repository or on official openhab-addons repo?

In the official openhab addons reproā€¦ I regulary check them

Hi,
Here you are. If you need my testing help in the mean time with custom jsons, just let me know. I know that it takes some time to have PR approved so probably we can save some additional effort if I test it myself beforehand. Also if you need me to try and build the JSONs I can give it a try during the weekendā€¦

Cheers,
Konstantin

HI Marcel,
thanks for the great work you are doing on implementing latest Xiaomi Air Purifier and Humidifier!
I read all the related posts (I think) and I could manage to connect to my Xiaomi Air Humidifier (deerma). While I could get connectivity info and some parameters, I still miss to get all the others - such humidity, setting, and switched. Below are snippets of my current configurations, which I tested this morning after downloading latest deerma.humidifier.mjjsq.json from the repository.
Iā€™m sure Iā€™ve missed somethingā€¦ would you have any suggestion to share?


Thanks beforehand for your help!

Yes, the deerma device was bit special and required some development of the binding besides the JSONFile.
Hence you need to upgrade the binding to the latest snapshot to have it working.

Hi Marcel, thanks for prompt your reply.
Really appreciated as it is now about two weeks Iā€™m trying to connect my Air Humidifier by reading all different threads.

First I tried to run bundle:list -s |grep to then update the binding, but I got this as error message ā€œbash: bundle:list: command not foundā€
I then downloaded the org.openhab.binding.miio-2.5.9-SNAPSHOT.jar file and placed it into the openhab2-addons directory. I checked the LogViewer and an error was returned (see picture below).
I tried to reboot OpenHabian and in the LogViewer and a different error is now returned (see picture below).
Checking the bindings, it looks that version has not been updated as it is still 2.5.12 i.o. 2.5.9

Did I miss any step? Any suggestion?
Thanks,
Heidrus

Hi again,
I kept trying troubleshooting and I come with an update.
Below is a new image capturing the latest learning at each step (sorry for the big image, but it seems I cannot yet post multiple images).
In sequence:

  1. Existing binging 2.5.12 unintalled
  2. Scanned for devices and adding the found Air Humidifier
  3. Checking Thingā€™s items. Here the device when offline and back online couple of times. Device name was lost but channel items where found.
  4. Items linked to channels via the items files (shared in previous post)
  5. Checked values in sitemap. No change vs. before. Network info available, maybe some data but not all. Switched not working. One good thing, at least, is that if I change the Mode via the Xiaomi app, the value is update on the sitemap.

    Hope this give some hints. Any suggestion is very welcome :slight_smile:
    Thanks,
    Heidrus

Yes, with the latest snapshot, I was meaning OH3.1-snapshot.
The json file will unfortunately not work for OH2.x. With 2.5 only some channels will work, but controlling most likely not

Now I understand where the problem was.
I will look forward to buy an RPi4 to migrate to OH3.1
Again, thanks a lot for your work on the binding and your help. They are both excellent!
Regards,
Heidrus

Hello everyone. Is deerma.humidifier.mjjsq support added? I have seen that some have had a problem with the database before. I have the same error and I donā€™t know what to do with this.

2021-04-06 00:14:57.095 [WARN ] [io.internal.handler.MiIoBasicHandler] - Database entry for model ā€˜deerma.humidifier.mjjsqā€™ cannot be found.

Maybe someone can share the database on deerma.humidifier.jsq or deerma.humidifier.jsq1, they should be the same.

it is available in the current 3.1-snapshot. Be aware that it needed some additional programming to get it working so not all may work if you use it on an older version of oh. (in older oh youā€™ll need to work around it with some rules to send the right values via the command channel)

1 Like

Thanks for the support. Iā€™ve tested this and it seems to work as expected.

Hi,
I canā€™t get a value for the ā€œtemperatureā€-channel for the zhimi.airpurifier.mb3. It remains null.
All other 49 channels work fine. I own 2 purifiers and the issue shows up with both of them.

My version is OH 3.1.0.M5. Is this a known issue? Did I miss something?

Thanks a lot