Docs › OCPP 2.1 › SetDisplayMessage

SetDisplayMessage OCPP 2.1

Der Simulator antwortet mit NotSupported, prüft die Nachricht aber gegen das Schema.

Auch in: OCPP 2.0.1

Request

FeldTypEinschränkungen / Beschreibung
messageobjectPflichtContains message details, for a message to be displayed on a Charging Station.
message.displayobjectA physical or logical component
message.display.evseobjectElectric Vehicle Supply Equipment
message.display.evse.idintegerPflichtminimum 0.0
EVSE Identifier. This contains a number (> 0) designating an EVSE of the Charging Station.
message.display.evse.connectorIdintegerminimum 0.0
An id to designate a specific connector (on an EVSE) by connector index number.
message.display.namestringPflichtmaxLength 50
Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case.
message.display.instancestringmaxLength 50
Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
message.idintegerPflichtminimum 0.0
Unique id within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).
message.prioritystringPflichtenum: AlwaysFront, InFront, NormalCycle
With what priority should this message be shown
message.statestringenum: Charging, Faulted, Idle, Unavailable, Suspended, Discharging
During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station.
message.startDateTimestringformat date-time
From what date-time should this message be shown. If omitted: directly.
message.endDateTimestringformat date-time
Until what date-time should this message be shown, after this date/time this message SHALL be removed.
message.transactionIdstringmaxLength 36
During which transaction shall this message be shown. Message SHALL be removed by the Charging Station after transaction has ended.
message.messageobjectPflichtContains message details, for a message to be displayed on a Charging Station.
message.message.formatstringPflichtenum: ASCII, HTML, URI, UTF8, QRCODE
Format of the message.
message.message.languagestringmaxLength 8
Message language identifier. Contains a language code as defined in <<ref-RFC5646,[RFC5646]>>.
message.message.contentstringPflichtmaxLength 1024
*(2.1)* Required. Message contents. + Maximum length supported by Charging Station is given in OCPPCommCtrlr.FieldLength["MessageContentType.content"]. Maximum length defaults to 1024.
message.messageExtraarray<object>minItems 1; maxItems 4
message.messageExtra[].formatstringPflichtenum: ASCII, HTML, URI, UTF8, QRCODE
Format of the message.
message.messageExtra[].languagestringmaxLength 8
Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.
message.messageExtra[].contentstringPflichtmaxLength 1024
*(2.1)* Required. Message contents. + Maximum length supported by Charging Station is given in OCPPCommCtrlr.FieldLength["MessageContentType.content"]. Maximum length defaults to 1024.
JSON-Schema (Request)
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "$id": "urn:OCPP:Cp:2:2025:1:SetDisplayMessageRequest",
  "comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
  "definitions": {
    "MessageFormatEnumType": {
      "description": "Format of the message.\r\n",
      "javaType": "MessageFormatEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "ASCII",
        "HTML",
        "URI",
        "UTF8",
        "QRCODE"
      ]
    },
    "MessagePriorityEnumType": {
      "description": "With what priority should this message be shown\r\n",
      "javaType": "MessagePriorityEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "AlwaysFront",
        "InFront",
        "NormalCycle"
      ]
    },
    "MessageStateEnumType": {
      "description": "During what state should this message be shown. When omitted this message should be shown in any state of the Charging Station.\r\n",
      "javaType": "MessageStateEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "Charging",
        "Faulted",
        "Idle",
        "Unavailable",
        "Suspended",
        "Discharging"
      ]
    },
    "ComponentType": {
      "description": "A physical or logical component\r\n",
      "javaType": "Component",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "evse": {
          "$ref": "#/definitions/EVSEType"
        },
        "name": {
          "description": "Name of the component. Name should be taken from the list of standardized component names whenever possible. Case Insensitive. strongly advised to use Camel Case.\r\n",
          "type": "string",
          "maxLength": 50
        },
        "instance": {
          "description": "Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.\r\n",
          "type": "string",
          "maxLength": 50
        },
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        }
      },
      "required": [
        "name"
      ]
    },
    "EVSEType": {
      "description": "Electric Vehicle Supply Equipment\r\n",
      "javaType": "EVSE",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "description": "EVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.\r\n",
          "type": "integer",
          "minimum": 0.0
        },
        "connectorId": {
          "description": "An id to designate a specific connector (on an EVSE) by connector index number.\r\n",
          "type": "integer",
          "minimum": 0.0
        },
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        }
      },
      "required": [
        "id"
      ]
    },
    "MessageContentType": {
      "description": "Contains message details, for a message to be displayed on a Charging Station.\r\n\r\n",
      "javaType": "MessageContent",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "format": {
          "$ref": "#/definitions/MessageFormatEnumType"
        },
        "language": {
          "description": "Message language identifier. Contains a language code as defined in &lt;&lt;ref-RFC5646,[RFC5646]&gt;&gt;.\r\n",
          "type": "string",
          "maxLength": 8
        },
        "content": {
          "description": "*(2.1)* Required. Message contents. +\r\nMaximum length supported by Charging Station is given in OCPPCommCtrlr.FieldLength[\"MessageContentType.content\"].\r\n    Maximum length defaults to 1024.\r\n\r\n",
          "type": "string",
          "maxLength": 1024
        },
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        }
      },
      "required": [
        "format",
        "content"
      ]
    },
    "MessageInfoType": {
      "description": "Contains message details, for a message to be displayed on a Charging Station.\r\n",
      "javaType": "MessageInfo",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "display": {
          "$ref": "#/definitions/ComponentType"
        },
        "id": {
          "description": "Unique id within an exchange context. It is defined within the OCPP context as a positive Integer value (greater or equal to zero).\r\n",
          "type": "integer",
          "minimum": 0.0
        },
        "priority": {
          "$ref": "#/definitions/MessagePriorityEnumType"
        },
        "state": {
          "$ref": "#/definitions/MessageStateEnumType"
        },
        "startDateTime": {
          "description": "From what date-time should this message be shown. If omitted: directly.\r\n",
          "type": "string",
          "format": "date-time"
        },
        "endDateTime": {
          "description": "Until what date-time should this message be shown, after this date/time this message SHALL be removed.\r\n",
          "type": "string",
          "format": "date-time"
        },
        "transactionId": {
          "description": "During which transaction shall this message be shown.\r\nMessage SHALL be removed by the Charging Station after transaction has\r\nended.\r\n",
          "type": "string",
          "maxLength": 36
        },
        "message": {
          "$ref": "#/definitions/MessageContentType"
        },
        "messageExtra": {
          "type": "array",
          "additionalItems": false,
          "items": {
            "$ref": "#/definitions/MessageContentType"
          },
          "minItems": 1,
          "maxItems": 4
        },
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        }
      },
      "required": [
        "id",
        "priority",
        "message"
      ]
    },
    "CustomDataType": {
      "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
      "javaType": "CustomData",
      "type": "object",
      "properties": {
        "vendorId": {
          "type": "string",
          "maxLength": 255
        }
      },
      "required": [
        "vendorId"
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "$ref": "#/definitions/MessageInfoType"
    },
    "customData": {
      "$ref": "#/definitions/CustomDataType"
    }
  },
  "required": [
    "message"
  ]
}

Response

FeldTypEinschränkungen / Beschreibung
statusstringPflichtenum: Accepted, NotSupportedMessageFormat, Rejected, NotSupportedPriority, NotSupportedState, UnknownTransaction, LanguageNotSupported
This indicates whether the Charging Station is able to display the message.
statusInfoobjectElement providing more information about the status.
statusInfo.reasonCodestringPflichtmaxLength 20
A predefined code for the reason why the status is returned in this response. The string is case-insensitive.
statusInfo.additionalInfostringmaxLength 1024
Additional text to provide detailed information.
JSON-Schema (Response)
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "$id": "urn:OCPP:Cp:2:2025:1:SetDisplayMessageResponse",
  "comment": "OCPP 2.1 Edition 1 (c) OCA, Creative Commons Attribution-NoDerivatives 4.0 International Public License",
  "definitions": {
    "DisplayMessageStatusEnumType": {
      "description": "This indicates whether the Charging Station is able to display the message.\r\n",
      "javaType": "DisplayMessageStatusEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "Accepted",
        "NotSupportedMessageFormat",
        "Rejected",
        "NotSupportedPriority",
        "NotSupportedState",
        "UnknownTransaction",
        "LanguageNotSupported"
      ]
    },
    "StatusInfoType": {
      "description": "Element providing more information about the status.\r\n",
      "javaType": "StatusInfo",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "reasonCode": {
          "description": "A predefined code for the reason why the status is returned in this response. The string is case-insensitive.\r\n",
          "type": "string",
          "maxLength": 20
        },
        "additionalInfo": {
          "description": "Additional text to provide detailed information.\r\n",
          "type": "string",
          "maxLength": 1024
        },
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        }
      },
      "required": [
        "reasonCode"
      ]
    },
    "CustomDataType": {
      "description": "This class does not get 'AdditionalProperties = false' in the schema generation, so it can be extended with arbitrary JSON properties to allow adding custom data.",
      "javaType": "CustomData",
      "type": "object",
      "properties": {
        "vendorId": {
          "type": "string",
          "maxLength": 255
        }
      },
      "required": [
        "vendorId"
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "status": {
      "$ref": "#/definitions/DisplayMessageStatusEnumType"
    },
    "statusInfo": {
      "$ref": "#/definitions/StatusInfoType"
    },
    "customData": {
      "$ref": "#/definitions/CustomDataType"
    }
  },
  "required": [
    "status"
  ]
}

Quelle: Open Charge Alliance, OCPP 2.1 – JSON-Schemas, unverändert wiedergegeben. © Open Charge Alliance. Lizenz: CC BY-ND 4.0. Die vollständige Spezifikation gibt es bei der Open Charge Alliance. ocpp-sim ist nicht mit der OCA verbunden.