Zigbee Intermittently "Failed to Setup"

I am using a Home Assistant Yellow (core 2024.1.5, OS 11.4). Zigbee (ZHA) works fine for a few hours but will give a “failed to setup” error after some random amount of time. If I restart HA it will work again for a while. I don’t see anything obvious in the logs below. Can anyone give me some troubleshooting tips? Zigbee had been working fine for a long time but over the last few weeks I’ve been having this problem.

Are you using the multiprotocol addon?
Here is what I did

Thanks so much for your reply. This is a real pain, I have been interested in trying out Thread. So strange, ZHA has been stable for months, one of the most consistent integrations I have but not lately. I don’t know if one of the updates broke it or what.

Hi, have the same problem here. Started giving errors recently after a update of HA. Only a reboot of the whole Yellow take it back online for a just day/days…

i’m having similar problem. zha works for a couple of days, them fails. The integration says Seup Fails, restarting. I never comes back. Only fixed with a HA restart, but sometimes even this does not work, and I need the boot the VM (proxmox) for ha.
I’m using a SkyConnect v1.0.

It becoming frustrating.
I did notice by VM said my memory was at 95% before my last reboot, do I need more memory ?(currently at 3G).

A brief “me too”. I’m running hassos on an x86 box. My zigbee coordinator is a SkyConnect. Two things that never recover this for me are:

  • unplug/replug the SkyConnect
  • restart Home Assistant

The only thing I have found to recover it is reboot the physical x86 box.

I haven’t yet tried the suggestions in this thread.

I gave up on zha/skyconnect. Pickup up a Zigbee SMLight SLZB-06 and now running Z2M. No failures after a week. I only had about 10 devices, so it was too painful.

I’ve been experiencing the same issues on and off.

They almost always crop up around the HA updates, but today it seems to have failed for no reason what so ever.

Logger: homeassistant.config_entries
Source: config_entries.py:604
First occurred: August 13, 2024 at 3:05:17 AM (1 occurrences)
Last logged: August 13, 2024 at 3:05:17 AM

Error setting up entry socket://192.168.1.30:6638 for zha
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 604, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/zha/__init__.py", line 151, in async_setup_entry
    await zha_gateway.async_initialize()
  File "/usr/local/lib/python3.12/site-packages/zha/application/gateway.py", line 273, in async_initialize
    await self._async_initialize()
  File "/usr/local/lib/python3.12/site-packages/zha/application/gateway.py", line 256, in _async_initialize
    await self.application_controller.startup(auto_form=True)
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 234, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 193, in initialize
    results = await self.energy_scan(
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bellows/zigbee/application.py", line 685, in energy_scan
    results = await self._ezsp.startScan(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/bellows/ezsp/__init__.py", line 241, in _list_command
    v = await fut
        ^^^^^^^^^
asyncio.exceptions.CancelledError: Global task timeout

And

Logger: homeassistant.bootstrap
Source: bootstrap.py:739
First occurred: August 13, 2024 at 3:01:17 AM (5 occurrences)
Last logged: August 13, 2024 at 3:05:17 AM

Waiting on integrations to complete setup: {('zha', '48ea463d489705e5fbc03d71d99cdad4'): 1233646.559489796, ('upnp', '72a0d081238b7b0407812d2816008aa4'): 1233647.043212134}
Waiting on integrations to complete setup: {('zha', '48ea463d489705e5fbc03d71d99cdad4'): 1233646.559489796}

I’m not sure what to do next to make this work consistently.

Core
2024.8.1
Supervisor
2024.08.0
Operating System
12.4
Frontend
20240809.0

I’m using a SLZB-06M that is connected via ethernet to the name device that HA is running on.

You might find some of the advice offered to me in this thread helpful: Best way to troubleshoot ZHA losing all devices?