Migrating zigbee devices from sonoff dongle E

I have been using home assistant with sonoff dongle E and ZHA for about 2 weeks and setup 40 zigbee devices.

I am now planning to upgrade the firmware on the dongle to the multi protocol firmware which supports matter. Any one tried this?

I see that I can backup the zigbee configuration, but don’t see a restore option. I see a migrate option, but in my case, I will have to stop this process when it asks to add new coordinator, then pair to the silicon labs multi protocol add on and then come back. Would this work.

Any steps or precautions will be helpful. Want to avoid re-pairing all the devices is possible.

The ‘migrate radio’ is the restore option.

Make sure Thread and Zigbee are on the same channel, or you will have a lot of problems.

Thanks very much for the response. So would the below steps be valid?

  • Backup zigbee
  • disable zha
  • disconnect dongle and upgrade
  • plug in dongle and configure as multi protocol
  • enable zha
  • migrate radio in zigbee wait for all devices to connect
  • configure matter and use the same channel that’s used in zigbee.

correct :slight_smile:

Sorry just edited my previous reply and added a disable and enable zha just to be safe before disconnecting the USB. Assuming this will be OK.

Seems coorect

This is not going well. I flashed the new firmware using the silicon labs web flasher. But the addon is stuck in an endless loop with the below error.

[07:58:43:020727] *** ASSERT *** : FATAL in function 'capabilities_checks' in file /usr/src/cpc-daemon/server_core/server_core.c at line #714 : UART flow control configuration mismatch between CPCd (enabled) and Secondary (disabled)
[07:58:44:021432] Info : Daemon exiting with status EXIT_FAILURE
Logger buffer size = 28672, highwater mark = 2471 : 8.62%. Lost logs : 0
[07:58:44] INFO: CPC ended with exit code 1 (signal 0)...
[07:58:45] INFO: Starting cpcd...
WARNING in function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.
FATAL in function 'capabilities_checks' in file /usr/src/cpc-daemon/server_core/server_core.c at line #714 : UART flow control configuration mismatch between CPCd (enabled) and Secondary (disabled)
[07:58:45:072315] Info : [CPCd v4.3.1.0] [Library API v3] [RCP Protocol v4]
[07:58:45:072360] Info : Git commit: 133b29678b3d0bc7578e098d2f46b4d5bcd2ebb4 / branch: 
[07:58:45:072361] Info : Sources hash: ff8300587e7e4ab1def7a89a272c0baef32f9eb3bff9b0ba06b94e655d652367
[07:58:45:072363] WARNING : In function 'main' in file /usr/src/cpc-daemon/main.c at line #186 : Running CPCd as 'root' is not recommended. Proceed at your own risk.

I also tried reflashing and didn’t make any difference. I looked up online to see one person who had this issue had firmware updater disabled which caused the problem. So I made sure it’s enabled. But no change.

Try to use this add-on

Worked for me (but not using a Dongle E but a zb-gw04-1v2)

Thanks for your help @francisp. I was able to get this working after disabling the Hardware flow control option which was selected by default in the multi protocol addon.

Below are the final steps for anyone going through this process.

  • Intall the multi protocol addon but don’t configure and start it.
  • Start migrate radio on ZHA.
  • When it tells you to disconnect old radio, then disconnect and flash it with multi pan firmware.
  • Leave this screen as it is and open a new home assistant window.
  • Connect the upgraded radio.
  • Now configure multi protocol addon. Make sure you disable Hardware flow control and it is fully started.
  • Go back to your ZHA migration screen and continue migration and select the new silicon labs device that is detected.

If everything goes well your device should be migrated.

1 Like

I see my ZHA is running on channel 25. Where do I change channel for Matter? When I tried changing it in the Thread configuration it tells me I have to do it in hardware settings menu. Not sure where this is.

The hardware settings menu is only available for the Skyconnect dongle and the HA Yellow :frowning:

See this issue for work-arounds :

Does

settings → devices & services → thread → configure → 3 dots → Change channel

not work ?

I did the same as your above screenshot, but I got a popup which said I have to change the channel in hardware settings.

But anyways, my happiness is shortlived. The Zigbee network went down and there are a lot of errors in the addon repeating while zha is trying to connect to the coordinator.

[09:57:27:999848] Info : Connecting to Secondary...
[09:57:30:000035] Info : Failed to connect, secondary seems unresponsive
[09:57:30:000045] Info : Connecting to Secondary...
[09:57:32:000446] Info : Failed to connect, secondary seems unresponsive
[09:57:32:000457] Info : Connecting to Secondary...
[09:57:34:000782] Info : Failed to connect, secondary seems unresponsive
[09:57:34:000792] Info : Connecting to Secondary...
[09:57:36:001146] Info : Failed to connect, secondary seems unresponsive
[09:57:36:001156] Info : Connecting to Secondary...
[09:57:38:001264] Info : Failed to connect, secondary seems unresponsive
[09:57:38:001271] Info : Connecting to Secondary...
[09:57:40:001344] Info : Failed to connect, secondary seems unresponsive

