world

ESPHome CO2 Monitors Reconfigured to Fail Visibly Instead of Silently

William Collis fixed silent failures in ESPHome SCD30 CO2 monitors via YAML config alone, replacing stale readings with explicit faults and LED alerts.

ESPHome CO2 Monitors Reconfigured to Fail Visibly Instead of Silently

A healthy-looking dashboard metric is reassuring right up until you realize the number has been frozen for days. As highlighted by Hackaday, maker William Collis confronted this classic telemetry trap in his home CO2 monitoring setup and redesigned his ESPHome nodes to fail visibly rather than silently holding onto the last known-good value.

The Silent-Failure Trap in Home Telemetry

Collis monitors carbon dioxide levels in two areas of his home using compact nodes built from a Sensirion SCD30 CO2 sensor paired with a Seeed XIAO ESP32-C3 microcontroller running ESPHome and reporting into Home Assistant. While reviewing his setup, he noticed a subtle but dangerous default behavior: when a sensor stopped producing fresh measurements, the system continued displaying the last valid reading.

In environmental monitoring, a frozen "normal" reading is worse than no reading at all. Because the dashboard keeps showing an acceptable parts-per-million value, neither the homeowner nor any ventilation automation realizes the sensor has hung or dropped off the bus. In tightly sealed modern homes—especially during winter when windows stay closed—elevated indoor CO2 can cause fatigue and cognitive sluggishness well before occupants consciously notice stuffy air.

Pure Configuration Fixes Without Custom Firmware

Rather than forking ESPHome or writing custom C++ firmware from scratch, Collis solved the problem entirely within ESPHome's declarative configuration layer. His approach addresses both sides of observability—digital state in Home Assistant and immediate physical feedback in the room:

  • Invalidating stale data: instead of letting the last valid reading linger indefinitely, the configuration explicitly replaces stale or failed sensor states so Home Assistant cannot mistake an unresponsive sensor for healthy air.
  • Local hardware fault signaling: when a failure condition is detected, the monitor flashes a dedicated fault LED directly on the device, making the outage obvious even without opening a phone or dashboard.

Keeping all of this logic inside standard ESPHome configuration files matters for long-term maintainability. Home automation nodes often run untouched for years, and relying on stock ESPHome components makes future updates far safer than maintaining out-of-tree firmware patches.

Why Even NDIR Sensors Need Watchdogs

In the hardware community, non-dispersive infrared (NDIR) modules like the Sensirion SCD30 are generally viewed as much more durable and accurate than low-cost chemical VOC sensors that drift or degrade over time. Yet even robust NDIR hardware is part of a larger chain: I2C buses can lock up, solder joints or jumper wires can loosen, power rails can brown out, and individual sensor units can still fail prematurely.

Engineering discussions around Collis's build underscored how widespread this pattern is beyond home IoT. One marine telemetry engineer recalled dealing with tide-level sensors in Southampton by forcing obvious sentinel values—such as -99.9m—whenever a sensor faulted, ensuring even a tired control-room operator immediately spotted the malfunction. Others pointed to complementary safeguards, such as Node-RED rules watching for missing MQTT heartbeats to catch network-layer dropouts, or debating active blinking fault LEDs versus passive "power-good" indicators that go dark when a node dies completely.

Design Lessons for Embedded and IoT Builders

Collis's tweak is a compact reminder that reliability in IoT is as much about failure modes as sensor accuracy. Any telemetry pipeline—whether a DIY air-quality monitor or an industrial PLC—should distinguish clearly between "measured normal" and "no fresh data received."

For Home Assistant and ESPHome users, the practical checklist is straightforward: audit critical sensors for stale-value persistence, expose explicit fault or unavailable states to automations so ventilation or alarms do not silently stall, and pair software alerts with a physical indicator on the enclosure. When a sensor fails loudly, fixing it takes minutes; when it fails quietly, you may never know how long you were flying blind.

// sources

// WebZona Studio products

Need a product or service that does not exist yet?

Pitch your idea in our "50 Hours" program — every month we build one community idea free for everyone. Or explore our released products.

// comments (0)

// no comments yet.