Skip to content

split consumer and cp standby threshold - #4204

Merged
LKuemmel merged 1 commit into
openWB:masterfrom
LKuemmel:fixes
Oct 28, 2026
Merged

LKuemmel merged 1 commit into
openWB:masterfrom
LKuemmel:fixes

Conversation

@LKuemmel

Copy link
Copy Markdown
Contributor

references #4203 (comment)

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.

🟢 Approval recommended

The load-specific threshold changes are covered by regression tests across the affected control paths, with no active review issues identified.

No open issues 🎉

What changed in this PR

This pull request separates standby-current thresholds for consumers and chargepoints, allowing low-power consumers to remain recognized as active while preserving the existing chargepoint behavior.

Changes:

  • Adds load-specific get_mean_current() behavior: 0.15 A for consumers and 0.5 A for chargepoints.
  • Updates counter, consumer, chargepoint, surplus-control, and common algorithm logic to use load-specific current calculations.
  • Adds regression coverage for small consumer currents and threshold behavior.
  • An unresolved boundary inconsistency remains for consumers reporting exactly 0.15 A; the mean-current calculation and charge_state classification use different comparisons.
File Description
packages/​control/​load_protocol.py Adds the shared load-specific mean-current implementation and default threshold. The exact-threshold comparison is inconsistent with consumer state classification.
packages/​control/​load_protocol_test.py Tests consumer and chargepoint threshold differences.
packages/​control/​counter.py Uses load-specific current calculations in counter handling.
packages/​control/​counter_test.py Covers small consumers with unknown phase configuration.
packages/​control/​consumer/​consumer.py Applies the consumer threshold when determining minimum and required current.
packages/​control/​consumer/​consumer_test.py Tests that small running consumers remain enabled.
packages/​control/​chargepoint/​chargepoint.py Uses the chargepoint-specific current calculation for logging.
packages/​control/​algorithm/​utils.py Makes the charging-current threshold configurable.
packages/​control/​algorithm/​utils_test.py Verifies the unchanged default threshold behavior.
packages/​control/​algorithm/​surplus_controlled.py Uses load-specific current values in surplus regulation.
packages/​control/​algorithm/​surplus_controlled_test.py Tests current limiting for small consumers.
packages/​control/​algorithm/​common.py Uses load-specific current values in load-management calculations.
packages/​control/​algorithm/​common_test.py Tests that small consumer current is retained during load management.

Review effort: Lite

@LKuemmel
LKuemmel merged commit 12d729b into openWB:master Oct 28, 2026
1 check passed
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