Skip to content

OCPP: ignore zero energy register after non-zero total - #35853

Merged
premultiply merged 2 commits into
masterfrom
fix/ocpp-zero-energy-35732
Nov 6, 2026
Merged

premultiply merged 2 commits into
masterfrom
fix/ocpp-zero-energy-35732

Conversation

@andig

@andig andig commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

fixes #35732

Some chargers (Huawei SCharger) report Energy.Active.Import.Register as 0 outside transactions. Since a lifetime register is never zero, zero readings are no longer stored. Before the first non-zero reading, total energy is unavailable and the charge rater takes its start value as soon as the first real reading arrives.

  • prevents both negative session energy (stop reads 0) and the spike (start reads 0, e.g. first session after restart)
  • applies to phase-specific energy registers, too
  • a skipped zero reading still counts as a fresh meter update, so meter timeouts and watchdog triggers are unaffected

🤖 Generated with Claude Code

@andig andig added bug Something isn't working devices Specific device support labels Nov 5, 2026
sourcery-ai[bot]

This comment was marked as resolved.

This comment was marked as resolved.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are recorded for the zero-energy filtering change.

No open issues 🎉

2 resolved since last review

Review effort: Balanced

@premultiply
premultiply merged commit e2f0762 into master Nov 6, 2026
15 checks passed
@premultiply
premultiply deleted the fix/ocpp-zero-energy-35732 branch November 6, 2026 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working devices Specific device support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implausible meter values with Huawei SCharger via OCPP (e.g. 519 kWh in 2.5h)

3 participants