Two meters, one subtraction and seven steps turn a single retailer bill into
two fair shares. Every formula below is the one the system runs.
Scroll to follow the energy around the property. Hover or tap any part of the
picture to see what it is and what it measures.
1
The Envoy measures the whole property
The solar system meters everything crossing the property boundary in 15-minute
intervals and uploads it to Enphase's cloud. It records how much the panels
generated, how much the whole site consumed, and how much crossed
the meter as import and export.
Those four must balance, so every interval checks itself.
Consumption − Production = Import − Export
On real data the balance is out by about 1 Wh in a quarter-hour on average (the
mean of the differences, ignoring sign, over the 6,399 intervals before the
battery was fitted). A failure points at the solar meter, not the flat's,
which is why the Data quality page reports it separately.
2
A second meter watches only the flat
A Shelly Pro EM-50 sits on the granny flat's own circuit and is read every
minute, far more often than the solar data arrives. Channel 0 is the
whole flat. Channel 1 is the EV charger, which sits
inside that circuit.
The two channels are never added. The EV is already in the flat's total,
so adding them would bill that energy twice.
3
The main house is never measured
There is no meter on the house. Its consumption is what is left when the
flat is taken off the whole property.
House = max(0, Site − Flat)
This matters more than anything else here, because every awkward case
follows from it. Two separately calibrated meters are being subtracted, so
the house carries the error of both. On a quiet interval the result
can come out slightly negative, which is impossible. So it is set to zero
and the interval is flagged.
The clamp is common and the flag is rare. Over the 6,399 intervals before the
battery was fitted, the clamp applied to 184 (about 3%) and added 8.6 kWh in
all. Only the 44 (about 0.7%) that were further out than the two meters'
tolerances can explain are flagged, and those are the Neg. house column
on the Data quality page.
4
Solar is shared, interval by interval
Each home is entitled to a share of what the panels made in that quarter-hour.
Whatever one cannot use, because it was not drawing that much, spills to the
other. It is not treated as exported.
flatEntitlement = Solar × αα = flat's share, default 0.5
solarToFlat = min(Flat, flatEntitlement)
solarToHouse = min(House, Solar − flatEntitlement)
leftover = Solar − solarToFlat − solarToHouse
Then a cap, because the two meters disagree. Self-consumption is exactly
what was generated and not exported. The Envoy measures both itself, so that
is the number to trust.
selfConsumed = Solar − Export
if (solarToFlat + solarToHouse) > selfConsumed:
scale both by selfConsumed ÷ allocated
Without that cap, meter drift credited the homes with solar that was really
exported. That was 1.5% of generation, which is money.
5
Grid import is attributed
Whatever a home used beyond its solar came off the grid. The flat's import
comes from its own measured consumption. The house's is whatever is
left of the real meter reading.
importFlat = Flat − solarToFlat
importHouse = max(0, GridImport − importFlat)
The house is tied to the measured import, not to its derived consumption, on
purpose. That makes the two shares always add up to what the meter recorded,
so the retailer's kWh are never invented or lost.
6
Every interval is priced at its own rate
A time-of-use plan charges differently through the day. Each quarter-hour is
matched to the band in force at that moment: the plan that covered the date,
then the window that covered the time and day of the week.
avoided = kWh × rate(t) ÷ 100
credit = exportedKwh × feedInRate ÷ 100
That is why the Savings page prices interval by interval, not by an average. A
kWh used in an expensive band is worth far more than one used at midday, and
in a free window it is worth nothing, because the grid would have supplied it
free. An average would credit the panels for the weather instead of for when
they generated.
7
The bill's dollars are split, never recomputed
The retailer's bill is the authority. Each charge line is divided by each
home's share of the import measured in that band's intervals.
share = importFlat ÷ (importFlat + importHouse)within that band's intervals
flatEnergy = ∑ lineAmount × share
flatSupply = supplyCharge × supplyShareFlat
batteryCredit = batteryExported × feedInRate(t)capped at the bill's feed-in credit
flatCredit = (batteryCredit if the flat owns the battery)
+ (feedInCredit − batteryCredit) × feedInShareFlat
Feed-in that the battery's own exports earned goes to the battery's owner
first. Only the rest of the credit is shared by feedInShareFlat.
Without a battery, batteryCredit is nothing and the whole credit is
shared.
The flat's side is rounded and the house's is the remainder, so the two always
add up to the bill exactly, to the cent. Nobody is short or over because of
rounding.
house = billTotal − flat
Every figure here includes GST, on both the bill and the plan, so the total
matches what was paid.
The battery
A home battery is a third way energy moves around the property, alongside the
roof and the grid. It belongs to one of the two homes and serves the whole site. Four
more steps decide where its energy came from, where it went, and what the homes owe
each other for it. None of them changes the retailer's bill.
8
The battery keeps its own count
The inverter keeps two running totals: energy that has gone into the
battery and energy that has come out. They only ever go up. The hub
reads them over the home network every minute, and the Fox cloud is the
fallback every five minutes. Occasional all-zero replies from the cloud are
ignored.
Each interval's battery figure is the difference between the totals at its
two edges. A reading rarely lands exactly on an edge, so the total there is
worked out from the readings either side.
charge = In(end) − In(start)
discharge = Out(end) − Out(start)
net = discharge − chargeonly the net is shared out
Within one quarter-hour the battery can charge and then discharge. Only the
net movement crossed the property, so only the net is shared. When both
happened by more than the meters can resolve, the interval is flagged
Circulating on the Data quality page. That flag is advisory only.
State of charge, kWh stored and battery power on the Live page are for
display. Nothing is billed on them.
9
Homes first, then the battery
Charging. Solar serves the two homes first, shared exactly as in
step 4. Only what is left over charges the battery, so nobody buys power
while the battery stores free energy. Any charge beyond that surplus came
from the grid. It is billed to the home that owns the battery, in the band it
was bought in. It can never be more than the meter actually imported.
solarToBattery = min(charge, Solar − solarToFlat − solarToHouse)
gridToBattery = charge − solarToBatterycapped at what the meter imported
Discharging. The inverter's sensor is on the main incomer, so the
battery serves whichever home needs power. Its energy is shared in proportion
to what each home still needed after solar. Anything neither home took was
exported.
unmetFlat = Flat − solarToFlat
unmetHouse = House − solarToHouse
toHomes = min(discharge, unmetFlat + unmetHouse)
batteryToFlat = toHomes × unmetFlat ÷ (unmetFlat + unmetHouse)
batteryToHouse = toHomes × unmetHouse ÷ (unmetFlat + unmetHouse)
batteryToGrid = discharge − batteryToFlat − batteryToHouse
The owner's import still includes the grid energy that charged the battery, so
the two homes' imports still add up to the meter. The charts show each home's
own grid use separately from grid → battery.
10
Battery energy is paid for at the battery rate of its band
For every kWh the home without the battery takes from the battery, it pays the
battery's owner the battery rate of the band it was used in, not what the
grid charges at that moment. The owner sets a battery rate for each band, and it is
usually less than the grid's peak rate. A band without its own battery rate uses
its retail rate.
Why it works for both homes. The home without the battery buys its peak-time power for less
than the grid would charge. The battery's owner is never out of pocket, and has a
choice: refill the battery free in the free window and keep the payment, or, if it
needs that energy to charge a car, take the same amount from the grid at the battery
rate and come out even. It does not have to draw from the grid then; the battery
rate is simply the price of the energy.
The battery solar credit. Solar that charged the battery would otherwise have
been exported and earned feed-in, which the two homes share. So the owner
credits the other home its share of the battery solar credit for every kWh of solar
the battery stored. The credit is set for each time window on the Plan page. It is a
separate price from the grid feed-in, so a plan that pays nothing for export by day can
still credit the other home for the solar the battery took. A window with no credit of its
own uses its grid feed-in rate.
batteryAmount = ∑ batteryToOther × batteryRate(t) ÷ 100
solarCredit = ∑ solarToBattery × batterySolarCredit(t) × otherFeedInShare ÷ 100batterySolarCredit(t) = the window's credit, else its grid feed-in
other = energy + supply − feedIn + batteryAmount − solarCredit
owner = energy + supply − feedIn − batteryAmount + solarCreditother = the home without the battery
Both are transfers between the homes. What one pays the other receives, so the
two shares still add up to the retailer's bill, to the cent. If an interval has
no retail rate, its battery energy is not charged and the bill says so.
11
When the battery was not read, the interval is not billed
An interval's battery figure needs a reading close to each of its edges. If
the readings either side of an edge are more than eleven minutes apart, or the
counters reset, nobody knows what the battery did in that quarter-hour. One
missed five-minute poll is tolerated; two are not.
Those intervals are marked MissingBattery. The energy had to come from
somewhere, and guessing where would be guessing a bill, so they are left out
of bills. They appear on the Data quality page. Totals on the other pages
still include them, just without battery figures.
Where the numbers come from
Only one row is derived, not measured. Every data quality flag traces back to it.