Skip to content

Fix OCPP 1.6 simulator profile config#229

Open
lewbei wants to merge 1 commit into
ChargePi:v2from
lewbei:fix-ocpp16-simulator-profiles
Open

Fix OCPP 1.6 simulator profile config#229
lewbei wants to merge 1 commit into
ChargePi:v2from
lewbei:fix-ocpp16-simulator-profiles

Conversation

@lewbei
Copy link
Copy Markdown

@lewbei lewbei commented May 12, 2026

Fixes #150.

This keeps the OCPP 1.6 runtime profile list advertised to the central system, but only passes profiles supported by ocpp-manager into default configuration creation and configuration-manager validation.

Changes:

  • build the default OCPP 1.6 config from Core + LocalAuthListManagement only
  • keep SupportedFeatureProfiles advertising Core, Reservation, RemoteTrigger, and LocalAuthListManagement
  • add default config keys needed by startup validation and reservation support
  • treat Core as already configured in the runtime profile loop
  • register LocalAuthListManagement validation for local auth instead of re-registering core validation
  • remove the empty custom-key update handler registration

Verification:

docker run --rm -v "${PWD}:/src" -w /src golang:1.25 bash -c "apt-get update >/dev/null && apt-get install -y pkg-config libnfc-dev >/dev/null && /usr/local/go/bin/gofmt -w cmd/ocpp_v16_profiles.go cmd/ocpp_v16_profiles_test.go cmd/run.go internal/chargepoint/v16/charge_point.go internal/chargepoint/v16/settings.go internal/chargepoint/v16/profiles_test.go && /usr/local/go/bin/go test ./cmd && /usr/local/go/bin/go test ./internal/pkg/configuration/manager && /usr/local/go/bin/go test ./internal/chargepoint/v16 -run 'TestSetProfilesFromConfig'"

Note: the full ./internal/chargepoint/v16 package currently has unrelated existing nil-pointer failures in older tests that construct partially initialized charge points. The focused startup-profile tests added here pass.

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: Docker container OCPP profiles prevent simulator mode

1 participant