Home Assistant air quality sensor
Print Profile(1)

Bill of Materials
- ENS160 AHT21 dioxyde de carbone capteur de qualité de l'air et de température et d'humidité x 1: https://fr.aliexpress.com/item/1005005559000737.html?spm=a2g0o.order_list.order_list_main.5.2ea95e5bkdh4kq&gatewayAdapt=glo2fra
- Module d'affichage TFT couleur HD IPS LCD écran LED 240x240 Interface SPI ST7789 x 1: https://fr.aliexpress.com/item/1005005556914555.html?spm=a2g0o.order_list.order_list_main.82.2ea95e5bkdh4kq&gatewayAdapt=glo2fra
- ESP32 x 1: https://fr.aliexpress.com/item/1005006456519790.html?spm=a2g0o.order_list.order_list_main.376.2ea95e5bkdh4kq&gatewayAdapt=glo2fra
Description
⭐ AirMonitor ESP32 – Premium Air Quality Station (ENS160 + AHT21 + ST7789) – v1.9 OTA GitHub
🧰 Project Description
The AirMonitor ESP32 v1.9 is a modern, compact, and powerful air quality station, based on an ESP32 and an ENS160 + AHT21 sensor module.
The unit accurately measures:
- TVOC
- Equivalent CO₂ (eCO₂)
- Temperature
- Humidity
- AQI (global index)
A ST7789 240×240 color screen provides an elegant and dynamic interface, while the device updates automatically via OTA GitHub.
The project includes a complete WebUI, instant integration into Home Assistant via MQTT Discovery, and a 3D printed enclosure optimized for airflow and a premium look.
🔗 Firmware & Source Code (GitHub)
All source code, OTA firmware, and documentation are available here:
👉 https://github.com/hebrru/Qualite-de-l-air
🎨 Main Features
🖥️ Premium Color Display
- Clean and readable interface
- Dynamic bubbles for each measurement
- AQI status (Very Good → Very Bad)
- Ultra-smooth screen updates
🌡️ Integrated Sensors
- ENS160 :
- TVOC
- eCO₂
- AQI
- AHT21 :
- Temperature
- Humidity
🌐 Full Connectivity
- Integrated WiFi
- MQTT compatible with Home Assistant (auto-discovery)
- AJAX WebUI server for :
- Calibration
- Network configuration
- MQTT
- Brightness adjustment
🔄 OTA GitHub (100% Reliable)
- Automatic check every 10 minutes
- HTTPS redirection correction (301/302/307/308)
- Download + progress bar
- Auto-update via your GitHub releases
- "Check for update" button in the WebUI
💡 Adjustable Brightness
- A single slider to adjust screen brightness
- Automatic memory saving
🔧 Full Calibration
- Adjustable offsets :
- Temperature
- Humidity
- CO₂
- TVOC
- Quick reset
- ENS160 Soft / Factory calibration mode
🧱 Required Hardware (with AliExpress links)
🟦 ESP32 DevKit USB-C (HW-394)
https://fr.aliexpress.com/item/1005005556914555.html
🟪 ENS160 + AHT21 / AHT20 Combo Module
(TVOC + eCO₂ + Temp + Humidity on the same board)
https://fr.aliexpress.com/item/1005005559000737.html
🟧 ST7789 Screen – 1.54" – 240×240 – SPI
https://fr.aliexpress.com/item/1005007046465880.html
🟩 Dupont 2.54 mm Cable Kit
https://fr.aliexpress.com/item/1005006456519790.html
🖨️ Recommended Print Settings
- Filament : PLA / PLA+ (PETG possible)
- Layer height : 0.16 to 0.20 mm
- Infill : 10–15%
- Walls : 2–3
- Supports : no supports
- Orientation : front face up
- Recommended color : Black / White / Gray for a premium style
🛠️ Assembly
📌 I²C Wiring (ENS160 + AHT21)
| Sensor | ESP32 |
|---|---|
| VIN | 3.3V |
| GND | GND |
| SDA | 21 |
| SCL | 22 |
📌 SPI Wiring (ST7789 240×240)
| Screen | ESP32 |
|---|---|
| VCC | 3.3V |
| GND | GND |
| SCL | 18 |
| SDA | 23 |
| DC | 16 |
| RESET | 17 |
| CS | 5 |
| BL | 4 |
🚀 Getting Started
1️⃣ Firmware Flash
Download via GitHub :
👉 https://github.com/hebrru/Qualite-de-l-air/releases
2️⃣ WiFi Configuration
- Long press BOOT
- TAC-TAC Portal
- Enter SSID + password
3️⃣ WebUI
Access at :
👉 http://IP-of-the-device
4️⃣ Home Assistant (automatic)
Thanks to MQTT Discovery :
- Temperature
- Humidity
- eCO₂
- TVOC
- AQI
- Online status
🎯 Ideal for
- Monitoring air quality at home / office
- Detecting CO₂, TVOC, indoor pollution
- Creating a complete DIY project (3D + electronics + firmware)
- Home Assistant integration
- A cool high-tech gadget on furniture
❤️ Thank you!
If you like this project :
⭐ Add it to favorites
👍 Like it
📸 Post photos of your print
💬 Leave a comment
License
You shall not share, sub-license, sell, rent, host, transfer, or distribute in any way the digital or 3D printed versions of this object, nor any other derivative work of this object in its digital or physical format (including - but not limited to - remixes of this object, and hosting on other digital platforms). The objects may not be used without permission in any way whatsoever in which you charge money, or collect fees.


Comment & Rating (0)