Skip to content

Portal start/stop and SendLocalList send untranslated OCPP 2.1 commands to OCPP 1.6 stations #30

Description

@MarcoSpittka

Problem

Drivers cannot stop an OCPP 1.6 session from the portal. The station receives the OCPP 2.1 command as is:

[2, "…", "RequestStopTransaction", {"transactionId": "4"}]

and a KEBA KC-P30 answers CALLERROR InternalError.

sendOcppCommandAndWait() forwards its optional version to the command listener, which then dispatches the command unchanged (dispatcher.sendCommand), because a caller passing a version is expected to send a version-native payload. Without a version the listener uses sendVersionAwareCommand, which translates RequestStopTransaction to RemoteStopTransaction with an integer transactionId for 1.6 stations.

Several callers build OCPP 2.1 payloads but still pass the station protocol:

  • portal start and stop (routes/portal/charger.ts: start, TxInProgress recovery stop and retry start, session stop),
  • guest start (routes/portal/guest.ts),
  • stop of an active session from the CSMS (routes/stations.ts, POST /stations/:id/evses/:evseId/stop-active-session),
  • SendLocalList (routes/local-auth-list.ts, whose comment already says "2.1 format; command-translation handles 1.6").

So remote start, remote stop and the local list do not work with OCPP 1.6 stations from these paths.

Proposed fix (PR follows)

Do not pass the version from these callers so the existing translation applies. triggerAndWaitForStatus() builds a version-native payload and keeps passing it. Document the version parameter.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions