Resolving Zigbee2MQTT Migration Issues: Network Commissioning Timed Out
Table of Contents
When migrating or restoring a Zigbee network in Zigbee2MQTT, you might encounter the following error:
Error: Network commissioning timed out - most likely network with the same panId or extendedPanId already exists nearby
This problem often stems from conflicts in your Zigbee network settings, particularly with the PAN ID, Extended PAN ID, or Network Key. It can also occur if devices from a previous network are still active. Below is a step-by-step guide to help resolve this issue.
Common Causes #
Starting Zigbee2MQTT before migrating the configuration:
If the coordinator initializes a new network, it may clash with an existing one nearby.Modifying and reverting network identifiers (PAN ID, Extended PAN ID, or Network Key):
Inconsistencies between the coordinator and connected devices can cause the error.Active Zigbee routers from the previous network:
These devices might still try to connect using the old network configuration, leading to conflicts.
Steps to Resolve the Issue #
1. Turn Off All Zigbee Routers #
Before starting Zigbee2MQTT with a restored backup:
- Disconnect all Zigbee routers (e.g., smart plugs or repeaters) by unplugging them or cutting off their power supply.
- This step prevents interference during the commissioning process.
2. Restore Your Backup #
Ensure you restore these key files from your backup:
coordinator_backup.json
: Contains the network configuration for the coordinator.database.db
: Stores paired device information and states.state.json
: Maintains runtime data.
Copy these files into your Zigbee2MQTT data directory (e.g., /data/zigbee2mqtt
).
3. Start Zigbee2MQTT #
- Start Zigbee2MQTT after restoring the backup and monitor the logs for errors.
- Once it starts successfully, reconnect power to all Zigbee routers.
If no devices appear joined after starting Zigbee2MQTT, stop it, reapply the backup files, and restart the service.
4. Allow Time for Network Stabilization #
Zigbee networks may take time to stabilize:
- Wait about 10 minutes for routers and end devices to rejoin automatically.
If you have lost all hope - or you don’t have devices joined yet, you can create a new network with adding the following to your config. Remove old entries for pan_id
, ext_pan_id
and network_key
advanced:
pan_id: GENERATE
ext_pan_id: GENERATE
network_key: GENERATE