My home solar system(6000XP + Livepower v2) has a design flaw that costs real money every single night.
When the battery reserve hits 20%, the inverter cuts discharge and switches to paid grid power. This happens around 2:00 AM. From that point on, I'm paying. And when the sun comes up, the inverter insists on recharging a buffer before releasing energy back to the house. So the grid bill keeps running until 7 or 8 AM with panels already producing above me. That's not a technical limitation. That's a delivery gap in the system's logic.
The manual workaround was simple: if tomorrow's forecast looked strong, I'd wake up at 5:00 AM and override the reserve limit to 0%, forcing the battery to drain just enough to meet sunrise perfectly. It made a noticeable difference on the bill. But one bad call on a cloudy day meant zero battery, and if the grid went down, zero house. The risk tolerance was unsustainable without automation.
So I built the brain.
The goal was a predictive engine that could make that call autonomously: is tomorrow's solar production reliable enough to justify releasing the reserve? Yes or no, with real data behind it.
The first approach used NASA irradiance data. Failed immediately. Timezone misalignment between UTC and my local zone made the solar curve completely unusable. Migrated to Open-Meteo and built an astrophysical filter that zeroed out below-horizon hours mathematically.
The second approach used Meta's Prophet model trained on months of my own production data. Also failed. I had recently doubled my panel capacity with a second inverter, and Prophet kept averaging against the old baseline. My system was producing 6,000W and the model stubbornly forecasted 2,000W. It couldn't adapt to an infrastructure change, which is a familiar problem for anyone managing environments that evolve faster than the models tracking them.
I'll be honest, I shelved the project for a while. Bought more batteries as a brute-force fix to survive the night. But the operational inefficiency kept nagging at me, so I came back to finish it right.
The solution was to abandon statistics entirely and build a physical scaling engine. Instead of training a model on historical averages, the system reads the last 7 days of real panel output to detect proven peak capacity, extracts thermal efficiency against the climate ceiling, and discounts tomorrow's cloud cover from the forecast API. Physics over pattern-matching. No training set, no hyperparameters. The model calibrates itself every night.
The output is a triple-curve forecast generated nightly: actual production (orange), ideal clear-sky potential (dotted bell), and a realistic prediction adjusted for every cloud in tomorrow's weather model (blue). The accuracy has been remarkably precise.
The decision engine is already built and tested. It doesn't run on a simple timer. It calculates three variables in real time: current household consumption, remaining battery capacity, and the scheduled sunrise hour. If the stored energy is enough to bridge that gap, it sends the release command. If not, it holds. A decision engine, not an alarm clock. I've been validating it by pushing automated Telegram notifications every time the system triggers a decision, and it works
The only remaining piece is the Solar Assistant integration to execute the actual inverter parameter change automatically. Once that connection is live, the entire cycle runs without human intervention.
Beyond my specific use case, this opens the door to something bigger: automatically deciding when to consume battery and when to hold it, so you either pay less or use 100% of your installed capacity instead of letting the inverter's conservative defaults leave energy on the table.
I'm sharing the repo here. The README covers everything, and getting started is straightforward: just upload your inverter data. I left my own export files in as examples so you can see the expected format.
<a class="underline underline underline-offset-2 decoration-1 decoration-current/40 hover:decoration-current focus:decoration-current" href=" removed link "> removed link
Contributions welcome.
Github runnet the link was removed