https://harizanov.com/2012/05/calculating-the-available-solar-energy-and-logging-it-to-emoncms/
Calculating the available solar energy and logging it to emoncms