Here is a schematic of the Solar Pump Controller with additions for the power supply and the relay.
No modifications were made inside the controller box; all changes are outside. Note that the relay coil is only 5V, so it needs a resistor. The LM317 is set to about 11V, because of the ripple across C6, and the dropout voltage of the LM317. The controller runs fine on 11V. The PFet on the controller is overkill to drive the relay, but it is already there.