Quentin Santos

Obsessed with programming since 2002

Hacking radiators for fun and no profit

My flat has a bunch of electrical radiators, branded Acova. They have a remote. Each. Fixed to the wall right next to it. This means I have to get up from my seat to turn a radiator on. Worse, I might have to get to an entirely different room.

Remember the first virtue.

This is the remote. You can move it around, but there is little point anyway when you would have to carry four. Also, they eat batteries.

Unlike the TV remote, my radiator remotes are not IR (although an IR variant does exist, and was already hacked), but RF. With no other information, I whipped out my trusty RTL-SDR Blog V3.

As is now usual, Claude helped me quickly detect the signals of the remotes, establishing that they use 868.2 MHz. So I got myself a Heltec V3 for that frequency. Unlike my SDR, it would let me send data, in addition to receiving it.

After more poking with the Heltec, I realized that the remotes seemed to use proper cryptography during pairing, and all communications thereafter were encrypted. That meant that trying to crack the exchanges from sniffed data would most likely not work.

So I took one apart.

The big black square near the middle labelled HP1 is a shielded STM32L151/L152 MCU. The smaller black square towards the top labelled U2 is an ST SPIRIT1 transceiver.

Promising! Next to the big black square is a connector with 6 pin holes labelled X1. Most likely a debug port for engineers and technicians working on the product.

After identifying the GND pin with a conductivity tester, and failing to conclusively identify the 3.3V pin, I tried the first guess of Claude for the mapping, with SWDIO on the 4th pin from the top and SWCLK on the 2nd pin from the top. It worked first try!

Fortunately, the MCU did not have any protection enabled, so I was able to dump the whole firmware, and to read memory freely. After I installed Ghidra, Claude was able to analyze the firmware to determine the whole protocol, including the cryptography, as well as dump the session key (determined at pairing).

Ghidra will decompile sections of assembly into somewhat more readable C, and help you track references through the firmware. Claude can use it directly from the command-line (source).

Interestingly, the firmware is labelled “ComfoRF” and bears marks of the Zehnder Group, of which Acova is a subsidiary. It embeds mbed TLS with various cryptographic primitives, but only ends up using AES-ECB, and implements its own finite-field Diffie-Hellman. Also, it has some logic to use a hardware implementation of AES available on a different variant of the MCU.

With this, I could determine exactly what the MCU was sending to the radio chip. However, I could not read and send commands just yet. The SPIRIT1 radio chip does its own transforms to make the transmission more reliable (FEC, interleaving, whitening), before 2-GFSK modulation. These steps are only partially documented and specific to the SPIRIT1. To use my Heltec module, I would need to know exactly what these steps do.

What I did have were the exact contents of messages going into the radio (read from the MCU using SWD) and of messages going out of the radio (captured using the Heltec). After collecting a few samples, I turned it into a math problem for Opus 5.5, which eventually managed to determine the exact transform used in the SPIRIT1. The real (also generated) prompt was longer, but in essence:

The task. A black-box deterministic function F maps an input byte-string X to an output. I observe pairs (X, Y) where Y is a fixed 64-byte window onto F(X) — the full output may be longer; only the first 64 bytes are seen. Recover F well enough to invert it: given Y, recover X. Approach it however you like; form your own model before reading "What I ruled out."

Data.
- pairs.txt — 5 labelled examples (<input_hex> <output_hex>): input is the full 57-byte record, output the 64-byte window.
- outputs.txt — 1831 unlabelled output windows from the same system.

Observations (verified on the data).
1. Fixed additive mask: Y = M XOR T(X), with M a fixed position-indexed sequence. XORing two outputs cancels M, and the zero runs line up with where the two inputs are equal.
2. Partially linear over GF(2): in some regions Y_i XOR Y_j depends only on X_i XOR X_j; in others it doesn't — so T isn't globally linear.
3. Input-independent invariant block: output bytes 12..27 are identical across every example, even though the inputs differ there. The central anomaly.
4. Leading correspondence: output 0..7 tracks input 0..7, degrading further in.

What I ruled out (read after forming your own view). Modelling T as a GF(2)-linear expansion plus the additive stream M and searching exhaustively: best ~73% of bits, never exact. Observation 3 can't come from a linear expansion, so a non-linear or block-structured component is involved — don't re-tread the linear-only family.

The Claude-generated description of the whole protocol is available in a separate article.

And now the fun begins. I added a separate tab to my TV control panel, dumped the session key of all remotes, and can now control all radiators from my computer, or even my phone. I can even do it remotely, to come back to a warm home!

It took more effort than taking control of the TV, both from me and from Claude, but it worked out in the end. Without Claude, such a project would have likely taken me dozens, if not hundreds, of hours, but it only took about 9 hours of my time, all included.

Now I just need to find a way to control the weather…

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

About me

I have always been fascinated with computers. Nowadays, I mostly use Rust, but I started out with a QuickBASIC book from the local library when I was in elementary school. I also got a Master in computer science from ENSL and a PhD in cryptography from ENS.

qsantos@qsantos.fr

All articles