explaingit

koenkk/zigbee2mqtt

Analysis updated 2026-06-24

15,126TypeScriptAudience · ops devopsComplexity · 3/5LicenseSetup · moderate

TLDR

Zigbee2MQTT bridges Zigbee smart-home devices to MQTT so you can use lights, sensors, and switches without the vendor hub. Integrates with Home Assistant and similar.

Mindmap

mindmap
  root((Zigbee2MQTT))
    Inputs
      Zigbee USB stick
      Device events
      MQTT commands
    Outputs
      MQTT messages
      Web frontend
      database.db
    Use Cases
      Home Assistant control
      Vendor-free Zigbee
      Custom automations
    Tech Stack
      TypeScript
      Node.js
      MQTT
      zigbee-herdsman
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Replace a Philips Hue or Ikea hub with one MQTT bridge across all brands

USE CASE 2

Expose Zigbee sensors to Home Assistant via the official add-on

USE CASE 3

Add support for a new Zigbee device by writing a converter

USE CASE 4

Run a self-hosted home automation stack on a Raspberry Pi

What is it built with?

TypeScriptNode.jsMQTTDocker

How does it compare?

koenkk/zigbee2mqttjupyterlab/jupyterlabvscodevim/vim
Stars15,12615,14215,147
LanguageTypeScriptTypeScriptTypeScript
Last pushed2026-05-21
MaintenanceMaintained
Setup difficultymoderateeasyeasy
Complexity3/53/52/5
Audienceops devopsdatadeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Needs a supported Zigbee USB radio adapter and an MQTT broker before the bridge can pair any device.

GPL license, you can use and modify it but derivative works must be shared under the same license.

In plain English

Zigbee2MQTT is a bridge that lets people use Zigbee smart-home devices without the original vendor's hub or gateway. Zigbee is a low-power wireless protocol used by many lights, sensors, switches, and plugs from brands like Philips Hue, Ikea, Xiaomi, and OSRAM. Normally each brand expects you to use its own bridge. This project replaces those bridges with a single piece of software that talks to the devices directly and republishes everything as MQTT messages. MQTT is a lightweight messaging protocol that many home-automation systems already understand. Because Zigbee2MQTT speaks MQTT, it slots into almost any setup. The README calls out direct integrations with Home Assistant (via an official add-on for Home Assistant OS), Homey, Domoticz, Gladys Assistant, and ioBroker. For each of those, the README points to the relevant add-on or wiki page. Internally, the software is split into three modules, each in its own GitHub project. zigbee-herdsman talks to the USB radio adapter that physically receives Zigbee traffic, for example a Texas Instruments stick using the TI zStack API. zigbee-herdsman-converters maps individual device models to the Zigbee clusters they support, clusters are layers of the Zigbee protocol that define how lights, sensors, and switches talk to each other. The top-level Zigbee2MQTT module drives the lower layers and translates Zigbee messages to MQTT. Device state is kept in a text file called database.db that stores connected devices and their capabilities. Two web frontends, zigbee2mqtt-frontend and zigbee2mqtt-windfront, provide monitoring and configuration in a browser. The code is written in TypeScript. Contributors install dependencies with pnpm, then run pnpm run build, or pnpm run build:watch for live recompilation. Before submitting changes the README asks contributors to run a check command and a test-coverage command. The documentation site at zigbee2mqtt.io covers initial setup, integration guides, and a long list of supported devices, plus instructions for adding support for a new device that is not yet listed. Help is offered through GitHub issues and a Discord server linked from the badges at the top of the README.

Copy-paste prompts

Prompt 1
Give me a docker-compose.yml that runs Zigbee2MQTT with a Sonoff Zigbee 3.0 USB stick on /dev/ttyUSB0
Prompt 2
Walk me through pairing an Aqara temperature sensor with Zigbee2MQTT and surfacing it in Home Assistant
Prompt 3
Show me how to write a zigbee-herdsman-converter entry for an unsupported device model
Prompt 4
Explain the structure of the database.db file and how to safely back it up before upgrading
Prompt 5
Configure Zigbee2MQTT to publish state updates only on change to reduce MQTT broker traffic

Frequently asked questions

What is zigbee2mqtt?

Zigbee2MQTT bridges Zigbee smart-home devices to MQTT so you can use lights, sensors, and switches without the vendor hub. Integrates with Home Assistant and similar.

What language is zigbee2mqtt written in?

Mainly TypeScript. The stack also includes TypeScript, Node.js, MQTT.

What license does zigbee2mqtt use?

GPL license, you can use and modify it but derivative works must be shared under the same license.

How hard is zigbee2mqtt to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is zigbee2mqtt for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.