In the boiler controller series I mostly describe what works. This post is about two things that did not. The first is a day and a half of trying to change the firmware of a radiator valve. The second is two weeks of building a system that was supposed to save gas and used more of it. I treated both as experiments, and both left me with a lesson and some knowledge.
Dead end one: a valve with a mind of its own
My radiators had Danfoss Ally valves on Zigbee. A valve like that accepts a target temperature and decides how far to open by itself, using its own internal controller. The autumn logs showed that this controller can be stubborn. With the room warmer than the target, the valve kept calling for heat. In one recorded episode the boiler fired with no real heat demand and shut down after 3 minutes in 25 of 36 cycles.
The boiler controller needed something simpler: to tell the valve directly what percentage to open to. I had one spare valve, some time and a question: could its firmware be changed?

What could be read
I experimented on a single unit that I own, for my own use only. The valves heating the house were left untouched. The firmware did not have to be extracted from the device, because the manufacturer distributes the update file itself and it is publicly available. The file is not encrypted. You can tell from the entropy: encrypted data looks like noise everywhere, while here the entropy jumped between blocks from 4.9 to 7.0 bits per byte. Each file does end with a 64-byte block that looks like a digital signature.
The agent loaded the images into Ghidra, a free tool for reading machine code, published in the official GitHub repository of the US agency NSA and used, in short, for decoding binary files and reverse engineering. After taking the valve apart it turned out there are two processors inside: one for the Zigbee radio and logic, one for the valve motor. The chip names are printed on the packages. The later assessment sounded encouraging: the radio processor uses the chip maker’s standard Zigbee stack, so adding a “set percent” command would be a targeted patch in a known place. Hard, but not very hard.
Where it stopped
The patch still has to be flashed. A normal update is blocked by the signature, so what remains is a cable and the processor’s programming connector. And here physics won.
- A hypothesis that fitted nicely. Measuring the eight pads with a multimeter gave a pattern of voltages that begged to be read as a programming connector. A Raspberry Pi acting as the programmer tried 20 pairs of lines and got no answer at all. There is simply no debug port on those pads.
- Power from the wrong side. The Raspberry Pi would not boot when the valve with batteries was already connected. Battery voltage was flowing through the pins into the powered-down computer.
- A torn trace. On the second, internal connector I tore off a trace while soldering, from exactly the pad that looked like the clock line. I think I repaired it.
- Tests on a dead valve. Several series of attempts returned silence, and then it turned out the valve had no batteries in it. A processor without power cannot answer, so those results meant nothing.
Along the way the agent proposed an add-on with a cable for every valve, and I answered that I did not want to take all the thermostats apart and build adapters for them. It should work over Zigbee, the way it always had. Up to that point the agent had been looking for the technically cheapest route, not the one I would want to use, so it took some effort to change the direction of the conversation.
The last sensible attempt would have meant soldering thin wires straight onto the processor’s legs. I let it go, because I have neither the skill nor the equipment. We broke nothing: we read, we understood, and we stopped at the protection. Whether the debug port was locked or we simply did not have a good connection remains an open question.
An off-the-shelf solution
That same evening, measurements on the bench showed why controlling a valve through temperature is the wrong road. With factory settings the opening saturated at about 77 %, even with a target of 35 °C. In the external-thermometer mode, which is how the valves ran in my house, the opening jumped 40 → 4 → 47 % with the target equal to the room temperature. A valve taken from the children’s room and fitted on a test valve body did not go past about 60 %, even when the room was 4 K short of the target.

Next to it lay a cheap Sonoff TRVZB valve, ordered earlier as a reference. It turned out to accept an opening percentage through ordinary Zigbee settings. Within five days I replaced all four valves; the three extra ones cost about 400 zł. The goal was reached by another road. The day and a half of reverse engineering left me with knowledge, a network programmer built on a Raspberry Pi, and an understanding of why that valve is not suited to the job.
Dead end two: economy mode
A condensing boiler runs more efficiently when it heats for a long time with cool water. After a day of watching, it turned out that the controller’s own curve would ask for water on average 10 °C cooler than the factory thermostat (40.8 versus 50.9 °C), with the same “heat or don’t heat” decision. It looked as if there was something to save. So “economy” was born: every 10 minutes of heating the controller lowers the water by 1 °C if every room calling for heat has headroom, and raises it when some room cannot keep up.
Four takes on the same problem
The whole difficulty sat in one question: how is the controller supposed to know that a room “has headroom”?
| When | “Headroom” signal | Why it failed |
|---|---|---|
| 5 Nov | valve open to 60 % at most | the valve opens at about 2 % per minute; a valve that was only just opening looked like headroom |
| 9 Nov, morning | valve below 85 % | the valve gave 70 % “forever”, economy waited for 85 %; the room stayed below target all night |
| 9 Nov, evening | small requested percentage | the room hung just below target for an hour and a half with the valve at 30 % |
| 11 Nov | a threshold of 0.05 K below target pauses lowering | every radiator room calling for heat blocked economy for the whole house |
The fourth fix changed the approach: the signal stopped being a state (how much is missing, how far it is open) and became movement (is the room temperature rising).
Along the way a “rescue” appeared for a room that calls for heat and does not warm up for 30 minutes. Its first version did not trigger once in 42 minutes. It counted 30 minutes of burner run time, and with cool water the burner ran 17.5 minutes out of 42 and spent the rest waiting on its anti-cycling lock. The rescue was waiting for the burner, and the burner was waiting for the rescue.
Gentle does not mean economical
On 10 November we ran the numbers and got something I had not expected. Without economy (5–7 November) the boiler used 2.8–2.9 kWh of gas per degree of temperature difference and fired 20–31 times a day. With economy (8–9 November) it was 3.2–3.3 kWh and 45–64 ignitions. Cooler water doubled the number of ignitions and gave no saving.

