Qcells, Solax active battery control#3360
Open
LKuemmel wants to merge 6 commits into
Open
Conversation
07bebf7 to
4575fd2
Compare
* adding active battery control for qcells and new field for overload security * remove field for max_power and use max_charge_power and max_discharge_power instead * Apply suggestion from @seaspotter Co-authored-by: SeaSpotter <florian.horch@gmail.com> * Apply suggestions from code review Co-authored-by: SeaSpotter <florian.horch@gmail.com> * Update packages/modules/devices/qcells/qcells/bat.py Co-authored-by: SeaSpotter <florian.horch@gmail.com> * Indentation corrected * remove whitespaces --------- Co-authored-by: SeaSpotter <florian.horch@gmail.com>
* adding active battery control for qcells and new field for overload security * remove field for max_power and use max_charge_power and max_discharge_power instead * fix: switch qcells battery control to mode 1 with dynamic timing; mode 8 was not stable
* adding active battery control for qcells and new field for overload security * remove field for max_power and use max_charge_power and max_discharge_power instead * fix: stabilize QCells active battery control in mode 1 Reworked QCells battery control to a stable Mode 1 workflow aligned with the validated HA behavior. The target calculation was corrected to avoid unintended forced charging, import limiting was applied consistently for net import control, and the full Mode 1 control payload is now written each cycle with dynamic timing based on the configured openWB control interval.
…ming (#3318) * adding active battery control for qcells and new field for overload security * remove field for max_power and use max_charge_power and max_discharge_power instead * fix: align QCells Mode 1 battery control with openWB semantics and timing
#3320) * adding active battery control for qcells and new field for overload security * remove field for max_power and use max_charge_power and max_discharge_power instead * fix: switch QCells remote control to Enabled Battery Control (mode 12) * fix: switch QCells battery control to SolaX mode 4 push-power with atomic Modbus block writes
4575fd2 to
9aecbdd
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds active battery power control for QCells/Solax devices via Modbus remote-control registers, with minimal tests for the openWB-to-Mode4 power sign conversion.
Changes:
- Adds QCells battery
set_power_limitsupport using Mode 4 push-power Modbus writes. - Adds helper logic for converting openWB charge/discharge semantics to QCells/Solax push-power semantics.
- Extends test mocking and adds basic QCells battery tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
packages/modules/devices/qcells/qcells/bat.py |
Implements active battery control and Modbus payload writing for QCells/Solax batteries. |
packages/modules/devices/qcells/qcells/bat_test.py |
Adds tests for sign conversion of Mode4 push power. |
packages/modules/conftest.py |
Adds a mock for BinaryPayloadBuilder so modules importing it can load in tests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+131
to
+133
| with self.client: | ||
| # data_type=None with list payload writes a contiguous FC16 block. | ||
| self.client.write_register(REMOTE_CONTROL_MODE_REG, payload, unit=unit) |
Contributor
Author
There was a problem hiding this comment.
Nicht unbedingt erforderlich.
…he SolaX battery module. (#3351) * adding active battery control for qcells and new field for overload security * remove field for max_power and use max_charge_power and max_discharge_power instead * fix(solax): enable mode4 battery control for g3 hybrids only Implement active battery control via SolaX Remote Control Mode 4 in the SolaX battery module. Gate controllability to version g3 (Gen3/Gen4 Hybrid) and keep g2/g4 non-controllable; add unit tests for sign mapping and version gating.
This file contains hidden or 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
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.
openWB/openwb-ui-settings#979