Skip to content

SMA Bat Sunny Island control / combine bat modules Sunny Boy#3363

Open
seaspotter wants to merge 29 commits into
openWB:masterfrom
seaspotter:feature_sma_bat
Open

SMA Bat Sunny Island control / combine bat modules Sunny Boy#3363
seaspotter wants to merge 29 commits into
openWB:masterfrom
seaspotter:feature_sma_bat

Conversation

@seaspotter
Copy link
Copy Markdown
Contributor

UI Änderungen: openWB/openwb-ui-settings#976

Es gab bisher 3 verschiedene Batterie Module für den sma_sunny_boy (SBS, Hybrid und Tesvolt), dieser PR bringt alles zusammen und macht nur noch eine Auswahl nötig, so wird der Code deutlich vereinfacht und kombiniert und so ist auch eine Speichersteuerung für Sunny Boy Storage möglich. Einzig ein Tesvolt Speicher ist damit nicht steuerbar.

Zudem enthält es die getestete und funktionierende Speichersteuerung für den Sunny Island. Der Feature Branch dafür kann gelöscht werden: https://github.com/openWB/core/tree/feature_bat_control_sunny_island

Eine Config Update Routine ist auch enthalten, bisher ungetestet, sollte aber die Config eigentlich sauber updaten.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Diese PR konsolidiert die bisher getrennten SMA Sunny Boy Batterie-Module (Hybrid/SBS/Tesvolt) in ein gemeinsames, versionsbasiertes Batterie-Modul und ergänzt/aktiviert die Speichersteuerung (Power-Limit) für SMA Sunny Island / Tripower X. Zusätzlich wird eine Datastore-Migrationsroutine eingeführt, um bestehende Konfigurationen auf die neue Struktur zu heben.

Changes:

  • SMA Sunny Boy: Zusammenführung der Batterie-Implementierungen in ein einziges bat-Modul mit version (hybrid/sbs/tesvolt) und Entfernen der alten Spezial-Module.
  • SMA Sunny Island: Ergänzung der Batteriesteuerung via set_power_limit() (externe Steuerung per Modbus).
  • Konfigurationsmigration: Datastore-Upgrade 123 zur automatischen Übernahme/Mapping alter SMA-Batterie-Komponenten-Typen.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/modules/devices/sma/sma_sunny_island/config.py UI/Config-Bezeichnungen für Sunny Island / Tripower X angepasst.
packages/modules/devices/sma/sma_sunny_island/bat.py Battery-Update refactored + neue Power-Limit-Steuerung (Modbus Register Writes).
packages/modules/devices/sma/sma_sunny_boy/device.py Entfernt alte Battery-Component-Typen/Factories, nur noch ein bat-Typ.
packages/modules/devices/sma/sma_sunny_boy/config.py Neues version-Feld für Batterie-Konfiguration; entfernt hybrid aus Inverter-Config.
packages/modules/devices/sma/sma_sunny_boy/bat.py Vereinheitlichte Batterie-Logik für hybrid/sbs/tesvolt + (teilweise) Power-Limit-Steuerung.
packages/modules/devices/sma/sma_sunny_boy/inverter.py Refactor: read() entfernt, Vorzeichenbehandlung umgestellt; Store-Write direkt in update().
packages/modules/devices/sma/sma_sunny_boy/bat_version.py Neue Enum zur Auswahl der Batterie-Variante.
packages/modules/devices/sma/sma_sunny_boy/bat_tesvolt.py Entfernt (Logik in unified bat.py aufgegangen).
packages/modules/devices/sma/sma_sunny_boy/bat_smart_energy.py Entfernt (Logik in unified bat.py aufgegangen).
packages/helpermodules/update_config.py Datastore-Version auf 123 + neue Migration für SMA Sunny Boy Battery-Module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/modules/devices/sma/sma_sunny_boy/bat.py
Comment thread packages/modules/devices/sma/sma_sunny_boy/bat.py Outdated
Comment thread packages/modules/devices/sma/sma_sunny_boy/bat.py Outdated
Comment thread packages/modules/devices/sma/sma_sunny_boy/inverter.py
Comment thread packages/modules/devices/sma/sma_sunny_boy/inverter.py Outdated
Comment thread packages/helpermodules/update_config.py Outdated
Comment thread packages/modules/devices/sma/sma_sunny_island/bat.py
@seaspotter
Copy link
Copy Markdown
Contributor Author

Änderungen von Copilot umgesetzt, nur mit dem Fehler beim Pytest kann ich leider nichts anfangen,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants