Basics · Video 4 of 19

OCPP-J message types: CALL, CALLRESULT and CALLERROR explained

Read a raw OCPP-J message and tell a request, an answer and an error apart.

Length: 3:30

In this video

Message type 2, 3 and 4, the message ID, and how to see who started an exchange in a charger log.

Chapters

Transcript

OCPP-J messages: CALL, CALLRESULT and CALLERROR. Read a raw OCPP message and tell a request, an answer and an error apart. Open Logs in the sidebar, or the Logs tab of a charger. Each OCPP message is a short, readable line. Open a row. Under Raw line is the line as the server wrote it, with the message inside. Find the word Received or Sending in it. That is seen from the central system: Received came from the charger.

Sending went to it. Right after that word comes the message itself: a short list in square brackets. Its first number says what kind of message it is: 2, 3 or 4. 2 is a CALL: a request. Here a charger in the Talvara garage asks if a resident's card may charge. After the 2 comes the message ID, here 5. Then the action, Authorize. Then the content in curly brackets: the idTag. The side that asks picks the message ID.

It can be a short number or a long random text. 3 is a CALLRESULT: the answer. It holds only the same message ID, 5, and the content: here, Accepted. An answer never names the action. The message ID alone ties it to its request. Powerfill pairs them for you: in a row, Show request and Show reply jump between the two. Some answers are just empty curly brackets. The answer to StatusNotification has nothing to say, and that is normal.

4 is a CALLERROR: the other side could not handle the request. It holds the message ID, an error code, a description and details. NotImplemented is one of OCPP's own error codes: the side that answers does not know that action. In Powerfill's log, the row names the action and lists the Error code. An error is not a refusal. Rejected comes in a normal answer, a 3: the charger understood, and said no.

A 4 means the request itself could not be handled. So look at the request it answers. Who started an exchange? Look at the 2. Received with a 2: the charger asked. Sending with a 2: Powerfill asked. That is what happens with every command you give. Each request gets one answer with its ID: a 3 or a 4. If a request row has no Show reply, no answer is in the log. Try it with a command. Say you send Unlock Connector to a charger at the Talvara garage.

First comes a line with Sending and a 2: the command and its new message ID. Then a line with Received and a 3, carrying the same ID: the charger's answer. Read its status: Unlocked means it worked. If that second line is a 4, or never comes, do not assume the command worked. You can now read a raw OCPP message: what kind it is, who asked, and which answer belongs to which request.