move feed_in_limit and feed_in_yield - #3812
Open
LKuemmel wants to merge 11 commits into
Open
Conversation
LKuemmel
force-pushed
the
feature_move_feed_in_limit
branch
from
August 18, 2026 09:17
5ce469a to
57f9a88
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Moves PV-surplus and battery configuration into dedicated MQTT topic hierarchies and makes the feed-in limit global.
Changes:
- Migrates MQTT topics and datastore configuration.
- Updates charging control logic and data models.
- Removes per-charge-point feed-in-limit controls and updates themes/APIs.
Reviewed changes
Copilot reviewed 38 out of 38 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
simpleAPI/src/ParameterHandler.php |
Updates battery-mode topic. |
simpleAPI/simpleAPI_mqtt.py |
Updates battery API topics. |
packages/modules/web_themes/standard_legacy/web/setupMqttServices.js |
Updates subscription topic. |
packages/modules/web_themes/standard_legacy/web/processAllMqttMsg.js |
Updates message handling and removes per-vehicle setting. |
packages/modules/web_themes/standard_legacy/web/index.html |
Updates battery topic and removes feed-in toggle. |
packages/modules/web_themes/koala/source/src/stores/mqtt-store.ts |
Migrates store topics and feed-in API. |
packages/modules/web_themes/koala/source/src/stores/mqtt-store-model.ts |
Removes per-template feed-in field. |
packages/modules/web_themes/koala/source/src/components/ChargePointPvSettings.vue |
Removes feed-in toggle. |
packages/modules/web_themes/colors/source/src/components/chargePointList/model.ts |
Removes feed-in model property. |
packages/modules/web_themes/colors/source/src/components/chargePointList/cpConfig/ConfigPv.vue |
Removes feed-in control. |
packages/modules/display_themes/colors/source/src/components/chargePointList/model.ts |
Removes feed-in model property. |
packages/modules/display_themes/colors/source/src/components/chargePointList/configPanels/ConfigPv.vue |
Removes feed-in control. |
packages/modules/display_themes/cards/source/src/views/ChargePointsView.vue |
Removes feed-in UI and handler. |
packages/modules/display_themes/cards/source/src/stores/mqtt.js |
Updates battery topic and removes getter. |
packages/modules/display_themes/cards/source/src/components/Battery/BatteryModeModal.vue |
Updates battery-mode publishing. |
packages/modules/display_themes/cards/source/src/App.vue |
Updates battery subscription. |
packages/helpermodules/update_config.py |
Adds datastore migration and new defaults. |
packages/helpermodules/subdata.py |
Routes nested surplus topics. |
packages/helpermodules/setdata.py |
Validates new topic hierarchy. |
packages/helpermodules/create_debug.py |
Reads reorganized configuration. |
packages/control/loadmanagement.py |
Applies global feed-in configuration. |
packages/control/loadmanagement_test.py |
Updates changed helper signature. |
packages/control/general.py |
Introduces battery and surplus configuration models. |
packages/control/ev/ev.py |
Uses global surplus configuration. |
packages/control/ev/charge_template.py |
Removes per-template feed-in setting. |
packages/control/counter.py |
Uses global feed-in and surplus settings. |
packages/control/counter_test.py |
Updates surplus tests. |
packages/control/chargepoint/get_phases_test.py |
Updates phase-switch configuration path. |
packages/control/chargepoint/chargepoint.py |
Uses relocated phase-switch setting. |
packages/control/chargepoint/chargepoint_test.py |
Updates configuration path. |
packages/control/bat_all.py |
Uses dedicated battery configuration. |
packages/control/bat_all_test.py |
Updates battery configuration tests. |
packages/control/auto_phase_switch_test.py |
Updates phase-switch signature. |
packages/control/algorithm/surplus_controlled.py |
Applies one global feed-in policy. |
packages/control/algorithm/surplus_controlled_test.py |
Updates surplus-control fixtures. |
packages/control/algorithm/integration_test/conftest.py |
Updates integration configuration. |
packages/control/algorithm/algorithm.py |
Updates phase-switch invocation. |
data/config/mosquitto/public/default-dynamic-security.json |
Migrates MQTT ACL topics. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+108
to
+110
| surplus_config = data.data.general_data.data.chargemode_config.surplus | ||
| if surplus_config.feed_in_limit: | ||
| raw_power_left = max(raw_power_left - surplus_config.feed_in_yield, 0) |
|
|
||
| try { | ||
| $topic = "openWB/set/general/chargemode_config/pv_charging/bat_mode"; | ||
| $topic = "openWB/set/general/chargemode_config/bat/mode"; |
Comment on lines
+771
to
+774
| elif ("openWB/set/general/chargemode_config/surplus/feed_in_yield" in msg.topic or | ||
| "openWB/set/general/chargemode_config/surplus/vehicle/switch_on_threshold" in msg.topic or | ||
| "openWB/set/general/chargemode_config/surplus/vehicle/switch_on_delay" in msg.topic or | ||
| "openWB/set/general/chargemode_config/surplus/vehicle/switch_off_delay" in msg.topic): |
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 38 out of 38 changed files in this pull request and generated 1 comment.
Suppressed comments (4)
simpleAPI/simpleAPI_mqtt.py:853
- This updates the Python MQTT handler, but the same SimpleAPI operation in
simpleAPI/src/ParameterHandler.php:1619still publishesopenWB/set/general/chargemode_config/pv_charging/bat_power_reserve. Requests routed through the PHP handler will therefore report success while writing a topic that the updated backend no longer accepts. Move the PHP handler and its docblock to.../bat/power_reserveas well.
packages/modules/web_themes/colors/source/src/components/chargePointList/model.ts:73 - The colors web theme migration is incomplete:
src/assets/js/sendMessages.ts:16still publishes battery priority to.../pv_charging/bat_mode, whileprocessMessages.ts:41subscribes only to.../pv_charging/#and parsesbat_mode. After the backend moves the value to.../bat/mode, this theme can neither receive nor change battery priority. Update the source topic map/subscription/parser and rebuild its committed web assets.
private _instantTargetPhases = 0
packages/modules/display_themes/colors/source/src/components/chargePointList/model.ts:159
- The colors display theme still uses the removed battery-mode namespace:
src/assets/js/sendMessages.ts:22publishes.../pv_charging/bat_mode, andprocessMessages.ts:32subscribes only to.../pv_charging/#. Consequently battery priority becomes stale and its controls write an ignored topic after this migration. Update its publish/subscription/parsing paths to.../bat/modeand rebuild the committed assets.
get pvMinCurrent() {
packages/helpermodules/update_config.py:3487
- There is no test for datastore upgrade 138, although this migration deletes a field from every charge template, merges multiple per-template booleans, moves 15 retained topics, and deletes the old topics.
packages/helpermodules/update_config_test.pytests earlier migrations but never invokes this one, so a regression could silently discard user configuration. Add a migration test covering true/false templates, preservation of moved payloads, removal of old topics, and version 138 being recorded.
def upgrade_datastore_138(self) -> None:
| ("openWB/general/chargemode_config/pv_charging/phase_switch_delay", 7), | ||
| ("openWB/general/chargemode_config/pv_charging/retry_failed_phase_switches", | ||
| PvCharging().retry_failed_phase_switches), | ||
| ("openWB/general/chargemode_config/bat/mode", BatConsiderationMode.EV_MODE.value), |
LKuemmel
marked this pull request as ready for review
August 19, 2026 09:04
LKuemmel
force-pushed
the
feature_move_feed_in_limit
branch
from
August 19, 2026 09:35
53705d9 to
ee65090
Compare
LKuemmel
force-pushed
the
feature_move_feed_in_limit
branch
from
August 19, 2026 10:32
ee65090 to
e4e7e49
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#1049