Zigbee Home firmware project aims to provide similar functionality to ESPHome open-source firmware, but for Zigbee devices based on Nordic Semi nRF52 wireless microcontrollers, and later on the newer nRF53 MCUs.
The firmware relies on Nordic Semi ZBOSS for Zigbee 3.0 stack and should eventually enable a range of Zigbee devices to be flashed with open-source firmware and facilitate integration with Home Assistant open-source home automation framework through ZHA integration, and support for Zigbee2MQTT is also being worked on.
The project consists of the “base” firmware written in C and a CLI application written in Go language that will provide the necessary options to build and upload firmware based on the provided configuration. The zigbee.yml file is used to describe the target hardware in YAML. Here’s an example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 |
# Format for this file is not stable, and can change at any time. general: # Defines how much time a loop will sleep after each iteration. runevery: 1m board: nrf52840dongle_nrf52840 # Flasher tells which flashing method to use. # Currently `nrfutil`, `mcuboot` and `west` # are defined(but not equally tested). Nrfutil works though. flasher: nrfutil # Flasheroptions are flasher-specific options flasheroptions: port: /dev/ttyACM1 # This section is for defining peripherals # on the board. I.e. uart, spi, i2c, etc. # NOTE: Only changes should be defined here. # See https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/<arch>/<board_name>/<board_name>.dts # for existing definitions for the board. # For example nRF52840 Dongle would have board devicetree at # https://github.com/zephyrproject-rtos/zephyr/tree/main/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts board: # This option will add USB UART loging functionality. # Quite limited for now, but can be easily extended debuglog: false # I2C is optional, only to provide different pins for i2c instance(s) i2c: # ID of instance is the same as defined in the SoC definition. # Generally they are in form of `i2c[0-9]`. # Number of i2c instances is also limited, and this allows only to # re-define pins for specified i2c instance. - id: i2c0 port: 0 sda: 29 scl: 31 sensors: - type: bme680 i2c: id: i2c0 addr: '0x76' - type: scd4x i2c: id: i2c0 # - type: device_temperature # on_off is a sensor that will respond to on/off state of the pin. # For now verifyied to be controlled by the client only, # so not by actually changing the state of the pin manually. # - type: on_off # pin: # # This is Green LED(LD1) on nrf52840 Dongle # port: 0 # pin: 6 # inverted: true |
The command to flash the firmware to a board looks like this:
1 |
go run ./cli/cmd/zigbee firmware --workdir <path_to_project> flash |
At this time the project is being developed with the official nRF52840 Dongle, and it is still in the early stages, so it’s not quite ready for end users. Note that it’s not the first project bringing nRF52 hardware to Home Assistant with the zigpy-zboss library aiming to do just that.
You’ll find Zigbee Home source code and basic instructions on GitHub.
Thanks to Hedda for the tip.

Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress