Fox v2 scheduler fixes#4190
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Fox v2/v3 scheduler and settings handling so “unsupported setting” errors are treated as permanent per-device, with safe defaults applied where appropriate, and so schedule-derived limits are preserved across v3 scheduler writes. It also expands Fox API test coverage for these scenarios and bumps Predbat’s version.
Changes:
- Track and persist per-device “unsupported setting” keys (errno 42015/44096), stop polling/writing them, and apply safe defaults (notably WorkMode as a select).
- Derive certain device settings from scheduler reads (e.g., Export/Import/PV limits, MaxSoc, MinSocOnGrid) and carry stored limits into v3 scheduler writes.
- Add regression tests for unsupported settings, scheduler-derived settings, and request errno handling; update CSpell dictionary; bump version.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| apps/predbat/fox.py | Adds unsupported-setting tracking/defaults, derives settings from schedules, and carries limits into v3 scheduler writes. |
| apps/predbat/tests/test_fox_api.py | Adds tests covering unsupported settings behavior, scheduler-derived settings, and unsupported errno propagation. |
| apps/predbat/predbat.py | Bumps THIS_VERSION to v8.44.2. |
| .cspell/custom-dictionary-workspace.txt | Adds Fox-related terms for spell-checking. |
Comment on lines
+1165
to
+1168
| for group_key, setting_key in SCHEDULE_DERIVED_LIMITS: | ||
| value = self.device_settings.get(deviceSN, {}).get(setting_key, {}).get("value") | ||
| if value is not None: | ||
| extra_param[group_key] = value |
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.
No description provided.