Building automation bridge
The building's original control computer had failed, leaving one thermostat on the wall for the whole house and rooms that could not be kept warm. I built the replacement from scratch: a Raspberry Pi running Home Assistant, with the whole control layer written as AppDaemon apps in Python, driving the building's existing Fidelix FX-2020 controller over Modbus RTU. It restored independent control of all 24 heating zones and shifts the heating into the cheaper hours of the Nord Pool spot price.
Python, Modbus RTU, AppDaemon, Home Assistant, Raspberry Pi. Published as a redacted snapshot.
In numbers
- 24heating zones controlled
- 4control modes per zone
- 30 scontrol loop
- 0.5 °Cthermostat hysteresis
Results so far
Heating in the cheaper hours
Solar forecast for the next day
What it works against
live
The Finnish spot price for the next 24 hours, a bar per quarter-hour, fetched live when this page loads. The inner ring lights the cheapest third of those hours.
The price-optimised mode holds each room at its setpoint but leans its heating into the cheap hours, so it never leaves a room cold to chase a low price.
What it replaced
Built from scratch on top of the existing wiring
The Fidelix FX-2020 and everything wired to it, 24 heating circuits and their sensors, were still good. What had failed was the Windows CE computer sitting on top of it, and with it per-circuit control of the heating. What was left was a single thermostat on the wall governing the whole house. In a house with 24 separately wired circuits that is not enough control to keep rooms warm, and they were cold.
Replacing the automation itself would have meant rewiring the house. Replacing the computer meant learning to speak to the FX-2020 directly. Modbus RTU over a serial line: raw registers, resistive sensor curves read through an NTC table, and output cards shared with equipment that must not be disturbed. Fidelix has essentially no open-source Home Assistant support, so the register layouts and the read-back procedure had to be worked out against the live panel.
On top of that sits a Raspberry Pi running Home Assistant, and eighteen AppDaemon apps in Python: the bridge itself, the thermostats, the price optimiser, the mode selector, the solar forecast, cost tracking, data loggers, and a watchdog that checks every signal is still arriving.
Modes
one chosen per zone
Each zone picks which controller drives its heating. The choice is the single source of truth, so nothing overrides anything and a switch you set stays where you set it.
Price optimised
Holds the zone at its setpoint but chooses when to spend the energy, biasing the heating toward the cheaper hours of the day's Nord Pool spot prices.
Thermostat
A plain setpoint thermostat that ignores price. This is the layer everything else sits on top of, and what a zone falls back to.
Manual
The zone's heating does what you set it to and stays there. No other controller touches it while the zone is in this mode.
Solar
Runs on solar surplus, with a configurable allowance for how much grid import is acceptable before it stops.
What is published
The repository is the real code with the building removed. It is not a library and not a deployable package. Zones are numbered, the controller's point tags are neutral, and the serial path, coordinates, addresses, tariff rates and credentials are gone. The logic, the structure and the comments are as written.
The code
live from GitHub
Stack
Python, Modbus RTU, pymodbus, AppDaemon, Home Assistant, Raspberry Pi, Nord Pool spot prices, offline test harnesses