home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.21k stars 30.23k forks source link

ZHA/SkyConnect/Multi-pan startup - race? #96959

Closed Anto79-ops closed 1 year ago

Anto79-ops commented 1 year ago

The problem

Hi!

Sometimes on restart of core, when my system comes back, I get a flurry of log entries that are related to ZHA. I don't remember this happening pre-multipan so might be related to that.

For example, in chronological order:

Logger: bellows.uart
Source: runner.py:179
First occurred: 9:08:50 AM (1 occurrences)
Last logged: 9:08:50 AM

Lost serial connection: ConnectionResetError('Remote server closed connection')
Logger: zigpy.application
Source: /usr/local/lib/python3.11/site-packages/zigpy/application.py:196
First occurred: 9:08:50 AM (1 occurrences)
Last logged: 9:08:50 AM

Couldn't start application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 193, in startup
    await self.connect()
  File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 133, in connect
    self._ezsp = await bellows.ezsp.EZSP.initialize(self.config)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 167, in initialize
    await ezsp._startup_reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 150, in _startup_reset
    await self._gw.wait_for_startup_reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/uart.py", line 175, in wait_for_startup_reset
    await self._startup_reset_future
ConnectionResetError: Remote server closed connection
Logger: homeassistant.config_entries
Source: config_entries.py:432
First occurred: 9:08:50 AM (1 occurrences)
Last logged: 9:08:50 AM

Config entry 'SkyConnect Multi-PAN' for zha integration not ready yet; Retrying in background

then it complains about my automations which use ZHA devices etc.:

Logger: homeassistant.components.automation.doorbell_ringing
Source: components/automation/__init__.py:701
Integration: Automation (documentation, issues)
First occurred: 9:09:30 AM (1 occurrences)
Last logged: 9:09:30 AM

Got error 'Unable to get zha device a7d20a5aa7550985a4e2c74714dc1229' when setting up triggers for Front Doorbell Ringing
Logger: homeassistant.components.automation.turn_shed_light_on_or_off
Source: components/automation/__init__.py:701
Integration: Automation (documentation, issues)
First occurred: 9:09:30 AM (2 occurrences)
Last logged: 9:09:30 AM

Got error 'Unable to get zha device 624bbaa901512486a67dbdf25262dbeb' when setting up triggers for Turn shed light on or off
Logger: homeassistant.components.automation.light_detected_in_garage
Source: components/automation/__init__.py:701
Integration: Automation (documentation, issues)
First occurred: 9:09:30 AM (1 occurrences)
Last logged: 9:09:30 AM

Got error 'Unable to get zha device b17f65494907a8d6057c4e88d2e8cd23' when setting up triggers for Light detected in garage
Logger: homeassistant.components.zha.core.cluster_handlers
Source: components/zha/core/cluster_handlers/__init__.py:480
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 9:09:54 AM (3 occurrences)
Last logged: 9:10:21 AM

[0xD2D5:1:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>')]
[0xB2D9:1:0x0001]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), TimeoutError()]
[0xB2D9:1:0x0400]: async_initialize: all attempts have failed: [DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), DeliveryError('Failed to deliver message: <EmberStatus.DELIVERY_FAILED: 102>'), TimeoutError()]

What version of Home Assistant Core has the issue?

2023.7.2

What was the last working version of Home Assistant Core?

pre-multipan

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA Zigbee

Link to integration documentation on our website

https://www.home-assistant.io/integrations/zha/

Diagnostics information

config_entry-zha-35e4f47bd1aec2897f2fa1af0eeb1329.json.txt

Example YAML snippet

No response

Anything in the logs that might be useful for us?

I'm also running:

Matter (4.8.3)
Silicon Labs Multi-protocol (2.3.0)
Thread
OpenThread Border Router
SkyConnect 4.3.0

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @dmulcahey, @adminiuga, @puddly, mind taking a look at this issue as it has been labeled with an integration (zha) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `zha` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign zha` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


zha documentation zha source (message by IssueLinks)