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
73.38k stars 30.64k forks source link

ZHA Integration failed to set up #83839

Closed rlewis187 closed 1 year ago

rlewis187 commented 1 year ago

The problem

Since updating to HA Version 2022.12.0 my ZHA Integration fails to start.

I am following on from this issue: https://github.com/home-assistant/core/issues/83509

As this looks like something different to me.

I'm using supervised HA on a Raspberry Pi 4 4GB. I was using a Tasmota flashed Sonoff Zigbee Bridge as my zigbee controller for ZHA.

Initially, the integration failed to start after updating to 2022.12.0, reverting to a backup of previously working version (2022.11.5) did not resolve the issue.

I ordered a Conbee II stick from Amazon and attempted to migrate everything across from the Sonoff, this did not work.

I deleted the ZHA integration and tried to start from scratch, but the ZHA integration still will not start.

Today, I created a new home assistant instance on a spare Raspberry Pi 400 and restored a previously working backup. I was able to switch to the DeconZ stick and re-pairing all my sensors worked and was fine.

When I tried to do the same thing back on my original Raspberry Pi 4, I have run into the exact same issues. ZHA just will not start.

See below for error logs:

Logger: homeassistant.config_entries
Source: components/zha/core/gateway.py:172
First occurred: 13:51:39 (5 occurrences)
Last logged: 14:02:08

