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
mackswan