move feed_in_limit and feed_in_yield - #3111
Open
LKuemmel wants to merge 7 commits into
Open
Conversation
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
March 12, 2026 05:52
c0911c9 to
6d4f1b2
Compare
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
April 21, 2026 11:31
6d4f1b2 to
060fad3
Compare
Contributor
|
Die Änderungen an den Topics müssen noch für die Benutzerverwaltung in
|
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
May 29, 2026 11:28
060fad3 to
44ff1fa
Compare
LKuemmel
marked this pull request as ready for review
June 1, 2026 10:21
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
June 16, 2026 12:25
b0947e3 to
878b2a8
Compare
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
July 8, 2026 12:14
878b2a8 to
cce1839
Compare
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
July 23, 2026 13:09
cce1839 to
40c8440
Compare
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
August 3, 2026 11:43
40c8440 to
db41828
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restructures the MQTT topic layout for charge mode configuration by moving battery-related settings under chargemode_config/bat/... and surplus/feed-in related settings under chargemode_config/surplus/..., and removes the per-chargepoint feed_in_limit flag in favor of a global setting.
Changes:
- Renamed MQTT topics for battery mode and related thresholds across backend, APIs, and UIs (legacy + koala + colors + cards).
- Moved feed-in limit/yield handling into the global surplus config and updated control algorithms accordingly.
- Updated validation, defaults, and broker ACLs to reflect the new topic structure and removed obsolete UI controls.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| simpleAPI/src/ParameterHandler.php | Publishes battery mode to the new .../bat/mode topic. |
| simpleAPI/simpleAPI_mqtt.py | Updates battery mode publish topic to .../bat/mode. |
| packages/modules/web_themes/standard_legacy/web/setupMqttServices.js | Subscribes to the new battery mode topic. |
| packages/modules/web_themes/standard_legacy/web/processAllMqttMsg.js | Processes the new battery mode topic; removes per-CP feed-in-limit UI refresh. |
| packages/modules/web_themes/standard_legacy/web/index.html | Updates battery mode data-topic; removes per-CP feed-in-limit toggle. |
| packages/modules/web_themes/koala/source/src/stores/mqtt-store.ts | Updates topics for battery mode + min/max SoC; removes per-CP feed-in-limit computed. |
| packages/modules/web_themes/koala/source/src/stores/mqtt-store-model.ts | Removes feed_in_limit from the charge template model. |
| packages/modules/web_themes/koala/source/src/components/ChargePointPvSettings.vue | Removes computed binding for per-CP feed-in-limit. |
| packages/modules/web_themes/colors/source/src/components/chargePointList/model.ts | Removes per-CP feed-in-limit property and model field. |
| packages/modules/web_themes/colors/source/src/components/chargePointList/cpConfig/ConfigPv.vue | Removes per-CP feed-in-limit UI control. |
| packages/modules/display_themes/colors/source/src/components/chargePointList/model.ts | Removes per-CP feed-in-limit property and model field. |
| packages/modules/display_themes/colors/source/src/components/chargePointList/configPanels/ConfigPv.vue | Removes per-CP feed-in-limit UI control. |
| packages/modules/display_themes/cards/source/src/views/ChargePointsView.vue | Removes per-CP feed-in-limit setter + UI controls. |
| packages/modules/display_themes/cards/source/src/stores/mqtt.js | Reads battery mode from the new .../bat/mode topic; removes per-CP feed-in-limit getter. |
| packages/modules/display_themes/cards/source/src/components/Battery/BatteryModeModal.vue | Publishes battery mode to .../bat/mode. |
| packages/modules/display_themes/cards/source/src/App.vue | Subscribes to the new battery mode topic. |
| packages/helpermodules/update_config.py | Updates valid topics/defaults for new bat/surplus config topics. |
| packages/helpermodules/setdata.py | Updates validation routing for new bat/surplus set-topics. |
| packages/helpermodules/create_debug.py | Adjusts debug output to new config structure. |
| packages/control/loadmanagement.py | Applies feed-in limit/yield via global surplus config during power limiting. |
| packages/control/loadmanagement_test.py | Updates _limit_by_power test for new signature/config sourcing. |
| packages/control/general.py | Introduces ChargemodeConfigBat and ChargemodeConfigSurplus* dataclasses; adds get_feed_in_yield(). |
| packages/control/ev/ev.py | Removes per-template feed-in handling; switches to global surplus config timing and surplus calculation. |
| packages/control/ev/charge_template.py | Removes per-template feed_in_limit field from PV charging template. |
| packages/control/counter.py | Moves control range + usable surplus calculations to global surplus config (and uses General.get_feed_in_yield()). |
| packages/control/counter_test.py | Updates tests to set global surplus feed-in limit and updated messages. |
| packages/control/chargepoint/get_phases_test.py | Uses new surplus vehicle config path for retry flag. |
| packages/control/chargepoint/chargepoint.py | Uses new surplus vehicle config path for retry flag. |
| packages/control/chargepoint/chargepoint_test.py | Updates retry flag config path for tests. |
| packages/control/bat_all.py | Uses new bat config paths (mode, min_soc, max_soc, reserve/discharge settings). |
| packages/control/bat_all_test.py | Updates tests to use ChargemodeConfigBat. |
| packages/control/auto_phase_switch_test.py | Updates test call for new auto_phase_switch signature. |
| packages/control/algorithm/surplus_controlled.py | Removes feed-in-yield parameter plumbing; uses global surplus config for control range logic. |
| packages/control/algorithm/surplus_controlled_test.py | Updates tests to new API and ensures data store init. |
| packages/control/algorithm/integration_test/conftest.py | Updates retry flag config path for integration test data. |
| packages/control/algorithm/algorithm.py | Updates auto phase-switch invocation to new signature. |
| data/config/mosquitto/public/default-dynamic-security.json | Updates ACLs to allow the new bat/surplus topics. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+382
to
+383
| msg = self.SWITCH_OFF_WAITING.format(timecheck.convert_timestamp_delta_to_time_string( | ||
| control_parameter.timestamp_switch_on_off, pv_config.switch_off_delay)) | ||
| control_parameter.timestamp_switch_on_off, surplus_config.switch_off_delay)) |
Comment on lines
33
to
+36
| for mode_tuple, counter in common.mode_and_counter_generator(CONSIDERED_CHARGE_MODES_SURPLUS): | ||
| preferenced_chargepoints, preferenced_cps_without_set_current = get_preferenced_chargepoint_charging( | ||
| get_chargepoints_by_mode_and_counter(mode_tuple, f"counter{counter.num}")) | ||
| cp_with_feed_in, cp_without_feed_in = self.filter_by_feed_in_limit(preferenced_chargepoints) | ||
| if cp_without_feed_in: | ||
| self._set(cp_without_feed_in, 0, mode_tuple, counter) | ||
| feed_in_yield = data.data.general_data.data.chargemode_config.pv_charging.feed_in_yield | ||
| if cp_with_feed_in: | ||
| self._set(cp_with_feed_in, feed_in_yield, mode_tuple, counter) | ||
| self._set(preferenced_chargepoints, mode_tuple, counter) |
Comment on lines
+231
to
+236
| "^openWB/general/chargemode_config/surplus/feed_in_limit$", | ||
| "^openWB/general/chargemode_config/bat/mode$", | ||
| "^openWB/general/chargemode_config/surplus/feed_in_yield$", | ||
| "^openWB/general/chargemode_config/surplus/vehicle/switch_on_threshold$", | ||
| "^openWB/general/chargemode_config/surplus/vehicle/switch_on_delay$", | ||
| "^openWB/general/chargemode_config/surplus/vehicle/switch_off_threshold$", |
Comment on lines
+33
to
+34
| mode: BatConsiderationMode = field(default=BatConsiderationMode.EV_MODE.value, metadata={ | ||
| "topic": "chargemode_config/bat/mode"}) |
LKuemmel
force-pushed
the
move_feed_in_limit
branch
from
August 5, 2026 10:04
bcd8960 to
f3e4414
Compare
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.
UI openWB/openwb-ui-settings#964