Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

zigbee2mqtt

Koenkk1.2kGPL-3.02.4.0TypeScript support: included

Zigbee to MQTT bridge using Zigbee-herdsman

xiaomi, tradfri, hue, bridge, zigbee, mqtt, cc2531

readme



Zigbee2MQTT 🌉 🐝

Allows you to use your Zigbee devices without the vendor's bridge or gateway.

It bridges events and allows you to control your Zigbee devices via MQTT. In this way you can integrate your Zigbee devices with whatever smart home infrastructure you are using.

Getting started

The documentation provides you all the information needed to get up and running! Make sure you don't skip sections if this is your first visit, as there might be important details in there for you.

If you aren't familiar with Zigbee terminology make sure you read this to help you out.

Integrations

Zigbee2MQTT integrates well with (almost) every home automation solution because it uses MQTT. However the following integrations are worth mentioning:

Home Assistant


Homey


Domoticz


Gladys Assistant

  • Integration implemented natively in Gladys Assistant (documentation).

IoBroker


Architecture

Architecture

Internal Architecture

Zigbee2MQTT is made up of three modules, each developed in its own Github project. Starting from the hardware (adapter) and moving up; zigbee-herdsman connects to your Zigbee adapter and makes an API available to the higher levels of the stack. For e.g. Texas Instruments hardware, zigbee-herdsman uses the TI zStack monitoring and test API to communicate with the adapter. Zigbee-herdsman handles the core Zigbee communication. The module zigbee-herdsman-converters handles the mapping from individual device models to the Zigbee clusters they support. Zigbee clusters are the layers of the Zigbee protocol on top of the base protocol that define things like how lights, sensors and switches talk to each other over the Zigbee network. Finally, the Zigbee2MQTT module drives zigbee-herdsman and maps the zigbee messages to MQTT messages. Zigbee2MQTT also keeps track of the state of the system. It uses a database.db file to store this state; a text file with a JSON database of connected devices and their capabilities. Zigbee2MQTT provides a web-based interface that allows monitoring and configuration.

Developing

Zigbee2MQTT uses TypeScript (partially for now). Therefore after making changes to files in the lib/ directory you need to recompile Zigbee2MQTT. This can be done by executing pnpm run build. For faster development instead of running pnpm run build you can run pnpm run build-watch in another terminal session, this will recompile as you change files.

Before running any of the commands, you'll first need to run pnpm install --include=dev. Before submitting changes run pnpm run check:w then pnpm run test:coverage.

Supported devices

See Supported devices to check whether your device is supported. There is quite an extensive list, including devices from vendors like Xiaomi, Ikea, Philips, OSRAM and more.

If it's not listed in Supported devices, support can be added (fairly) easily, see How to support new devices.

Support & help

If you need assistance you can check opened issues. Feel free to help with Pull Requests when you were able to fix things or add new devices or just share the love on social media.

changelog

Changelog

2.4.0 (2025-06-01)

Features

