Zigbee2MQTT

On this page 7

Zigbee2MQTT is an open-source bridge that connects Zigbee devices to an MQTT message broker, translating radio messages from sensors, lights and switches into readable JSON messages and back. In home automation, it lets a single USB or network Zigbee adapter replace several proprietary vendor hubs, so devices from different manufacturers can be combined in one system.

The project runs on Node.js and is usually installed next to platforms such as Home Assistant, openHAB or Node-RED. Its value lies in broad device support, local control without cloud services and a transparent message format that any automation software able to speak MQTT can use.

How Zigbee2MQTT bridges radio and messages

Zigbee2MQTT works as a translator between two networks. On one side, a Zigbee adapter acts as the network coordinator, forming the mesh, admitting devices and holding the network key. On the other side, the software publishes each device state to an MQTT broker such as Mosquitto and subscribes to command topics.

A motion sensor named hallway_motion, for example, publishes its state to the topic zigbee2mqtt/hallway_motion with a payload such as {"occupancy": true, "battery": 87}. A light is switched by publishing {"state": "ON", "brightness": 150} to zigbee2mqtt/kitchen_light/set. This topic-per-device model keeps every message human-readable and easy to debug.

Internally, two libraries do the heavy lifting: zigbee-herdsman talks to the adapter firmware, and zigbee-herdsman-converters contains a definition for each supported model that maps manufacturer-specific clusters to standard properties.

The table below lists the components of a typical installation and their roles.

ComponentTypical exampleRole
Zigbee adapterUSB stick or Ethernet coordinatorForms and manages the Zigbee mesh
Zigbee2MQTT serviceNode.js process or containerTranslates Zigbee frames into JSON messages
MQTT brokerMosquittoDistributes messages between publishers and subscribers
Automation platformHome Assistant, openHAB, Node-REDRuns rules, scenes and dashboards
Web frontendBuilt-in browser interfacePairing, network map, settings and OTA updates
Components of a Zigbee2MQTT installation

Supported adapters and devices

Zigbee2MQTT supports several coordinator chip families, and the choice of adapter strongly affects stability. The project recommends adapters based on current Texas Instruments or Silicon Labs chips, while older chips remain usable only for small networks.

Chip familyDriverSuitability
Texas Instruments CC2652 and CC1352Z-StackRecommended for most homes
Silicon Labs EFR32EmberZNetRecommended with current firmware
ConBee and RaspBeedeCONZSupported, slightly fewer features
Texas Instruments CC2530 and CC2531Z-Stack legacyObsolete, small test networks only
Common Zigbee2MQTT adapter families

On the device side, the project lists several thousand models from hundreds of vendors, including lights, plugs, thermostatic radiator valves, door sensors, buttons and blinds. When a new device appears, users can write an external converter to add support before an official definition is released.

Zigbee2MQTT compared with other Zigbee integrations

Zigbee2MQTT is one of several ways to run Zigbee locally, and the main differences lie in device coverage, architecture and coupling to one platform. Owners of Home Assistant most often choose between Zigbee2MQTT and the built-in ZHA integration.

ApproachArchitecturePlatform independenceTypical strength
Zigbee2MQTTSeparate service plus MQTT brokerHighBroadest device support and detailed exposes
ZHA in Home AssistantIntegrated libraryHome Assistant onlySimpler setup with fewer moving parts
deCONZ with PhosconVendor software for ConBeeModeratePolished graphical interface
Vendor hubsProprietary bridge with cloud appLowEasy onboarding for one brand
Zigbee2MQTT against alternative approaches

The decoupling through MQTT is the decisive advantage: the Zigbee network keeps running when the automation platform restarts or is replaced, and several consumers can read the same messages at once.

Configuring a reliable Zigbee2MQTT network

A stable deployment depends more on radio planning than on software settings. Zigbee operates at 2.4 GHz and shares the band with Wi-Fi, so the Zigbee channel should be chosen away from busy Wi-Fi channels, commonly channel 15, 20 or 25 depending on the local Wi-Fi layout.

  • Connect USB adapters through a short extension cable, because USB 3 ports emit noise in the same band.
  • Pair mains-powered routers first, such as plugs and fixed lights, so battery devices find strong parents.
  • Give each device a descriptive friendly name before building automations, since topics are derived from it.
  • Keep regular backups of the coordinator and the configuration, which hold the network key and device database.
  • Enable Home Assistant MQTT discovery only when entities should appear automatically.

Zigbee2MQTT also supports groups and direct binding. Groups let one message switch many lights at the same moment, and binding lets a wall remote control a lamp directly, so the pairing keeps working even when the server is offline.

Limitations and common mistakes

Most Zigbee2MQTT problems trace back to radio interference, weak mesh routing or adapter changes. The software itself is mature, but it exposes the user to the full complexity of a Zigbee network.

SymptomLikely causeFix
Devices drop off overnightToo few routers or poor placementAdd mains-powered Zigbee routers
Pairing fails repeatedlyAdapter next to USB 3 or Wi-Fi routerUse an extension cable and relocate
All devices lost after adapter swapNew network key or PAN IDRestore the coordinator backup
Automations stop with no Zigbee errorMQTT broker offlineMonitor and auto-restart the broker
Device shows missing featuresGeneric or outdated definitionUpdate or add an external converter
Frequent Zigbee2MQTT problems and fixes

Another trade-off is operational responsibility: updates, broker security and backups fall on the owner. MQTT credentials should always be set, because an unauthenticated broker lets any device on the local network control the home.

In everyday language

Many smart bulbs, sensors and switches use a wireless language called Zigbee, and each brand usually wants its own hub to understand it. Zigbee2MQTT is a universal interpreter: one small radio stick listens to all those devices and passes their messages to the rest of the home system in a simple, shared format.

The benefit is one hub instead of many, with everything working inside the home rather than through company servers. The price is that the owner has to set it up and look after it.

Seen in the real world

A family in a two-story house had three separate apps for lights, radiator valves and door sensors, each with its own bridge. They bought a network-connected adapter based on a Texas Instruments CC2652 chip, placed it in the hallway on channel 20, and paired 42 devices from five brands to a Zigbee2MQTT instance running on a small home server.

In Home Assistant, they built an automation that lowers the thermostatic radiator valves whenever a window sensor reports an open window for more than two minutes. Because the messages travel only over the local network, the rule fires in under one second and works even during an internet outage. The family retired all three vendor bridges and now manages the entire home from one dashboard.