Skip to content

Fix post-connect stability for Grizzl-E and similar OCPP 1.6 chargers#6

Open
lortiejp wants to merge 1 commit into
djiesr:mainfrom
lortiejp:fix/post-connect-stability
Open

Fix post-connect stability for Grizzl-E and similar OCPP 1.6 chargers#6
lortiejp wants to merge 1 commit into
djiesr:mainfrom
lortiejp:fix/post-connect-stability

Conversation

@lortiejp
Copy link
Copy Markdown

@lortiejp lortiejp commented Apr 4, 2026

Summary

This PR fixes a post-connect instability seen with Grizzl-E chargers using OCPP 1.6.

In practice, the charger could connect, start boot/setup, then fall into reconnect/setup loops during the post-connect phase.

Changes

  • serialize post_connect execution to avoid duplicate concurrent setup runs
  • ignore duplicate post-connect triggers from boot notification / monitor backstop
  • cancel pending post-connect work when the connection stops
  • make GetConfiguration(HeartbeatInterval) timeout non-fatal
  • avoid the extra MeterValuesSampledData query/configuration round-trip that can destabilize Grizzl-E chargers
  • persist negotiated measurands and disable autoconfig after a successful negotiation
  • add targeted tests for duplicate scheduling, heartbeat timeout handling, and measurand autodetect flow

Files

  • custom_components/ocpp/chargepoint.py
  • custom_components/ocpp/ocppv16.py
  • tests/test_post_connect.py

Validation

Validated against a real Grizzl-E charger setup showing:

  • stable OCPP connection
  • successful StartTransaction / StopTransaction
  • MeterValues received
  • Heartbeat received

Local py_compile passed.

I was not able to complete full local pytest execution on macOS because of an old native dependency (lru-dict) failing to build there, so CI should be the source of truth for the full test run.

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.

1 participant