Created
February 14, 2022 03:12
-
-
Save huntc/d8b55678cf6e87ea1d8bf7b24f5f25c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"$id": "urn:OCPP:Cp:2:2020:3:TransactionEventRequest", | |
"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" | |
] | |
}, | |
"ChargingStateEnumType": { | |
"description": "Transaction. State. Transaction_ State_ Code\r\nurn:x-oca:ocpp:uid:1:569419\r\nCurrent charging state, is required when state\r\nhas changed.\r\n", | |
"javaType": "ChargingStateEnum", | |
"type": "string", | |
"additionalProperties": false, | |
"enum": [ | |
"Charging", | |
"EVConnected", | |
"SuspendedEV", | |
"SuspendedEVSE", | |
"Idle" | |
] | |
}, | |
"IdTokenEnumType": { | |
"description": "Enumeration of possible idToken types.\r\n", | |
"javaType": "IdTokenEnum", | |
"type": "string", | |
"additionalProperties": false, | |
"enum": [ | |
"Central", | |
"eMAID", | |
"ISO14443", | |
"ISO15693", | |
"KeyCode", | |
"Local", | |
"MacAddress", | |
"NoAuthorization" | |
] | |
}, | |
"LocationEnumType": { | |
"description": "Sampled_ Value. Location. Location_ Code\r\nurn:x-oca:ocpp:uid:1:569265\r\nIndicates where the measured value has been sampled. Default = \"Outlet\"\r\n\r\n", | |
"javaType": "LocationEnum", | |
"type": "string", | |
"default": "Outlet", | |
"additionalProperties": false, | |
"enum": [ | |
"Body", | |
"Cable", | |
"EV", | |
"Inlet", | |
"Outlet" | |
] | |
}, | |
"MeasurandEnumType": { | |
"description": "Sampled_ Value. Measurand. Measurand_ Code\r\nurn:x-oca:ocpp:uid:1:569263\r\nType of measurement. Default = \"Energy.Active.Import.Register\"\r\n", | |
"javaType": "MeasurandEnum", | |
"type": "string", | |
"default": "Energy.Active.Import.Register", | |
"additionalProperties": false, | |
"enum": [ | |
"Current.Export", | |
"Current.Import", | |
"Current.Offered", | |
"Energy.Active.Export.Register", | |
"Energy.Active.Import.Register", | |
"Energy.Reactive.Export.Register", | |
"Energy.Reactive.Import.Register", | |
"Energy.Active.Export.Interval", | |
"Energy.Active.Import.Interval", | |
"Energy.Active.Net", | |
"Energy.Reactive.Export.Interval", | |
"Energy.Reactive.Import.Interval", | |
"Energy.Reactive.Net", | |
"Energy.Apparent.Net", | |
"Energy.Apparent.Import", | |
"Energy.Apparent.Export", | |
"Frequency", | |
"Power.Active.Export", | |
"Power.Active.Import", | |
"Power.Factor", | |
"Power.Offered", | |
"Power.Reactive.Export", | |
"Power.Reactive.Import", | |
"SoC", | |
"Voltage" | |
] | |
}, | |
"PhaseEnumType": { | |
"description": "Sampled_ Value. Phase. Phase_ Code\r\nurn:x-oca:ocpp:uid:1:569264\r\nIndicates how the measured value is to be interpreted. For instance between L1 and neutral (L1-N) Please note that not all values of phase are applicable to all Measurands. When phase is absent, the measured value is interpreted as an overall value.\r\n", | |
"javaType": "PhaseEnum", | |
"type": "string", | |
"additionalProperties": false, | |
"enum": [ | |
"L1", | |
"L2", | |
"L3", | |
"N", | |
"L1-N", | |
"L2-N", | |
"L3-N", | |
"L1-L2", | |
"L2-L3", | |
"L3-L1" | |
] | |
}, | |
"ReadingContextEnumType": { | |
"description": "Sampled_ Value. Context. Reading_ Context_ Code\r\nurn:x-oca:ocpp:uid:1:569261\r\nType of detail value: start, end or sample. Default = \"Sample.Periodic\"\r\n", | |
"javaType": "ReadingContextEnum", | |
"type": "string", | |
"default": "Sample.Periodic", | |
"additionalProperties": false, | |
"enum": [ | |
"Interruption.Begin", | |
"Interruption.End", | |
"Other", | |
"Sample.Clock", | |
"Sample.Periodic", | |
"Transaction.Begin", | |
"Transaction.End", | |
"Trigger" | |
] | |
}, | |
"ReasonEnumType": { | |
"description": "Transaction. Stopped_ Reason. EOT_ Reason_ Code\r\nurn:x-oca:ocpp:uid:1:569413\r\nThis contains the reason why the transaction was stopped. MAY only be omitted when Reason is \"Local\".\r\n", | |
"javaType": "ReasonEnum", | |
"type": "string", | |
"additionalProperties": false, | |
"enum": [ | |
"DeAuthorized", | |
"EmergencyStop", | |
"EnergyLimitReached", | |
"EVDisconnected", | |
"GroundFault", | |
"ImmediateReset", | |
"Local", | |
"LocalOutOfCredit", | |
"MasterPass", | |
"Other", | |
"OvercurrentFault", | |
"PowerLoss", | |
"PowerQuality", | |
"Reboot", | |
"Remote", | |
"SOCLimitReached", | |
"StoppedByEV", | |
"TimeLimitReached", | |
"Timeout" | |
] | |
}, | |
"TransactionEventEnumType": { | |
"description": "This contains the type of this event.\r\nThe first TransactionEvent of a transaction SHALL contain: \"Started\" The last TransactionEvent of a transaction SHALL contain: \"Ended\" All others SHALL contain: \"Updated\"\r\n", | |
"javaType": "TransactionEventEnum", | |
"type": "string", | |
"additionalProperties": false, | |
"enum": [ | |
"Ended", | |
"Started", | |
"Updated" | |
] | |
}, | |
"TriggerReasonEnumType": { | |
"description": "Reason the Charging Station sends this message to the CSMS\r\n", | |
"javaType": "TriggerReasonEnum", | |
"type": "string", | |
"additionalProperties": false, | |
"enum": [ | |
"Authorized", | |
"CablePluggedIn", | |
"ChargingRateChanged", | |
"ChargingStateChanged", | |
"Deauthorized", | |
"EnergyLimitReached", | |
"EVCommunicationLost", | |
"EVConnectTimeout", | |
"MeterValueClock", | |
"MeterValuePeriodic", | |
"TimeLimitReached", | |
"Trigger", | |
"UnlockCommand", | |
"StopAuthorized", | |
"EVDeparted", | |
"EVDetected", | |
"RemoteStop", | |
"RemoteStart", | |
"AbnormalCondition", | |
"SignedDataReceived", | |
"ResetCommand" | |
] | |
}, | |
"AdditionalInfoType": { | |
"description": "Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.\r\n", | |
"javaType": "AdditionalInfo", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"additionalIdToken": { | |
"description": "This field specifies the additional IdToken.\r\n", | |
"type": "string", | |
"maxLength": 36 | |
}, | |
"type": { | |
"description": "This defines the type of the additionalIdToken. This is a custom type, so the implementation needs to be agreed upon by all involved parties.\r\n", | |
"type": "string", | |
"maxLength": 50 | |
} | |
}, | |
"required": [ | |
"additionalIdToken", | |
"type" | |
] | |
}, | |
"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 (> 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" | |
] | |
}, | |
"IdTokenType": { | |
"description": "Contains a case insensitive identifier to use for the authorization and the type of authorization to support multiple forms of identifiers.\r\n", | |
"javaType": "IdToken", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"additionalInfo": { | |
"type": "array", | |
"additionalItems": false, | |
"items": { | |
"$ref": "#/definitions/AdditionalInfoType" | |
}, | |
"minItems": 1 | |
}, | |
"idToken": { | |
"description": "IdToken is case insensitive. Might hold the hidden id of an RFID tag, but can for example also contain a UUID.\r\n", | |
"type": "string", | |
"maxLength": 36 | |
}, | |
"type": { | |
"$ref": "#/definitions/IdTokenEnumType" | |
} | |
}, | |
"required": [ | |
"idToken", | |
"type" | |
] | |
}, | |
"MeterValueType": { | |
"description": "Meter_ Value\r\nurn:x-oca:ocpp:uid:2:233265\r\nCollection of one or more sampled values in MeterValuesRequest and TransactionEvent. All sampled values in a MeterValue are sampled at the same point in time.\r\n", | |
"javaType": "MeterValue", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"sampledValue": { | |
"type": "array", | |
"additionalItems": false, | |
"items": { | |
"$ref": "#/definitions/SampledValueType" | |
}, | |
"minItems": 1 | |
}, | |
"timestamp": { | |
"description": "Meter_ Value. Timestamp. Date_ Time\r\nurn:x-oca:ocpp:uid:1:569259\r\nTimestamp for measured value(s).\r\n", | |
"type": "string", | |
"format": "date-time" | |
} | |
}, | |
"required": [ | |
"timestamp", | |
"sampledValue" | |
] | |
}, | |
"SampledValueType": { | |
"description": "Sampled_ Value\r\nurn:x-oca:ocpp:uid:2:233266\r\nSingle sampled value in MeterValues. Each value can be accompanied by optional fields.\r\n\r\nTo save on mobile data usage, default values of all of the optional fields are such that. The value without any additional fields will be interpreted, as a register reading of active import energy in Wh (Watt-hour) units.\r\n", | |
"javaType": "SampledValue", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"value": { | |
"description": "Sampled_ Value. Value. Measure\r\nurn:x-oca:ocpp:uid:1:569260\r\nIndicates the measured value.\r\n\r\n", | |
"type": "number" | |
}, | |
"context": { | |
"$ref": "#/definitions/ReadingContextEnumType" | |
}, | |
"measurand": { | |
"$ref": "#/definitions/MeasurandEnumType" | |
}, | |
"phase": { | |
"$ref": "#/definitions/PhaseEnumType" | |
}, | |
"location": { | |
"$ref": "#/definitions/LocationEnumType" | |
}, | |
"signedMeterValue": { | |
"$ref": "#/definitions/SignedMeterValueType" | |
}, | |
"unitOfMeasure": { | |
"$ref": "#/definitions/UnitOfMeasureType" | |
} | |
}, | |
"required": [ | |
"value" | |
] | |
}, | |
"SignedMeterValueType": { | |
"description": "Represent a signed version of the meter value.\r\n", | |
"javaType": "SignedMeterValue", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"signedMeterData": { | |
"description": "Base64 encoded, contains the signed data which might contain more then just the meter value. It can contain information like timestamps, reference to a customer etc.\r\n", | |
"type": "string", | |
"maxLength": 2500 | |
}, | |
"signingMethod": { | |
"description": "Method used to create the digital signature.\r\n", | |
"type": "string", | |
"maxLength": 50 | |
}, | |
"encodingMethod": { | |
"description": "Method used to encode the meter values before applying the digital signature algorithm.\r\n", | |
"type": "string", | |
"maxLength": 50 | |
}, | |
"publicKey": { | |
"description": "Base64 encoded, sending depends on configuration variable _PublicKeyWithSignedMeterValue_.\r\n", | |
"type": "string", | |
"maxLength": 2500 | |
} | |
}, | |
"required": [ | |
"signedMeterData", | |
"signingMethod", | |
"encodingMethod", | |
"publicKey" | |
] | |
}, | |
"TransactionType": { | |
"description": "Transaction\r\nurn:x-oca:ocpp:uid:2:233318\r\n", | |
"javaType": "Transaction", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"transactionId": { | |
"description": "This contains the Id of the transaction.\r\n", | |
"type": "string", | |
"maxLength": 36 | |
}, | |
"chargingState": { | |
"$ref": "#/definitions/ChargingStateEnumType" | |
}, | |
"timeSpentCharging": { | |
"description": "Transaction. Time_ Spent_ Charging. Elapsed_ Time\r\nurn:x-oca:ocpp:uid:1:569415\r\nContains the total time that energy flowed from EVSE to EV during the transaction (in seconds). Note that timeSpentCharging is smaller or equal to the duration of the transaction.\r\n", | |
"type": "integer" | |
}, | |
"stoppedReason": { | |
"$ref": "#/definitions/ReasonEnumType" | |
}, | |
"remoteStartId": { | |
"description": "The ID given to remote start request (<<requeststarttransactionrequest, RequestStartTransactionRequest>>. This enables to CSMS to match the started transaction to the given start request.\r\n", | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"transactionId" | |
] | |
}, | |
"UnitOfMeasureType": { | |
"description": "Represents a UnitOfMeasure with a multiplier\r\n", | |
"javaType": "UnitOfMeasure", | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"unit": { | |
"description": "Unit of the value. Default = \"Wh\" if the (default) measurand is an \"Energy\" type.\r\nThis field SHALL use a value from the list Standardized Units of Measurements in Part 2 Appendices. \r\nIf an applicable unit is available in that list, otherwise a \"custom\" unit might be used.\r\n", | |
"type": "string", | |
"default": "Wh", | |
"maxLength": 20 | |
}, | |
"multiplier": { | |
"description": "Multiplier, this value represents the exponent to base 10. I.e. multiplier 3 means 10 raised to the 3rd power. Default is 0.\r\n", | |
"type": "integer", | |
"default": 0 | |
} | |
} | |
} | |
}, | |
"type": "object", | |
"additionalProperties": false, | |
"properties": { | |
"customData": { | |
"$ref": "#/definitions/CustomDataType" | |
}, | |
"eventType": { | |
"$ref": "#/definitions/TransactionEventEnumType" | |
}, | |
"meterValue": { | |
"type": "array", | |
"additionalItems": false, | |
"items": { | |
"$ref": "#/definitions/MeterValueType" | |
}, | |
"minItems": 1 | |
}, | |
"timestamp": { | |
"description": "The date and time at which this transaction event occurred.\r\n", | |
"type": "string", | |
"format": "date-time" | |
}, | |
"triggerReason": { | |
"$ref": "#/definitions/TriggerReasonEnumType" | |
}, | |
"seqNo": { | |
"description": "Incremental sequence number, helps with determining if all messages of a transaction have been received.\r\n", | |
"type": "integer" | |
}, | |
"offline": { | |
"description": "Indication that this transaction event happened when the Charging Station was offline. Default = false, meaning: the event occurred when the Charging Station was online.\r\n", | |
"type": "boolean", | |
"default": false | |
}, | |
"numberOfPhasesUsed": { | |
"description": "If the Charging Station is able to report the number of phases used, then it SHALL provide it. When omitted the CSMS may be able to determine the number of phases used via device management.\r\n", | |
"type": "integer" | |
}, | |
"cableMaxCurrent": { | |
"description": "The maximum current of the connected cable in Ampere (A).\r\n", | |
"type": "integer" | |
}, | |
"reservationId": { | |
"description": "This contains the Id of the reservation that terminates as a result of this transaction.\r\n", | |
"type": "integer" | |
}, | |
"transactionInfo": { | |
"$ref": "#/definitions/TransactionType" | |
}, | |
"evse": { | |
"$ref": "#/definitions/EVSEType" | |
}, | |
"idToken": { | |
"$ref": "#/definitions/IdTokenType" | |
} | |
}, | |
"required": [ | |
"eventType", | |
"timestamp", | |
"triggerReason", | |
"seqNo", | |
"transactionInfo" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment