batpred
batpred copied to clipboard
Solar Assistant Freeze/HoldCharge not working as intended
Describe the bug When PredBat tries to set a percentage value for FreezeCharge or HoldCharge on Solar Assistant, the change is not done and reflected straight away as it takes some time to set this on the inverter. Problem with that is that BatPred sees it as a write failure but when it runs again, the change has been done but then it reincrements it by 1 which takes the actual FreezeCharge to go all the way to 100% if the window is large.
Expected behaviour Expect PredBat sets the percentage and doesn't give a write failed straight away and wait until Solar Assistant can write the percentage amount to the inverter.
Predbat version
8.23.1
Environment details
- Solar Assistant with a Growatt Inverter
- HAOS 2025.07.3
Screenshots
Log file
Predbat debug yaml file
What would you suggest, a longer timeout? How long does it take?
I think a longer timeout is a good idea to start. I believe it takes ~~between 2 or 3 minutes~~ for it to settle and be written to the inverter. Is it doable? Edit: It doesn't take that long, by the looks of it, less than a minute to actually write to the inverter so maybe a minute to wait until it's written to start?
So you can change the poll interval in apps.yaml e.g:
inverter:
write_and_poll_sleep: 10
But I've made a change to the default increasing it to 10 seconds and 6 retries is the default so that should be enough, you can try the version on 'main' to see if this works?
Hey Trefor,
Sure thing, just changed that on mine and as soon as I get a window with a hold/freeze charge, I will let you know. Thanks for that!
Just had a freeze charge window now and got the same error even with all the changes from main since the last version:
14513 | 2025-08-17 10:57:20.004229: Completed run status Freeze charging with Errors reported (check log)
-- | --
14506 | 2025-08-17 10:57:19.180324: Warn: record_status Warn: Inverter 0 write to charge_limit failed
14505 | 2025-08-17 10:57:19.087041: Warn: Inverter 0 Trying to write 82 to charge_limit didn't complete got 81
14180 | 2025-08-17 10:53:53.528144: Completed run status Freeze charging with Errors reported (check log)
14173 | 2025-08-17 10:53:53.022025: Warn: record_status Warn: Inverter 0 write to charge_limit failed
14172 | 2025-08-17 10:53:52.963619: Warn: Inverter 0 Trying to write 81 to charge_limit didn't complete got 80
Can you try 15 seconds?
Sure thing, trying 15 now and will update as soon as I get a window.
It's still doing the same with 15 as well.
Can you figure out how long it actually takes to write?
On Mon, 18 Aug 2025 at 15:07, xhemp @.***> wrote:
xhemp left a comment (springfall2008/batpred#2580) https://github.com/springfall2008/batpred/issues/2580#issuecomment-3197092817
It's still doing the same with 15 as well.
— Reply to this email directly, view it on GitHub https://github.com/springfall2008/batpred/issues/2580#issuecomment-3197092817, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALSXIHYI33ESDH2MG4GLH3T3OHM25AVCNFSM6AAAAACCI5A2QKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJXGA4TEOBRG4 . You are receiving this because you were assigned.Message ID: @.***>
I will check again on a few different windows and will let you know
On Mon, 18 Aug 2025, 18:00 Trefor Southwell, @.***> wrote:
springfall2008 left a comment (springfall2008/batpred#2580) https://github.com/springfall2008/batpred/issues/2580#issuecomment-3197729613 Can you figure out how long it actually takes to write?
On Mon, 18 Aug 2025 at 15:07, xhemp @.***> wrote:
xhemp left a comment (springfall2008/batpred#2580) < https://github.com/springfall2008/batpred/issues/2580#issuecomment-3197092817>
It's still doing the same with 15 as well.
— Reply to this email directly, view it on GitHub < https://github.com/springfall2008/batpred/issues/2580#issuecomment-3197092817>,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/ALSXIHYI33ESDH2MG4GLH3T3OHM25AVCNFSM6AAAAACCI5A2QKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJXGA4TEOBRG4>
. You are receiving this because you were assigned.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/springfall2008/batpred/issues/2580#issuecomment-3197729613, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIEYDFTPG7LVFPTQDMWVXL3OIBBPAVCNFSM6AAAAACCI5A2QKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTCOJXG4ZDSNRRGM . You are receiving this because you authored the thread.Message ID: @.***>
The 1 to 2 minute mark should be fine for hold freeze (still waiting on holding charge to test) , I saw just one error for the last writes but it's weird that it keeps adding 1% every time baatpred runs:
2025-08-19 11:07:43.451364: Inverter 0 write_and_poll_value: Wrote 61 to charge_limit, successfully now 61 2025-08-19 11:09:46.457794: Inverter 0 write_and_poll_value: Wrote 62 to charge_limit, successfully now 62 2025-08-19 11:11:50.366154: Inverter 0 write_and_poll_value: Wrote 63 to charge_limit, successfully now 63 2025-08-19 11:13:58.740339: Inverter 0 write_and_poll_value: Wrote 64 to charge_limit, successfully now 64 2025-08-19 11:18:02.269790: Inverter 0 write_and_poll_value: Wrote 65 to charge_limit, successfully now 65 2025-08-19 11:21:18.133527: Inverter 0 write_and_poll_value: Wrote 66 to charge_limit, successfully now 66
Is that expected?