forked from tbnobody/OpenDTU
-
-
Notifications
You must be signed in to change notification settings - Fork 69
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.23 #796
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
This triggers a re-fetch of the hardware information. Especially 124097 seems to be a wrong read-out.
by default and until this change, we assumed that the inverter controlled by the DPL is powered by a battery. not all users have a battery in their system. they still use the DPL to achieve net-zero export. those users can now tell the DPL that their inverter is powered by solar modules rather than a battery and the DPL will behave accordingly.
avoid shutting down the inverter at all if the calculated power limit falls below the lower power limit or if the power meter value is outdated. do this only if the inverter is setup to be solar powered.
the allocated memory to create the JSON with onBattery-specific totals for the live view was too little to contain all values, which are sent regularly.
…tional DPL: Explicit Support for solar-powered inverters
the exp_aft value is in seconds.
publish DPL thresholds to MQTT, add support for setting powerlimiter thresholds via MQTT, and make these auto-discoverable for Home Assistent.
* fix logic in HomeAssistent handler * also publish voltage thresholds (not just SoC thresholds) * do not publish irrelevant thresholds to MQTT. if the inverter is solar-powered, no thresholds are effectively in use by the DPL and it therefore makes no sense to publish them to the broker. similarly, if no battery interface is enabled or the SoC values are set to be ignored, the SoC thresholds are effectively not in use and will not be published to the broker. * make HA auto-discovery expire. this makes auto-dicovered items disappear from Home Assistent if their value is no longer updated. changes to settings which cause other thresholds to be relevant will then be reflected in Home Assistent even if some thresholds are no longer maintaned in MQTT. * force HA update when related settings change enabling VE.Direct shall trigger an update since solar passthrough thresholds become relevant. similarly, enabling the battery interface makes SoC thresholds become relevant. there are more settings in the power limiter that also influence the auto-discoverable items. * break very long lines
currently this is only supported by the Pylontech battery provider, as it reports a "charge battery immediately" alarm. this will also be implemented by the JK BMS provider, and possibly also by the smart shunt provider. the method will be used to determine whether or not to start charging the battery using the (Huawei) charger.
Previously some old settings from previous inverters could have been shown in a new inverter
now that users can tell the DPL that their inverter is not powered by a battery but powered by solar panels, we shall not restart inverters to reset the daily yield value, if they are solar powered. these inverters will reboot every night by themselves.
* remove/comment unused variables to avoid compiler warnings * cleanups: fix indention and style, make variable private, implement getters in header and make const. * optimize message output: respect verbose logging setting. prefix output with SMA_HM. * use newly introduced mutex in PowerMeterClass also for SMA HomeManager * refactor code for readibility, unindent where possible.
in your pin_mapping.json, add a powermeter object like this: [ { "name": "My Board", ... "powermeter": { "rx": <num>, "tx": <num>, "dere": <num> }, ... } ] the SML power meter requires the rx pin to be set. the SDM power meter requires the rx and tx pins are set. the "dere" pin pin is optional and if set, this pin controls the driver enable and receiver enable pins of the RS485 transceiver. the SDM library handles this pin. closes #771.
merges upstream v24.3.15
an error was made when determining whether or not to push a VE.Direct MPPT's state through the websocket based on its data's age.
determine the amount of controllers actually in use dynamically, especially to avoid indices which are invalid, causing an error to be printed, even though the user did not do anything wrong.
when consuming from the grid, the power meter value shall be positive, and it shall be negative when exporting power.
Due to the latest live view api changes, I revert the maximum number of supported inverters to the upstream default (10).
on the "main" live data websocket this can happen if no OnBattery-specific data is available to sent but the empty JSON document is still sent, which trips the web application. publishing null in the battery live data websocket also trips the web application, which rightfully assumes a valid object if data is received through the websocket.
* updating the SoC or value shall also update the general timestamp, as the latter is defined as "any value changed", which includes SoC and voltage, of course. * if the last update is not a valid timestamp at all, the updateAvailable method must always return false, obviously.
PLLIMIT would not (always) be part of the JSON string transmitted to the web application and trip it. with the help of the ArduinoJson assistant, new values to use in the response size calculation were introduced. also, importantly, a constant offset was added for the DPL status and the JSON structure sourrounding the MPPTs.
in case the user defines the respective pins, an MPPT controller will be setup and the websocket would previously publish its invalid data even if no data at all was received. this lead to using an invalid index and to publish a useless card. instead, skip those controllers. if the connection to a controller breaks, it will always present as a card in the live view with the respective serial number and the last known data.
this method calls the overflowed() method on the respective DynamicJsonDocument and prints a respective message if not all data could be added to the DynamicJsonDocument.
users are manipulating the DPL using HTTP POST requests. often they are requesting the current settings using HTTP GET on the respective route, then change a particular settings, and send all the data back using HTTP POST. if they failed to remove the metadata node from the JSON, OpenDTU-OnBattery would not be able to process the JSON due to its size. the web app does not submit the metadata. to avoid problems, the metadata is now split from the configuration data.
this commit is empty when inspecting it with --ignore-all-space.
unindent code, prepare this method for re-use on the same HTTP response but with a different JSON path.
if only a single request was made (switch "Individual HTTP requests per phase" is off), the user could still enable phase 2 and phase 3 config and configure a respective JSON path. however, the value was never extracted from the successful HTTP request for phase 1. closes #637.
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.
Includes upstream v24.3.22 and a whole bunch of features/updates/improvements/fixes to OpenDTU-OnBattery-specific parts of the codebase.