Easy swap from ZBDongle-E to ZBDongle-P?

I have Home Assistant set up on a Raspberry Pi 400 with a Sonoff ZBDongle-E. After purchasing that dongle and configuring it, I discovered that it is not fully supported. I have not been happy with the Zigbee performance (frequent disconnects, etc), so I purchased a Sonoff ZBDongle-P and flashed it with “GitHub - Koenkk/Z-Stack-firmware: Compilation instructions and hex files for Z-Stack firmwares”.

But I am not sure how best to swap in this new zigbee device, while keeping all of my configuration. I have configured Zigbee2MQTT, and Node-Red, and that config is good when the devices are connected, so I want to keep that config.

I am assuming something like this would work:

  1. Note the zigbee device names in HA
  2. Delete all zigbee devices from HA
  3. Remove old ZBDongle-E and plug in ZBDongle-P
  4. Pair all zigbee devices to the ZBDongle-P, and use the same names that they had before
  5. All of the Node-Red configuration should work fine as long as the names are the same.

Is this the easiest way for me to perform the swap?

Thanks
David

I doubt much of that should be necessary.

First: Backup, backup, backup.

Second: make needed changes to the serial: config - change port, remove adapter: ezsp if it is there.

Then:

Ideal but extremely doubtful scenario:
Backup/restore for ezsp (dongle-e) is almost non-existent, but it does create a very basic but incomplete coordinator_backup.json. If you’re really lucky, maybe the backup will be restored to the blank “P”, and devices automatically rebuild as they check in. I’d consider the possibility almost non-existent, but worth trying before doing anything destructive.

Likely Scenario:
Delete coordinator_backup.json and let the new stick initialize from scratch. You will need to re-pair the devices, but I think they will pick up the existing names. Not much else should be needed.

Worst Case:
Something closer to your steps.

hmmmm… I also have the E dongle but never had an issue like disconnect, in fact it is rock solid. Very happy with it. Just wondering did you connect via an USB extension cable to avoid the interferance with the USB port. Also I did not modify or upgrade or flash any firmware , just using what came with the dongle, not sure it made any difference

Yes thats about all you can do. The ZBDongle-E and ZBDongle-P are built on different architectures and cannot be migrated, however you can probably short-cut this a bit so make the migration easier…

Don’t remove any devices from HA. Don’t delete any devices from Z2M. This will keep the devices in both the HA and Z2M databases.

  1. Shut down Z2M.
  2. Swap the Dongle-E for the Dongle-P.
  3. Reconfigure Z2M as needed, including setting PAN ID and Network Key to GENERATE to form an entirely new network on startup.
  4. When startup is complete, put Z2M into Inclusion and reset your devices, They should be re-detected by Z2M using the previous information in the Z2M database and should also re-populate back in to HA using the existing devices.

I’ve done this during some recent testing and was successful with those steps on a few test devices.

1 Like

Yes, has a USB 1 meter extension, and antenna is about 1 meter from the Pi. No firmware flash, just out of box. I have never used Zigbee devices before with any other configuration, so maybe the disconnects that I see are normal. Want to go through the steps to use the “supported” dongle that everyone seems to be ahppy with, and see what the experience is with that config. I will turn the ZBDongle-E into a router.

How did this work out for you in the end? I happen to be in the same situation and considering whether to try and make a swap or just delete and repair everything manually.

I bought a ZBDongle-E last month and I tried to migrate from ZBDongle-P to ZBDongle-E on Z2M. Then I found the migration steps for Tul47 on Github.
Finally,I successfully migrated it.
The link is here:https://github.com/Koenkk/zigbee2mqtt/discussions/16478#discussioncomment-7362747