You still need to know more about each of the wires.
ignoring any earth wires, your programmer needs five wires.
That is a 'live' and 'neutral' input. Most likely a red 'live' and a black 'neutral. shouldn't be too difficult to determine which these are with a meter or test lamp
The three output wires are
1. a wire that leads to the input side of the room stat (via the terminal box). when you have proved which wire this is, connect it to term 4, CH ON.
2. a wire that leads to the mid pos valves 'grey' wire in the terminal box.
again when proved connect to term 1 HW OFF.
3. This leaves one remaining wire, which goes to the input side of the cylinder stat ( this will be via the terminal box). connect this to term 3 HW ON.
These 3 wires are all switched lives.
If it helps, I can tell you the CH ON wire may go like this.
programmer to terminal box term?
terminal box to room stat
room stat to terminal box term ? (look for white wire )
terminal box to motorized valves white wire.
The HW OFF may go like this
programmer to terminal box term?( look for 'grey' wire
terminal box to motorized valves 'grey' wire
The HW ON may go like this.
programmer to terminal box, term ?
terminal box to cylinder stat. (com terminal)
The cylinder stat is like a two way switch with one input terminal but two output terminals. One of the output terminals feeds the boiler until the temperture is satisfied, at which point power is cut and switched the second output terminal. a wire from this terminal joins up with the 'grey' wire mentioned before ( HW OFF)