Skip to content

SMA NaN check for values at night#3675

Open
seaspotter wants to merge 1 commit into
openWB:masterfrom
seaspotter:fix_sma_nan
Open

SMA NaN check for values at night#3675
seaspotter wants to merge 1 commit into
openWB:masterfrom
seaspotter:fix_sma_nan

Conversation

@seaspotter

Copy link
Copy Markdown
Collaborator

Fix for #3674

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

Fixes SMA Sunny Boy night-standby behavior where the inverter reports sentinel “NaN” values (e.g., -0x80000000) that previously triggered the peak filter and put the module into an error state (Issue #3674).

Changes:

  • Extend SMA “NaN” sentinel constants (INT16/INT32/UINT32/UINT64).
  • Treat sentinel “NaN” power readings as 0 at night (and reset related values) to avoid peak filter errors.
  • Broaden the “NaN” detection for energy counters to include additional sentinel representations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +79 to 84
# WR geht nachts in Standby und gibt einen NaN-Wert für die Leistung aus.
if power_total in (self.SMA_INT16_NAN, self.SMA_INT32_NAN,
-self.SMA_INT16_NAN * 10, -self.SMA_INT32_NAN):
power_total = 0
# WR geht nachts in Standby und gibt einen NaN-Wert für die Leistung aus.
dc_power = 0
currents = [0, 0, 0]
dc_power = 0
currents = [0, 0, 0]
if energy == self.SMA_UINT32_NAN:
if energy in (self.SMA_UINT32_NAN, self.SMA_UINT32_NAN * 100, self.SMA_UINT64_NAN):
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.

[BUG] Peakfilter für SMA bei keiner Produktion nachts

2 participants