Ecobee+ESP32 comfortD

Project / comfortd-ecobee-esp32

System overview

A self-hosted ESP32 based room-sensing network and "comfortD" control daemon that improves Ecobee heat/cooling duty-cycles.

ElectricalFirmwareHVACHome Automation
3 Deployed nodes
4 mo Battery life
- 45% HVAC runtime
Secure Protocol

Project narrative

Case-study notes

Problem

My upstairs Ecobee thermostat sits on a narrow landing beside the main air return. A doorless loft off the landing absorbs summer heat all day, so the thermostat can read roughly 5–6°F warmer than the closed bedrooms and nursery.

That placement created a comfort problem: the HVAC was reacting to the hottest central point upstairs instead of the rooms people were actually sleeping in. Further, the HVAC unit can and would be called for cooling for 10+ hours during the day. With the nursery door closed and bedroom doors closed, the goal was to keep those rooms comfortable without buying a set of proprietary Ecobee room sensors.

Approach

comfortD separates low-power sensing from thermostat control. Two battery-powered ESP32-C6 room sensors read SHT31 temperature and humidity data, then broadcast encrypted ESP-NOW packets instead of joining Wi-Fi directly.

A dedicated ESP32-C6 gateway receives those packets, validates the device signature, synchronizes radio channel behavior, and forwards readings to the self-hosted comfortD service. comfortD combines room data with Ecobee state from Home Assistant and decides whether the thermostat should cool to a target temperature or hold at a higher setpoint.

Frontend UX

The comfortD frontend is styled like a small dedicated appliance rather than a generic admin panel. The current Sensors screen uses a dark pixel-display panel inside a physical device frame, with tactile controls for Home, up/down navigation, and a confirm button.

The Sensors tab shows two active room nodes: masterbedroom at 70.2°F and 56% RH, last seen 7 minutes ago, and nursery at 69.2°F and 55% RH, last seen 4 minutes ago. The footer summarizes system health as online, 2 sensors, nursery 69 seconds ago, and gateway 10 minutes.

What made it interesting

The hardware wiring was intentionally simple, but the full control loop spans small soldered boards, firmware, ESP-NOW radio behavior, Wi-Fi gateway behavior, Kubernetes services, Home Assistant, Ecobee, and a custom frontend. The hard part was validating the complete path end-to-end and making each layer observable enough to debug.

comfortD also includes a frontend web app for tuning parameters and a modern pixel-display/device-emulation UX. That turns the project from a hidden automation into something closer to a small self-hosted appliance.

Exploded diagram of the Seeed Studio XIAO ESP32-C6 development board, showing USB-C, ESP32-C6 module, buttons, pogo pads, and pin legend.
XIAO ESP32-C6 compute node

Implementation stack

Subsystem breakdown

  • Sensors Battery-powered XIAO ESP32-C6 boards wired to SHT31 temperature/humidity modules
  • Gateway ESP32-C6 receiver synchronizes ESP-NOW packets and forwards readings over Wi-Fi
  • Protocol Encrypted signed packets, channel hunting across Wi-Fi channels 1–11, ACK-based sync
  • Daemon comfortD combines independent room readings with Ecobee/Home Assistant state
  • Frontend Pixel-device web UI with Comfort, Sensors, Tune, Device, and Actions panels
  • Ops Self-hosted Kubernetes services with Home Assistant running alongside comfortD
comfortD architecture diagram showing ESP32-C6 sensor nodes, an ESP-NOW gateway, Home Assistant, Ecobee thermostat integration, and the comfortD service path.
comfortD architecture: room sensors, gateway, Home Assistant, Ecobee, and Kubernetes service loop
Exploded diagram of the SHT31-D digital temperature and humidity sensor board, showing the sensor, breakout board, I2C pins, Grove connector, and Qwiic connectors.
SHT31-D temperature/humidity breakout

Specifications

Spec table

Sensor boards
2x Seeed Studio XIAO ESP32-C6 room nodes
Gateway
1x ESP32-C6 gateway with Wi-Fi uplink
Sensing
SHT31 temperature and humidity modules
Power
1300 mAh lithium battery per room sensor
Radio
Encrypted ESP-NOW packets with signature validation
Backend
comfortD daemon and frontend web app running in Kubernetes
Thermostat bridge
Home Assistant Ecobee integration
Control behavior
Calculates whether Ecobee should cool to target or hold at a warmer setpoint

Validation

Evidence checklist

  • Two occupied-room sensors report bedroom and nursery temperature/humidity instead of relying on the overheated landing thermostat.
  • The sensor UI shows live room readings, humidity, last-seen age, and key names for each deployed room node.
  • Gateway rejects packets without the expected device signature and keeps sensors synchronized after reboot or channel changes.
  • comfortD can tune cooling behavior through configurable web parameters instead of hardcoded firmware-only rules.
  • Observed HVAC behavior shifted away from all-day continuous running toward roughly half-hour cooling cycles during hot weather.
  • Ecobee long-run alerts have not appeared this summer after deploying the room-aware control loop.

Outcome

Observed impact

  • Closed bedrooms and the nursery feel noticeably cooler and less humid than the warm upstairs landing.
  • The system avoids optimizing around a central hot spot and instead responds to occupied rooms.
  • HVAC appears to run closer to a 30-minutes-on / 30-minutes-off rhythm instead of continuously during peak heat.
  • The project avoided buying multiple proprietary Ecobee room sensors while creating a hackable self-hosted control system.