Bug Fixes

  • API missing a few request endpoints (#27551) (a5e4e9e)
  • Don't copy external JS to dist folder (#27397) (0ead302)
  • Drop Node 18 support, add 24 (#27348) (aad87cc)
  • Fix bind/unbind by coordinator ieeeAddr not working (#27333) (d8855b8)
  • Fix import error on Windows (ERR_UNSUPPORTED_ESM_URL_SCHEME) (#27519) (ed03c40)
  • HA integration for external sensors Aqara W100 (#27520) (4bf4563)
  • ignore: bump the minor-patch group across 1 directory with 2 updates (#27562) (278e3fb)
  • ignore: Cleanup publish options (#27226) (b7b92da)
  • ignore: Fix passive states not updating in frontend (#27532) (a289f98)
  • ignore: networkmap typing (#27566) (621cae2)
  • ignore: update zigbee-herdsman to 4.0.2 (#27380) (cc3521c)
  • ignore: update zigbee-herdsman to 4.1.0 (#27462) (3edcfd7)
  • ignore: update zigbee-herdsman-converters to 23.37.0 (#27300) (ff823db)
  • ignore: update zigbee-herdsman-converters to 23.38.0 (#27329) (164c322)
  • ignore: update zigbee-herdsman-converters to 23.39.0 (#27340) (1d6ba53)
  • ignore: update zigbee-herdsman-converters to 23.40.0 (#27347) (7a4f286)
  • ignore: update zigbee-herdsman-converters to 23.40.1 (#27358) (317c9b4)
  • ignore: update zigbee-herdsman-converters to 23.41.0 (#27371) (f7e5051)
  • ignore: update zigbee-herdsman-converters to 23.42.0 (#27392) (edcfe32)
  • ignore: update zigbee-herdsman-converters to 23.43.0 (#27394) (e061126)
  • ignore: update zigbee-herdsman-converters to 23.44.0 (#27404) (21c9faf)
  • ignore: update zigbee-herdsman-converters to 23.45.0 (#27422) (8c3252c)
  • ignore: update zigbee-herdsman-converters to 23.46.0 (#27444) (7449c23)
  • ignore: update zigbee-herdsman-converters to 23.47.0 (#27463) (693f0d0)
  • ignore: update zigbee-herdsman-converters to 23.48.0 (#27470) (1303340)
  • ignore: update zigbee-herdsman-converters to 23.49.0 (#27479) (ea49d1a)
  • ignore: update zigbee-herdsman-converters to 23.50.0 (#27521) (1960e02)
  • ignore: update zigbee-herdsman-converters to 23.50.1 (#27531) (00dda24)
  • ignore: update zigbee-herdsman-converters to 23.51.0 (#27540) (f5920fd)
  • ignore: update zigbee-herdsman-converters to 23.52.0 (#27559) (6ed18c7)
  • ignore: update zigbee-herdsman-converters to 23.52.1 (#27563) (711b456)
  • ignore: update zigbee-herdsman-converters to 23.53.0 (#27572) (e0b0248)
  • ignore: update zigbee2mqtt-frontend to 0.9.11 (#27301) (3cb63aa)
  • ignore: update zigbee2mqtt-frontend to 0.9.12 (#27379) (615c53c)
  • ignore: update zigbee2mqtt-frontend to 0.9.13 (#27382) (f656d96)
  • ignore: update zigbee2mqtt-windfront to 1.0.2 (#27567) (5e44cf7)
  • Improve update script (#27308) (3cbcc4a)
  • Only send JSON state over WebSocket (#27225) (39e4468)
  • Rerun onboarding if Z2M start failed after previous onboarding (#27386) (d697c29)
  • Trim name on rename (#27332) (69364c9)

2.3.0 (2025-05-01)

Features

Bug Fixes

2.2.1 (2025-04-04)

Bug Fixes

  • Fix issue with some settings when migrating from 1.x.x to 2.2.x (#26947) (9e481fe)
  • Fix settings being overwriting when env var is set to a ref (#26988) (d6a5128)
  • ignore: update zigbee-herdsman-converters to 23.19.0 (#26938) (0b7d003)
  • ignore: update zigbee-herdsman-converters to 23.19.1 (#26961) (e90afb2)
  • ignore: update zigbee-herdsman-converters to 23.20.0 (#26978) (37927e6)
  • ignore: update zigbee-herdsman-converters to 23.20.1 (#26989) (9d0ee03)
  • ignore: update zigbee2mqtt-frontend to 0.9.6 (#26959) (fb4d01e)
  • ignore: update zigbee2mqtt-frontend to 0.9.7 (#26976) (89cdb1f)

2.2.0 (2025-04-01)

Features

Bug Fixes

2.1.3 (2025-03-02)

Bug Fixes

2.1.2 (2025-03-01)

Bug Fixes

  • Add Home Assistant device class to external_temperature_input entity (#26535) (e8031ef)
  • Allow configuring number of folders of old logs to keep (#26398) (845e03e)
  • Fix Docker build hanging (#26547) (e050e20)
  • Fix HA MQTT dict entry indicating that an update is progress (#26267) (b35cdc3)
  • Home Assistant: add brightness to supported_color_modes (#26545) (063aba1)
  • Home Assistant: add is_updating attribute (#26231) (1eda69a)
  • Home Assistant: add missing device_class for some current and power entities (#26324) (1e656c2)
  • Home Assistant: support speed-controlled fans (#24483) (7ce5b58)
  • ignore: Add publish to meta of toZigbee converters (#26490) (07145ac)
  • ignore: remove obsolete @types/eslint__js (d522d2c)
  • ignore: update dependencies (#26266) (3e3ceff)
  • ignore: update dependencies (#26383) (758c566)
  • ignore: update dependencies (#26478) (d2166f2)
  • ignore: update zigbee-herdsman to 3.2.6 (#26303) (49fe147)
  • ignore: update zigbee-herdsman to 3.2.7 (#26498) (4e650b7)
  • ignore: update zigbee-herdsman-converters to 21.32.0 (#26245) (8542b35)
  • ignore: update zigbee-herdsman-converters to 21.33.0 (#26258) (97c7485)
  • ignore: update zigbee-herdsman-converters to 21.34.0 (#26285) (7a0964e)
  • ignore: update zigbee-herdsman-converters to 21.35.0 (#26305) (30d13d6)
  • ignore: update zigbee-herdsman-converters to 21.36.0 (#26333) (ba76533)
  • ignore: update zigbee-herdsman-converters to 21.37.0 (#26367) (dec5ca8)
  • ignore: update zigbee-herdsman-converters to 21.38.0 (#26400) (93af062)
  • ignore: update zigbee-herdsman-converters to 22.0.1 (#26418) (7d63a9a)
  • ignore: update zigbee-herdsman-converters to 22.1.0 (#26445) (40f4147)
  • ignore: update zigbee-herdsman-converters to 22.2.0 (#26469) (67e1a02)
  • ignore: update zigbee-herdsman-converters to 23.0.0 (44f9fe7)
  • ignore: update zigbee-herdsman-converters to 23.1.0 (#26509) (db7b51a)
  • ignore: update zigbee-herdsman-converters to 23.1.1 (#26510) (102857a)
  • ignore: update zigbee-herdsman-converters to 23.2.0 (#26549) (9f72c5c)
  • Make compatible with pnpm 10 (#26546) (29d25ae)
  • Support FreeBSD for update.sh (#26261) (5e55ef0)

2.1.1 (2025-02-06)

Bug Fixes

  • ignore: update dependencies (#26126) (b960775)
  • Rename internal_temperature to internalTemperature to correct typo (#26114) (e4e4f16)

2.1.0 (2025-02-01)

Features

  • Add a settings option to log to console in json format (#25649) (26ef565)
  • Allow Home Assistant OTA Update entity to show progress while updating (#25632) (318dc04)

Bug Fixes

2.0.0 (2025-01-03)

⚠ BREAKING CHANGES

  • Change default homeassistant.status_topic to homeassistant/status (#25286)
  • Docker: update Alpine to 3.21, drop x86 support (#25171)
  • Remove permit_join_timeout (#25082)
  • Home Assistant: remove duplicate sensor/select for select/number/button entities (#25026)
  • Ensure data in response is always empty on error (#24971)
  • Rework OTA (#24634)
  • Remove deprecated Home Assistant integration features (#24494)
  • Improve bind/bridge/groups parsing and resolving consistency (#24432)
  • Remove configuring group members through configuration.yaml (#24338)
  • Improve permit join (#24257)
  • The big cleanup (#24200)
  • HA permit join switch: disable automatically after 254 seconds (#24245)

Features

Bug Fixes

1.42.0 (2024-12-01)

Features

  • Add experimental support for Home Assistant event entities (#24233) (848f250)

Bug Fixes

1.41.0 (2024-10-31)

Features

Bug Fixes

  • Add additional discovery lookups for Home Assistant (#24555) (a2ce323)
  • Fix group state change for open/close devices (#24226) (076ada2)
  • Frontend code cleanup @Nerivec (#24322) (e2f19f1)
  • ignore: update dependencies (#24236) (5c3f712)
  • ignore: update dependencies (#24309) (9f12ebb)
  • ignore: update dependencies (#24411) (eb606a5)
  • ignore: update dependencies (#24498) (2139e7a)
  • ignore: update zigbee-herdsman to 2.1.4 (#24397) (12cb6e1)
  • ignore: update zigbee-herdsman to 2.1.5 (#24433) (6477865)
  • ignore: update zigbee-herdsman to 2.1.6 (#24545) (9837488)
  • ignore: update zigbee-herdsman to 2.1.7 (#24566) (f1615a2)
  • ignore: update zigbee-herdsman-converters to 20.22.0 (#24186) (e5fac76)
  • ignore: update zigbee-herdsman-converters to 20.23.0 (#24201) (b09ae10)
  • ignore: update zigbee-herdsman-converters to 20.23.1 (#24225) (0229259)
  • ignore: update zigbee-herdsman-converters to 20.24.0 (#24246) (3bb4af2)
  • ignore: update zigbee-herdsman-converters to 20.25.0 (#24285) (5f60187)
  • ignore: update zigbee-herdsman-converters to 20.26.0 (#24307) (db00759)
  • ignore: update zigbee-herdsman-converters to 20.27.2 (#24321) (618b318)
  • ignore: update zigbee-herdsman-converters to 20.28.0 (#24337) (d12b117)
  • ignore: update zigbee-herdsman-converters to 20.29.0 (#24363) (d79e71b)
  • ignore: update zigbee-herdsman-converters to 20.31.0 (#24408) (669a16f)
  • ignore: update zigbee-herdsman-converters to 20.32.0 (#24434) (9ad7c70)
  • ignore: update zigbee-herdsman-converters to 20.33.0 (#24457) (c09aeec)
  • ignore: update zigbee-herdsman-converters to 20.34.0 (#24493) (2b460d3)
  • ignore: update zigbee-herdsman-converters to 20.35.0 (#24514) (074b2e2)
  • ignore: update zigbee-herdsman-converters to 20.36.0 (#24542) (b620a21)
  • ignore: update zigbee-herdsman-converters to 20.37.0 (#24553) (bd1f6d2)
  • ignore: update zigbee-herdsman-converters to 20.38.0 (#24567) (c5d30b5)
  • Improve power_phase_b and power_phase_c Home Assistant discovery (#24538) (e0a0f86)
  • Remove extraneous whitespace in template for binary attributes (#24520) (ab72606)

1.40.2 (2024-10-01)

Bug Fixes

1.40.1 (2024-09-07)

Bug Fixes

1.40.0 (2024-09-01)

Features

Bug Fixes

1.39.1 (2024-08-01)

Bug Fixes

1.39.0 (2024-06-30)

Features

  • Allow hierarchical filtering of logger namespaces (#22859) (881037c)

Bug Fixes

1.38.0 (2024-06-01)

Features

Bug Fixes

1.37.1 (2024-05-09)

Bug Fixes

1.37.0 (2024-05-01)

Features

Bug Fixes

  • Change MQTT publish log to debug (#22063) (bbb6f9e)
  • Cleanup old logger leftovers (#22069) (919c4ee)
  • Convert logger into a class (#22129) (3c1a4af)
  • Disable automatic reconfigure when configureKey changes (#22088) (9d251db)
  • Fix crash when stopping in case MQTT client did not connect yet (#22110) (92f5323)
  • ignore: fix 73566df (cdd6fb0)
  • ignore: fix 73566dff98e64038117ec71c7aaa897a4070474d (780c065)
  • ignore: update dependencies (#22007) (e748718)
  • ignore: update dependencies (#22331) (d7e2d98)
  • ignore: update zigbee-herdsman to 0.41.0 (#22045) (bd0a411)
  • ignore: update zigbee-herdsman to 0.41.1 (#22064) (3e91349)
  • ignore: update zigbee-herdsman to 0.41.2 (#22087) (a020138)
  • ignore: update zigbee-herdsman to 0.42.0 (#22121) (28b8aff)
  • ignore: update zigbee-herdsman to 0.42.1 (#22143) (a210c23)
  • ignore: update zigbee-herdsman to 0.42.2 (#22220) (76f5425)
  • ignore: update zigbee-herdsman to 0.42.3 (#22253) (f7abbd5)
  • ignore: update zigbee-herdsman to 0.42.4 (#22283) (a8f6bec)
  • ignore: update zigbee-herdsman to 0.42.5 (#22285) (4f97a7a)
  • ignore: update zigbee-herdsman to 0.43.0 (#22300) (75f9743)
  • ignore: update zigbee-herdsman to 0.43.1 (#22317) (389779d)
  • ignore: update zigbee-herdsman to 0.44.0 (#22339) (1b089ef)
  • ignore: update zigbee-herdsman to 0.45.0 (#22365) (8e27ec2)
  • ignore: update zigbee-herdsman-converters to 19.13.0 (#22046) (db7d9e1)
  • ignore: update zigbee-herdsman-converters to 19.15.0 (#22089) (ae35aae)
  • ignore: update zigbee-herdsman-converters to 19.16.0 (#22107) (394a3fb)
  • ignore: update zigbee-herdsman-converters to 19.17.0 (#22122) (cabc9f5)
  • ignore: update zigbee-herdsman-converters to 19.18.0 (#22141) (8b8d660)
  • ignore: update zigbee-herdsman-converters to 19.19.0 (#22153) (cdbbe0d)
  • ignore: update zigbee-herdsman-converters to 19.19.1 (#22171) (f774753)
  • ignore: update zigbee-herdsman-converters to 19.20.0 (#22187) (e10ab5c)
  • ignore: update zigbee-herdsman-converters to 19.21.0 (#22199) (87aa18d)
  • ignore: update zigbee-herdsman-converters to 19.22.0 (#22221) (172aa74)
  • ignore: update zigbee-herdsman-converters to 19.23.0 (#22232) (1544317)
  • ignore: update zigbee-herdsman-converters to 19.24.0 (#22254) (d9628df)
  • ignore: update zigbee-herdsman-converters to 19.25.0 (#22266) (80504b9)
  • ignore: update zigbee-herdsman-converters to 19.26.0 (#22284) (4bf2ffa)
  • ignore: update zigbee-herdsman-converters to 19.27.0 (#22301) (df23240)
  • ignore: update zigbee-herdsman-converters to 19.28.0 (#22318) (245afb1)
  • ignore: update zigbee-herdsman-converters to 19.29.0 (#22325) (3755126)
  • ignore: update zigbee-herdsman-converters to 19.32.0 (#22377) (e03013c)
  • ignore: update zigbee2mqtt-frontend to 0.6.162 (#22094) (0c80129)
  • ignore: update zigbee2mqtt-frontend to 0.6.163 (#22288) (e5d632b)
  • ignore: update zigbee2mqtt-frontend to 0.6.164 (#22340) (10e6ad0)
  • ignore: update zigbee2mqtt-frontend to 0.6.165 (#22366) (8a288a9)
  • Reduce MQTT publishing by excluding debug logging from bridge/logging (#22066) (002050f)
  • Remove deprecated Home Assistant color_mode (#22142) (c98e5a7)

1.36.1 (2024-04-01)

Bug Fixes

1.36.0 (2024-03-01)

Features

Bug Fixes

1.35.3 (2024-02-06)

Bug Fixes

  • ignore: set zhc logger (f83709d)
  • ignore: update dependencies (#21204) (1df54f0)
  • ignore: update zigbee-herdsman to 0.33.7 (#21178) (3d1336d)
  • ignore: update zigbee-herdsman-converters to 18.26.0 (#21145) (08c03e4)
  • ignore: update zigbee-herdsman-converters to 18.27.0 (#21184) (a678a1c)
  • ignore: update zigbee-herdsman-converters to 18.27.1 (#21189) (4b17217)
  • ignore: update zigbee-herdsman-converters to 18.28.0 (#21207) (3d37892)
  • ignore: update zigbee-herdsman-converters to 18.28.1 (#21222) (a6d51a6)
  • ignore: update zigbee-herdsman-converters to 18.28.2 (#21245) (250d5bf)
  • ignore: update zigbee-herdsman-converters to 18.28.3 (#21265) (29bae3a)
  • ignore: update zigbee2mqtt-frontend to 0.6.153 (#21187) (7295955)
  • ignore: update zigbee2mqtt-frontend to 0.6.154 (#21188) (2db0723)
  • ignore: update zigbee2mqtt-frontend to 0.6.155 (#21228) (8ab6c16)
  • ignore: update zigbee2mqtt-frontend to 0.6.156 (#21229) (dfda631)

1.35.2 (2024-01-31)

Bug Fixes

1.35.1 (2024-01-07)

Bug Fixes

1.35.0 (2024-01-01)

Features

  • Support automatically generating device definitions (#20358) (56f5762)
  • Support bridge discovery for Home Assistant (#19994) (f11eb24)

Bug Fixes

1.34.0 (2023-12-01)

Features

Bug Fixes

1.33.2 (2023-11-01)

Bug Fixes

1.33.1 (2023-10-03)

Bug Fixes

  • Correct typos (#19143) (83e3313)
  • Fix configuration.example.yaml missing from container (#18836) (0543ad4)
  • ignore: update dependencies (#18995) (5477163)
  • ignore: update dependencies (#19061) (d99da63)
  • ignore: update dependencies (#19127) (1c7bb8f)
  • ignore: update zigbee-herdsman to 0.18.6 (#18838) (6654c7f)
  • ignore: update zigbee-herdsman to 0.18.7 (#18865) (914b4c6)
  • ignore: update zigbee-herdsman to 0.19.0 (#18998) (84f9950)
  • ignore: update zigbee-herdsman-converters to 15.69.0 (#18835) (3285850)
  • ignore: update zigbee-herdsman-converters to 15.70.0 (#18866) (91a9e32)
  • ignore: update zigbee-herdsman-converters to 15.71.0 (#18887) (f509410)
  • ignore: update zigbee-herdsman-converters to 15.72.0 (#18901) (ea8de2b)
  • ignore: update zigbee-herdsman-converters to 15.73.0 (#18917) (d6ed0f4)
  • ignore: update zigbee-herdsman-converters to 15.74.0 (#18949) (6de7662)
  • ignore: update zigbee-herdsman-converters to 15.75.0 (#18972) (cc95c85)
  • ignore: update zigbee-herdsman-converters to 15.76.0 (#18978) (4040840)
  • ignore: update zigbee-herdsman-converters to 15.77.0 (#18984) (0a69bb5)
  • ignore: update zigbee-herdsman-converters to 15.78.0 (#18999) (eac9240)
  • ignore: update zigbee-herdsman-converters to 15.80.0 (#19023) (af209b6)
  • ignore: update zigbee-herdsman-converters to 15.81.1 (#19041) (9a7aeaf)
  • ignore: update zigbee-herdsman-converters to 15.82.0 (#19067) (1190a34)
  • ignore: update zigbee-herdsman-converters to 15.83.0 (#19088) (a7bb3fc)
  • ignore: update zigbee-herdsman-converters to 15.84.0 (#19096) (7ccb4bc)
  • ignore: update zigbee-herdsman-converters to 15.85.0 (#19102) (90763fd)
  • ignore: update zigbee-herdsman-converters to 15.86.0 (#19149) (45ce494)
  • ignore: update zigbee-herdsman-converters to 15.86.1 (#19150) (b990ed9)
  • ignore: update zigbee2mqtt-frontend to 0.6.136 (#19040) (9b66ab1)

1.33.0 (2023-09-01)

Features

Bug Fixes

1.32.2 (2023-08-01)

Bug Fixes

1.32.1 (2023-07-08)

Bug Fixes

  • ignore: update zigbee-herdsman-converters to 15.33.1-hotfix.0 (15601d6)

1.32.0 (2023-07-01)

Features

Bug Fixes

1.31.0 (2023-06-01)

Features

  • ignore: update CI/CD (b3de973)
  • ignore: update CI/CD (0d17d26)
  • ignore: update zigbee-herdsman-converters to 15.6.0 (#17774) (24baed3)
  • ignore: update zigbee-herdsman-converters to 15.7.0 (#17777) (1344ae0)

Bug Fixes