-
Notifications
You must be signed in to change notification settings - Fork 81
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
feat(solaredge): Add active battery control with power limit setting #2108
Draft
Xerolux
wants to merge
17
commits into
openWB:master
Choose a base branch
from
Xerolux:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
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
- Neue Funktionalität: - `set_power_limit`: Ermöglicht die dynamische Steuerung des Entladelimits. - Standardwert 5000 W bei `None` (Null-Punkt-Ausregelung). - Validierung von Werten (nur 0-5000 W erlaubt). - Schreibvorgänge erfolgen nur, wenn das bestehende Limit abweicht. **Hinweis:** Für die aktive Steuerung muss der Speicher auf **Control Mode 4 (Remote)** gesetzt werden (`StorageConf_CtrlMode (0xE004)`). Dies muss **extern** erfolgen und kann nicht von OpenWB automatisch übernommen werden.
Changes: - Replaced all non-ASCII characters (e.g., "Umlauts") with UTF-8-safe alternatives to avoid encoding issues. - Ensured all error and debug messages use encoding-safe text, replacing "Ungültige" with "Ungueltige".
- Added `blocked` mode to `set_power_limit` to set discharge limit to 0 W, allowing battery usage to be disabled (e.g., for fast charging without battery). <- not supported from OpenWB at moment - Introduced robust handling for advanced power control activation: - Confirm activation using a commit register (57741). - Ensured redundant writes are avoided through checks. - Improved validation logic for power limits with explicit error logging.
- Added detailed error messages for Modbus register read failures - Optimized power limit setting to avoid unnecessary writes"
- Refactored float conversion function - Ensured proper spacing after function definitions to comply with PEP8
- Ensured Modbus registers are only written when necessary to prevent EEPROM wear - Implemented `ensure_remote_control_mode()` to verify and set remote control mode (57348) only once - Improved error handling for `read_state()` to prevent crashes - Standardized register access with proper checks before writing values - Introduced helper function for payload builder to reduce redundancy - Enhanced logging for better debugging and clarity - Adjusted type hints in `set_power_limit()` to support future flexibility Tested and verified correct behavior for setting power limits and enabling APC.
feat: Optimierung der Solaredge-Batteriesteuerung - Kommentare für alle Funktionen hinzugefügt - Code gemäß PEP8 formatiert (max. 100 Zeichen pro Zeile) - Unnötige Schreibvorgänge reduziert, um Modbus-Kommunikation zu minimieren - Verbesserte Fehlerbehandlung mit log.exception für besseren Debugging-Support - Float-Wertevergleiche mit Toleranz für präzisere Limit-Checks optimiert
Ich habe hier noch ein bisschen die Nutzung der Profile der SE Monitorplattform getestet. |
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.
set_power_limit
: Ermöglicht die dynamische Steuerung des Entladelimits.None
(Null-Punkt-Ausregelung).