Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

What's MessageTypeId in OCPP request payload

In OCPP 1.6, the client (Charging Station) sends a CALL (similar to request in HTTP) to server (Charging Station Management Systems). All CALLs have a strict structure of 4 elements:

  • MessageTypeId (integer)
  • UniqueId (UUID, string)
  • Action (string)
  • Payload (JSON object containing the arguments relevant to the
    Action.)

I have gone through the documentation but I cannot find MessageTypeId. So I want to know whether it is just a random number?

Example request payload:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

[
  2,// <----- I want to know, where I can find this. 
  "a7caa7a1-c309-43bd-af3f-b5c1c4f9657e", 
  "Authorize",
  {
    "idTag": "${req.body.idTag}"
  }
]

>Solution :

MessageTypeId Defines the type of Message, whether it is Call, CallResult or CallError:

MessageType | MessageTypeId | Direction

CALL        |       2       | Client-to-Server

CALLRESULT  |       3       | Server-to-Client

CALLERROR   |       4       | Server-to-Client

You can read more on page 9 of This document .

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading