ZHA Not starting

I see a few other posts around that ask about ZHA not starting, and there aren’t any real good answers. A lot of times it just fixes itself, which I have seen. But eventually, I will notice that none of my zigbee stuff is working, open up HA and see that the ZHA integration isn’t working. Remove the conbee 2, reboot a few times, and and eventually it just starts working again. This is a brand new Deb install (11, just did it yesterday). My conbee 2 is on a USB extension cable, but my laptop and no other devices in this room are using wifi. When I plug the stick in, dmesg shows it:

[ 1118.092425] usb 1-2: USB disconnect, device number 3
[ 1125.160136] usb 1-2: new full-speed USB device number 10 using xhci_hcd
[ 1125.310037] usb 1-2: New USB device found, idVendor=1cf1, idProduct=0030, bcdDevice= 1.00
[ 1125.310048] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1125.310054] usb 1-2: Product: ConBee II
[ 1125.310058] usb 1-2: Manufacturer: dresden elektronik ingenieurtechnik GmbH
[ 1125.310062] usb 1-2: SerialNumber: DE2466314
[ 1125.312736] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
[ 1128.661650] usb 1-2: USB disconnect, device number 10
[ 1129.007969] usb 1-2: new full-speed USB device number 11 using xhci_hcd
[ 1129.158031] usb 1-2: New USB device found, idVendor=1cf1, idProduct=0030, bcdDevice= 1.00
[ 1129.158041] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1129.158046] usb 1-2: Product: ConBee II
[ 1129.158051] usb 1-2: Manufacturer: dresden elektronik ingenieurtechnik GmbH
[ 1129.158055] usb 1-2: SerialNumber: DE2466314
[ 1129.161150] cdc_acm 1-2:1.0: ttyACM0: USB ACM device

But here is a snippet from the log when I try to add the ZHA integration:

2021-12-19 16:30:07 DEBUG (MainThread) [zigpy_znp.zigbee.application] Probing /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2466314-if00
2021-12-19 16:30:07 DEBUG (MainThread) [zigpy_znp.uart] Connecting to /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2466314-if00 at 115200 baud
2021-12-19 16:30:07 DEBUG (MainThread) [zigpy_znp.uart] Opened /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2466314-if00 serial port
2021-12-19 16:30:07 DEBUG (MainThread) [zigpy_znp.uart] Connected to /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2466314-if00 at 115200 baud
2021-12-19 16:30:07 DEBUG (MainThread) [zigpy_znp.api] Toggling RTS/DTR pins to skip bootloader or reset chip
2021-12-19 16:30:07 DEBUG (MainThread) [zigpy_znp.uart] Setting serial pin states: DTR=False, RTS=False
2021-12-19 16:30:08 DEBUG (MainThread) [zigpy_znp.uart] Setting serial pin states: DTR=False, RTS=True
2021-12-19 16:30:08 DEBUG (MainThread) [zigpy_znp.uart] Setting serial pin states: DTR=False, RTS=False
2021-12-19 16:30:08 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:08 DEBUG (MainThread) [zigpy_znp.api] Sending CC253x bootloader skip bytes
2021-12-19 16:30:11 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:12 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:13 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:14 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:15 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:16 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:17 DEBUG (MainThread) [zigpy_znp.api] Sending request: SYS.Ping.Req()
2021-12-19 16:30:17 DEBUG (MainThread) [zigpy_znp.api] Connection to /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2466314-if00 failed, cleaning up
2021-12-19 16:30:17 DEBUG (MainThread) [zigpy_znp.uart] Closing serial port
2021-12-19 16:30:17 DEBUG (MainThread) [zigpy_znp.zigbee.application] Failed to probe ZNP radio with config {'path': '/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2466314-if00', 'baudrate': 115200, 'flow_control': None}
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/api.py", line 509, in _skip_bootloader
    result = await responses.get()
  File "/usr/local/lib/python3.9/asyncio/queues.py", line 166, in get
    await getter
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/zigbee/application.py", line 139, in probe
    await znp.connect()
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/api.py", line 551, in connect
    self.capabilities = (await self._skip_bootloader()).Capabilities
  File "/usr/local/lib/python3.9/site-packages/zigpy_znp/api.py", line 509, in _skip_bootloader
    result = await responses.get()
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 128, in __aexit__
    self._do_exit(exc_type)
  File "/usr/local/lib/python3.9/site-packages/async_timeout/__init__.py", line 203, in _do_exit
    raise asyncio.TimeoutError
asyncio.exceptions.TimeoutError
2021-12-19 16:30:17 DEBUG (MainThread) [bellows.ezsp] Resetting EZSP
2021-12-19 16:30:19 DEBUG (MainThread) [bellows.ezsp] Unsuccessful radio probe of '/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2466314-if00' port
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/bellows/ezsp/__init__.py", line 75, in _probe
    await self.reset()
  File "/usr/local/lib/python3.9/site-packages/bellows/ezsp/__init__.py", line 98, in reset
    await self._gw.reset()
asyncio.exceptions.CancelledError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 492, in wait_for
    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.9/site-packages/bellows/ezsp/__init__.py", line 59, in probe
    await asyncio.wait_for(ezsp._probe(), timeout=PROBE_TIMEOUT)
  File "/usr/local/lib/python3.9/asyncio/tasks.py", line 494, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError

That was an issue on 2021.11.betas but it’s been resolved on 2021.12 (at least for me). What version are you running?

I am using 2021-12 also.

System Health

version: core-2021.12.3
installation_type: Home Assistant Supervised
dev: false
hassio: true
docker: true
user: root
virtualenv: false
python_version: 3.9.7
os_name: Linux
os_version: 5.10.0-10-amd64
arch: x86_64
timezone: America/New_York

GitHub API: ok
Github API Calls Remaining: 4985
Installed Version: 1.18.0
Stage: running
Available Repositories: 921
Installed Repositories: 2

logged_in: true
subscription_expiration: January 2, 2022 at 19:00
relayer_connected: true
remote_enabled: true
remote_connected: true
alexa_enabled: false
google_enabled: true
remote_server: us-east-1-0.ui.nabu.casa
can_reach_cert_server: ok
can_reach_cloud_auth: ok
can_reach_cloud: failed to load: timeout

host_os: Debian GNU/Linux 11 (bullseye)
update_channel: stable
supervisor_version: supervisor-2021.12.2
docker_version: 20.10.12
disk_total: 226.3 GB
disk_used: 11.0 GB
healthy: true
supported: failed to load: Unsupported
supervisor_api: ok
version_api: ok
installed_addons: Plex Media Server (2.7.0), SSH & Web Terminal (10.0.0), Mosquitto broker (6.0.1), Node-RED (10.2.0), Log Viewer (0.12.1), Samba share (9.5.1), Insteon MQTT (1.1.1), Home Assistant Google Drive Backup (0.105.2), Studio Code Server (3.7.0), deCONZ (6.10.0), Zigbee2mqtt (1.22.1-1)

dashboards: 2
resources: 0
views: 0
mode: storage

I don’t think you can run ZHA and Zigbee2mqtt and deCONZ at the same time. I believe ya gotta pick 1.

You can have both but only one can be used /started. If you enable start all on restart, then it will fail.

I think that was it. Great catch. It’s working again. Thanks :slight_smile: