airq integration stops updating
See original GitHub issueThe problem
I’m trying the AirQ integration on the dev
branch. I was able to set it up fine, and it started gathering and reporting data.
However, a few hours later (at 8:45 local time), it suddenly stopped updating and providing new values.
During the night (these times are in UTC), I found these in the logs - there’s nothing else after the start up:
2022-11-14 01:30:47.030 ERROR (MainThread) [homeassistant.components.airq] Timeout fetching airq data
2022-11-14 01:30:57.142 INFO (MainThread) [homeassistant.components.airq] Fetching airq data recovered
However, the airq then continued reporting data until 7:45 UTC. The only error message in the logs which matches this is a timeout from the telegram integration, which seems unrelated. The AirQ itself is still reachable on its web interface and via the app.
Manually reloading the integration resolved this temporarily and the AirQ is now reporting values again, but obviously it would be preferable if this wasn’t necessary.
What version of Home Assistant Core has the issue?
Home Assistant 2022.12.0.dev20221113
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Container
Integration causing the issue
AirQ
Link to integration documentation on our website
https://next.home-assistant.io/integrations/airq
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Unfortunately not.
Additional information
AirQ Pro by CorantGmbH Firmware: 1.20.2.r6_D_1.79 Hardware: D
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (9 by maintainers)
Top GitHub Comments
It hasn’t occurred again. But I’ve also had to upgrade the Air-Q firmware to 1.80.0 (the new ones shipped with -rc1 which wouldn’t dim the LEDs during the night 😃 ), plus moved on to a more recent dev release from HA.
Let’s close unless I can reproduce with more logs, and hopefully on a stable HA branch too.
Thanks for the logs! I am assuming those records which state
success: False
are proceeded by another log entry, such asTimeout fetching airq data
? Just wanted to comment on the ~15.5 seconds reported by all failed updates. It is most likely due to the default timeout of 15s set inaioairq.AirQ.__init__
and passed throughaioairq.AirQ.get
toaiohttp.ClientSession.get
. Hitting this timeout raisesaiohttp.ServerTimeoutError
(derived fromasyncio.TimeoutError
) which then must be caught byDataUpdateCoordinator
. As a design decision this timeout was added to curb unreasonably long (5min by default) and predestined to fail queries when device and the HA host are not connected to the same network. This timeout is, of course, arbitrary and should not be expected to apply universally. At this point, however, the integration neither changes this timeout nor even exposes it for configuration, which may be a sensible point of further improvement. I cannot, however, point a finger at what may be causing the longer delays in those requests which finally succeed.