The condensation argument did not hold either. The water returning to the boiler was always at 37–47 °C, whether the flow was 40 or 55 °C. The boiler was condensing in both cases. On top of that, the boiler turned out to ignore small requests. When the controller raised the requested temperature by 1 °C every 10 minutes, the boiler sat for half an hour at 16–19 % power and 42 °C, despite a request for 50–52 °C. It only moved after a big jump.
The test that settled it
For most of those two weeks several changes overlapped: swapping the valves, a pump test, adjusting the underfloor heating valves. So on 13 November at 6:54 I switched economy off for three days and changed nothing else. On 15 November I read the gas meter, to base the result on the meter and not on a figure calculated from boiler operation, which understates consumption.
| Gas per day | Average outdoors | Gas per degree day | |
|---|---|---|---|
| with economy | 6.88 m³ | 4.8 °C | 0.52 m³ |
| without economy | 6.37 m³ | 3.4 °C | 0.44 m³ |
Without economy the result was 16 % less gas per degree day. The boiler started less often and ran in longer cycles, and comfort in the rooms was the same or better. The mechanism called economy was doing the opposite of what it was meant to do. It was switched off pending a redesign.
The figure from the first half-day of the test looked more impressive: 30 % less. Full days gave less, because at night the difference is smaller. A half-day result is easy to mistake for the result.
What was left of it
Economy left me with three things. I know that my boiler has to be asked firmly: raise the water quickly, lower it slowly. I have a measure of success I did not have before: gas per degree day against the 2024/25 season, when the factory thermostat ran alone. And I have a method that lost to my impatience more often than I would like to admit: one change at a time.

For the record: 0.44 m³ per degree day is still more than in October, when the factory thermostat was running with the help of my Home Assistant scripts (0.35), and less than in November 2024 (0.53). The controller on its own, without scripts, must not be worse than that October. For now it is.
Update, 19 November: does the controller save gas
After publication the controller kept heating, now without economy, so a few days later I ran all the numbers again. The next three full days, 16–18 November, gave 0.48 m³ per degree day, almost as much as with economy. The 16 % saving from the test did not last. That made me check the measure itself.
The degree day was misleading
Gas per degree day depends on the outdoor temperature itself, even when nothing changes in the control. In the 2024/25 season, when the factory thermostat ran alone, it looked like this:
| Outdoor temperature | Gas per degree day |
|---|---|
| 10–15 °C | 0.39 m³ |
| 5–10 °C | 0.44 m³ |
| 0–5 °C | 0.50 m³ |
So a warm October will always look better than November. The reason is simple: part of the gas goes to hot water and the cooker regardless of the weather, and the house stops heating at 15 °C already, not at the 18 °C that the degree day assumes.
A better measure: the house’s formula from two years ago
The daily data from the 2024/25 season produced a simple formula: the house used 0.58 m³ of gas a day regardless of the weather, plus 0.56 m³ for every degree below 15 °C outdoors. The formula matches the gas supplier’s readings from that winter to within 7 %. Now I can ask a different question: how much gas would the house have used two years ago, with the factory thermostat alone, in this year’s weather, and how much did it really use?
| Period in 2026 | What controlled the boiler | Two years ago the house would have used | It really used | Result |
|---|---|---|---|---|
| 4 Sep – 31 Oct (57 days) | factory thermostat and Home Assistant scripts | 121 m³ | 104 m³ | 14 % less gas |
| 1–15 Nov (13 days) | controller | 93 m³ | 85 m³ | 9 % less gas |
| 16–18 Nov (3 days) | controller | 17.6 m³ | 18.2 m³ | no difference: 0.6 m³ more, too short for a result |
The last row looks like a loss, but it is three days and a difference of 0.6 m³, which is what the boiler burns in just under three hours. Over a period that short the measurement itself swings by well over ten percent in either direction (figures below), and the consumption here comes from a calculation in Home Assistant, not from the meter. The first two rows are the ones that count: the first is based on the gas supplier’s readings, the second on my own meter readings.
Two comparisons, not one
In the last paragraph of the post I compared the controller with October and concluded it was worse. That comparison was skewed for two reasons. The first is the flaw in the measure described above. The second: this autumn the boiler was no longer run by the factory thermostat alone. From September it was helped by elaborate Home Assistant scripts that an AI agent wrote and adjusted every day. That setup worked a bit like the controller we built later.
So there are two fair comparisons. Against the factory thermostat alone, which is what an ordinary user has at home, the controller used about 9 % less gas in the first half of November. Against the scripts with the agent it comes out roughly the same: 9 % next to 14 % is a difference smaller than the accuracy of the measurement. For me that is a good result. The controller replaced Home Assistant, the scripts and daily supervision with a single device, and I did not pay for it in gas.
I checked how far the result strayed from the formula in the 2024/25 season, when nobody was changing anything: one day ±26 %, three days ±19 %, a week ±15 %, two weeks ±9 %. A test shorter than two weeks will not settle a difference of around 10 %.
This applies to the economy test in this post as well. Two and a half days is too short, so 16 % is not a result, just a lucky stretch of weather. In the new measure economy does not appear to change gas consumption in either direction. It stays off, because it did not save anything and it doubled the number of burner ignitions.
Caveats. The controller’s result covers two weeks during which the tests described above were still going on. The scripts worked at an average of 13 °C outdoors, the controller at 3–4 °C. The controller is also not fully independent yet: it makes the decision about heating and water temperature itself, but it still gets room temperatures through Home Assistant. I will take the next measurement after two full weeks without any changes.




Leave a comment