I have a self-hosted emoncms, setup with inputs from various sensors covering electricity, hot water, central heating.
Recently i’ve had solar PV installed on the house, which has 2 separate inverters due to the system size. The outputs from these inverters goes through a junction box, and from there a single wire goes to my distribution board (consumer unit) - so essentially a solar type-2 arrangement.
I also have a Solar iboost, which diverts excess solar to the hot water immersion heater (and so far it’s working very effectively; 200L heated by 11 C yesterday afternoon).
I have 4 CTs as follows (feed names in " ")
1 “GRID” in the meter cupboard, between the main supply meter and the henley block (from there the cable goes to the consumer distribution board).
2 for the PV, “PV1” and “PV2” - one after each inverter, before they merge in the junction box.
…i want to track them separately to better understand how each solar string gets the sun.
1 “DIVERT” on the mains supply spur that goes to the solar iboost.
Now, the challenge I have is that the CTs i’m using are not directional, so i’m trying to figure out how to determine what is import and what is export.
So instead of showing negative values, my GRID CT shows a +ve for export, and a +ve for import (and an eerie near-zero figure if current PV and House Usage are balanced!)
At this point I don’t want to purchase more CTs, especially when in theory the CT data I do have should be enough to perform the sums for the outputs I want.
I can work through the logic, but am struggling to implement this within emoncms, so far.
Here’s my logic:
-
virtual feed PVgen = PV1 + PV2…to show total PV generation.
I have created this and it’s working fine. -
house usage/consumption “HOUSE” is:
2a) If PVgen > GRID, house use is PVgen - GRID - DIVERT
- this covers when there is excess PV, or no PV.
2b) if PVgen <= GRID, house use is PVgen + GRID
- this is the awkward middle period, when the PV is producing something but not enough to power the house - i.e. the house is running from a mixture of PV+GRID.
I can then do
NETuse = PVgen - HOUSE
…this will give a -ve value if we’re currently using more than the PV is producing, or a +ve value if the PV is producing more than we’re using.
I realise this excludes anything used by the iboost “DIVERT”, that will have a separate dial-gauge on my dashboard
So, my question (finally). How do I do the IF logic within a Virtual Feed (or another method if that’s better)
Re: Night time PVgen. I know that overnight my solar CTs report 32W (total), so my assumption is that is the power draw by the inverters (or rather, the CT measurement - I realise they are inaccurate at low readings). So at some point in the logic i’m going to minus 32 from the PVgen figure to account for this.