My Charge Planner Stopped Guessing

My Charge Planner Stopped Guessing

On the night every fixed guess in my charge planner was swapped for a number measured from this flat's own data, the plan didn't budge. It booked exactly 3.5 hours of charging, the same as before. That sounds like nothing happened. What actually happened is that the inputs finally became physically right.

Almost every figure the planner leaned on used to be something typed in once: a datasheet value, a single reading, a best guess. Then it sat there. Over one long session, Claude Opus 5.5, the AI I use to maintain the planner, went through them one by one.

Each is now measured from this house's own history and re-measured as new data arrives. The old constant only survives as a fallback for when there isn't enough data to trust. Some of the old numbers turned out fine. Others were wrong, and one was wrong in a way that happened to hide another.

FigureAssumedMeasured
Battery scale (kWh per 100 gauge points)6.77.42
Charge fill rate465 W513 W
Inverter efficiency85%81.7%
Plunge day, 90th percentile13.6 kWh cap19.8 kWh
Plunge energy per half-hour—0.47 kWh
Safety margin above floorconstants4.0 points (2.61 kWh/day)
Base drainfour versionsone learned figure
Solar fallback day04:30–20:00 UTCreal sunrise/sunset
Charger755 W, 85%confirmed
Battery-full reading106.8106.8 (confirmed)

Where the Old Number Was Wrong

The biggest miss was the battery scale: how many kWh sit behind 100 points on the battery gauge. The planner used 6.7, worked out from 560 Ah at 12.8 V. Both premises were wrong. The gauge's 100% is 560 Ah, but true full is about 106.8% (598 Ah), confirmed by four full charges.

The pack also works at around 13.25 V, not the 12.8 V nominal. Measured over 102 dark overnight discharges, the real figure is 7.42. It stays a constant on purpose, since it should only move if the battery is reconfigured. A weekly re-measure checks it (latest: 7.48 over 64 runs) and alerts if they drift more than 3% apart.

Charging fill rate was the other big one. Seven separate parts of the planner each carried their own fixed figure. They now share a single learned rate: 513 W measured, against 465 W assumed.

The house's base drain had four different hard-coded versions: 150 W, 120 W, 1.5% an hour, and one that had silently become 2.97 kWh a day once the battery scale was corrected. There is now one learned figure.

The safety margin above the battery floor was a pair of constants. It is now learned from how much the house typically discharges in a day (2.61 kWh) and from how wrong the state-of-charge forecast has actually been, which works out to a 4.0-point margin.

For plunge slots, the half-hours when Agile falls to zero or below, the planner now expects 0.47 kWh per half-hour and a 19.8 kWh day at the 90th percentile. Both are learned from billed half-hours. The old day cap was 13.6 kWh.

The inverter was a little worse than its assumed 85%. Measured over 569 dark hours with the charger off, it converts at 81.7%. That feeds straight into my ROI page: round-trip storage dropped from 67.2% to 64.7%, and arbitrage profit after inverter losses from £65 to £57.33.

The headline saving on that page didn't change. It compares the real bill with the price cap, which never depended on the inverter constant.

The solar fallback curve assumed a 04:30 to 20:00 UTC day all year round. It now takes real sunrise and sunset from Home Assistant; today that's 05:59 to 17:42 UTC.

Where It Was Right

Not everything was wrong, and that's worth saying. The charger checked out fine: 755 W draw at 85% efficiency, as assumed. The battery-full reading of 106.8 was right too. It's now read from the latest real absorption charge instead of being assumed, and it still says 106.8.

A few smaller ones went the same way. The exercise drain now starts from the real charge ceiling rather than a private 95%. The e-bike fallback draw is the measured 190 W peak. One constant that nothing used was deleted.

Why the Plan Didn't Move

So why did the plan land in exactly the same place? Because the learned fill rate had been quietly cancelling out the battery-scale error. The planner was reaching the right answer with two wrong numbers. Now it reaches it with two right ones.

That matters the next time conditions change and the two errors stop lining up. The kWh figures are now physically right, not just right on average.

The One Slip

It wasn't flawless. The change to the shared savings code needed a new module that the scripts behind this blog didn't have, so the next update of my ROI page failed. It was caught on that first run, before anything broken reached the page.

The deploy check now refuses any shared file that imports something the blog side is missing. On its first run it caught a second one.

Thanks

Thanks to Claude Opus 5.5 for going through every one of these with patience, for saying plainly where my old numbers were right as well as where they were wrong, and for leaving the planner measuring itself rather than trusting me. More on how the planner is built in How My Charge Planner Grew Up.

Thinking of switching energy supplier? We both get £50.

Switch to Octopus Energy →