N and L are straightforward, they are the same for the Potterton and the Hive, so they simply transfer from one to the other, however, the link between L and 5 on the EP2001 does not need to be retained. This connection is made internally by the Hive so it doesn't have a terminal 5.
Earths from the EP2001 go to the Hive's earth tether.
Then it is a matter of moving the remaining wires from the main switching terminals as defined on the back of your EP2001 (1, 3 & 4) as below
to the corresponding terminals at the Hive. Which is straightforward in this instance. [for example 'HW On' (EP2001) corresponds to 'Hot Water On' (Hive)] Even the numbers match up in this case. (lucky you!

)
Because the Hive carries out the functions of the room thermostat as well as the EP2001 programmer, the old wired thermostat needs to be decommissioned to prevent it overriding the Hive. It can't simply be disconnected as this would leave the heating wiring 'open circuit' and it will not operate. The thermostat can be decommissioned in three ways, in order of professionalism, they are.
1. Find the origin of the cable going to the room thermostat. Note where the wires are connected and then disconnect the entire cable and remove it. Then insert a wire link between the terminals where the two switching wires (red and yellow) have just been removed from.
2. Remove the existing thermostat and replace it with a junction box, connect the two switching wires together (red and yellow) and isolate the neutral (blue)
3. Leave the existing room thermostat in place, and put both of the switching wires (red and yellow) in terminal 1.