github springfall2008/batpred v9.6.4
Export threshold per 5 minutes, stored-energy value and Solis/SolaX fixes

4 hours ago

What's Changed

This release makes metric_min_improvement_export do what its name says, stops a one-off free or saving session from setting the value of stored energy, and updates the Agile price prediction for this year's tariff changes. It also fixes several Solis and SolaX problems that could stop charging or polling, and makes the web /entity history table read correctly.

Plan and battery behaviour

  • metric_min_improvement_export now applies to every 5 minutes of a forced export. Before, it was only checked against not exporting at all. The first minutes of an export usually earn a lot, which hid a thin tail that earned almost nothing, so in practice the setting rarely shortened an export. Now each 5 minutes must earn its share of the threshold, and a tail that doesn't is trimmed. An export that is already running is never cut short part way through. At the default of 0.1 plans barely change; if you have raised this setting, expect shorter exports. The customisation.md entry has worked examples, and the best_soc_keep entry now describes how that penalty is actually applied. @springfall2008 in #5874, addresses #3376 and #5860
  • Stored energy is valued at your tariff's own rates. The value of energy left in the battery at the end of the plan was worked out after Octopus saving, free and Axle sessions had been added to the rates. A 0p free session the next day made refilling look free, which changed what every stored kWh was worth (in one real case 15.61p instead of 9.18p). One-off sessions no longer affect it. @springfall2008 in #5872
  • Octopus Intelligent: smaller PV10 hedge once the car is charging. In the PV10 scenario, Predbat assumes a dispatch more than 30 minutes ahead may be withdrawn and prices it at the worst-case rate. Once a car is confirmed charging in that dispatch, a withdrawal would be noticed within one cycle, so the premium for the house and battery's own import is now 5 minutes in every 30, and the car's own import carries none. Plans can now hold the battery through a confirmed dispatch rather than cycling it through its losses. Unconfirmed dispatches keep the full hedge. @springfall2008 in #5896
  • Agile future rate prediction updated for 2026 pricing. The prediction now allows for the 3.34p/kWh (ex VAT) discount Octopus applied earlier in the year and for VAT falling from 5% to 0% in October. @AndrewColes in #5731
  • The marginal rate cheap/moderate sensors are based on your normal tariff. During a free session every level read "moderate", and a saving session made almost every slot read "moderate". The thresholds now use the base tariff's minimum and maximum, which the sensor already showed in its attributes. @chalfontchubby in #5827, fixes #5382

Inverters and integrations

  • Solis Cloud: if the startup read of the TOU V2 mode flag timed out, a V2 inverter was driven as V1 until the next restart, so no charge or export ran while the status still showed Charging/Exporting. The read is now retried, falling back to the last saved value. @springfall2008 in #5864
  • Solis: switching to Demo (read-only) mode now waits for the inverter to confirm its charge and export schedules are cleared before Predbat stops writing to it. Before, a timed schedule could stay active on the inverter. @mgazza in #5863
  • SolaX Cloud: a battery that reports its charge/discharge power, SoC or temperature as null no longer leaves the SolaX component in error on every poll. @springfall2008 in #5894, fixes #5893
  • SolaX Cloud: PV-only inverters (X1-Boost, Air, Mini and similar) are no longer counted as battery power in automatic configuration. A hybrid plus a separate PV inverter was being advertised with twice its real battery rate. @mgazza in #5899
  • Inverters with no reserve register (Solis, SolarEdge, SolaX Gen4, Sofar, Huawei, Sunsynk, Sigenergy): the placeholder reserve entity was seeded in kWh while labelled %, which could mislead inverter balancing. It is now seeded in percent, and an existing wrong value is corrected. @springfall2008 in #5870, fixes #5850
  • Hanchu: with hanchu_automatic, a load_today, import_today, export_today or pv_today sensor you set in apps.yaml is no longer overwritten by automatic configuration. @upton68 in #5883, fixes #5873
  • Fox: a setting your model doesn't support is now logged as information rather than a warning, and the retry count in the log is correct. @chalfontchubby in #5840, refs #3880
  • Config check: with a custom prefix, Predbat's own control placeholders no longer raise a false "cannot be modified" error in apps.yaml. @chalfontchubby in #5845, fixes #5242

Web UI

  • /entity history table fixed. Each row now shows the value at its own time, newest first, with changes coloured on the right row. Attribute columns no longer read "None", and the newest row no longer expands into future slots. @springfall2008 in #5859 and #5895
  • Opening /entity no longer adds load. Each entity listed on the page was being re-read from history every 2 minutes until the next restart. @springfall2008 in #5865

Debugging

  • Debug dumps from systems with Load ML enabled can be replayed again. They contained numpy values that failed to load on any machine. @springfall2008 in #5892

Documentation

  • car_charging_from_battery was described the wrong way round in two places: it must be Off for Predbat to hold the home battery while the car charges. @springfall2008 in #5897
  • Design document for an optional switch that would let the planner cancel a car slot to take a high-value export. No code yet. @springfall2008 in #5891
  • Debug journal updated with recent investigations. @springfall2008 in #5898

For developers and hosted deployments

  • Gateway (SaaS): with no gateway_inverter_serial list, a battery-less PV inverter alongside a battery inverter now has its generation counted in pv_power. @mgazza in #5805
  • Sigenergy onboarding (SaaS): an unknown system ID is now reported as invalid_system_id instead of staying at "provisioning". @chalfontchubby in #5844, fixes #5691
  • Execution state (charging/exporting flags) is saved separately from the plan and restored at startup. @mgazza in #5877
  • update_pred() takes an optional plan_at, like plan_once(). @mgazza in #5875
  • Several engines in one process no longer share state: the update and save/restore options are built per engine, and !secret is resolved with a private YAML loader instead of the global yaml.SafeLoader. @mgazza in #5876, #5882 and #5820

Full Changelog: v9.6.3...v9.6.4

Don't miss a new batpred release

NewReleases is sending notifications on new releases.