The code is designed to control a MainPine EPC unit to allow the charge rate of an electric vehicle to be automatically varied. The code is basic and will need work to enable certain circumstances to work properly, i.e you may wish to add delay to cover cloud shading, unless you live in California! This code is based on the OpenenergyMonitor rfm12b simple demo.
Please note the diagram is missing a gnd on the AD5206 !