Move Zigbee2MQTT to a different device?!

So the USB ports on my Odroid N2+ stopped working yesterday (seems to be a common problem) and now I had to go back to a RPi3 B+ which is just painfully slow and I regularly had issues with that hardware before I got the N2+ … That’s why I really want to go back to some decent hardware as soon as possible. However, right now there is nothing available - at least for a appropriate price… and the Amber only has 2GB RAM and ships somewhere next year (iirc) CM4 are impossible to get a hold of right now anyway so not even the least appealing Amber kit makes sense for me to buy (which would be available by the end of the month)

So, for now my idea was to keep using the N2+ and run Zigbee2MQTT (the only reason I need USB in the first place) on the RPi3 … how would I do that so I can keep all my devices connected and ideally still be able to control it from Home Assistant through the side-panel?

I really don’t want to re-pair 100+ Zigbee devices that are partially placed really inconvenient to reach throughout my house.

Would appreciate any help and links to instructions (for dummies) on how to do that

To answer my own question, I got it to work:

  1. Make a backup of you Zigbee2MQTT Home Assistant integration and save it to you PC
  2. Install Zigbee2MQTT on the RPi (don’t start it yet) Linux | Zigbee2MQTT
  3. Install Samba Share on the RPi and share the /opt/zigbee2mqtt folder (there’s a lot of instructions on how to do that)
  4. open your backup with 7zip (or whatever) and copy the contents from .\share.tar.gz\share.tar\zigbee2mqtt\ to the RPi /data folder (the first path of the path depends on the Samba settings you defined before)
  5. change the mqtt:// address of the configuration.yaml to point to you HA mqtt server (don’t change anything else)
  6. start zigbee2mqtt
  7. add to the configuration.yaml in Home Assistant
panel_iframe:
  z2m:
    title: "Zigbee2MQTT"
    url: "http://xxx.xxx.xxx.xxx:8099"
    icon: mdi:zigbee
  1. done - nothing should have changed (for me the energy consumption for the hour when I switched devices got all messed up - no idea why exactly because it also affects non-zigbee2mqtt devices :woman_shrugging:)
3 Likes

Thanks for this write up - very helpful as I attempt to do the same process !

I know this is a little old, but wondering why you didn’t use ZigBee2MQTT Proxy?

And what does the change to configuration.yaml add that is not provided my ZigBee2MQTT?

He means the configuration.yaml of Zigbee2mqtt, not HA’s configuration.yaml. The mqtt line needs to point to the mqtt server HA is using.

Thanks, I was referring to this:

panel_iframe:
  z2m:
    title: "Zigbee2MQTT"
    url: "http://xxx.xxx.xxx.xxx:8099"
    icon: mdi:zigbee

Why not use the Z2M proxy?

1 Like

Googled for it, I did not even know it existed.

Nice, it even works from outside. No need any more for a https://z2m.mydomain.com

Still not sure. Why not just use Z2M proxy. It does the same.

That is my last comment, I installed Z2M proxy, it even works from outside :slight_smile:

1 Like

I was moving from one HA Supervised to another.

Instructions were really helpful! Thank you @Farnsworth

What I did extra was:

  1. install the add on “Advanced SSH & Web Terminal” to grant SSH access on both systems (allow sftp and change user to root). :warning: Immediately stop this add-on after you finish this process as these settings make it very insecure
  2. cd config
  3. tar -czvf z2m.tar.gz zigbee2mqtt/ zigbee.db (to copy all things Z2M)
  4. scp z2m.tar.gz [email protected]:~/config (to copy to new host)
  5. SSH into new host
  6. cd config
  7. tar -xzvf z2m.tar.gz
  8. Start new Z2M with every device and already paired

Hopefully that helps someone else