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
I wonder if we’ll see this integrated into the InfiniTime firmware for the PineTime watch?
The PineTime is based on the nRF52832 which does not support Zigbee. Zigbee is only supported on the nRF52820, nRF52833, nRF52840, and nRF5340 MCUs.
Pity – from reading this line in the article…:
“for Zigbee devices based on Nordic Semi nRF52 wireless microcontrollers”
…I just figured that it would fall within that category and that it might be possible to convert its Bluetooth output to Zigbee or something.
Zigbee applications can probably at a later date be ported to Matter over Thread devices as used the same hardware and Matter devices being based on the Zigbee Cluster Library specification
Is Matter over Thread something to which Bluetooth can be converted?
Nordic already offers Matter over Thread on most of these chips.
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/matter_weather_station/README.html
I didn’t see the nrf52 series mentioned there? But if Matter over Thread already works on the nrf52832 then great, that’s promising!
Now to see whether JF002 et al. might be interested!
The instructions are somewhat lacking at this stage to actually build the firmware
I’ve been making zigbee devices with cc2530 boards which you can get for under $10 and ptvo.info firmware builder. You don’t have as much customization but it’s worked great for me and much cheaper than these nRF boards.
Hopefully the price of these boards come down as a modern chip and solution is needed.
It would be really nice to see this group try to find some crossover and include the ESP32-C6 (& upcoming H2). ESPHome supports them as wifi devices, but doesn’t even try to do anything with the Zigbee side of them. And based on the forums, it appears there’s little interest in dong so in the future.