batpred
batpred copied to clipboard
8.18.0 not producing 'good stable' plans
Describe the bug I know it's a vague title but since upgrading to 8.18.0 I have been concerned by some of the plan behaviours Predbat has devised.
On 8.17.10 I was getting pretty good plans, exporting remaining charge before/at sunrise (to reduce clipping, although the exports were not always big enough), and then charge during the day.
8.18.10's plan last night for this morning was to export the battery and then export all morning, relying on charging in the afternoon (which turned out to be overcast and raining):
And then a minute later the plan changed to just a first thing export:
This morning it appeared that Predbat was executing this latter plan:
But during the afternoon a big chunk of freeze export was applied, resulting in the batteries not charging fully
Tonight Predbat planned to fully export what remained in the battery, then partially re-fill, but looking at the rates including losses, this would lose money:
And then half an hour later the plan looks more sensible:
Expected behaviour Hard to describe, but more sensible plans, not exporting unnecessarily, and in particular holding onto the stored battery charge as long as possible before exporting it. I'm ideally only going to see an export first thing in the morning before the sun gets up to empty the batteries to reduce clipping the next day.
Predbat version 8.18.0
Environment details HAOS 2024.3.4 2x Gen 1 hybrid inverters each with their own battery
Log file Log from last night: predbat.2.log
Log from tonight: predbat.log
Predbat debug yaml file predbat_debug.txt
I had a look but the debug yaml shows the good plan, can you capture a bad one? Ideally update to 'main' first and see if it helps too.
This is what I got:
Actually that was your previous plan, which it selected due it not being much different from the new one I created which looks like this:
I'll try to capture a debug file from a 'bad' plan
My current plan from 8.18.0 I was quite happy with, it had freeze charging through the cheap cosy period then force export before the start of the solar day. I forgot to paste it here before upgrading to main:
This plan is OK as well.
I then changed back to 8.18.0 to get a screenshot, but the plan wasn't as good as it originally was, it had charging at 22:00 only to then export later on (which isn't profitable) and then a further charge at 6:30am charge which is debateable as to whether needed
Here's the debug file for the plan with 8.18.0: predbat_debug8.18.0.txt
Upgraded back to main and this plan is back to being what I'd expect:
debug file for main plan: predbat_debugmain.txt
Went back to 8.18.0 and again charging at 22:00 and a long period of morning export:
Main is at the moment definitely producing better plans, changed back to it again:
But as you can see I'm not consistently getting the same plan on either software version
Maybe spoke too soon about main being 'good'
Increased load_filter_threshold to see if that reduced the number of load history errors, and the plan produced on main, well is not 'good' - the charge at 06:00 from 4% to 10% isn't required as it freeze exports afterwards and then discharges from 10 to 7%.
Plan execution overnight looked OK, mixture of demand and exporting
The charge and then export didn't happen and there's none of that planned for this morning
Maybe spoke too soon about main being 'good'
Increased load_filter_threshold to see if that reduced the number of load history errors, and the plan produced on main, well is not 'good' - the charge at 06:00 from 4% to 10% isn't required as it freeze exports afterwards and then discharges from 10 to 7%.
I ran this plan myself and got a different result, the change I made to main at around 7pm last night seemed to have an impact
I ran this plan myself and got a different result, the change I made to main at around 7pm last night seemed to have an impact
Your plan looks more like what I'd expect; possibly could have exported a bit more in the morning, but no unexpected charges.
I swapped back and forth between main and 8.18.0, but this was all at around 10pm so should have included your latest changes.
I'll leave it on this version and see what's planned for tonight/ tomorrow
I've given it a bit, to decide how I feel about the plans being produced.
Have upgraded to 8.18.2 (latest version)
This is the plan earlier this evening, not a good plan. Despite the battery being full, planning a charge this evening and then to export all morning which will produce a load of clipping for me:
Looking at the plan now, its better:
But why export down to empty at 4am, OK then run on cheap import is fine enough, but why charge at 5:30, freeze export and freeze charge over the following slots. It's just weird behaviour; the charge and freeze charge then have to be exported again. Surely better to just freeze export or leave exporting all the way through to the end of the cheap rate period. Similarly 9:30 charges then exports again
As I was typing this in, the plan has just changed, a bit better, no charging now, but still a 6:30 freeze charge that then has to be exported again
debug file and logfile:
Another example of strange charge then export. I wonder if this one is due to the rate export override from 4pm (to reduce potential DFS period exporting)?
Can you feedback on version v8.18.7 which includes a new swap optimisation?
8.18.7 is looking a lot better in terms of forward plan although there is a new issue of it trying to export mid afternoon which I have added to #2240
Perhaps a bit too much freeze exporting, but otherwise OK.
I'll take another look later on tonight
Closing this one as there’s been quite a few versions since