A radiator valve head has a thermometer, and the thermometer is bolted to the hottest object in the room. Asking it for the room temperature is like asking a kettle about the weather: it has an answer, it is confident, and it is describing itself. Our four heads arrived with this arrangement and a setting that promised to accept an external sensor, which is the sort of promise a product makes in a screenshot.
The house already owns a decent thermometer in every room. The obvious plan was to hand the heads those readings and let them get on with it. The plan survived contact with the heads for about an evening. What we built instead is, we think, better, and it is certainly more honest about who knows what.
Let the head keep its loop
The head regulates on its own thermometer. This is the part we did not change, and it is the part worth defending: the control loop lives in the device, runs every few seconds, needs no network, and keeps working if the house computer is having one of its afternoons. A radiator that depends on a message bus to stay warm is a radiator with a philosophy problem.
What the house does is arithmetic. Every time either thermometer moves, it computes the difference between the room sensor and the head's raw reading and writes that difference into the head's calibration offset. The head now believes it is standing in the middle of the room. It is not, but it thinks it is, and a thermostat's beliefs are all that matter to it.
Two small rules keep this from being a nuisance. The offset only changes when it is wrong by more than three tenths of a degree, and it changes in steps of two tenths, because a device whose calibration is rewritten every thirty seconds is a device whose radio never sleeps. And if the room sensor goes away, the last offset stays. A stale correction is a correction; no correction is a kettle.
The house does the politics
The head does the turning; the house decides what to turn towards. Each room has a daytime target on a slider, a night discount that applies after bedtime and lifts in the morning, a lower target for when nobody is home, and a much lower one for when a window in that room is open, because heating the street is a hobby with no upper limit. The target the head sees is whichever of those rules currently wins, and the rule is written on the sensor as a reason, so the dashboard can say why a room is aiming at 17.
None of this is clever. It is the kind of logic that every heating system claims to have and most implement as a single schedule per week. Ours differs only in that the inputs are the ones the house already knows: who is home, who is asleep, and which windows are open. It had to learn nothing new to heat the flat sensibly; it had merely never been asked.
The off season, and how it ends
Outside the heating season the valves are parked fully open. A valve left closed for half a year sticks, and a stuck valve is discovered in October, by a cold person. Fully open costs nothing when the water is cold. Once a week, at a civilised hour on a Monday, every head closes for three minutes and opens again, a short walk so the pins remember how.
The end of the season is a switch, because a cold radiator looks exactly like a radiator nobody asked to be warm. The start of the season, though, announces itself, and the house listens for it in the one place it cannot be missed: the calibration. When the building first sends hot water round, the head's thermometer, bolted to the radiator, leaps ahead of the room's, and the offset the house computes dives. Below minus four degrees for half an hour means the radiators are hot, whatever the calendar says; regulation switches on and we get a message that autumn has been detected.
The heads, for their part, remain convinced they are standing in the middle of the room, and have never been happier.
The radiator that told us the building's schedule
One radiator in the flat has no thermostatic head, because it lives in the bathroom and bathrooms are allowed to be warm. It turned out to be the most informative device in the heating system. With nothing to throttle it, its room temperature is a clean copy of whatever the building's boiler room is doing: a rise every morning from half past five, a sag every evening from ten. Two weeks of it and the schedule was obvious. The building heats for about sixteen and a half hours a day and then goes to bed, like a sensible organism.
This reframed two things we had been quite proud of. The night setback, which lowered the targets at half past ten, was saving nothing, because there was nothing to save: the water had already gone cold on its own. And the morning target, which rose at half past six, was an hour late to a party that started at half past five. The day now begins when the building opens the tap. The heads also stop being written to while the supply is off, since a command to a cold radiator is a battery spent on a gesture.
There is now a sensor called "supply from the building", derived entirely from a bathroom. It is right more often than the people who run the boiler room would probably like.
Pre-heating a flat you are not in
Coming home to a flat held at seventeen degrees for two months is not a hardship, exactly, but the walls have opinions. Air warms in hours; a wall of this flat takes a day or two to stop feeling like a wall. So the return is now a two-act play, and the date for both acts comes from the travel calendar, which already knew when we were coming back and was slightly offended not to have been asked.
Three days before arrival the whole flat drifts up to nineteen, so the masonry can start thinking about it. Two days before, every room goes to its daytime target plus one degree, day and night, no setback, until the door opens. Then the ordinary rules take over. If the plan changes and nobody arrives, it all switches itself off the day after the date it was given, because a flat warming itself for ghosts is the kind of thing this site exists to prevent.
Naturally the first version of this failed every hour for a night. It compared the current time with a placeholder that said "no arrival", and the platform, helpfully, had turned the placeholder into a number. The nightly reviewer found it before we did. We have learned to reserve our sentinel values from the letters, not the digits.
The regulator that ran every twenty-seven seconds
While we were congratulating ourselves on an hourly regulation cycle, a weekly review counted the actual runs: three thousand two hundred and forty-eight in a day. The living room's temperature was an average of two sensors, one of which reports every thirty seconds and rounds to two decimals, and the regulation was politely re-running on every twitch. Worse, it occasionally caught a valve head between receiving a new offset and reporting a new reading, doubled the correction, and corrected the correction thirty seconds later. Seven writes in forty-nine seconds, to a device on three AA batteries, in a room whose temperature had moved by a tenth of a degree.
The same sensor, it emerged, sits on the sofa and faces a window. On sunny mornings it reported thirty degrees with great confidence while the other sensor in the same room reported twenty. The fix was not clever: the shaded sensor leads, the sunny one is consulted only when it agrees to within a degree, the result is rounded to a tenth, and the regulator runs every fifteen minutes whether or not anything twitched. Writes to the heads fell from sixty a day to roughly ten. The batteries have not sent a thank-you note, but we feel they would.