Skip to content

move feed_in_limit and feed_in_yield - #3812

Open
LKuemmel wants to merge 11 commits into
masterfrom
feature_move_feed_in_limit
Open

move feed_in_limit and feed_in_yield#3812
LKuemmel wants to merge 11 commits into
masterfrom
feature_move_feed_in_limit

Conversation

@LKuemmel

@LKuemmel LKuemmel commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

UI openWB/openwb-ui-settings#1049

  • feed in limit aktiv übernehmen, Einträge aus Ladeprofil entfernen
  • feed in limit inaktiv übernehmen, Einträge aus Ladeprofil entfernen
  • feed in limit aktivieren
  • feed in yield mit 5 kW übernehmen, auf 7kW ändern
  • bat mode mit Speicher-SoC übernehmen, auf Fahrzeug umstellen
  • switch on threshold mit 1500W übernehmen, auf 2kW ändern
  • switch on delay mit 70s übernehmen, auf 55s ändern
  • switch off threshold mit 500W übernehmen, auf 1kW ändern
  • switch off delay mit 90s übernehmen, auf 75s ändern
  • phase switch delay mit 6 Min übernehmen, auf 8 Min ändern
  • control range mit Bezug übernehmen, auf Einspeisung ändern
  • bat min soc mit 55% übernehmen, auf 60% ändern
  • bat max soc auf 75% übernehmen, auf 80% ändern
  • power discharge mit 4.5 kW übernehmen, auf 6.2kW ändern
  • power discharge active mit True übernehmen, auf False ändern
  • power reserve mit 2.3kW übernehmen, auf 2.6kW ändern
  • power reserve active mit True übernehmen, auf False ändern
  • retry failed phase switches mit True übernehmen, auf False ändern

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 thread packages/helpermodules/update_config.py Outdated
Comment thread packages/helpermodules/subdata.py
Comment thread packages/control/loadmanagement.py Outdated
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):

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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:1619 still publishes openWB/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_reserve as 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:16 still publishes battery priority to .../pv_charging/bat_mode, while processMessages.ts:41 subscribes only to .../pv_charging/# and parses bat_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:22 publishes .../pv_charging/bat_mode, and processMessages.ts:32 subscribes 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/mode and 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.py tests 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
LKuemmel marked this pull request as ready for review August 19, 2026 09:04
@LKuemmel
LKuemmel force-pushed the feature_move_feed_in_limit branch from 53705d9 to ee65090 Compare August 19, 2026 09:35
@LKuemmel
LKuemmel force-pushed the feature_move_feed_in_limit branch from ee65090 to e4e7e49 Compare August 19, 2026 10:32
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