manfredfr/co2-sensor-zigbee-rust — explained in plain English
Analysis updated 2026-05-18
Build a battery free, WiFi free CO2 sensor for a room and monitor it in Home Assistant.
Get an instant color coded warning when indoor air quality gets poor or dangerous.
Learn how to write Zigbee device firmware in Rust on an ESP32 chip.
Add a custom Zigbee device to a Zigbee2MQTT and Home Assistant smart home setup.
| manfredfr/co2-sensor-zigbee-rust | abc3dz/mixxx | abyo-software/ferro-stash | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Rust | Rust | Rust |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 2/5 | 4/5 |
| Audience | developer | general | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Needs specific hardware (ESP32-H2, Senseair S8, Zigbee coordinator) plus a Rust embedded toolchain.
This project is the firmware for a small home built air quality sensor that measures carbon dioxide levels indoors and reports them wirelessly. It runs on an ESP32-H2 microcontroller connected to a Senseair S8 sensor, and it does not need WiFi or batteries. Instead it talks to your smart home setup over Zigbee, joining a Zigbee network the same way a commercial sensor would, and reporting into Home Assistant through Zigbee2MQTT. The device checks CO2 levels every 10 to 300 seconds, and you can change how often it checks directly from Home Assistant. An onboard multicolor LED gives you an instant sense of air quality without opening an app: green means the air is fine, orange means it is getting stale, red means it is bad, and a flashing red means the CO2 level is dangerously high. The brightness of that LED can also be adjusted from Home Assistant, and your settings for both the reporting interval and the LED brightness are remembered by the device itself. Under the hood, the sensor exposes its readings using standard Zigbee building blocks, a bit of a workaround since a true CO2 measurement type is not supported the normal way, so the project reuses a temperature reading slot to carry the CO2 number instead. A companion file tells Zigbee2MQTT how to translate that into a proper CO2 reading, a report interval setting, and an LED brightness setting. The firmware itself is written in Rust, targeting the ESP32-H2 chip through Espressif's development tools, and it replaces an earlier version that was written in Arduino's C or C plus plus style code. Wiring the sensor to the microcontroller only requires four wires, and no extra components are needed to convert voltage levels between the two parts. The project includes wiring diagrams, hardware part numbers, and step by step instructions for adding it to Zigbee2MQTT, including how to give the device a custom icon.
A do it yourself CO2 sensor that runs on a small chip and reports air quality to Home Assistant over Zigbee, using an onboard LED to show if the air is good or bad.
Mainly Rust. The stack also includes Rust, ESP-IDF, Zigbee.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.