core: Error with Qingping Air Monitor (cgllc.airmonitor.s1) after firmware upgrade to 4.1.8_0244
The problem
After the firmware upgrade of Qingping Air Monitor (cgllc.airmonitor.s1) to version 4.1.8_0244 Home Assistant can’t get info anymore.
It seems air monitor resets connection with mi home after upgrade. I reconnected it back to mi home, in the mihome mobile app the monitor started to work and shows current values from screen.
I removed integration in the HA and added it back using a token. It recognized cgllc.airmonitor.s1 device and added it to HA. But now I see only one sensor entry w/o an entry from air_monitor domain. And this sensor entry just unavailable.
What version of Home Assistant Core has the issue?
core-2022.8.3
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Xiaomi Miio
Link to integration documentation on our website
https://www.home-assistant.io/integrations/xiaomi_miio/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
2022-08-12 10:29:29.412 ERROR (MainThread) [homeassistant.components.air_quality] xiaomi_miio: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 477, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 702, in async_device_update
await task
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/air_quality.py", line 135, in async_update
state = await self.hass.async_add_executor_job(self._device.status)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/miio/click_common.py", line 184, in _wrap
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/miio/airqualitymonitor.py", line 197, in status
return AirQualityMonitorStatus(defaultdict(lambda: None, values))
ValueError: dictionary update sequence element #0 has length 1; 2 is required
2022-08-12 10:29:50.567 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.cgllc_airmonitor_s1 fails
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 514, in async_update_ha_state
await self.async_device_update()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 709, in async_device_update
raise exc
File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/sensor.py", line 852, in async_update
state = await self.hass.async_add_executor_job(self._device.status)
File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.10/site-packages/miio/click_common.py", line 184, in _wrap
return func(self, *args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/miio/airqualitymonitor.py", line 197, in status
return AirQualityMonitorStatus(defaultdict(lambda: None, values))
ValueError: dictionary update sequence element #0 has length 1; 2 is required
Additional information
The same issue with latest xiaomi-miio (0.5.12) in command line:
(miio) pk-imac-01-27:~% miiocli airqualitymonitor --ip 192.168.XX.XX --token XXXXXXX status
Traceback (most recent call last):
File "/usr/local/lib/python-venv/miio/bin/miiocli", line 8, in <module>
sys.exit(create_cli())
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/miio/cli.py", line 66, in create_cli
return cli(auto_envvar_prefix="MIIO")
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/miio/click_common.py", line 51, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/miio/click_common.py", line 305, in wrap
kwargs["result"] = func(*args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/miio/click_common.py", line 270, in command_callback
return miio_command.call(miio_device, *args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/miio/click_common.py", line 217, in call
return method(*args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/miio/click_common.py", line 184, in _wrap
return func(self, *args, **kwargs)
File "/usr/local/lib/python-venv/miio/lib/python3.9/site-packages/miio/airqualitymonitor.py", line 197, in status
return AirQualityMonitorStatus(defaultdict(lambda: None, values))
ValueError: dictionary update sequence element #0 has length 1; 2 is required
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 5
- Comments: 81 (3 by maintainers)
2022.8.5 not fixed
I have written code that fixes this problem for the 4th version of the firmware, but it is not yet clear how fast it will be in the new version of the Miio library and when the Home assistant will be able to update it. we’ll wait.
https://github.com/rytilahti/python-miio/pull/1510
2022.8.6 not fixed
I confirm that. Adding device from this integration and I see data. Thanks dumbodumbos .
There hasn’t been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
IMHO, that eager bot’s policy not respecting other bug’s liveness tags and earlier dismissing of the staleness isn’t a “clean some old issues”, it’s more of a “we won’t do ignored by the maintainers issues”.
There hasn’t been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
@ildar170975 Here’s an issued discussion tread, so the context is the bug. Fine means the device is working and getting some data, not just effectively dead. As I can see the battery just wasn’t implemented https://home.miot-spec.com/spec/cgllc.airmonitor.s1, you can file a feature request there, here it’s irrelevant. I either do not see battery, however can see it in miHome, so it’s doable to implement it in miot.
bump. Any news?
@ildar170975
Yes, it seems to me that these are slightly different stories. I tried to draw how I see the whole scheme of working with the device. And it seems to me that cloud sender has slightly different access to Internal state than local sender. I can’t prove it yet, but I’ll try to put a record of all traffic on port 54321 on my airQuality and see, after a while, on all incoming requests, whether there will be a battery property.
2022.8.7 not fixed
Anybody here? News?
There hasn’t been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
updating the device to 4.1.8_0267 and HA to 2023.1.2 did not resolve the issue.
Буду по русски ) Поставил интеграцию Xiaomi Miot Auto - далее добавил устройство - данные пришли через минуту. На питание от АКБ не переходил. Регион Китай
same
I trying repeat your case, but I don’t have data from ClearGrass.
2022.9.0 not fixed
After update 4.1.8._0256 access to battery property has not appeared. 😦
I suppose this is being tracked upstream at https://github.com/rytilahti/python-miio/issues/1489