I’ve been setting up a 3-phase solar PV + consumption monitoring setup for a customer today and I thought I would share the input processing that we have ended up with as I realise this isn’t well documented. I will add this to the docs as well, perhaps with some further refinement if there are suggestions about better ways to do this.
We wanted to record both detailed per phase data and totals summed across all three phases.
- This is what the input processing summary looks like:
- P1, P2 & P3: Solar generation, these are logged to feeds solar_L1, solar_L2, solar_L3 respectively.
- P3: uses ‘+ input’ to calculate a total sum of P1, P2 & P3, the result is published to MQTT topic:
emon/sum/solar_total
. - P4, P5 & P6: This is grid import & export, which is first logged to grid_L1, grid_L2, grid_L3 respectively. Then there is a
allow positive
input process with the result logged to feeds import_L1, import_L2, import_L3 respectively. Each leg is reset to the original value and then theallow negative
input process is used followed my a scale by -1 before recording export_L1, export_L2 & export_L3. - P6: also uses ‘+ input’ to calculate a total sum of P4, P5 & P6, the result is published to MQTT topic:
emon/sum/grid_total
.
Zooming in on the input processing for P6 (Grid_L3):
A second layer of input processing is then added to these generated inputs:
- grid_total:
- solar_total: just logs the total to a power feed and uses ‘power_to_kwh’ to calculate cumulative solar kWh data as well.
The final result in terms of feeds is:
and MySolar app:
This did get quite complicated for something that should be relatively simple. Recording all the individual phase import/exports etc does add complexity. The use of Publish to MQTT to generate new inputs while a neat simplification for local installs is not something that is available on emoncms.org. Ideally we would have a “write input processing result to new input” option that did not have to go out and back via MQTT…
Some of the above could be simplified with virtual feeds. E.g generating separate import/export power feeds at least from grid import/export feeds. In this particular install we had historic import data but not import/export and so I went down the non virtual feed route. I’ve also been thinking there’s probably a good case for having Emoncms app’s generate daily kWh stats from selected power feeds on the fly rather than require both power and kWh feeds, this could reduce the amount of input processing complexity quite a bit… These are future ideas but the above is one way of getting all the feeds for data analysis using the capabilities of emoncms today.
The overall aim of this monitoring installation is to:
- Calculate the value of the exported electricity
- Work out the value of increasing the size of the solar array
- Work out the value of adding battery storage.