You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR implements automatic SOC recalibration to 100% for the BYD series of batteries, triggered when the pack has been held at tail current for a sustained dwell period of 10 minutes and the reported SOC has drifted beyond a configurable threshold (in the more battery info page).
Why
The BYD packs drift their SOC gradually over time (tends to be around 1% per day). Without any SOC calibration, usable capacity is reduced over time. The existing manual SOC calibration via the WebUI requires user intervention each time — this automates it safely under tightly gated conditions.
How
Monitors charge taper progress and current direction; starts a 10-minute dwell timer once the slewed current cap reaches the tails current (which as been increased to 1A) and actual charge current is below 3A. If the tail current isn't held for 10 minutes (due to discharge etc) then the timer resets.
Fires the existing UserRequestCalibrateSOC state machine when all conditions are met simultaneously: dwell elapsed, SOC drift exceeds the configured threshold, contactor closed, no manual request in progress, and a 1-hour cooldown has passed. It also copies the exisitng batteries "capcity current" so as to not modify the reported battery SOH value when the SOC is written back.
Adds a toggle in the more battery info page to turn on and off (defaults to on).
Adds a drift percentage variable so you can set the threshold of how much drift is acceptable before it will trigger an SOC recalibration which also saves and is persistent with a reboot (The default for this is 5%).
Logs an event into the 'Events' page labelled EVENT_BYD_AUTO_SOC_CALIBRATION and logs the data drift percentage at the time of firing.
I am looking forward to have this integrated and working. i am trying to install your code to try it. but have not yet succeeded. i am a rookie with github. thanks for your work. this will make my byd atto 3 battery paired with the sma stp 10.0 hybrid working without intervention.
I am looking forward to have this integrated and working. i am trying to install your code to try it. but have not yet succeeded. i am a rookie with github. thanks for your work. this will make my byd atto 3 battery paired with the sma stp 10.0 hybrid working without intervention.
Thank you Demon. and sorry for taking this long. i managed to download your firmware and install it. i am testing if the autocallibirate wil work. can i do something specific to help the project further?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR implements automatic SOC recalibration to 100% for the BYD series of batteries, triggered when the pack has been held at tail current for a sustained dwell period of 10 minutes and the reported SOC has drifted beyond a configurable threshold (in the more battery info page).
Why
The BYD packs drift their SOC gradually over time (tends to be around 1% per day). Without any SOC calibration, usable capacity is reduced over time. The existing manual SOC calibration via the WebUI requires user intervention each time — this automates it safely under tightly gated conditions.
How
Tip
You can help test this PR with this guide