Close
0%
0%

ESP32 Smart Thermostat for 120V Fan Coil System

A fully custom ESP32-based thermostat designed for 120V fan coil systems with dimmable OLED, HA integration, and a clean wall-mount design

Similar projects worth following
0 followers
Designed for a condo with a building-controlled two-pipe HVAC system, where the thermostat can only switch the fan coil unit, this project adds a dimmable OLED display, rotary encoder UI, IR receiver/blaster, and ambient light sensing.

The device runs ESPHome with custom logic for display rendering, control, and mode handling, while pulling external weather data from Home Assistant. It operates fully standalone but integrates deeply into HA for automation and monitoring.

Housed in a modified Wiremold enclosure with a brushed aluminum knob, the final build aims for a clean, industrial look rather than a typical DIY aesthetic.

Overview

This project replaces a basic on/off thermostat in a condo building with a fully custom ESP32-based controller designed specifically for 120V fan coil systems.

In this environment, the building controls whether heating or cooling is available via a two-pipe system. The thermostat itself can only switch the fan coil unit (FCU) on and off. Rather than fighting that limitation, this design builds a smarter interface around it—adding visibility, control, and integration.

Key Features

  • Indoor and outdoor environmental display
  • 2.42" OLED screen with automatic brightness adjustment
  • Rotary encoder with push-button UI navigation
  • ESPHome firmware with Home Assistant integration
  • Custom pixel weather icons (18 conditions with day/night variants)
  • IR receiver and planned IR blaster for device control
  • Relay-based switching of 120V fan coil unit
  • Clean wall-mounted enclosure with hidden line voltage

Hardware

  • ESP32-S3-Zero 
  • SSD1309 2.42" OLED display (SPI) 
  • SHTC3 temperature/humidity sensor (I2C) 
  • KY-040 rotary encoder 
  • KY-018 photoresistor (ambient light sensing) 
  • V1222 IR receiver 
  • TSAL6100 IR LED (planned upgrade) 
  • SRD-05VDC relay 
  • 120V to 5V internal power module

UI / Display Design

The display is designed to be readable at a glance:

  • Center: indoor temperature (primary focus)
  • Left column: outdoor temperature and dew point
  • Right column: setpoint and humidity
  • Upper corner: custom weather sprite
  • Bottom: mode (Cool/Heat/Off)

Brightness automatically adjusts based on ambient light conditions using a photoresistor.  Small beeps acknowledge button presses.

Firmware

The firmware is built entirely in ESPHome, with custom C++ lambda code handling:

  • Display rendering
  • Encoder input and UI navigation
  • Relay control logic
  • Mode selection behavior

The system runs fully standalone but integrates with Home Assistant via ESPHome’s native API.

Home Assistant Integration

The device exposes the following to Home Assistant:

  • Temperature
  • Humidity
  • Setpoint
  • Mode

External weather data (conditions, temperature, dew point) is pulled from Home Assistant (Met.no integration) and displayed locally.

IR functionality allows the device to act as a bridge for controlling other Home Assistant devices.

Enclosure & Design

The enclosure evolved significantly during development.

The original plan was to use a vintage Honeywell housing, but the final build uses:

  • Wiremold NMW3 surface-mount raceway box (painted black)
  • Screwless nickel faceplate
  • 40mm brushed aluminum encoder knob

The goal was to create a clean, industrial look that feels intentional rather than DIY.

Electrical Design

  • Relay and 120V wiring are contained inside the gang box
  • The 5V power module is mounted behind the wall
  • All low-voltage electronics are housed in the front enclosure

The thermostat unit connects via a 3-pin JST harness, allowing removal and servicing without exposing line voltage.

Development Notes

  • Initial IR blaster (HX-53) was underpowered and will be replaced
  • OLED dimming is driven by ambient light sensor input
  • Weather icon system maps all Met.no conditions with custom sprites
  • Mode control is intentionally limited to align with building HVAC constraints

Future Work

  • IR blaster hardware upgrade and full integration
  • Expanded IR-based control of Home Assistant devices
  • Additional UI refinements
  • Further automation integration

thermostat.yaml

Firmware. Requires ESPHome and a Home Assistant instance for full functionality but runs standalone without HA. IR currently in progress but receiver side works and blaster is pending hardware upgrade.

yaml - 45.39 kB - 04/23/2026 at 15:00

Download

  • 1 × 2.42" OLED (SPI) - SSD1309
  • 1 × Nonmetallic Raceway Deep Outlet Box - NMW3
  • 1 × Temperature and Humidity Sensor (I2C) - SHTC3
  • 1 × IR Reciever - V1222
  • 1 × ESP32-S3-Zero Dev Board - ESP32-S3FH4R2

View all 14 components

  • Initial Build Complete: From Basic Relay to Full Smart Thermostat

    mackswan2 hours ago 0 comments

    This project started with a pretty simple goal: replace a basic on/off thermostat in a condo building where the HVAC system is centrally controlled.

    The building uses a two-pipe fan coil system, so the thermostat can’t actually control heating vs cooling—it can only switch the fan coil unit on and off. That constraint ended up shaping the entire design.

    Since I was already putting an ESP32-S3 on the wall, I decided to build something more than just a relay:

    • A full OLED interface showing indoor and outdoor conditions
    • A rotary encoder UI instead of buttons
    • Ambient light sensing for automatic dimming
    • Integration with Home Assistant for weather and automation
    • IR receiver (and soon IR blaster) to extend control beyond the thermostat

    The enclosure went through a few iterations. The original plan was to reuse a vintage Honeywell housing, but space constraints pushed the design toward a Wiremold surface-mount box. With a screwless faceplate and a 40mm aluminum knob, it ended up with a much cleaner, more intentional look than expected.

    Electrically, the high-voltage relay is isolated in the gang box, with a 5V supply mounted behind the wall. The front unit contains only low-voltage components and connects via a small harness so it can be removed without exposing line voltage.

    The firmware is built entirely in ESPHome with custom logic for display rendering and control. It runs fully standalone, but integrates tightly with Home Assistant for data and automation.

    Still in progress:

    • Upgrading the IR blaster hardware (current module is underpowered)
    • Expanding IR-based control for other devices
    • Refining the UI and interaction model

    Overall, this ended up being less about “making a thermostat” and more about building a smarter interface around a very limited HVAC system.

View project log

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates