batpred icon indicating copy to clipboard operation
batpred copied to clipboard

Charging planned to (and does) complete much faster than available cheap rate period with charge_low_power enabled

Open chibbert opened this issue 3 months ago • 7 comments

Firstly, thank you for an awesome project @springfall2008 :-) really enjoying it :-)

Describe the bug Charging is occurring much faster than it needs to with charge_low_power enabled.

I'm on octopus go, which provides cheap rates between 00:30 and 05:30, so I was expecting charge_low_power setting to plan charging at lower power so that the batter is charged by 05:00 (I've set predbat_charge_low_power_margin to 30 minutes).

However the plan shows charging starting at 03:00:

Image

Expected behaviour I expected predbat to start charging at 00:30, and to use a sufficiently low charge power such that the battery is charge to 100% by 05:00

Predbat version

Predbat version: v8.25.5

Environment details

  • Givenergy 5kW hybrid - Gen 3 inverter
  • Giv-Bat 5.2 - Gen 1
  • Docker
  • Setting battery_rate_max, inverter_limit_charge, inverter_limit_discharge to 2557 as this is the max for this inverter/battery combo, even though givtcp reports 3600W

Screenshots If applicable, add screenshots to help explain your problem. The most useful ones can be your battery chart, the Predbat HTML plan and your current settings in HA.

Image

Log file Can you capture a log file from the time of the issue, debug mode is not normally required.

You can download the logfile from the WebUI on the Dash tab select predbat_debug.log

Predbat debug yaml file This is important for any plan related issues.

Once you have captured the issue go to the Web UI, in the Dash tab click on predbat_debug.yaml and wait 30 seconds for it to download. Select 'keep' if your Web Browser thinks the file is dangerous.

Rename the download file to predbat_debug.yaml.txt and upload it to Github. This will allow your plan to be reproduced and also stores all your settings for review.

predbat_plan.html predbat.log apps.yaml predbat_debug.yaml.txt

chibbert avatar Oct 21 '25 16:10 chibbert

Retested with v8.26.1 and v8.26.2 (via in container files upgrade that occurs when you use the "upgrade" button from inside home assistant), and behaviour remains the same:

Image

chibbert avatar Oct 24 '25 08:10 chibbert

Additionally it seems that the charge_low_power_margin isn't being used correctly either. I have it set to 30 minutes, but charging completes just 10 minutes before the end of the cheap period (10 minutes is the default for charge_low_power_margin too... so interesting...)

Image

Settings are definitely shown as I expect in config page though:

Image

chibbert avatar Oct 24 '25 08:10 chibbert

Have just done another quick test, disabled charge_low_power (set to false) to check how the plan compares:

Image

And now it is planning to use the whole cheap window to charge the battery more slowly, so perhaps the logic for charge_low_power has ended up reversed!

Image

chibbert avatar Oct 24 '25 08:10 chibbert

Not as simple as as that... changed back false:

Image

and still working in low power mode!

Image

Then changed back to low power mode and now its back to charging too quickly!

Image

chibbert avatar Oct 24 '25 08:10 chibbert

Then set predbat_active to force a plan recompute rather than automatic restart that occurs when you change a setting and it's now charging slowly!

Image

chibbert avatar Oct 24 '25 08:10 chibbert

thanks for all the testing,could you attach the logfile, might give a clue as to what is happening

gcoan avatar Oct 24 '25 12:10 gcoan

First message has my intial logfile before testing.

Here is logfile which covers the above tests (not sure if it'll be clear without timings, so I can redo these tests if that helps and record timings?)

Also latest plan (with charge_low_power enabled) attached - overnight charge has gone back to quick again in the latest plan!

predbat.log

predbat_plan.html

chibbert avatar Oct 24 '25 14:10 chibbert