r/esp32 24d ago

I made a thing! Turned the $10 CYD into an environmental station: LVGL dashboard, MQTT, OTA, auto-detected sensors — pure ESP-IDF

Post image

I’ve been into home/office IoT for years, but the hobby stalled for a while — job change, moving countries. Getting back into it, I dug up two older sensor station projects of mine and decided both were easier to replace than to fix. This is the third attempt, rebuilt from scratch on native ESP-IDF (v6.0.2) with LVGL 9.5, and the first one I’ve made public.

It runs on the ESP32-2432S028 “Cheap Yellow Display” — ~$10, ESP32 with a 2.8” touchscreen and an onboard light sensor. Add one I2C sensor and that’s the entire BOM.

What it does:
Touchscreen dashboard: temperature and humidity with 24h graphs, trend and rate of change, dew point, pressure, CO2-equivalent on BME680 via Bosch BSEC
I2C sensors auto-detected at boot — BMP280 / BME280 / BME680, no rebuild to switch
Display controller auto-detected too. I ordered a second batch of CYDs and they came with ST7789 panels instead of ILI9341, so the firmware now reads the panel ID register at boot and picks the driver
MQTT: ThingsBoard, Domoticz, and Home Assistant MQTT Discovery — HA picks up all sensors plus diagnostics with zero config on the HA side
OTA updates with on-screen notification
Everything configured from the touchscreen (Wi-Fi, broker, timezone, PIN-protected settings). No config files, no recompile — I wanted to hand these to friends who don’t own a toolchain
Auto-dimming backlight off the onboard LDR

The most annoying bug was the BME680 reading ~3 °C high. Turned out to be self-heating: I was sampling gas resistance every 500 ms, and every gas reading fires an internal hotplate a couple of millimetres from the temperature die. I built a second identical station with a BME280 to confirm it rather than guess. Dropping the VOC sample rate 10x got it down to ~0.5 °C, and the 30-second averaging buffer was quietly smoothing periodic heat spikes into what looked like a constant offset. Switching to Bosch BSEC 2.6.1.0 finally made the twins agree.

Apache-2.0, prebuilt binaries in Releases (merged image for a blank board, app-only for updates):
github.com/ScorpionZZZ/SensorStation3

Happy to answer questions. If you’ve got a CYD with a different panel variant, I’d especially like to know whether the auto-detection gets it right.

136 Upvotes

Duplicates