diff --git a/interfaces/display_message.yaml b/interfaces/display_message.yaml new file mode 100644 index 000000000..459f3f0d3 --- /dev/null +++ b/interfaces/display_message.yaml @@ -0,0 +1,73 @@ +description: >- + This interface allows to add / remove / change messages that should be showed on the display. +cmds: + set_display_message: + description: >- + Command to set or replace a display message. + arguments: + request: + description: >- + Request to set a display message + $ref: /display_message#/DisplayMessage + result: + description: >- + Response to the set display message request. + type: object + properties: + status: + description: Whether the charging station is able to display the message + $ref: /display_message#/DisplayMessageStatusEnum + status_info: + description: Detailed status information + $ref: /ocpp#/StatusInfoType + required: + - status + get_display_messages: + description: Command to get one or more display messages. + arguments: + request: + description: The request for display messages + type: object + properties: + id: + description: If provided the Charging Station shall return Display Messages of the given ids. + type: array + items: + type: integer + priority: + description: If provided the Charging Station shall return Display Messages with the given priority only. + $ref: /display_message#/MessagePriorityEnum + state: + description: If provided the Charging Station shall return Display Messages with the given state only. + $ref: /display_message#/MessageStateEnum + response: + description: The display messages or an empty array if there are none + type: object + properties: + status_info: + description: Detailed status information + $ref: /ocpp#/StatusInfoType + messages: + description: Requested messages, if any + type: array + items: + $ref: /display_message#/DisplayMessage + clear_display_message: + description: Command to remove a display message + request: + description: The request to clear a message + type: object + properties: + id: + description: Id of display message that should be removed from the charging station + type: integer + response: + description: Response on the clear message request + type: object + properties: + status: + $ref: /display_message#/ClearMessageResponseEnum + status_info: + $ref: /ocpp#/StatusInfoType + required: + - status diff --git a/interfaces/ocpp.yaml b/interfaces/ocpp.yaml index d782df637..a4b0ce087 100644 --- a/interfaces/ocpp.yaml +++ b/interfaces/ocpp.yaml @@ -102,76 +102,6 @@ cmds: items: type: object $ref: /ocpp#/ComponentVariable - set_display_message: - description: >- - Command to set or replace a display message. - arguments: - request: - description: >- - DisplayMessage request, like done in OCPP 2.0.1, also used for 1.6 as DisplayMessage is not implemented there. - $ref: /ocpp#/DisplayMessage - result: - description: >- - Response to the set display message request, as specified in OCPP 2.0.1. - type: object - properties: - status: - description: Whether the charging station is able to display the message - $ref: /ocpp#/DisplayMessageStatusEnum - status_info: - description: Detailed status information - $ref: /ocpp#/StatusInfoType - required: - - status - get_display_messages: - description: Command to get one or more display messages. - arguments: - request: - description: The request for display messages - type: object - properties: - id: - description: If provided the Charging Station shall return Display Messages of the given ids. - type: array - items: - type: integer - priority: - description: If provided the Charging Station shall return Display Messages with the given priority only. - $ref: /ocp#/MessagePriorityEnum - state: - description: If provided the Charging Station shall return Display Messages with the given state only. - $ref: /ocpp#/MessageStateEnum - response: - description: The display messages or an empty array if there are none - type: object - properties: - status_info: - description: Detailed status information - $ref: /ocpp#/StatusInfoType - messages: - description: Requested messages, if any - type: array - items: - $ref: /ocpp#/DisplayMessage - clear_display_message: - description: Command to remove a display message - request: - description: The request to clear a message - type: object - properties: - id: - description: Id of display message that should be removed from the charging station - type: integer - response: - description: Response on the clear message request - type: object - properties: - status: - $ref: /ocpp#/ClearMessageResponseEnum - status_info: - $ref: /ocpp#/StatusInfoType - required: - - status vars: ocpp_transaction_event: description: Emits events related to OCPP transactions diff --git a/types/display_message.yaml b/types/display_message.yaml new file mode 100644 index 000000000..7b1f80efc --- /dev/null +++ b/types/display_message.yaml @@ -0,0 +1,104 @@ +description: >- + Message to show on a display +types: + MessageContent: + description: Contains message details + required: + - format + - content + type: object + properties: + format: + type: string + $ref: /display_message#/MessageFormat + language: + type: string + content: + type: string + MessageFormat: + description: Format of the message to be displayed + type: string + enum: + - ASCII + - HTML + - URI + - UTF8 + MessagePriorityEnum: + description: Priority of the message + type: string + enum: + - AlwaysFront + - InFront + - NormalCycle + MessageStateEnum: + description: During what state the message should be shown + type: string + enum: + - Charging + - Faulted + - Idle + - Unavailable + DisplayMessageStatusEnum: + description: Response on a display message request + type: string + enum: + - Accepted + - NotSupportedMessageFormat + - Rejected + - NotSupportedPriority + - NotSupportedState + - UnknownTransaction + ClearMessageResponseEnum: + description: Response on a clear display message request + type: string + enum: + - Accepted + - Unknown + DisplayMessage: + description: Message to show on a display + type: object + additionalProperties: false + properties: + id: + description: The message id + type: integer + priority: + description: Priority of the message + $ref: /display_message#/MessagePriorityEnum + state: + description: >- + During what state should this message be shown. When omitted, this message should be shown in any state of + the Charging Station + $ref: /display_message#/MessageStateEnum + timestamp_from: + description: >- + From what date-time should this message be shown. If omitted: directly. + type: string + format: date-time + timestamp_to: + description: >- + Until what date-time should this message be shoen, after this date/time this message SHALL be removed. + type: string + format: date-time + transaction_id: + description: >- + During which transaction shall this message be shown. Message SHALL be removed by the Charging Station + after transaction has ended. + type: string + minLength: 0 + maxLength: 36 + message: + $ref: /display_message#/MessageContent + description: The message to show + message_format: + description: The format of the message + $ref: /display_message#/MessageFormat + display: + description: >- + When a Charging Station has multiple Displays, this field can be used to define to which Display this message + belongs. + $ref: /display_message#/Component + required: + - id + - priority + - message diff --git a/types/ocpp.yaml b/types/ocpp.yaml index 8b29a1b17..42cc566c8 100644 --- a/types/ocpp.yaml +++ b/types/ocpp.yaml @@ -113,107 +113,6 @@ types: - Started - Updated - Ended - MessageContent: - description: Contains message details - required: - - format - - content - type: object - properties: - format: - type: string - $ref: /ocpp#/MessageFormat - language: - type: string - content: - type: string - MessageFormat: - description: Format of the message to be displayed - type: string - enum: - - ASCII - - HTML - - URI - - UTF8 - MessagePriorityEnum: - description: Priority of the message - type: string - enum: - - AlwaysFront - - InFront - - NormalCycle - MessageStateEnum: - description: During what state the message should be shown - type: string - enum: - - Charging - - Faulted - - Idle - - Unavailable - DisplayMessageStatusEnum: - description: Response on a display message request - type: string - enum: - - Accepted - - NotSupportedMessageFormat - - Rejected - - NotSupportedPriority - - NotSupportedState - - UnknownTransaction - ClearMessageResponseEnum: - description: Response on a clear display message request - type: string - enum: - - Accepted - - Unknown - DisplayMessage: - description: Message to show on a display - type: object - additionalProperties: false - properties: - id: - description: The message id - type: integer - priority: - description: Priority of the message - $ref: /ocp#/MessagePriorityEnum - state: - description: >- - During what state should this message be shown. When omitted, this message should be shown in any state of - the Charging Station - $ref: /ocpp#/MessageStateEnum - timestamp_from: - description: >- - From what date-time should this message be shown. If omitted: directly. - type: string - format: date-time - timestamp_to: - description: >- - Until what date-time should this message be shoen, after this date/time this message SHALL be removed. - type: string - format: date-time - transaction_id: - description: >- - During which transaction shall this message be shown. Message SHALL be removed by the Charging Station - after transaction has ended. - type: string - minLength: 0 - maxLength: 36 - message: - $ref: /ocpp#/MessageContent - description: The message to show - message_format: - description: The format of the message - $ref: /ocpp#/MessageFormat - display: - description: >- - When a Charging Station has multiple Displays, this field can be used to define to which Display this message - belongs. - $ref: /ocpp#/Component - required: - - id - - priority - - message OcppTransactionEventResponse: description: Information that can be returned with a OCPP TransactionEventResponse type: object