forked from tbnobody/OpenDTU
-
Notifications
You must be signed in to change notification settings - Fork 67
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 2025.01.09 #1510
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 need to wait for new inverter stats from all inverters after they processed their last respective power limit update command. otherwise new limits will be calculated based on outdated output power values.
re-using the unconditional full solar-passthrough implementation does not work if the battery is full (full solar-passthrough active) while the grid consumption is higher than the solar output. we then only produce as much power as is available from the charge controllers, where we actually should match the grid cosumption by also using the battery's power. notice that this makes "uncondictional full solar-passthrough" (the DPL mode of operation set through MQTT) something different than just "full solar-passthrough", as was before #1216 (support for multiple DPL inverters) was merged.
* avoid redundant information * log missing information/settings * improve reading flow * drop function names in prefix
this is probably a merge hickup, as the loop was implemented downstream, and the Utils::skipBom() function comes from upstream.
this function does all the conversions from legacy configuration settings into the current config schema. in the future, we also have the OpenDTU-OnBattery-specific config version value available to easily distinguish different config schemas.
that loss factor is not only used in the context of solar-passthrough. for that reason, the setting was renamed. the web UI is updated accordingly. this commit includes minor updates to other DPL language tokens to better match the support for multiple inverters. one obsolete token was removed.
when starting up, the current limit set at the inverter is not known for a couple of minutes (see upstream FAQ). to speed things up and to make sure that the current limit is eventually known (which it is not always, see #1427), the DPL now sends the lower power limit proactively.
avoid re-calculation of the load-corrected voltage within the same DPL loop, as the calculation is quite costly.
if variables are set with 'const foo = {} as Inverter', then 'foo.serial' will be undefined, causing warnings and errors when using InputSerial.
as shown in #1432, the Huawei AC charger sends signed values to communicate the temperature. given that the value range for all other data points is expected to be less than ~2 million, we now interpret all data as signed values.
these were not removed after refactoring the handling of multiple inverters in the web UI while making progress on #1216.
the config hint "inverters must be configured to be send/receive command" shall only show if a *governed* inverter has one of the communication switches disabled.
Github announced to switch the "ubuntu-latest" image to version 24.04: actions/runner-images#10636 this starts shortly, but takes three weeks. to control when we use the new image, we explicitly select the new image now.
* increase the spacing between the icon and the text. * put the text into its own box so it does not flow around the icon. * vertically center the icon to account for multiple lines of text. * vertically center the text to account for a single line of text. closes #1441.
I assumed that 'isSunsetAvailable' tells us if NTP is working and we got the correct time and timezone but actually it tells us if sunrise/sunset exists for the current timeperiod in the current timezone.
Remove default scaling/compensation for unused inputs and add hints why and when overscaling should be turned on or off.
use separate files to hold the controller logic and the CAN/data handling parts of the Huawei AC charger implementation. move the respective classes to new file system paths and C++ namespaces in the process.
this change only shows a few added/removed newlines when inspecting the commit using `git show --ignore-all-space`.
the ESP is restarted, so the removed code is not executed at all.
* move conversion of PSU-specific values to floats with SI units into hardware interface. * use enum class values to identify settings and values. * use a queue to manage settings to be sent. * use a map to manage received values, including the timestamp they were received. * move pin handling down to hardware interface implementation, as only it knows what pins to use for what and another implementation will use a different set of pin definitions. * make the power pin to control the slot detect relay optional.
these pins will be used to talk directly to a CAN transceiver using the TWAI controller.
this changeset adds support for talking to the Huawei grid charger using a CAN transceiver like the VP230 on the OpenDTU Fusion CAN/Iso shield. we need the ESP32's TWAI controller for that, so this feature conflicts with the Pylontech (and all other battery providers using CAN) battery implementation. the user selects which hardware interface to use in the web UI/config.
MCP215: make event-driven. in particular, this allows us to sleep for some time in the loop task instead of only yield()ing, which effectively keeps the core busy all the time because of this task. the newly added ISR now wakes the loop task once the IRQ pin goes low. use unique_ptr<> to manage the lifetime of the MCP2515 CAN lib object as well as the respective SPI host object.
instead of using a large receive queue and a large stack to handle it all, we now use a mechanism similar to the MCP2515 ISR, which alerts the hardware interface of inbound messages once they are available. this is done by creating another task which blocks on twai_read_alerts() and tests if new messages arrived. if so, the upstream task is notified and can process these messages in time.
it seems we are not supposed to do that, but instead use the FreeRTOS-specific functions and structures without #includ'ing the supposedly correct headers.
since this is really about using the internal TWAI controller and "any" compatible external CAN transceiver, we rename the setting.
it is likely that the previous implementation for the MCP2515 CAN controller and transceiver communicating with the Huawei charger did work even without the IRQ pin in use. the new implementation will miss CAN messages if the IRQ pin is not connected or not defined, because it is event-driven, rather than polling with maximum frequency. to avoid people yelling at us because their insane setup worked before but not does not any more, we mark this to be a breaking change.
To prevent further issues with solar passthrough for setups without solarchargers connected to the DTU solar_passhtrough_enabled has been set to false by default.
Guarded all solar_passthrough_enabled checks with a check for config.Vedirect.Enabled to prevent that setups without a solarcharger connected to the DTU from accidentally trying to start full-solar-passthrough. Those checks are needed because the default value for solar_passthrough_enabled is true.
allows to fine-tune the DTU poll interval in steps of 100ms using the web application.
since we reduced the DTU polling interval minimum value, it is desirable to have the data age value increment at the right time point, which is dependent on the sub-second data age when the data was crafted.
To prevent solar powered inverters from getting stuck at their limit because all MPPTs assume shaded we assume that we can increase the limit by 3% of the max power.
currently, only VE.Direct solar chargers can deliver information on the solar power output. this is going to be generalized in the future. this changeset takes the first step and renames the respective feature in the code and web UI. Authored-by: Andreas Böhm <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merges branch development into master.