solar by numbers

The software

Home Assistant on a £50 second-hand Dell OptiPlex, running Predbat, which replans every half hour using half-hourly prices and a Solcast forecast. It breaks down into four layers, below. All the software is free.

01

Read everything

The inverter speaks Modbus TCP over the local network. Every meter, cell voltage and MPPT string ends up in Home Assistant (over 250 entities, all local). Nothing leaves the house except the nightly summary that feeds this site.

Home Assistant OS · Sigenergy ESS integration · SQLite recorder

02

Forecast the day

Solcast gives two forecasts a day for each roof plane, east and west modelled separately. On Intelligent Octopus Go the prices are fixed (8p overnight, 34.72p the rest of the day, 12p for export), so the unknowns are the weather and the house's load.

Solcast · Octopus Energy integration · tariff rates

03

Make a plan

Predbat plans the next 48 hours: when to charge, when to discharge, and when to leave the battery alone. It sends the plan to the inverter through three small bridge automations that map its requested mode onto Sigenergy's EMS registers.

Predbat via AppDaemon · 48h horizon · 30-minute slots

04

Publish it

At 00:15 an automation rolls up the day, compares it with Predbat's no-solar baseline, and pushes one JSON file to this site's GitHub repo. A GitHub Action rebuilds and deploys. Nobody edits the figures by hand.

rest_command → GitHub Contents API · Actions · static build

What a plan looks like

Every half hour Predbat chooses one of three actions for each upcoming slot. Typically it charges overnight when power is cheap, holds at dusk, and in the morning works out whether the forecast is good enough to leave room in the battery for solar.

Charge

Charge in the cheapest slots, but only as much as tomorrow's forecast says we'll need, so there's still room for the solar.

Hold

Leave the battery alone through mid-price slots. Quite often that's the cheapest option.

Discharge

Carry the house through the 16:00–19:00 peak, and discharge to the grid when Axle calls an event at £1/kWh.

How the battery gets used: the export rate is a flat 12p all day, so there's no export peak to aim for, and the battery mostly feeds the house. In order of value per kWh: avoid evening peak import, then the £1/kWh VPP events, then avoid standard-rate import, and export at 12p only when there's nothing better. Predbat works this out from the rates; we haven't written any of it as fixed rules.

The pieces

LayerWhatJob
OSHome Assistant OS (x86-64)Runs on the OptiPlex's SSD, which copes with the statistics database far better than a Pi's SD card
Inverter linkSigenergy ESS integration (HACS)Modbus TCP on port 502. Over 250 entities, all local, no cloud
TariffOctopus Energy integration (HACS)Import and export rates, Saving Sessions, consumption
ForecastSolcast (HACS)7-day rooftop PV forecast, both roof faces, free hobbyist tier
PlannerPredbat (add-on mode)Plans charge and discharge against prices, forecast and learned consumption
BridgeThree small HA automationsMap Predbat's requested mode onto Sigenergy's EMS controls. See configs

The extras

Octopus Saving Sessions

The Octopus integration joins every session automatically. Predbat knows about them too: it tops the battery up beforehand, then force-discharges through the session window. A one-hour session usually shifts about 7 kWh, and the Octopoints come out at £3 to £4 per kWh against the 10-day baseline. Sessions only run November to March, so they contribute nothing to the numbers on this site yet.

Axle VPP, events-only

We signed up in June 2026 in events-only mode. Axle dispatches the battery four to eight times a month when the grid is under strain and pays £1/kWh, with a £10/month minimum if there aren't many events. Predbat has Axle support built in: it adds upcoming events to its plan, charges the battery beforehand and hands over control while the event runs. The rest of the time Predbat is in charge. Axle settles through the smart meter, so it was paying for months before our Octopus export was certified, and it was our first export income. If an Axle event falls inside a Saving Session you get paid by both, as the two schemes don't know about each other.

Load shifting

Tapo P110 smart plugs on the washing machine, dryer and dishwasher, plus a phone notification when solar surplus goes over 2 kW. Simple, and worth about £65 a year.

The pipeline behind this site

The stats page is fed by Home Assistant directly, with no spreadsheets or cloud service in between:

  1. Six daily utility_meter helpers wrap the Sigenergy cumulative energy sensors. When they reset at midnight, yesterday's total survives in the last_period attribute, which is what makes reading them at 00:15 reliable.
  2. Yesterday's costs come from Predbat's own tracking sensors (cost_yesterday and its no-solar comparison), which are ready right after midnight. The Octopus cost sensors run a day behind, so they can't be used here.
  3. At 00:15 an automation builds one JSON file for yesterday and pushes it to this site's GitHub repo with a single rest_command against the GitHub Contents API. One file per day, retried up to five times, with increasing delays, if the network drops.
  4. GitHub Actions rebuilds the site and rsyncs it to the server. The commit history also serves as a record of every day's data.

The full pipeline YAML is on the configs page if you want it for your own install.

Maintenance

CadenceTask
WeeklyCheck HA is up (an uptime monitor pings it anyway)
MonthlyHACS updates, and a sanity check of earnings against the Octopus bill
QuarterlyCompare flat 12p export earnings with what Agile Outgoing would have paid. Switching is free
AnnuallyFull backup, battery cycle count, panel inspection