Skip to content

Qcells active battery control#3244

Open
Xoffroad wants to merge 7 commits intoopenWB:feature_bat_controlfrom
Xoffroad:qcells-active-battery-control
Open

Qcells active battery control#3244
Xoffroad wants to merge 7 commits intoopenWB:feature_bat_controlfrom
Xoffroad:qcells-active-battery-control

Conversation

@Xoffroad
Copy link
Copy Markdown

@Xoffroad Xoffroad commented Mar 26, 2026

adding active battery control for qcells

@LKuemmel LKuemmel requested a review from ndrsnhs March 26, 2026 08:35
@Xoffroad
Copy link
Copy Markdown
Author

Neues Feld entfernt und auf die Nutzung von max_charge_power und max_discharge_power umgebaut.

Copy link
Copy Markdown
Contributor

@seaspotter seaspotter left a comment

Choose a reason for hiding this comment

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

Mir sei nochmal der Kommentar erlaubt, dass du damit ja im Prinzip jetzt keine zusätzliche Sicherheitsebene einbaust sondern die bereits vorhandene und funktionierende duplizierst und damit ist sie eigentlich unnötig.
Denn schon in der Regelung in ttps://github.com/openWB/core/blob/f3983a443e8f331c1399aeb428f189872185f2ef/packages/control/bat_all.py ist ja sichergestellt das zum einen wenn keine Max Lade-Entladeleistung definiert ist, eine Warnung kommt und zudem das der übergebene power_limit Wert ans Batteriemodul niemals über der Lade- oder der Entladeleistung liegt. Meines Erachtens ist das damit unötig.
In anderen Modulen hat sich zudem power_value etabliert, clamped als Wert ist nicht wirklich sprechend.

Xoffroad and others added 2 commits March 27, 2026 08:53
Co-authored-by: SeaSpotter <florian.horch@gmail.com>
Co-authored-by: SeaSpotter <florian.horch@gmail.com>
@Xoffroad
Copy link
Copy Markdown
Author

Xoffroad commented Mar 27, 2026

Mir sei nochmal der Kommentar erlaubt, dass du damit ja im Prinzip jetzt keine zusätzliche Sicherheitsebene einbaust sondern die bereits vorhandene und funktionierende duplizierst und damit ist sie eigentlich unnötig. Denn schon in der Regelung in ttps://github.com/openWB/core/blob/f3983a443e8f331c1399aeb428f189872185f2ef/packages/control/bat_all.py ist ja sichergestellt das zum einen wenn keine Max Lade-Entladeleistung definiert ist, eine Warnung kommt und zudem das der übergebene power_limit Wert ans Batteriemodul niemals über der Lade- oder der Entladeleistung liegt. Meines Erachtens ist das damit unötig. In anderen Modulen hat sich zudem power_value etabliert, clamped als Wert ist nicht wirklich sprechend.

Jein, mir ist bewusst, das dies an anderer Stelle schon existiert. Ich hatte den Code tatsächlich 1:1 so wie deine Anmerkung jetzt. Aber dann viel mir ein, man kann ja über MQTT die Daten manipulieren und die angesprochene Ermittlung könnte auch mal fehlerhaft sein. Es sollte eine zusätzliche Absicherung sein. Ich habe gestern nochmal die Remotesteuerung von QCells/Solax geprüft. Es scheint so oder so nicht möglich zu sein per Remotecontrol den Wechselrichter dazu zu bringen, Werte zu akzeptieren die außerhalb der festen Einstellungen im Wechselrichter selbst liegen. Solange der Anwender also den Wechselrichter passend zu den Spezifikationen der Batterie konfiguriert hat, ist eine Manipulation außerhalb dieser definierten Grenzen über die Befehle die ich nutze nicht möglich. Somit braucht es die Sicherheitsebene überhaupt nicht.

Edit: die Hinweise in der Oberfläche am Batteriemodul würde ich aber gern lassen, siehe UI Repo.

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

Adds active battery power control support for QCells (Solax-based) batteries by writing Solax/QCells “Mode 8 / Individual Duration” remote control Modbus holding registers.

Changes:

  • Introduces constants for Solax/QCells Mode 8 remote control holding registers (0xA0–0xA7) and default duration/timeout values.
  • Implements set_power_limit() and _write_mode8() in QCellsBat to enable/disable remote control and command charge/discharge power.
  • Marks the QCells battery component as power_limit_controllable().

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

Xoffroad and others added 2 commits March 30, 2026 13:57
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.

4 participants