Heating control with live sensor data

Software and hardware together: a cloud API, an ESP32 I built for the boiler room, and a private chart site that shows what the heating actually did.

Problem
When heating comes back on, every radiator valve opens at once and the house warms unevenly. The manufacturer's app shows the current state and keeps no useful history.
What runs
A reading every two minutes from the heating system, every minute from pipe sensors, plus smart plugs and blinds. Daily reports and a chart site rebuilt every five minutes.
How it is watched
Charts behind Cloudflare Access, a server that refreshes its own credentials, deploys on every push.
Stack
Python standard library, ESPHome, Cloudflare Tunnel, R2 and Workers, systemd timers.
Code
Private repository. A walkthrough is available on request.

The problem

Smart radiator heads are good at holding a temperature and bad at explaining themselves. After a night setback they all open together, the boiler cannot keep up, and the rooms at the far end of the pipe stay cold for an hour. The vendor app answers "what is the temperature now" but not "how fast did the bathroom warm up last Tuesday, and was it colder outside".

The first goal was a software equivalent of a hydraulic separator: bring the rooms up in a queue instead of all at once. To know whether that helps, the house first needed a memory.

What it does

  • Reads every room from the Viessmann ViCare API every two minutes: temperature, set point, valve opening and battery.
  • An ESP32 with four DS18B20 probes, which I built and fitted in the boiler room, sends supply and return temperatures on both sides of the heat exchanger every minute.
  • Smart plugs report when the circulation pumps run and how much power they draw. Blind schedules from Somfy TaHoma are logged, so a cold room can be matched to closed blinds.
  • Reports turn the log into answers: warm-up and cool-down rate per room, a day-by-day view with weather and degree-days, valve-hours, the morning shortfall, and "show me days with a similar outdoor temperature" for fair comparisons.

How it stays under control

  • The sensor board talks to the server through a Cloudflare Tunnel with a bearer token. The server opens no ports to the internet.
  • Every five minutes the server recalculates the current and previous day and uploads only changed files to Cloudflare R2. A Worker serves the chart site, and Cloudflare Access lets in only the email addresses on the list.
  • A push to the main branch deploys the code and the chart site through GitHub Actions. Nothing is copied by hand.

What a business could reuse from this

Any business with equipment that has a temperature, a state or a meter: cold rooms, greenhouses, workshops, server cupboards, machines. Read the sensors you already have, add an inexpensive board where you have none, keep the history, and get told when something drifts.

Want something like this, built around your process?

Tell me what happens today and how often. A few sentences are enough.

Describe a process