Thank you so much for making the Agile integration feature - it works well, compared to pretty much everything else out there!
However, for this automation for work well here is quite a few variables and parameters which need to be set manually (slots, timeranges ranges, SOC levels, system capabilities, etc.) - and potentially continuously tuned as the consumption / generation patterns change through the year.
It feels like perhaps an opportunity was lost here to make this option really 100% automated and super efficient.
The problem to solve here is essentially: "When (in 30 min resolution windows) over the next 24 hours should I charge or discharge the battery to minimize the absolute electricity cost".
It seems like all the information needed to make this decision autonomously are available to the system already:
- Agile prices in 30min buckets are available half a day in advance for the next 24 hours
- Next 24h solar forecast for the region is a thing
- The exact generation stats with 5 min resolution (going back in time for days / months) are available via Givenergy API
- Same for the detailed electricity consumption data over the day(s) - this is acquirable via Givenergy or Octopus API.
With all this info in place, there should be no need to fiddle by hand with any of these mentioned parameters.
The flow here could be a bit like this:
- Solar forecast (and historical data) is used to backtest against historical home system production (within certain time window) to come up with a 'calibration factor' - essentially modelling how forecast values translate to the actual energy generation for the specific system (since this very much depends on factors like panel types, orientation, efficiency, shading etc.). After calibration, it should be possible to relatively accurately predict exact solar KWh production in 30 min buckets for the next day - no need to worry about specifying system/panels wattage manually, etc.
- Same for the consumption data - looking at the historical consumption trends (hour by hour over period of time - ideally accounting for weekends vs weekdays, etc factors.) it is possible to come up with a 30 min buckets curve predicting consumption during the next 24 hours. The most simplistic approach could be simply to look at the KWh consumption e.g. between 13:00 and 13:30 for the past four or so Mondays - and just use linear regresion to predict 13:00 - 13:30 value for the next future Monday (although ideally you want something smarter, be able to be quicker to react to things like spikes or seasonal differences)
- Now, having all this 30 min resolution data for the next 24 hours (agile prices, system generation prediction, system consumption prediction) - and since battery capacity and charge / discharge rate is known, deciding when to charge/discharge exactly is essentially a variant of bin packing problem, where we want to optimize for lowest possible energy cost, algorithms / libraries for this exist already.
It would be super cool if such 'autopilot' functionality was included - perhaps even as a part of some sort of (sensibly priced) 'premium tier'. Is something like that perhaps on the roadmap?