-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow battery energy to reset to zero #122
Conversation
It was assumed that battery energy for import/export were lifetime counters (per description in docs), but this may not be the case as reported in issue #118. Allow display and reset to zero, and log error if they go backwards.
If anyone else with a battery has or has not observed the battery energy import/export counters resetting to zero, your feedback is needed. |
The counters on my LG RESU7H battery reset to 0 quite regularly (with no discernable pattern). I did raise a ticket with Solaredge pointing out that this behaviour is in violation of their documented register specification - but unsurprisingly I got no response. You can also see that the "charged" value is totally wrong, as it reports almost 3kWh being charged to the battery during the period ~2am-4am, during which time the SoE of the battery is a constant 40%. This behaviour is rather infuriating as these counters are therefore useless for the energy dashboard and I ended up using the "integration" integration to integrate the instantaneous battery power - but that has it's own issues. |
What are the problems with the "integration" method? |
Integrating the area under the curve of the power graph is quite lossy, you need to have a high sample rate of the power to get the "best" result, but short spikes will be missed completely, and the integral of the power will be quite wrong depending on what the power does between samples, so the sensors are never 100% accurate. That results in the charged / discharged results diverging over time. For example, my "charged" sensor integrated from the battery power currently has a value of 1945kWh, wheras "discharged" has 1440kWh. Clearly half a megawatt-hour did not vanish, this is simply because even sampling the registers at an interval of 10seconds, spikes are missed and the graphs diverge over time. It's a real-time problem that requires much faster sampling, or the BMS to actually report the correct numbers ;-) |
So then it sounds like there's no real "fix" becasue even if by allowing it to reset to zero (even though the docs call it a "lifetime" counter) it could have reset between reads and there's no way to know that happened. If the integration kept its own running total it would still have the missing data from resetting to zero randomly problem. |
What I'll plan on doing then is make the changes to allow battery import and export energy to reset to zero which will also log a warning if it happens, and I've created a "known issues" wiki page that documents this. |
Allowing battery energy to reset to zero has been added to Release v2.2.6-pre.2 A note about this issue has been added to the wiki: https://github.com/WillCodeForCats/solaredge-modbus-multi/wiki/Known-Issues#battery-energy |
It was assumed that battery energy for import/export were lifetime counters (per description in docs), but this may not be the case as reported in issue #118. Allow reset to zero, and log warning if they go backwards.