core: error at log: Timeout fetching xxx data and device is unavialable for few moments

The problem

See this timeout error at log, and devices are reallly on moment unavialable

Logger: homeassistant.components.xiaomi_miio Source: helpers/update_coordinator.py:197 Integration: Xiaomi Miio (documentation, issues) First occurred: 15 czerwca 2022, 08:54:49 (2358 occurrences) Last logged: 18:16:59

Timeout fetching fan1 data Timeout fetching purifer1 data Timeout fetching purifer2 data Timeout fetching fan2 data Timeout fetching purifer3 data Timeout fetching fan3 data

Purifers: 2x Mi 3H EU ver and Mi PRO EU ver Fans: 3x Smartmi Standing Fan 3

What version of Home Assistant Core has the issue?

2022.6.6

What was the last working version of Home Assistant Core?

2022.4.5

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?

ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching fan1 data
ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching fan2 data
ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching purifer1 data
ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching fan3 data
ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching purifer2 data
ERROR (MainThread) [homeassistant.components.xiaomi_miio] Timeout fetching purifer3 data

Additional information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 38 (11 by maintainers)

Most upvoted comments

Please pick a debian based host and install the Home Assistant Core in a virtualenv: https://www.home-assistant.io/installation/generic-x86-64#install-dependencies

Please don’t use any virtualization. For the test scenario it’s important to have a super simple (bare metal) setup. If you have trouble to setup a virtualenv + homeassistant please let me know. I will try to provide support. As soon as the setup (HA core instance) is up and running (accessible via http://a.b.c.d:8123) we will your the Xiaomi devices. Let the setup run a few days, so we can compare the history graphs of both HA instances (virtualenv vs. dockerized=your production system).

Hi @syssi , I have a core version has described in your message (on a beagle bone black which is a mini PC like the Raspberry PI) and unfortunately I have not the supervised version running in parrallel.

I have sometimes also some unavailabilities (see bellow), and that actually does not bother me. In this example the unavailability is only 22s : so who cares? image

But there is actually a critical side effect. I don’t know if this occurs on the core version only or in all install versions but since these unavailabilities generate “ERRORS” it can break actually the run of other homeassistant processes or the core process itself. For example, if it happends during the startup of homeassistant, it will fail to load (see bellow). It can may be break also other services such as core updates or other critical processes ? image

So I see actually 2 issues :

  • avoid having this unavailability ERROR (the root cause) which is annoying but may be not critical,
  • catch the error in order to not break other homeassistant processes (critical side effect, at least on the core version).

Do you think I should create a new issue for this : catch the xiaomi_miio error (for example try to generate a warning and not an error?)

Regards, Ainslie

last 7 days. Crazy is that Xiaomi purifer PRO has no problem. 7 days i cant see 1 error with purifer PRO. Other devices - no comment

Adnotacja 2022-08-22 001226

same here - Purifier 2s became unavailable every few seconds Debian 11, HA Supervised 2022.8.2

image