Xiaomi Mijia Air Qualitiy Monitor

Do you plan that the the Xiaomi binding will support the Xiaomi air quality monitor?
It is a usefull sensor with lots of air quality informations.

Hey @Tamas_Nadanicsek binding does support it https://www.openhab.org/addons/bindings/miio/#cgllc-airmonitor-b1

However for me even tho OH shows status online I am not getting any data…

Please try and let me know if it works for you.

Same situation in my case, online status, but no any data.

Any news on this?

an update for the airmonitor was merged last night.
Try to pull the latest version of the binding. Anyway, if you have no data, there is a higher likelyhood that your token is wrong. Enable the debug logging for the binding to see if the device responds at all (the online in this case just means the ip address is correct and the device is pingable… most likely it will change after a while)

I do have trouble to receive the proper channels for my Xiaomi Mija Air Quality Monitor 2gen (cgllc.airmonitor.b1).
I am on openhab 2.4.0-1 (due to a lot of Tasmota devices) and am using the org.openhab.binding.miio-2.5.0-SNAPSHOT.jar (placed in openhabs addon folder).
I manged to read the token of the Air Quality Monitor and the device is constantly online.
Firmware of the device is current: firmware version: 3.5.7_0094
The strange thing is, openhabs Paper UI presents the modelID of the 2gen, but the channels of the V1 version of the Air Quality monitor.






Air Quality Index



So I am receiving no data form the device - not even the power state, which should be the same channel for V1 and 2gen devices. Instead I get a cofiguration erreor:

2020-03-19 12:28:03.265 [hingStatusInfoChangedEvent] - 'miio:basic:0F59A694' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)
2020-03-19 12:28:03.300 [hingStatusInfoChangedEvent] - 'miio:basic:0F59A694' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE

Any ideas what I could have done wrong?
From where can I get the latest version of the binding, which works with 2.4.0 - binding version 2.5.2 does not work for my environment.
Many thanks for your support!

This still looks very much like a token issue (online here means that the IP address is pingable as miio device, the config error is if communication is lacking due to the token being wrong)

I would suggest to give the experimental binding a try which receives the token from the cloud… that way you can be sure you have the latest. (as linking to a newer app version, or changing wifi or many other actions can reset the token)

Switch on debugging if needed to see what is the communication between the device to get any meaning full understanding of the issue at hand

Marcel, thanks a lot for this hint!
Your binding 2.5.3 refuses to run with my openhab 2.4.0 - the last version of your binding running in my environment is the 2.5.0 version.
I will dig into the token issue and try to extract the token in a different way - I have been using MiTool Kit 1.6 and Mi Home 5.0.15 - lets see how the 5.4.49 version works out.

The token is correct, extracting it via the above mentioned method leads to the same result as before.
It seems to be a problem of the binding (version).

Some success here: Thanks to Marcel updating his experimental binding to 2.5.4, the binding is now working with Openhab 2.4.
The Air Quality Monitor is recognized as Mi Air Quality Monitor 2gen and constantly online after I have inserted the token.

Its now a generic device (was a basic device before).


But it still reports the channels of V1 device instead of Gen2 - and the configuration error remains.

2020-04-02 20:03:07.567 [hingStatusInfoChangedEvent] - 'miio:generic:0F59A694' changed from ONLINE to OFFLINE (CONFIGURATION_ERROR)

2020-04-02 20:03:07.597 [hingStatusInfoChangedEvent] - 'miio:generic:0F59A694' changed from OFFLINE (CONFIGURATION_ERROR) to ONLINE

How to switch on debugging?

maybe by following the link I provided related to logging in my earlier post…

Problem solved, the miio binding version 2.5.4 and later work fine with Xiaomi Mija Air Quality Monitor 2gen (cgllc.airmonitor.b1) and Openhab 2.5, but do not work correct with openhab 2.4.0-1. So it was not a token issue…

1 Like