Smart Home
ZHA vs Zigbee2MQTT: pick and migrate
Choose between ZHA and Zigbee2MQTT and migrate cleanly — the three operations people conflate (coordinator swap, software switch, asymmetric ZHA↔Z2M) and where re-pairing is unavoidable.
Problem summary
The 'which is better' question is saturated; the real trouble is migration, where three different operations get conflated. A same-software coordinator swap keeps your devices (both ZHA and Z2M support it; ZHA even has a built-in cross-vendor Migrate Radio wizard). A ZHA↔Zigbee2MQTT software switch is hard — the supported answer is re-pair, and the 'no-re-pair' community scripts are fragile and unsupported. The low-risk path is a second coordinator and a gradual move.
Name the operation: coordinator swap, or stack switch (ZHA↔Z2M)?
ls -l /dev/serial/by-id/
You know whether re-pairing is avoidable.
If you try a script, back up first and expect it may fail.
Layer path
Step-by-step runbook
Start here. Do each check in order, compare it to the expected result, and stop when the evidence explains the failure or the safe stop point applies.
Classify the migration
Check: Decide coordinator swap vs ZHA↔Z2M stack switch.
Expected result: You know whether re-pairing is needed.
If not: Don't treat a software switch as a simple radio change.
For a swap, use the built-in path
Check: Run ZHA's Migrate Radio wizard (or Z2M's supported swap).
Expected result: Devices stay paired on the new coordinator.
If not: Keep the old radio until the new one is verified.
For a stack switch, go parallel
Check: Add a second coordinator and run the new stack alongside.
Expected result: You can move devices at your own pace.
If not: Pair mains-powered routers first, battery devices last.
Avoid the fragile shortcut
Check: Skip unsupported no-re-pair scripts unless you've backed up and accept the risk.
Expected result: You don't corrupt the Zigbee database mid-migration.
If not: The parallel approach is the safer route.
Verify and decommission
Check: Confirm devices respond on the new stack/radio, then retire the old.
Expected result: The migration is proven before cleanup.
If not: If a device won't move, re-pair just that one.
Decision tree
If: You just want a better/newer radio.
Then: Coordinator swap, same software.
Action: Use ZHA's Migrate Radio wizard or Z2M's supported swap — devices stay paired.
If: You want to switch ZHA to Zigbee2MQTT.
Then: Software switch — re-pairing is the supported answer.
Action: Re-pair, or run Z2M alongside ZHA and move devices gradually.
If: You're tempted by a no-re-pair conversion script.
Then: Unsupported and version-fragile (broke on a 2026 API change).
Action: Use the parallel-coordinator approach instead for safety.
Safe stop: If you try a script, back up first and expect it may fail.
If: You need more than one Zigbee network.
Then: ZHA can't; Z2M can (multiple instances).
Action: Choose Zigbee2MQTT for multi-network setups.
Evidence table
| Symptom | Evidence to collect | Likely layer | Next action |
|---|---|---|---|
| Want to change radios, keep devices. | Whether it's a same-software swap and both adapters are supported. | Coordinator swap | Use the Migrate Radio wizard / supported Z2M swap. |
| Want to leave ZHA for Z2M. | Whether you accept re-pairing or will run parallel stacks. | Stack switch | Re-pair or move gradually with a second coordinator. |
| Tried a no-re-pair script and it errored. | Script/version compatibility (e.g. 2026 template change). | Unsupported migration script | Fall back to re-pairing or parallel coordinators. |
| Need multiple Zigbee networks. | ZHA single-network limit vs Z2M multi-instance. | Topology requirement | Pick Z2M for multiple networks. |
Commands and settings paths
Find both coordinators' paths
ls -l /dev/serial/by-id/
Where: On the Home Assistant host.
Expected: Each coordinator appears with a stable by-id name.
Failure means: Missing entries mean the adapter isn't connected/passed through.
Safe next step: Use the by-id path in ZHA/Z2M config, not /dev/ttyACM0.
Use ZHA's Migrate Radio wizard
Settings > Devices & Services > ZHA > (kebab) > Migrate Radio
Where: In the Home Assistant UI.
Expected: ZHA backs up and restores the network onto the new coordinator.
Failure means: If it errors, the target adapter may be unsupported.
Safe next step: Pick a supported adapter; keep the old one until verified.
Stand up Z2M in parallel (stack switch)
Add a second adapter; configure Zigbee2MQTT (adapter: ember, baud per device)
Where: In the Z2M add-on/container config.
Expected: Z2M runs alongside ZHA on the second radio.
Failure means: Wrong adapter/baudrate stops Z2M from starting.
Safe next step: Use the device-correct adapter/baud; move devices gradually.
Hardware and platform boundary
Change only when
- Buy a second supported coordinator (e.g. Connect ZBT-2) when switching stacks or radios — it enables a gradual, low-risk move and a clean coordinator swap.
Evidence that matters
- A supported adapter (ZBT-2/ZBT-1, TI zstack, Silabs ember), referenced by by-id, and a backup before you start.
Evidence that does not matter
- Brand loyalty between ZHA and Z2M — pick by needs (multi-network, add-on workflow), and migrate by operation type, not hype.
Avoid
- Promising yourself a no-re-pair ZHA→Z2M switch via an unsupported script (it broke on a 2026 HA change) instead of re-pairing or going parallel.
Related tool
Use the linked tool to turn this runbook into a guided check for your exact setup.
Device setup troubleshooterRelated problems
Last reviewed
2026-06-03 · Reviewed by HomeTechOps. Built from 2026-06 research verified against home-assistant.io ZHA docs and Zigbee2MQTT migration docs; the differentiator is separating the three conflated operations (coordinator swap vs stack switch vs ZHA↔Z2M asymmetry) and flagging the no-re-pair scripts as unsupported/fragile. SkyConnect is the legacy name for ZBT-1.
Sources/assumptions
- Assumes a Zigbee network on ZHA or Zigbee2MQTT with a supported coordinator (Connect ZBT-2/ZBT-1, TI zstack, or Silabs ember); SkyConnect is the legacy name for ZBT-1.
- A same-software coordinator swap can avoid re-pairing; a ZHA↔Z2M software switch generally cannot, and any 'no-re-pair' script is community/unsupported and version-fragile.
- Adapter/baudrate values (e.g. ember at 460800) are device-specific; chip-family support lists change — verify against current docs.
Source-backed checks
HomeTechOps turns official docs and conservative safety rules into a shorter runbook. These links are the source trail for the page direction.