Skip to content

move feed_in_limit and feed_in_yield - #3111

Open
LKuemmel wants to merge 7 commits into
openWB:masterfrom
LKuemmel:move_feed_in_limit
Open

move feed_in_limit and feed_in_yield#3111
LKuemmel wants to merge 7 commits into
openWB:masterfrom
LKuemmel:move_feed_in_limit

Conversation

@LKuemmel

@LKuemmel LKuemmel commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

@benderl benderl added user-management Anpassung an die Benutzerverwaltung erforderlich! ui depends on changes in ui repository labels Feb 17, 2026
@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from c0911c9 to 6d4f1b2 Compare March 12, 2026 05:52
@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from 6d4f1b2 to 060fad3 Compare April 21, 2026 11:31
@benderl

benderl commented May 15, 2026

Copy link
Copy Markdown
Contributor

Die Änderungen an den Topics müssen noch für die Benutzerverwaltung in default-dynamic-security.json umgesetzt werden:

  • Rolle "surplus-charge-configuration-access":
    • ".../feed_in_yield" entfernen (lesen und schreiben)
    • ".../feed_in_limit" hinzufügen (lesen und schreiben)
  • Rolle "general-charge-configuration-access"
    • ".../feed_in_yield" hinzufügen (lesen und schreiben)

@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from 060fad3 to 44ff1fa Compare May 29, 2026 11:28
@LKuemmel
LKuemmel marked this pull request as ready for review June 1, 2026 10:21
@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from b0947e3 to 878b2a8 Compare June 16, 2026 12:25
@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from 878b2a8 to cce1839 Compare July 8, 2026 12:14
@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from cce1839 to 40c8440 Compare July 23, 2026 13:09
@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from 40c8440 to db41828 Compare August 3, 2026 11:43
@LKuemmel
LKuemmel requested a review from Copilot August 5, 2026 07:55

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

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 thread packages/control/counter.py Outdated
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 thread packages/control/general.py Outdated
Comment on lines +33 to +34
mode: BatConsiderationMode = field(default=BatConsiderationMode.EV_MODE.value, metadata={
"topic": "chargemode_config/bat/mode"})
@LKuemmel
LKuemmel force-pushed the move_feed_in_limit branch from bcd8960 to f3e4414 Compare August 5, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui depends on changes in ui repository user-management Anpassung an die Benutzerverwaltung erforderlich!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants