Docs › OCPP 2.0.1 › SetVariables

SetVariables OCPP 2.0.1

Der Simulator beantwortet diese Anfrage des Backends.

Auch in: OCPP 2.1

Request

FeldTypEinschränkungen / Beschreibung
setVariableDataarray<object>PflichtminItems 1
setVariableData[].attributeTypestringenum: Actual, Target, MinSet, MaxSet
Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.
setVariableData[].attributeValuestringPflichtmaxLength 1000
Value to be assigned to attribute of variable. The Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal.
setVariableData[].componentobjectPflichtA physical or logical component
setVariableData[].component.evseobjectEVSE urn:x-oca:ocpp:uid:2:233123 Electric Vehicle Supply Equipment
setVariableData[].component.evse.idintegerPflichtIdentified_ Object. MRID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:569198 EVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.
setVariableData[].component.evse.connectorIdintegerAn id to designate a specific connector (on an EVSE) by connector index number.
setVariableData[].component.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.
setVariableData[].component.instancestringmaxLength 50
Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
setVariableData[].variableobjectPflichtReference key to a component-variable.
setVariableData[].variable.namestringPflichtmaxLength 50
Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case.
setVariableData[].variable.instancestringmaxLength 50
Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
JSON-Schema (Request)
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "comment": "OCPP 2.0.1 FINAL",
  "definitions": {
    "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"
      ]
    },
    "AttributeEnumType": {
      "description": "Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.\r\n",
      "javaType": "AttributeEnum",
      "type": "string",
      "default": "Actual",
      "additionalProperties": false,
      "enum": [
        "Actual",
        "Target",
        "MinSet",
        "MaxSet"
      ]
    },
    "ComponentType": {
      "description": "A physical or logical component\r\n",
      "javaType": "Component",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "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
        }
      },
      "required": [
        "name"
      ]
    },
    "EVSEType": {
      "description": "EVSE\r\nurn:x-oca:ocpp:uid:2:233123\r\nElectric Vehicle Supply Equipment\r\n",
      "javaType": "EVSE",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "id": {
          "description": "Identified_ Object. MRID. Numeric_ Identifier\r\nurn:x-enexis:ecdm:uid:1:569198\r\nEVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.\r\n",
          "type": "integer"
        },
        "connectorId": {
          "description": "An id to designate a specific connector (on an EVSE) by connector index number.\r\n",
          "type": "integer"
        }
      },
      "required": [
        "id"
      ]
    },
    "SetVariableDataType": {
      "javaType": "SetVariableData",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "attributeType": {
          "$ref": "#/definitions/AttributeEnumType"
        },
        "attributeValue": {
          "description": "Value to be assigned to attribute of variable.\r\n\r\nThe Configuration Variable &lt;&lt;configkey-configuration-value-size,ConfigurationValueSize&gt;&gt; can be used to limit SetVariableData.attributeValue and VariableCharacteristics.valueList. The max size of these values will always remain equal. \r\n",
          "type": "string",
          "maxLength": 1000
        },
        "component": {
          "$ref": "#/definitions/ComponentType"
        },
        "variable": {
          "$ref": "#/definitions/VariableType"
        }
      },
      "required": [
        "attributeValue",
        "component",
        "variable"
      ]
    },
    "VariableType": {
      "description": "Reference key to a component-variable.\r\n",
      "javaType": "Variable",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "name": {
          "description": "Name of the variable. Name should be taken from the list of standardized variable 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 variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.\r\n",
          "type": "string",
          "maxLength": 50
        }
      },
      "required": [
        "name"
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "customData": {
      "$ref": "#/definitions/CustomDataType"
    },
    "setVariableData": {
      "type": "array",
      "additionalItems": false,
      "items": {
        "$ref": "#/definitions/SetVariableDataType"
      },
      "minItems": 1
    }
  },
  "required": [
    "setVariableData"
  ]
}

Response

FeldTypEinschränkungen / Beschreibung
setVariableResultarray<object>PflichtminItems 1
setVariableResult[].attributeTypestringenum: Actual, Target, MinSet, MaxSet
Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.
setVariableResult[].attributeStatusstringPflichtenum: Accepted, Rejected, UnknownComponent, UnknownVariable, NotSupportedAttributeType, RebootRequired
Result status of setting the variable.
setVariableResult[].attributeStatusInfoobjectElement providing more information about the status.
setVariableResult[].attributeStatusInfo.reasonCodestringPflichtmaxLength 20
A predefined code for the reason why the status is returned in this response. The string is case-insensitive.
setVariableResult[].attributeStatusInfo.additionalInfostringmaxLength 512
Additional text to provide detailed information.
setVariableResult[].componentobjectPflichtA physical or logical component
setVariableResult[].component.evseobjectEVSE urn:x-oca:ocpp:uid:2:233123 Electric Vehicle Supply Equipment
setVariableResult[].component.evse.idintegerPflichtIdentified_ Object. MRID. Numeric_ Identifier urn:x-enexis:ecdm:uid:1:569198 EVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.
setVariableResult[].component.evse.connectorIdintegerAn id to designate a specific connector (on an EVSE) by connector index number.
setVariableResult[].component.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.
setVariableResult[].component.instancestringmaxLength 50
Name of instance in case the component exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
setVariableResult[].variableobjectPflichtReference key to a component-variable.
setVariableResult[].variable.namestringPflichtmaxLength 50
Name of the variable. Name should be taken from the list of standardized variable names whenever possible. Case Insensitive. strongly advised to use Camel Case.
setVariableResult[].variable.instancestringmaxLength 50
Name of instance in case the variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.
JSON-Schema (Response)
{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "comment": "OCPP 2.0.1 FINAL",
  "definitions": {
    "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"
      ]
    },
    "AttributeEnumType": {
      "description": "Type of attribute: Actual, Target, MinSet, MaxSet. Default is Actual when omitted.\r\n",
      "javaType": "AttributeEnum",
      "type": "string",
      "default": "Actual",
      "additionalProperties": false,
      "enum": [
        "Actual",
        "Target",
        "MinSet",
        "MaxSet"
      ]
    },
    "SetVariableStatusEnumType": {
      "description": "Result status of setting the variable.\r\n",
      "javaType": "SetVariableStatusEnum",
      "type": "string",
      "additionalProperties": false,
      "enum": [
        "Accepted",
        "Rejected",
        "UnknownComponent",
        "UnknownVariable",
        "NotSupportedAttributeType",
        "RebootRequired"
      ]
    },
    "ComponentType": {
      "description": "A physical or logical component\r\n",
      "javaType": "Component",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "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
        }
      },
      "required": [
        "name"
      ]
    },
    "EVSEType": {
      "description": "EVSE\r\nurn:x-oca:ocpp:uid:2:233123\r\nElectric Vehicle Supply Equipment\r\n",
      "javaType": "EVSE",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "id": {
          "description": "Identified_ Object. MRID. Numeric_ Identifier\r\nurn:x-enexis:ecdm:uid:1:569198\r\nEVSE Identifier. This contains a number (&gt; 0) designating an EVSE of the Charging Station.\r\n",
          "type": "integer"
        },
        "connectorId": {
          "description": "An id to designate a specific connector (on an EVSE) by connector index number.\r\n",
          "type": "integer"
        }
      },
      "required": [
        "id"
      ]
    },
    "SetVariableResultType": {
      "javaType": "SetVariableResult",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "attributeType": {
          "$ref": "#/definitions/AttributeEnumType"
        },
        "attributeStatus": {
          "$ref": "#/definitions/SetVariableStatusEnumType"
        },
        "attributeStatusInfo": {
          "$ref": "#/definitions/StatusInfoType"
        },
        "component": {
          "$ref": "#/definitions/ComponentType"
        },
        "variable": {
          "$ref": "#/definitions/VariableType"
        }
      },
      "required": [
        "attributeStatus",
        "component",
        "variable"
      ]
    },
    "StatusInfoType": {
      "description": "Element providing more information about the status.\r\n",
      "javaType": "StatusInfo",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "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": 512
        }
      },
      "required": [
        "reasonCode"
      ]
    },
    "VariableType": {
      "description": "Reference key to a component-variable.\r\n",
      "javaType": "Variable",
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "customData": {
          "$ref": "#/definitions/CustomDataType"
        },
        "name": {
          "description": "Name of the variable. Name should be taken from the list of standardized variable 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 variable exists as multiple instances. Case Insensitive. strongly advised to use Camel Case.\r\n",
          "type": "string",
          "maxLength": 50
        }
      },
      "required": [
        "name"
      ]
    }
  },
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "customData": {
      "$ref": "#/definitions/CustomDataType"
    },
    "setVariableResult": {
      "type": "array",
      "additionalItems": false,
      "items": {
        "$ref": "#/definitions/SetVariableResultType"
      },
      "minItems": 1
    }
  },
  "required": [
    "setVariableResult"
  ]
}

Quelle: Open Charge Alliance, OCPP 2.0.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.