Zigbee Home Automation (ZHA) runs inside Home Assistant on the Python zigpy stack with no external broker, while Zigbee2MQTT runs as a separate Node.js bridge on zigbee-herdsman connected over MQTT. Choose ZHA for a native integration with UI-guided migration across supported radio families, or choose Zigbee2MQTT for a decoupled service with its own web frontend and JavaScript device converters.
Evidence and Scope Note
This comparison is compiled from official Home Assistant (2026.11.3), zigpy, zigbee-herdsman, and Zigbee2MQTT documentation checked on 2026-11-26. Configuration snippets, UI paths, and migration procedures were checked against the documentation without lab testing. Browse all Zigbee Guide articles.
Architectural Overview
The core difference between ZHA and Zigbee2MQTT is coupling. ZHA uses the Zigbee stack directly within Home Assistant. Zigbee2MQTT separates radio control from Home Assistant with an MQTT broker.
ZHA (Native Integration)
[ Zigbee Mesh ] -> [ Coordinator ] -> [ zigpy + Radio Library ] -> [ ZHA Integration ] -> [ HA Entities ]
Zigbee2MQTT (Decoupled Broker Architecture)
[ Zigbee Mesh ] -> [ Coordinator ] -> [ Zigbee2MQTT (zigbee-herdsman) ]
|
(JSON over MQTT)
v
[ MQTT Broker (e.g., Mosquitto) ]
|
(MQTT messages)
v
[ Home Assistant MQTT Integration ] -> [ HA Entities ]
Side-by-Side Architectural Comparison
| Architectural Layer | ZHA (Zigbee Home Automation) | Zigbee2MQTT |
|---|---|---|
| Runtime and Core Stack | Python in Home Assistant via zigpy (ZCL and ZDO stack) | Node.js standalone service via zigbee-herdsman |
| Communication to Home Assistant | Direct native integration | JSON messages through an MQTT broker and Home Assistant MQTT discovery |
| External Broker Needed | No | Yes (such as Eclipse Mosquitto) |
| Radio Protocol Drivers | bellows (ezsp), zigpy-znp (znp), zigpy-deconz (deCONZ), zigpy-xbee (xbee), zigpy-zigate (zigate) | zstack, ember, deconz, zboss (experimental), zigate (not maintained) |
| Non-Standard Device Layer | Python quirks in zha-device-handlers | JavaScript converters in zigbee-herdsman-converters |
| Management Interface | Native Home Assistant UI (Settings > Connectivity > Zigbee) | Built-in web frontend. Standalone deployments default to port 8080 when the frontend is enabled. The Home Assistant add-on enforces port 8099 for Ingress. |
| Network Coordinator URI | socket://[IP]:[PORT] (for example, Sonoff ZBBridge) | tcp://[IP]:[PORT] |
| Backup and Migration | Automatic and manual backups, with UI migration across compatible ezsp, znp, and deCONZ adapters using a backup made in ZHA | coordinator_backup.json supported on zstack and ember only |
| OTA Firmware Updates | Native HA update entities via zigpy providers | Built-in OTA via Koenkk/zigbee-OTA reporting idle, available, scheduled, updating |
ZHA and Zigbee2MQTT each require a dedicated coordinator, so they cannot share the same USB stick. Running both on one Home Assistant instance requires two separate physical coordinators operating on independent Zigbee networks.
Deployment Models and Home Assistant Install Methods
Your Home Assistant installation type determines how you deploy Zigbee2MQTT. ZHA is a native integration on Home Assistant OS and Home Assistant Container.
| Home Assistant Install Method | Includes Apps (Add-ons) | ZHA Deployment | Zigbee2MQTT Deployment |
|---|---|---|---|
| Home Assistant OS (HAOS) | Yes | Native integration | Zigbee2MQTT add-on with an MQTT broker such as the Mosquitto Broker app (64-bit aarch64 or amd64) |
| Home Assistant Container | No | Native integration | Standalone Docker container plus an MQTT broker |
Coordinator Hardware and Connection Architecture
Both platforms support Texas Instruments and Silicon Labs coordinators. Their driver names and backup capabilities differ.
Supported Radio Families
- ZHA (
zigpy): Supportsezsp(Silicon Labs EmberZNet, such as Home Assistant ZBT-1, ZBT-2, Elelabs, and HUSBZB-1) andznp(Texas Instruments CC253x, CC26x2, and CC13x2). It also supportsdeCONZ(ConBee and RaspBee),zigate, andxbee(Digi XBee Series 2, 2C, and 3). - Zigbee2MQTT (
zigbee-herdsman): Recommendszstack(Texas Instruments, including CC2652 and CC1352),ember(Silicon Labs), anddeconzadapters. It markszboss(Nordic Semiconductor) as experimental andzigateas not maintained.
Serial Paths and Network Coordinators
On Linux, both projects recommend using a USB coordinator’s persistent path under /dev/serial/by-id/. ZHA documentation also recommends connecting USB coordinators through a USB extension cable plugged into a USB 2.0 port to reduce 2.4 GHz electromagnetic interference from computer hardware and USB 3.x ports.
ZHA uses socket://[IP]:[PORT] for network coordinators such as Sonoff ZBBridge (socket://192.168.1.11:8888). Zigbee2MQTT uses tcp://[IP]:[PORT] for Ethernet-attached coordinators (for example, tcp://192.168.1.12:6638) or a remote host running ser2net.
Warning: Zigbee2MQTT documentation warns that using a Zigbee coordinator over a serial proxy (
ser2netor a serial-to-IP bridge) across Wi-Fi, WAN, or VPN is unsupported for normal operation. Unstable connections can introduce packet loss and latency that the serial protocols cannot handle reliably.
Setting Up ZHA in Home Assistant
ZHA requires no MQTT broker or external containers. Home Assistant can auto-discover ZHA, or you can configure it manually.
- Connect a compatible coordinator. If you use a USB coordinator, plug it into a USB 2.0 port using a USB extension cable. If you use a USB coordinator with Home Assistant Container, map its device from the host into the container. The ZHA guide shows
/dev/ttyUSB0:/dev/ttyUSB0under the Home Assistant service’sdevicesin Docker Compose. Restart Home Assistant before configuring ZHA. - In Home Assistant, go to Settings > Devices & services.
- Click Add Integration and select Zigbee Home Automation.
- Select the serial device path for your radio from the detected options and choose Submit.
- If ZHA cannot detect the radio type, choose the matching type (
ezsp,znp,deCONZ,zigate, orxbee) and select Submit. Enter the serial device path. For a USB adapter, use its path under/dev/serial/by-id/if available. Set Port speed and Data flow control if applicable, and select Submit. - For a Sonoff ZBBridge, configure the additional
usb_pathsetting assocket://[IP]:[PORT].
Deploying Zigbee2MQTT and MQTT Discovery
To connect Zigbee2MQTT to Home Assistant, run the Zigbee2MQTT service and an MQTT broker, and enable Home Assistant’s MQTT integration.
Path A: Home Assistant OS or Supervised Add-on Overview
The Zigbee2MQTT add-on supports Home Assistant OS and existing Supervised installations on 64-bit aarch64 or amd64 systems.
You can set up the Mosquitto Broker app through Home Assistant’s MQTT integration. For the add-on installation steps, follow the instructions linked from the official Zigbee2MQTT add-on installation guide.
When running as a Home Assistant add-on, Zigbee2MQTT serves its web frontend on port 8099 for Ingress. Use core-mosquitto as the broker host if you use the Mosquitto Broker app.
Path B: Standalone Docker Deployment
On a host running Docker, including a Home Assistant Container host, run Zigbee2MQTT with Docker Compose and connect it to your MQTT broker. Before starting Zigbee2MQTT, make sure the adapter has coordinator firmware. Some adapters ship with it preflashed.
services:
zigbee2mqtt:
container_name: zigbee2mqtt
image: ghcr.io/koenkk/zigbee2mqtt
restart: unless-stopped
volumes:
- ./data:/app/data
- /run/udev:/run/udev:ro
ports:
- 8080:8080
devices:
- /dev/serial/by-id/your-adapter-id:/dev/ttyACM0
Run ls -l /dev/serial/by-id on your Linux host and find the adapter’s listed name before ->. On the left side of the mapping, replace your-adapter-id with that name and keep the /dev/serial/by-id/ prefix. Keep /dev/ttyACM0 on the container side. Mount /app/data persistently to keep the Zigbee2MQTT configuration and network data. Save the Compose file as docker-compose.yml.
Configuring configuration.yaml and Home Assistant MQTT Discovery
In Zigbee2MQTT’s configuration.yaml, enable Home Assistant discovery, set your broker address and adapter, and enable the web frontend. The example uses the Docker USB mapping above and an ember adapter. For this Compose setup, save the configuration as ./data/configuration.yaml. Replace broker-host and the port with your broker’s connection details. Use your broker credentials for user and password when authentication is required. For an anonymous broker connection, omit both fields.
homeassistant:
enabled: true
mqtt:
base_topic: zigbee2mqtt
server: mqtt://broker-host:1883
user: my_user
password: my_password
version: 4
serial:
port: /dev/ttyACM0
adapter: ember
frontend:
enabled: true
port: 8080
For the Docker deployment, start Zigbee2MQTT from the directory containing docker-compose.yml.
docker compose up -d zigbee2mqtt
If the onboarding screen appears on port 8080 at first start, open it in your browser and complete the on-screen configuration.
Next, connect Home Assistant to the broker. Home Assistant requires a broker that supports MQTT protocol version 5. The version: 4 setting above selects the MQTT protocol version for the Zigbee2MQTT client.
- Navigate to Settings > Devices & services.
- Click Add Integration and select MQTT. Home Assistant can configure the official Mosquitto Broker app and generate credentials for the integration.
- If you configure the connection manually, enter the broker’s hostname or IP address, its port, and the username and password if required.
- Verify discovery settings under Configure MQTT Options if you changed the default
homeassistantprefix.
MQTT discovery is enabled by default in Home Assistant.
Handling Non-Standard Devices: Quirks vs External Converters
When a device deviates from the Zigbee Cluster Library (ZCL) specification, ZHA quirks and Zigbee2MQTT converters can handle device-specific behavior.
ZHA Quirks (zha-device-handlers)
ZHA uses Python device handlers from zha-device-handlers to handle non-standard messages and expose device features.
Zigbee2MQTT External Converters (zigbee-herdsman-converters)
Zigbee2MQTT uses device definitions from zigbee-herdsman-converters and supports temporary external converters for new devices.
- Pair the unsupported device so Zigbee2MQTT completes its interview and logs its Zigbee model and manufacturer name.
- Open the device in the Zigbee2MQTT web frontend, go to the Dev console tab, and click Generate external definition.
- Use modern extends if they cover the missing features. To load the converter, open Extending the generated external definition in the Zigbee2MQTT guide to supporting new devices and follow its external converters link for the loading instructions.
Coordinator Backups and Adapter Migration
| Capability | ZHA | Zigbee2MQTT |
|---|---|---|
| Network Backups | Automatic backups, with manual creation in network settings | Coordinator backup file coordinator_backup.json on supported adapters |
| Adapter Families for Migration | Compatible ezsp, znp, and deCONZ adapters | Backup and restore on zstack and ember only (not conbee, ezsp, zboss, or zigate) |
| Cross-Chipset Migration | Supported through the UI for compatible ezsp, znp, and deCONZ adapters using a backup made in ZHA | Switching between zstack and ember is unofficial and may require re-pairing |
ZHA Adapter Migration Path
In Home Assistant, open Settings > Connectivity > Zigbee, select Migrate, and follow the prompts to Migrate to a new adapter. ZHA makes an automatic backup during migration. Check the minimum firmware requirement in the ZHA migration guide if your previous ZHA adapter uses the deCONZ radio type.
Zigbee2MQTT Adapter Migration Checklist
Follow the migration sequence in the Zigbee2MQTT FAQ when moving coordinators:
- Update Zigbee2MQTT to the latest release.
- Stop Zigbee2MQTT cleanly.
- Check whether re-pairing is needed before you remove any files. Keeping the same
serial.adapterdriver (zstacktozstackorembertoember) generally preserves pairings. Moving from a CC2530 or CC2531 to a CC2652 or CC1352 requires re-pairing. For any other adapter change, check the linked FAQ before choosing a branch.- If re-pairing is unnecessary, copy the old adapter’s IEEE address onto the new adapter.
- If re-pairing is required, delete
data/coordinator_backup.json(if present) anddata/database.db(the directory iszigbee2mqtt/in the Home Assistant add-on).
- Update
serial.portinconfiguration.yaml. If you explicitly setserial.adapterand the new coordinator uses a different driver, change that value to match the new driver. Update the baud rate if the new hardware requires it. - Start Zigbee2MQTT. If devices do not respond after a migration without re-pairing, power-cycle some mains-powered routers for a few seconds. If re-pairing is required, disconnect all mains-powered devices before re-pairing devices one by one.
Warning: Changing
network_keyorpan_idin Zigbee2MQTT’sconfiguration.yamlrequires re-pairing all devices. Preserve both during a migration without re-pairing.
Mesh Management, Binding, Groups, and OTA Updates
Both architectures expose Zigbee mesh diagnostics, direct device binding, Zigbee groups, and over-the-air firmware updates, though their interfaces differ.
Visualization and Frontend Controls
- ZHA provides a built-in network map showing connections between paired devices and their reported RSSI and LQI values.
- Zigbee2MQTT ships a web frontend with optional
auth_token,base_url, and TLS (ssl_certandssl_key) settings. When enabled in a standalone deployment, the frontend defaults to port8080. The Home Assistant add-on enforces port8099for Ingress. Zigbee2MQTT also provides a network map. The frontend can manage bindings, groups, and OTA updates and includes a Dev console.
Direct Binding and Zigbee Groups
Direct Zigbee binding links endpoints on compatible devices, such as a wireless dimmer and a smart bulb, so the dimmer can control the bulb even when Home Assistant or Zigbee2MQTT is offline. Zigbee groups let one broadcast command control multiple devices at once.
- In ZHA, open a device page, select the three-dots menu next to Reconfigure, and choose Manage Zigbee device. Use the Bindings tab to configure bindings. Zigbee groups are managed natively inside ZHA.
- In Zigbee2MQTT: Configure bindings from a device’s Bind tab in the frontend or publish a JSON payload with
fromandtofields tozigbee2mqtt/bridge/request/device/bind(supporting clusters such asgenScenes,genOnOff,genLevelCtrl,lightingColorCtrl, andclosuresWindowCovering). Groups can be managed via the frontend, MQTT commands, orconfiguration.yaml.
Over-the-Air (OTA) Firmware Updates
- ZHA surfaces available firmware updates through Home Assistant’s
updateentities. Thezigpystack supports online firmware providers and local OTA files in the Zigbee OTA format. - Zigbee2MQTT fetches firmware images from
Koenkk/zigbee-OTAby default when internet access is available. It publishes update states over MQTT asidle,available,scheduled, orupdating.
Who Each Architecture Suits
Choose ZHA If
- You want the fewest moving parts, with no MQTT broker or second service to maintain.
- You run Home Assistant and want Zigbee pairing, visualization, bindings, and
updateentities inside Home Assistant’s native UI. - You want automatic network backups and UI-guided migration across compatible
ezsp,znp, anddeCONZadapters using a backup made in ZHA.
Skip ZHA If
- You want your Zigbee bridge running as a separate service or on another host connected over MQTT.
- You want Zigbee2MQTT’s dedicated web frontend, MQTT API, or Dev console external-definition workflow for unsupported devices.
Choose Zigbee2MQTT If
- You already run Docker or an MQTT broker and prefer a decoupled bridge that publishes structured JSON over MQTT.
- You want a network map and a web UI for bindings, groups, OTA updates, and generating external device definitions.
- You use a recommended
zstackorembercoordinator and want MQTT integration with Home Assistant discovery.
Skip Zigbee2MQTT If
- You do not want to operate and secure an MQTT broker alongside Home Assistant.
- You run a 32-bit host and expect to install the Home Assistant add-on, which requires a 64-bit (
aarch64oramd64) system. - You use a
conbee,zboss, orzigateadapter and need native coordinator backup and restore inside the Zigbee software.