core: ZHA: Sonoff Zigbee USB dongle does not work after 2022.12 update

The problem

Dear,

There’s an issue with the Sonoff dongle. I’ve switched to another scene right before the update so it was working before. Now I get an eror message:

Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus, s/n: 6222e9dc1d3bec118daaa0957a0af07f - ITead for zha

I will upload the log as well.

Yours sincerely.

Me

What version of Home Assistant Core has the issue?

2022.12.0

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

ZHA

Link to integration documentation on our website

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

Diagnostics information

home-assistant_2022-12-07T22-44-50.849Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Error setting up entry Sonoff Zigbee 3.0 USB Dongle Plus, s/n: 6222e9dc1d3bec118daaa0957a0af07f - ITead 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 100, in async_setup_entry
    setup_quirks(config)
  File "/usr/local/lib/python3.10/site-packages/zhaquirks/__init__.py", line 400, in setup
    importlib.import_module(modname)
  File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 879, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1012, in get_code
  File "<frozen importlib._bootstrap_external>", line 672, in _compile_bytecode
ValueError: bad marshal data (unknown type code)

Additional information

All my Zigbee devices that are connected are not working no more because of this issue with the dongle. I’ve tried to restart HA, stop the integration, start the integration, reconect the radio, rebooted the hardware, removed the dongle from my pi and re ensterted it again. Tried to reconfigure the dongle for several times. Nothing solved the issue.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 51 (13 by maintainers)

Most upvoted comments

Screenshot 2022-12-14 234117

I can see on Windows with Samba:

  • If ZHA is disable there is no zigbee.db-shm and zigbee.db-wal
  • zigpy - no idea
  • but now zigbee.db and fixed.db have the same file size and ZHA is running @11.5

Tomorrow I will try a update to 12.7 😃 … THX for today

After repeating everything and replacing the fixed.db with the zigbee.db I was able to update to 2022.12.7.

THX to puddly

I habe the same Problem with Sonoff Dongle (why Conbee in this topic ?)

Because I started out with a Sonoff gateway and now moved to Conbee yesterday to see if the gateway was the problem.

I’m having a similar issue with Sonoff Zigbee Bridge. I have the wireless one with tasmota intalled.

HA Version 2022.12.0 Tasmota ZHA ZBBridge version 12.2.0

Logger: homeassistant.components.zha.core.gateway
Source: components/zha/core/gateway.py:172
Integration: Zigbee Home Automation (documentation, issues)
First occurred: 07:30:00 (3 occurrences)
Last logged: 07:30:12

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/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 131, 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 101, in initialize
    await ezsp.connect(use_thread=zigpy_config[conf.CONF_USE_THREAD])
  File "/usr/local/lib/python3.10/site-packages/bellows/ezsp/__init__.py", line 118, in connect
    self._gw = await bellows.uart.connect(self._config, self, use_thread=use_thread)
  File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 389, in connect
    protocol, connection_done = await thread.run_coroutine_threadsafe(
  File "/usr/local/lib/python3.10/site-packages/bellows/uart.py", line 368, in _connect
    transport, protocol = await zigpy.serial.create_serial_connection(
  File "/usr/local/lib/python3.10/site-packages/zigpy/serial.py", line 36, in create_serial_connection
    transport, protocol = await loop.create_connection(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
    raise exceptions[0]
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
    sock = await self._connect_sock(
  File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
    await self.sock_connect(sock, address)
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
    return await fut
  File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 535, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
ConnectionRefusedError: [Errno 111] Connect call failed ('10.109.1.157', 8888)

I can access the bridge UI and was able to uptate its firmware to the latest version OTA.

You can access it, but zha cannot connect to it as the error says. Did it change the address?