Custom IoT House Thermostat
Published at 2/2/2023
Overview
A custom-built HVAC control system utilizing a split-architecture design to overcome wiring limitations and provide advanced automation features not available in off-the-shelf thermostats.
The Problem
My house only had four wires in the wall for the thermostat, which prevented me from adding whole-house humidity control or independent fan circulation. I tried a Bosch WiFi thermostat, but it constantly disconnected, requiring me to wake up in the middle of the night to re-enter credentials.
Architecture
The solution was to split the brain from the interface. I built a “Head Unit” for the hallway that uses the existing 4 wires for power and high-speed serial data, communicating with a “Control Unit” in the attic that handles the actual HVAC relays.
1. Head Unit (Hallway)
- Hardware: Arduino Nano, BME680 (Temp, Humidity, Pressure, Gas/Air Quality), DS18B20.
- Design: 3D printed housing designed in OnShape to fit the existing wall footprint.
- Connectivity: Sends telemetry over the 4-wire bundle using a custom logic-level serial protocol (12V/GND/TX/RX).


2. Control Unit (Basement)
- Controller: Raspberry Pi Zero running Node.js.
- Sensors:
- BME280 sensors on Supply and Return plenums to calculate Delta-T and efficiency.
- DS18B20 probes strapped to refrigerant lines to monitor compressor health.
- IO: 8-Channel Relay Board to control Fan, Heat, Cool, Humidifier, and Aux Heat.

Software & Integration
- Frontend: Leveraged my existing Home Assistant server for the UI, avoiding the need to build a custom screen on the wall unit.
- Communication: The Pi Zero interfaces with Home Assistant via MQTT.
- State changes (e.g., “Set Temp to 72”) are published to MQTT.
- The Node.js engine parses the command and triggers the relays.
- This “headless” design means I can control the house from anywhere, and the schedule logic is handled by Home Assistant’s robust automation engine.

Outcome
I successfully replaced a dumb, unreliable thermostat with a fully networked climate control system. It now handles:
- Automated Humidity Control: Triggers the whole-house humidifier based on BME680 readings.
- Air Quality Monitoring: Detects VOCs/Gas resistance.
- Reliability: The hard-wired serial connection is rock solid compared to the old WiFi thermostat.