I can also see timeouts in the homeassistant logs.

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 209, in async_initialize
    await self.application_controller.startup(auto_form=True)
  File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 201, in startup
    await self.shutdown()
  File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 406, in shutdown
    await self._dblistener.shutdown()
  File "/usr/local/lib/python3.11/site-packages/zigpy/appdb.py", line 187, in shutdown
    await self._set_isolation_level(None)
  File "/usr/local/lib/python3.11/site-packages/zigpy/appdb.py", line 205, in _set_isolation_level
    await self._db._execute(lambda: setattr(self._db, "isolation_level", level))
  File "/usr/local/lib/python3.11/site-packages/aiosqlite/core.py", line 126, in _execute
    raise ValueError("Connection closed")
ValueError: Connection closed
2023-10-04 09:56:46.035 ERROR (MainThread) [zigpy.application] Couldn't start application
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 197, in startup
    await self.connect()
  File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 141, in connect
    await ezsp.startup_reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 159, in startup_reset
    await self.reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 185, in reset
    await self._gw.reset()
TimeoutError
2023-10-04 09:56:46.037 WARNING (MainThread) [homeassistant.components.zha.core.gateway] 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.11/site-packages/zigpy/application.py", line 197, in startup
    await self.connect()
  File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 141, in connect
    await ezsp.startup_reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 159, in startup_reset
    await self.reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 185, in reset
    await self._gw.reset()
TimeoutError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 209, in async_initialize
    await self.application_controller.startup(auto_form=True)
  File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 201, in startup
    await self.shutdown()
  File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 406, in shutdown
    await self._dblistener.shutdown()
  File "/usr/local/lib/python3.11/site-packages/zigpy/appdb.py", line 187, in shutdown
    await self._set_isolation_level(None)
  File "/usr/local/lib/python3.11/site-packages/zigpy/appdb.py", line 205, in _set_isolation_level
    await self._db._execute(lambda: setattr(self._db, "isolation_level", level))
  File "/usr/local/lib/python3.11/site-packages/aiosqlite/core.py", line 126, in _execute
    raise ValueError("Connection closed")
ValueError: Connection closed
2023-10-04 09:57:10.276 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry SONOFF Zigbee 3.0 USB Dongle Plus V2 for zha
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/zigpy/application.py", line 197, in startup
    await self.connect()
  File "/usr/local/lib/python3.11/site-packages/bellows/zigbee/application.py", line 141, in connect
    await ezsp.startup_reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 159, in startup_reset
    await self.reset()
  File "/usr/local/lib/python3.11/site-packages/bellows/ezsp/__init__.py", line 185, in reset
    await self._gw.reset()
TimeoutError

Now I am trying to find a way to go back to the old firmware.

If you really want to use thread, a nRF52840 dongle costs about €12, is a thread certified component, and works well with HA.

https://openthread.io/vendors/nordic-semiconductor

Migrated back to the old firmware and was able to restrore the previous backup.

Looks like it is difficult to source a nRF52840 dongle in the UK. I may get another dongle E and flash it with a matter firmware instead of a multi pan.

PS: Found this one which is nRF52840.

This indicates that multiprotocol can’t connect to the dongle, usually caused by wrong settings or bad USB connection. However very occasionally the dongle might hang and require unplug/replug (this mostly seems to happen in VM’s )

Thanks very much for your response. Yes I am running this in a VM, but not sure if this could be the USB connection. I have re flashed the firmware twice by disconnecting and reconnecting the usb and saw the same errors. At this time I also started my cpu spiking to 50% which is usually around 3%.

My settings are below which from what I have read online should be right for this dongle.

  • selected the right usb adapter.
  • baud rate 460800
  • disabled hardware flow control
  • disabled auto update
  • Rest are defaults

When I switched back to zigbee firmware, it immediately started working.

I will give it one more try.

Tried one more time today. I have not seen the failed to connect error this time, but the behaviour is the same. After restart zigbee wouldn’t connect to the new coordinator.

I did see a message to change my zigbee and thread channels to match. Below is the help link provided.
https://skyconnect.home-assistant.io/about-multiprotocol/#resolve-channel-conflict

I couldn’t change the channel in both zha and thread settings. Below is the message I get for thread, but I get a similar message when tried to change the channel in zha.

So switched back to zigbee firmware agian. I don’t think I will try this experimental feature on my only zigbee adapter. As I can order a ZB-GW04 for about £6, I will buy one to experiment.

Did you reconfigure ZHA to connect to silabs multiprotocol? via socket://core-silabs-multiprotocol:9999

There is no easy solution to the channel mismatch right now, but you can change the Thread channel to match Zigbee via the api

Other work arounds are also mentioned in that thread.

Thank you very much for the info. Yes my settings are correct. I picked the right adapter socket://core-silabs-multiprotocol:9999. As soon as the migration is done it did work and was able to control my zigbee devices. Only breaks after a restart of home assistant.

I will try again once I get my new adapter.