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.05.03 #948
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
set the "last published" timestampt after handling *all* MPPTs.
…lot of redundant code
This change logically connects the AC-Charger with the BMS to add BMS initiated emergency charging and respecting BMS current limits.
queue every text event until the frame was checked by it checksum. then process the data directly into the buffer struct. do not clear the buffer struct, so it will always include the most recent value of a particular data point.
hand out const& to the data structs. this is possible now that this struct is "stable", i.e., not reset regularly.
double precision floating point numbers are not needed to handle VE.Direct values. handling double is implemented in software and hence *much* more resource intensive.
the use of a #define is warranted here since it saves a lot of code duplication and improves code readability.
* show charge controller temperature in live view * send hex requests right after decoding a frame. this seems to have the best chance of getting an answer to all requests. * deem 0xFFFFFFFF value of network total DC power as invalid indicator. neither network state, nor network info, nor network mode seem to indicate that the charge controller is part of a VE.Smart network. for that reason, we revert to always querying the network total DC power value, but testing it for max(uin32_t) value, which seems to indicate that the charge controller is not part of a VE.Smart network. * improve (verbose) logging, e.g., use _logId, and print names of response codes and known registers, always print error messages, add additional tests to prevent overly verbose messages. * move hex protocol definitions to VeDirectData.h header and use enum classes * define register addresses in enum class * move values retrieved through hex protocol into main MPPT data struct * do not send HEX requests if the serial interface cannot send data * detect whether smart battery sense temperature is available * web app: make all VE.Direct sub-cards iterable. this makes addind more values much simpler and saves a bunch of code in the web app. * make VeDirectFrameHandler state a type-safe enum class * unindent MPPT controller loop() * whitespace cleanup
1. makes the DPL use the power generated by all connected charge controllers for calculations based on solar passthrough. 2. makes the network total DC power appear as "MPPT Total Power" in the live view at the top. 3. shows the network total DC power in the VE.Direct live data card.
Merges v24.3.31 from upstream
avoid performing a calculation based on a (slightly) outdated power meter reading, which was aquired just before the limit was actually applied by the inverter, but which was received by OpenDTU-OnBattery after the inverter stats.
for solar-powered inverters, the unconditional full solar-passthrough implementation now sets the upper limit configured in the DPL settings.
we found that the inverter sometimes stops responding to commands, especially to the "start producing" command. we now count the number of consecutive timeouts when trying to send a new limit or power state commands. after two timeouts were recorded, every additional timeout will send a restart command to the inverter. as a last resort, if the counter keeps climbing, the DTU is restarted. notice that this only targets unresponsive inverters which are reachable. unreachable inverters are not restarted and do not cause a DTU reboot. this is important for solar-driven inverters, which are unreachable during the night. the DPL will not calculate a new limit and hence the updateInverter() method will do nothing while the target inverter is unreachable. publish the timeout counter to MQTT for monitoring purposes.
saves redundant code, reducing flash usage.
this allows to use two VE.Direct interfaces, as there is no conflict regarding HW serial port 2 after making the battery interfaces use serial port 0 on devices with USB CDC. on those chips HW serial 0 is free to be used since serial messages are written through the USB interface directly.
merge upstream tag v24.4.12, resolve conflicts (helgeerbe), fix eslint errors (schlimmchen) and adopt new web api method to save code duplication (schlimmchen).
Merge upstream v24.4.24
when calculating efficiency, we need to take into account that the load might also sink a significant amount of current and power, which adds to the total output of the charge controller.
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.
This merges the current development branch into the master branch, preparing a release.