conectar-termostato-inteligente-reles-contacto-seco

How to Connect a Smart Thermostat to a Boiler

  • 7 min

A smart thermostat is a controller that measures temperature and requests heat through the interface provided by the heating equipment.

The interface can be a dry contact, a voltage input, or a digital bus such as OpenTherm or eBUS. Applying voltage to the wrong terminal can destroy the circuit board, so the installation manual for the exact model overrides any generic schematic.

In this article, we will analyze the concept of a dry contact, how to interact with the control terminals of a traditional boiler, and how to manage zoned systems using thermostatic valves.

Voltage Output vs. Dry Contact

To understand how to turn on a boiler from Home Assistant, we must first classify relays into two main families based on their internal topology.

Voltage Outputs

These are the ones we have used so far for lights (for example, a Sonoff Basic, a Shelly 1PM, or a generic Zigbee module). In these devices, the internal circuitry connects the Phase (230V) from the power input directly to the output terminal. When the relay activates, it outputs 230V at its terminal to power the load.

Dry Contacts or Potential-Free Contacts

In a dry contact relay, the circuit that powers the microcontroller (chip) itself is physically isolated from the circuit that opens or closes the mechanical switch.

The relay acts exactly as if you were connecting two wires with your own fingers. It does not inject any of its own voltage into the output. It simply closes an external circuit. This is what is known as a “potential-free” switch.

How Boiler Control Works

The vast majority of individual gas, oil, or pellet boilers (such as those from brands Saunier Duval, Junkers, Vaillant, Baxi) have a terminal strip on their main board designed for a wall thermostat.

These terminals (often labeled TA, COM / NO, or RT) operate at low DC voltage (typically 5V, 12V, or 24V), or simply inject a very low amperage signal.

The boiler’s logic is binary and extremely simple:

  • If the circuit between these two terminals is open (infinite resistance), the boiler understands the house is warm and stops the burners.
  • If the circuit between these two terminals is closed (continuity), the boiler starts the water pump and burners to send hot water to the radiators.

This applies mainly to traditional on/off boilers. Many modern condensing units use communication buses like OpenTherm, eBUS, or proprietary protocols, where simply closing a contact is no longer sufficient. In those cases, we will need a gateway or a thermostat compatible with that specific protocol.

If you connect a wet contact relay to these terminals, you will inject 230V AC directly into the boiler’s microprocessor, frying the main board instantly. For a boiler, it is absolutely mandatory to use a Dry Contact relay.

A Hardware Example: Shelly Plus 1

The Shelly Plus 1 features dry contacts, unlike the 1PM variants, whose output is not isolated from the power supply. This makes it useful when the boiler manual explicitly requests a potential-free contact.

Connection Diagram

To wire it correctly, we must mentally separate the module’s power supply from the boiler’s control circuit:

  1. Shelly Power Supply: Connect Phase (L) and Neutral (N) from the 230V mains to the Shelly’s L and N terminals. This keeps the ESP32 powered on and connected to our WiFi.
  2. Boiler Control Circuit: Take the two wires going to the boiler’s circuit board and connect them to the Shelly’s I (Input) and O (Output) terminals.

When Home Assistant activates the relay, the I and O terminals are connected. This is only valid if the boiler accepts that type of contact and the relay meets the required voltages, currents, and isolation.

If you want alternatives, there are 5V-powered dry contact modules like the Sonoff RE5V1C, as well as Zigbee/Tuya micromodules explicitly labeled as “Dry Contact Relay”. Always be sure to verify the schematic with a multimeter in continuity mode before connecting anything to the boiler.

Before touching a boiler, search for the technical manual of the exact model. Not the user brochure, but the installation manual. That is where the thermostat terminals will be shown, if it supports a dry contact, if it requires removing a jumper, and what voltage the input handles. Don’t guess based on intuition, because intuition with boilers is expensive.

Zoned Systems: Valves and Thermostatic Heads

Centralized control via the boiler is fine, but it’s rudimentary in terms of energy efficiency. Turning on the boiler heats all the radiators in the house equally, even if we are only in the living room.

To solve this, we use zoned systems. At this point, two different hardware pieces appear that do operate on local actuators.

Thermostatic Radiator Valves (TRVs)

If your house has standard water radiators, the most efficient way to automate them is to replace the manual valve with a Smart Thermostatic Radiator Valve (TRV).

TRVs are mechanical devices (usually Zigbee and battery-powered) that contain a small stepper motor. They screw onto the radiator valve. When Home Assistant determines the room is cold, the TRV retracts a plunger, allowing hot water from the boiler to enter that specific radiator.

  • Advantage: They allow having an independent temperature in each room.
  • Integration: In Home Assistant, a TRV doesn’t appear as a relay (switch), but directly as a thermostat (climate), with its own target temperature (setpoint) and current temperature.

Underfloor Heating and Electrothermal Actuators

If you have water-based underfloor heating, there are no radiators, but manifolds with multiple circuits (one per room). An Electrothermal Actuator is installed on each circuit.

Here we change the electrical rule again: standard electrothermal actuators usually operate at 230V. Inside, they contain a wax that expands when heated by the electric current, pushing the valve.

  • If the actuator is NC (Normally Closed), when we apply 230V, the valve opens and allows hot water to flow into that room.
  • To control them, we DO use wet contact relays (or multi-channel relay boards), since we need to send them mains voltage to actuate them.

Software Control: Generic Thermostat

Let’s say we have installed the Shelly 1 on the boiler and have a Zigbee temperature sensor (a Xiaomi or a Sonoff SNZB-02) in the living room. We have a switch.rele_caldera and a sensor.temperatura_salon.

For Home Assistant to understand that these two disconnected entities actually form a unified climate system, we use the native generic_thermostat platform in our configuration.yaml file.

climate:
  - platform: generic_thermostat
    name: "Central Thermostat"
    heater: switch.rele_caldera
    target_sensor: sensor.temperatura_salon
    min_temp: 15
    max_temp: 25
    ac_mode: false
    target_temp: 21
    cold_tolerance: 0.3 # On hysteresis
    hot_tolerance: 0.2  # Off hysteresis
Copied!

Home Assistant will create the entity climate.central_thermostat and apply the configured tolerances to prevent too frequent relay switching.

Failsafe and Manual Control

In heating, we must always think about what happens if Home Assistant goes down, the relay loses WiFi, or the temperature sensor stops reporting. A home shouldn’t be left without heating in the middle of winter because a Docker container got fussy.

The ideal approach is to maintain a manual control mode provided by the manufacturer or a safe recovery procedure if the home automation system fails. Automation should enhance the installation, not hold it hostage to our server.