fix: debounce grid sensor dropouts and make the failsafe direction configurable#4
Open
bvweerd wants to merge 1 commit into
Open
fix: debounce grid sensor dropouts and make the failsafe direction configurable#4bvweerd wants to merge 1 commit into
bvweerd wants to merge 1 commit into
Conversation
…nfigurable A single 5 s sensor dropout (e.g. an MQTT reconnect) immediately reset the PID and slammed all PV limits to maximum. For zero-export installations, failing to maximum is exactly the wrong direction. - Hold the current actuator state (integrator frozen) for up to 3 consecutive unavailable grid reads before entering failsafe; the repair issue is only raised when failsafe actually engages. - New "Failsafe behaviour" option: maximize (default, unchanged behaviour, for self-consumption setups) or curtail (PV to minimum, for zero-export requirements). Applies both to grid-sensor outages and to the controller being disabled. - Reset the EWM filter on a full outage so the first cycles after recovery are not biased by stale pre-outage state. https://claude.ai/code/session_01RUWpwxbGsgR3PoLHLq4Djz
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.
Problem
Fix
GRID_UNAVAILABLE_TOLERANCE_CYCLES) hold the current actuator state with the integrator frozen. The failsafe and the repair issue only engage when the outage persists; a successful read resets the counter.maximize(default, unchanged behaviour) — PV to full output, for self-consumption setups.curtail— PV to minimum, for zero-export installations.The mode applies both to grid-sensor outages and to the controller being disabled via the enable switch.
Tests
tests/test_grid_failsafe.py: hold-then-failsafe sequencing, counter reset on recovery, curtail mode on outage, curtail mode on disable, and filter re-seeding. Full suite: 131 passed.https://claude.ai/code/session_01RUWpwxbGsgR3PoLHLq4Djz
Generated by Claude Code