openhab-addons icon indicating copy to clipboard operation
openhab-addons copied to clipboard

[miio] Qingping Air Monitor (cgllc.airmonitor.s1) support is broken

Open mak-42 opened this issue 2 years ago • 1 comments

Openhab can't receive information from Qingping Air Monitor (cgllc.airmonitor.s1) any more after the device's firmware was updated ("miio_ver":"0.0.9","fw_ver":"4.1.8_9999","hw_ver":"Linux","miio_client_ver":"4.1.8").

I checked logs and found that the device sends back "result":"ok" for the command "method":"get_value","params":["battery","pm25","co2","tvoc","humidity","temperature"].

It seems the firmware has a bug and the device stop processing "battery" command.

I tried to send the command without requesting battery info (get_value["pm25","co2","tvoc","humidity","temperature"]) and the device processed it well ("result":{"co2":548,"humidity":53.5,"pm25":5,"temperature":25.1,"tvoc":244}).

I'm going to solve the problem locally by removing "battery" channel. But it does not look as a solution for everyone.

mak-42 avatar Aug 13 '22 20:08 mak-42

I found a suitable solution: I defined custom refresh command for "battery". It should work for both old firmware (the battery information would be requested as before) and it does not prevent the device with new firmware from sending other values (I checked it).

mak-42 avatar Aug 14 '22 18:08 mak-42