Skip to content

dronix27/esphome_zb_sensor

 
 

Repository files navigation

ESPHome Zigbee sensor using ESP32-H2

ESPHome example of a zigbee sensor.

Note that the Zigbee part in this project is currently hardcoded and included as a custom component including a task. (Changing this to an external component with more configuration possibilities would be the next step).

Zigbee based temperature and humidity sensor

ESPHome Zigbee sensor connected to AHT10 Temperature+Humidity Sensor.

Hardware Required

  • One development board with ESP32-H2 SoC acting as Zigbee end-device (that you will load ESPHome with the zb-sensor config to).
  • AHT10/AHT20/AHT30 Temperature+Humidity Sensor connected to I2C pins (SDA: 12, SCL: 22).
  • A USB cable for power supply and programming.
  • (Optional) A USB-C cable to get ESP32 logs from the UART USB port (UART0).

Build ESPHome Zigbee sensor

Steps

  • Change the AHTx0 variant in ZB_sensor.yaml file according to the sensor you have
  • Build with esphome run ZB_sensor.yaml command will fail
  • Copy idf_component.yml to .esphome/build/zb-sensor/src/
  • Add the following 4 lines to the .esphome/build/zb-sensor/sdkconfig.zb-sensor file
CONFIG_ZB_ENABLED=y
CONFIG_ZB_RADIO_NATIVE=y
CONFIG_ZB_ZED=y
ZB_ED_ROLE=y
  • Build with esphome run ZB_sensor.yaml command
  • Firmware will be uploaded automatically to the ESP32-H2 board

Notes

External documentation and reference

Note! The official documentation and reference examples for the ESP Zigbee SDK can currently be obtained from Espressif:

How to contribute

If looking to contribute to this project then suggest follow steps in these guides + look at issues in Espressif's ESP Zigbee SDK repoository:

About

Example of a zigbee sensor in esphome

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.0%
  • C++ 11.0%