ZBDongle-E - "Error setting up entry SONOFF Zigbee 3.0 USB Dongle Plus V2 for zha" [solved-ish]

I had recently setup a Sonoff Zigbee 3.0 USB Dongle Plus dongle model ZBDongle-E, which was working well and had 6 devices added to it, no problem.

I use a virtualization software to run instance of hass (proxmox) I pass through the USB dongle to the VM. I noticed today that the home assistant is no longer correctly connecting to the dongle. I did a VM host reboot recently while adding some other unrelated service, might have caused it.

I see the dongle should still be connected through: on VM host:

root@p***x:~# lsusb
...
Bus 001 Device 008: ID 1a86:55d4 QinHeng Electronics
...

Then in hass ssh terminal:

[core-ssh ~]$ lsusb
Bus 005 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0001
Bus 002 Device 002: ID 0627:0001
Bus 001 Device 001: ID 1d6b:0002
Bus 006 Device 005: ID 0409:55aa
Bus 006 Device 003: ID 1a86:55d4
Bus 006 Device 001: ID 1d6b:0002
Bus 004 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0001
Bus 006 Device 004: ID 05ac:828f
Bus 003 Device 002: ID 1a86:55d4
Bus 007 Device 001: ID 1d6b:0003
Bus 006 Device 002: ID 1a86:55d4 <----------------

Its still there, should be passed through ok?

I’m on HA core 2023.2.5 will try updating

I pasted the zha error log below as well. What could be going wrong here? How do I approach troubleshooting this?



Logger: homeassistant.config_entries
Source: components/zha/core/gateway.py:174
First occurred: 4:06:46 PM (3 occurrences)
Last logged: 4:07:58 PM
Error setting up entry SONOFF Zigbee 3.0 USB Dongle Plus V2 for zha

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/src/homeassistant/homeassistant/config_entries.py", line 382, 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 189, in async_initialize
    raise exc
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 174, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 169, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 145, in startup
    await self.connect()
  File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 124, in connect
    self._ezsp = await bellows.ezsp.EZSP.initialize(self.config)
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 104, in initialize
    await ezsp._startup_reset()
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 95, in _startup_reset
    await self.reset()
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 124, in reset
    await self._gw.reset()
  File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 258, in reset
    return await asyncio.wait_for(self._reset_future, timeout=RESET_TIMEOUT)
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError



Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:174
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 4:06:16 PM (10 occurrences)
Last logged: 4:07:58 PM

    Couldn't start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 1 of 3)
    Couldn't start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 2 of 3)
    Couldn't start EZSP = Silicon Labs EmberZNet protocol: Elelabs, HUSBZB-1, Telegesis coordinator (attempt 3 of 3)

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/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 174, in async_initialize
    self.application_controller = await app_controller_cls.new(
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 169, in new
    await app.startup(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 146, in startup
    await self.initialize(auto_form=auto_form)
  File "/usr/local/lib/python3.10/site-packages/zigpy/application.py", line 91, in initialize
    await self.load_network_info(load_devices=False)
  File "/usr/local/lib/python3.10/site-packages/bellows/zigbee/application.py", line 215, in load_network_info
    (nwk,) = await ezsp.getNodeId()
  File "/usr/local/lib/python3.10/asyncio/tasks.py", line 458, in wait_for
    raise exceptions.TimeoutError() from exc
asyncio.exceptions.TimeoutError


(upgrading to 2023.3.6 did not resolve issue)
edit:
‘DOWNLOAD BACKUP’ button under Network Settings is grayed out.

I tried ‘migrate radio’ > ‘migrate current radio’


It lists three serial devices for this sonoff stick, but when selecting /dev/ttyACM0 or /dev/ttyACM1, a ‘Failed to connect’ error is shown.
Points to problem with dongle?

I saw this ticket, which reads similar: Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus · Issue #89261 · home-assistant/core · GitHub
about NVRAM corruption, which advises to reflash, however, the instructions are for the ZBDongle-P model, which uses the CP210x usb to serial chip, this ZBDongle-E model has CH9102 chip. I did try to flash it (not sure if wise) but the TI ‘Flash programmer 2’ complains about not being able to connect and simply crashes…

When I removed dongle after making those screenshots, home assistant completely froze, could not connect to SSH, had to hard reset. I restarted it without the dongle connected (same error either way), then connected the dongle:

[core-ssh ~]$ lsusb
Bus 005 Device 001: ID 1d6b:0001
Bus 003 Device 001: ID 1d6b:0001
Bus 002 Device 002: ID 0627:0001
Bus 001 Device 001: ID 1d6b:0002
Bus 006 Device 003: ID 0409:55aa
Bus 006 Device 001: ID 1d6b:0002
Bus 004 Device 001: ID 1d6b:0001
Bus 002 Device 001: ID 1d6b:0001
Bus 006 Device 002: ID 05ac:828f
Bus 003 Device 002: ID 1a86:55d4
Bus 007 Device 001: ID 1d6b:0003
Bus 006 Device 004: ID 1a86:55d4

Tried migrating the radio again, this time it only showed one serial device: /dev/ttyACM0, radio migration worked and the integration is working again :thinking: :man_shrugging: