-
-
Notifications
You must be signed in to change notification settings - Fork 150
fix(inverter): don't silently fall back to a real charge when charge freeze isn't available #4435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+262
−1
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ded6514
fix(inverter): disable charge freeze when no charge_freeze_service is…
chalfontchubby 0503950
fix(inverter): also gate carHolding/boostHolding freeze on set_charge…
chalfontchubby 1a2e595
fix(inverter): scope charge_freeze_service requirement to inverters w…
chalfontchubby 32e639f
fix(inverter): apply the same charge_freeze_service scoping to discha…
chalfontchubby 694cdf7
fix(inverter): surface the freeze-service-missing fallback as Warn, n…
chalfontchubby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -610,7 +610,15 @@ def execute_plan(self): | |
|
|
||
| # Charging/Discharging off via service | ||
| if not isCharging and self.set_charge_window: | ||
| if carHolding or boostHolding: | ||
| if (carHolding or boostHolding) and self.set_charge_freeze: | ||
| # Only attempt the extra charge-side hold when a genuine passive freeze is available | ||
| # (self.set_charge_freeze already accounts for inverter support and charge_freeze_service | ||
| # being configured, #4424/#4432) - otherwise adjust_charge_immediate(soc, freeze=True) | ||
| # silently falls back to a real charge_start_service targeting the current SoC, which | ||
| # some inverters treat as a fresh command each cycle and briefly ramp to full power, | ||
| # producing repeated short full-rate import bursts instead of a passive hold. The | ||
| # discharge-side hold set above (pause/rate/reserve) already prevents discharge, so | ||
| # falling back to a plain charge-stop is safe. | ||
| inverter.adjust_charge_immediate(inverter.soc_percent, freeze=True) | ||
| else: | ||
| inverter.adjust_charge_immediate(0) | ||
|
|
@@ -806,10 +814,32 @@ def fetch_inverter_data(self, create=True): | |
| self.log("Note: Inverter does not support discharge freeze - disabled") | ||
| self.set_export_freeze = False | ||
| self.set_export_freeze_only = False | ||
| elif not (inverter.inv_has_target_soc and inverter.inv_target_soc_used_for_discharge) and not self.args.get("discharge_freeze_service", ""): | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. target_soc_used_for_discharge is often false, surely this throws the normal GE (e.g. GivTCP) to no longer support export freeze Why not just add an inverter capability setting? |
||
| # Same class of bug as #4424/charge_freeze_service above, but on the export side, | ||
| # and with a different fallback condition: adjust_battery_target() only writes a | ||
| # target SoC during export when inv_target_soc_used_for_discharge is also set | ||
| # (inverter.py:1899) - GE/GEC have a target SoC but target_soc_used_for_discharge is | ||
| # False for them, so they get no passive-hold protection from it at all and depend | ||
| # entirely on discharge_freeze_service. Without it, adjust_export_immediate() would | ||
| # silently fall back to a real discharge_start_service call instead of a passive hold. | ||
| self.log("Warn: No discharge_freeze_service configured - discharge freeze disabled") | ||
| self.set_export_freeze = False | ||
| self.set_export_freeze_only = False | ||
| if not inverter.inv_support_charge_freeze: | ||
| # Force off unsupported feature | ||
| self.log("Note: Inverter does not support charge freeze - disabled") | ||
| self.set_charge_freeze = False | ||
| elif not inverter.inv_has_target_soc and not self.args.get("charge_freeze_service", ""): | ||
| # Inverters with a target SoC (GE, GEC, GEE, the cloud integrations, etc.) already | ||
| # achieve a passive hold via adjust_battery_target() and never need | ||
| # charge_freeze_service configured at all - GE's own default template doesn't set it. | ||
| # Only inverters without that fallback (e.g. SIG, FoxESS) rely on charge_freeze_service | ||
| # as their sole freeze mechanism - for those, a missing service means | ||
| # adjust_charge_immediate() silently falls back to a real charge_start_service call | ||
| # instead of a passive hold (#4424), so treat it the same as an inverter type with no | ||
| # support at all. | ||
| self.log("Warn: No charge_freeze_service configured - charge freeze disabled") | ||
| self.set_charge_freeze = False | ||
|
chalfontchubby marked this conversation as resolved.
|
||
| if not inverter.inv_has_reserve_soc: | ||
| self.log("Note: Inverter does not support reserve - disabling reserve functions") | ||
| self.set_reserve_enable = False | ||
|
|
||
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.