forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Prepare Release 2024.03.07 #726
Merged
Merged
Conversation
This file contains 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
we previously only called commitPowerLimit() if the desired limit changed such that the change was bigger than the hysteresis. we found that if the limit update was not received and the desired limit would not change much, the limit of the inverter was wrong for a long time. to mitigate this, we introduced re-sending the limit update every 60 seconds, regardless of what the limit reported by the inverter was at that time. if the power-up command was not received, we also would repeat it only once every 60 seconds. this leads to a new kind of staleness and the actual inverter state was still not matching the desired state. this new approach effectively adds an additional control loop at the start of the DPL loop(). that new function compares the requested inverter state to the actual reported state. it sends updates (limit update or power on state) until the desired inverter state is reached, or until a (hard-coded) timeout occurs. this approach also allows us to send power-up, power-down, and limit update commands independent from one another and in a particular order. this should make sure that the inverter is in the desired state even if conditions change slowly and commands were not received as expected.
Fix: DPL: ensure inverter reaches requested state
This change makes the build runner switch to a meaningful branch name, which will then appear as the "Firmware Branch" in the System Info of the web application. This helps users testing pull-request builds identify that they are actually using the changes from the respective pull request.
the update frequency of Victron MPPT charger data, the battery Soc, the huawei charger power, and the power meter differ from one another, and differ in particular from the inverter update frequency. the OnBattery-specific data is now handled in a new method, outside the upstream code, which merely call the new function(s). the new function will update the websocket independently from inverter updates. also, it adds the respective data if it actually changed since it was last updated through the websocket. for the webapp to be able to recover in case of errors, all values are also written to the websocket with a fixed interval of 10 seconds.
do not scale limit if inverter is not producing, as DC channel power is expected to be close to zero anyways. do not scale limit if current inverter limit is small, such that channels might produce very little power exactly because the limit is so low. move the calculation out of setNewPowerLimit and into a new function, so that we can make use of return statements there.
this check was removed on error when moving the scaling code into its own function.
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
No description provided.