Controller for a pool solar heater