Error setting up entry socket://10.109.1.157:8888 for zha
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 141, in change_loop
    await asyncio.sleep(CHANGE_NETWORK_WAIT)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 116, in start_network
    await self._change_network_state(NetworkState.CONNECTED)
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 144, in _change_network_state
    await asyncio.wait_for(change_loop(), timeout=timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 111, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 185, in async_initialize
    raise exc
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 108, in initialize
    await self.start_network()
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 118, in start_network
    raise FormationFailure() from e
zigpy.exceptions.FormationFailure
Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:172
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 13:51:13 (17 occurrences)
Last logged: 14:02:08

Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 1 of 3)
Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 2 of 3)
Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 3 of 3)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 141, in change_loop
    await asyncio.sleep(CHANGE_NETWORK_WAIT)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 116, in start_network
    await self._change_network_state(NetworkState.CONNECTED)
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 144, in _change_network_state
    await asyncio.wait_for(change_loop(), timeout=timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 108, in initialize
    await self.start_network()
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 118, in start_network
    raise FormationFailure() from e
zigpy.exceptions.FormationFailure

Logger: zigpy.application
Source: /usr/local/lib/python3.10/site-packages/zigpy/application.py:134
First occurred: 13:51:13 (17 occurrences)
Last logged: 14:02:08

Couldn't start application
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 141, in change_loop
    await asyncio.sleep(CHANGE_NETWORK_WAIT)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 116, in start_network
    await self._change_network_state(NetworkState.CONNECTED)
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 144, in _change_network_state
    await asyncio.wait_for(change_loop(), timeout=timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 108, in initialize
    await self.start_network()
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 118, in start_network
    raise FormationFailure() from e
zigpy.exceptions.FormationFailure
Logger: homeassistant
Source: config_entries.py:1067
First occurred: 13:53:08 (3 occurrences)
Last logged: 13:54:53

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1067, in async_setup
    raise OperationNotAllowed(
homeassistant.config_entries.OperationNotAllowed: The config entry socket://10.109.1.157:8888 (zha) with entry_id 48faca05acf465856ea044ee096fd58d cannot be setup because is already loaded in the ConfigEntryState.SETUP_ERROR state

Logger: homeassistant
Source: runner.py:120
First occurred: 13:51:51 (3 occurrences)
Last logged: 13:54:13

Error doing job: Unclosed client session
Error doing job: Task was destroyed but it is pending!
Logger: aiohttp.server
Source: config_entries.py:1067
First occurred: 13:53:47 (1 occurrences)
Last logged: 13:53:47

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 81, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 241, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 277, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 284, in async_step_reuse_settings
    return await self._async_create_radio_entry()
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 656, in _async_create_radio_entry
    await self.hass.config_entries.async_setup(self.config_entry.entry_id)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1067, in async_setup
    raise OperationNotAllowed(
homeassistant.config_entries.OperationNotAllowed: The config entry socket://10.109.1.157:8888 (zha) with entry_id 48faca05acf465856ea044ee096fd58d cannot be setup because is already loaded in the ConfigEntryState.SETUP_ERROR state

What version of Home Assistant Core has the issue?

2022.12.X

What was the last working version of Home Assistant Core?

2022.11.5

What type of installation are you running?

Home Assistant OS

Integration causing the issue

ZHA

Link to integration documentation on our website

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

Diagnostics information

home-assistant_zha_2022-12-12T14-03-31.636Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.config_entries
Source: components/zha/core/gateway.py:172
First occurred: 13:51:39 (5 occurrences)
Last logged: 14:02:08

Error setting up entry socket://10.109.1.157:8888 for zha
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 141, in change_loop
    await asyncio.sleep(CHANGE_NETWORK_WAIT)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 116, in start_network
    await self._change_network_state(NetworkState.CONNECTED)
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 144, in _change_network_state
    await asyncio.wait_for(change_loop(), timeout=timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 111, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 185, in async_initialize
    raise exc
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 108, in initialize
    await self.start_network()
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 118, in start_network
    raise FormationFailure() from e
zigpy.exceptions.FormationFailure
Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:172
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 13:51:13 (17 occurrences)
Last logged: 14:02:08

Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 1 of 3)
Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 2 of 3)
Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 3 of 3)
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 141, in change_loop
    await asyncio.sleep(CHANGE_NETWORK_WAIT)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 116, in start_network
    await self._change_network_state(NetworkState.CONNECTED)
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 144, in _change_network_state
    await asyncio.wait_for(change_loop(), timeout=timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 108, in initialize
    await self.start_network()
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 118, in start_network
    raise FormationFailure() from e
zigpy.exceptions.FormationFailure

Logger: zigpy.application
Source: /usr/local/lib/python3.10/site-packages/zigpy/application.py:134
First occurred: 13:51:13 (17 occurrences)
Last logged: 14:02:08

Couldn't start application
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 141, in change_loop
    await asyncio.sleep(CHANGE_NETWORK_WAIT)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 605, in sleep
    return await future
asyncio.exceptions.CancelledError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 456, in wait_for
    return fut.result()
asyncio.exceptions.CancelledError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 116, in start_network
    await self._change_network_state(NetworkState.CONNECTED)
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 144, in _change_network_state
    await asyncio.wait_for(change_loop(), timeout=timeout)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 108, in initialize
    await self.start_network()
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 118, in start_network
    raise FormationFailure() from e
zigpy.exceptions.FormationFailure
Logger: homeassistant
Source: config_entries.py:1067
First occurred: 13:53:08 (3 occurrences)
Last logged: 13:54:53

Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1067, in async_setup
    raise OperationNotAllowed(
homeassistant.config_entries.OperationNotAllowed: The config entry socket://10.109.1.157:8888 (zha) with entry_id 48faca05acf465856ea044ee096fd58d cannot be setup because is already loaded in the ConfigEntryState.SETUP_ERROR state

Logger: homeassistant
Source: runner.py:120
First occurred: 13:51:51 (3 occurrences)
Last logged: 13:54:13

Error doing job: Unclosed client session
Error doing job: Task was destroyed but it is pending!
Logger: aiohttp.server
Source: config_entries.py:1067
First occurred: 13:53:47 (1 occurrences)
Last logged: 13:53:47

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
    resp = await request_handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 81, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 241, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
    result = await method(view, request, data, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 277, in async_configure
    result = await self._async_handle_step(
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 368, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 284, in async_step_reuse_settings
    return await self._async_create_radio_entry()
  File "/usr/src/homeassistant/homeassistant/components/zha/config_flow.py", line 656, in _async_create_radio_entry
    await self.hass.config_entries.async_setup(self.config_entry.entry_id)
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1067, in async_setup
    raise OperationNotAllowed(
homeassistant.config_entries.OperationNotAllowed: The config entry socket://10.109.1.157:8888 (zha) with entry_id 48faca05acf465856ea044ee096fd58d cannot be setup because is already loaded in the ConfigEntryState.SETUP_ERROR state


### 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` Change the title of 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)

rlewis187 commented 1 year ago

I have taken a backup from the working test server and restored it to the main one. Still doesn't want to work. Error logs:


Logger: homeassistant.config_entries
Source: components/zha/core/gateway.py:172
First occurred: 15:48:13 (1 occurrences)
Last logged: 15:48:13

Error setting up entry socket://10.109.1.157:8888 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 372, in async_setup
    result = await component.async_setup_entry(hass, self)
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 111, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 185, in async_initialize
    raise exc
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 111, in initialize
    await self.permit(0)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 945, in permit
    await zigpy.zdo.broadcast(
  File "/usr/local/lib/python3.10/site-packages/zigpy/device.py", line 515, in broadcast
    return await app.broadcast(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 760, in broadcast
    await self.send_packet(
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 423, in send_packet
    raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to deliver packet: <TXStatus.MAC_CHANNEL_ACCESS_FAILURE: 225>
Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:172
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 15:48:06 (3 occurrences)
Last logged: 15:48:13

Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 1 of 3)
Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 2 of 3)
Couldn't start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator (attempt 3 of 3)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 172, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 151, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 132, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 111, in initialize
    await self.permit(0)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 945, in permit
    await zigpy.zdo.broadcast(
  File "/usr/local/lib/python3.10/site-packages/zigpy/device.py", line 515, in broadcast
    return await app.broadcast(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 760, in broadcast
    await self.send_packet(
  File "/usr/local/lib/python3.10/site-packages/zigpy_deconz/zigbee/application.py", line 423, in send_packet
    raise zigpy.exceptions.DeliveryError(
zigpy.exceptions.DeliveryError: Failed to deliver packet: <TXStatus.MAC_CHANNEL_ACCESS_FAILURE: 225>
Logger: homeassistant.components.automation.new_automation_2
Source: components/automation/__init__.py:609
Integration: Automation (documentation, issues)
First occurred: 15:48:21 (1 occurrences)
Last logged: 15:48:21

Got error 'Unable to get zha device a6f58e4f5cd1e5d405bae98ca2b4a93a' when setting up triggers for Jess Room power button on
Logger: homeassistant.components.automation.workstation_power_button_off
Source: components/automation/__init__.py:609
Integration: Automation (documentation, issues)
First occurred: 15:48:21 (1 occurrences)
Last logged: 15:48:21

Got error 'Unable to get zha device a6f58e4f5cd1e5d405bae98ca2b4a93a' when setting up triggers for Jess Room power button off
puddly commented 1 year ago
zigpy.exceptions.DeliveryError: Failed to deliver packet: <TXStatus.MAC_CHANNEL_ACCESS_FAILURE: 225>

Your Conbee is experiencing too much interference and is refusing to send packets. Move it away from SSDs and USB 3.0 ports by putting it on a USB 2.0 extension cable.

rlewis187 commented 1 year ago

It is already on an extension, but it is in a very noisy area generally, I have ordered a longer (3M) one which will arrive wednesday. I will report back when I have tested it.

greyhound3 commented 1 year ago

zigpy.exceptions.DeliveryError: Failed to deliver packet: <TXStatus.MAC_CHANNEL_ACCESS_FAILURE: 225> Tried to solve this problem now for hours, downgrading, upgrading, switching wifi channel to lower end and zigbee to channel 25, having an extension cord etc. What helped, was shutting down my raspberry and my pc, cutting ALL electrical power (the whole apartment) for a few seconds and then restarting. Maybe there is some buffer overrun in a light bulb or a mains powered zigbee device, but now everything works again.

rlewis187 commented 1 year ago

I have put my Conbee stick on a 3M Amazon Basics USB extension lead and now it is working again. Putting it on 2ft and a 3M USB extension leads did not work, the Conbee stick was not even visible in HA. This was not unexpected.

I has intended to migrate off the somewhat flaky Sonoff hub at some point anyway, this whole issue has just forced my hand.

I am now back up & running, many thanks for the help @puddly

rlewis187 commented 1 year ago

Closing as resolved