batpred
batpred copied to clipboard
Freeze discharge slots disappear from the plan in favour of forced export
Describe the bug myself.and another user have noticed that Predbat plans periods of freeze discharge, which are sensible. Then despite having sufficient solar (even considering best10 plan) , these slots disappear and an export is planned for later instead.
Expected behaviour Freeze discharge where appropriate to minimise round trip losses
I caught the debug file late, but can use this to upload more data as available
Predbat version V 8.16.6
Environment details
- Inverter and battery setup - Givenergy AC3 and 2x5.2kWh batteries
- Standard HAOS
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.
Log file Can you capture a log file from the time of the issue, debug mode is not normally required.
Predbat debug yaml file
Enable debug mode and let Predbat run for one cycle. Look in the 'debug' directory under the Predbat add-on and take the .yaml file for the time period in question. Rename the predbat_debug_XX_XX_XX.yaml to predbat_debug_XX_XX_XX.yaml.txt and upload it to Github. This will allow your plan to be reproduced and also stores all your settings for review.
Two more alternating plan debug files Common sense says a freeze would be the best option to minimise later discharge
After a short period of discharge freeze, it's cancelled it and set a nearly 2 hours forced discharge at the end of day, rather than exporting the excess solar directly
This is related to the value used for input_number.predbat_metric_min_improvement_expor
If you put a low value e.g. 2, then it plans an export freeze. However if you use a higher number (which is intented to stop marginal battery discharge - not stop direct export), then it removes the freezes.
If I use a low number, it annoyingly plans in an early discharge mid afternoon rather than waiting til just before cheap rate. Try simulating with the debug files above
Likely related to an earlier issue I raised #1997
I've pushed a fix to 'main' which I will release too which decouple the min improvement export from freeze export
Thanks , will.givw main a go
I know the release notes for the last release tried to increase the likelihood of freeze discharge. It seems to be very undecided from my records, with frequent switching. Not sure what would be of use to investigate, but I can try and supply what is needed
mine has been pretty stable today
have you got a metric min improvement export set? Mine is set to 5p
I've also got it set to 5p, however I'm running the version on main where Trefor has decoupled it, so I wonder if it needs a bit of damping adding
Here's a couple of debug files. On the face of it, there appears no reason to have switched from freeze export to demand. Seems to be turning out to be a similar pattern to yesterday. Changing pause mode uses a lot of register writes (not that I'm worried as i'm using RTC)
predbat_debug (1).yaml.txt predbat_debug.yaml.txt
Edit.. It did turn out to be another very unstable day, changing modes frequently. Each time it was in the battery SOC got fuller.until.it got to 100%
Same today
@springfall2008 I've updated to the latest version on main and tried to get most settings near to default, however the plan still constantly flip flops between freeze export and demand. The soc gradually increases until.it reaches 100%, so this feature doesn't seem to be working correctly (at least for me)
I have min metric improvements export set to 5 (the default 3 added unwanted early discharges)
I've captured 2 debug yamls. 1 in demand and one in freeze export
Do you have any suggestions for my config, or can anything be done to make it more stable in decision making. Plenty of solar today and low loads, so expected it to hold at 89% as originally planned.
I'm seeing this problem too. At the beginning of the day, the plan was to hold at 85%~ battery, and then as time approaches that, it all gets dropped and replaced with Demand followed by a dump later in the day.
As a work around selecting "Set Export Freeze Only" to true seems to be keeping the slots and I'm not seeing the cycling.
I'll probably set an automation to turn this switch on/off at sunrise/sunset as a temporary fix.
Yesterday PB planned mostly a full day of freeze export and seemed to hold to it. Today it isn't planning much freeze export (but fairly certain it had it all blocked in yesterday), despite several hours of forced export planned at the end of the day:
Debug capture. Just changed from freeze export to demand, despite significant margin to soc keep on the best10
My plan has updated to more sane version:
Finally managed to catch it in both states. V8.18.1 main version for testing
predbat_debug.yaml.txt predbat_debug-3.yaml.txt