kirby-ocpp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +129 -0
- package/THIRD_PARTY_NOTICES.md +15 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +72 -0
- package/dist/config.d.ts +2 -0
- package/dist/config.js +53 -0
- package/dist/ocpp/client.d.ts +59 -0
- package/dist/ocpp/client.js +294 -0
- package/dist/ocpp/schema-validator.d.ts +15 -0
- package/dist/ocpp/schema-validator.js +75 -0
- package/dist/ocpp/schemas/json/Authorize.json +16 -0
- package/dist/ocpp/schemas/json/AuthorizeResponse.json +40 -0
- package/dist/ocpp/schemas/json/BootNotification.json +49 -0
- package/dist/ocpp/schemas/json/BootNotificationResponse.json +30 -0
- package/dist/ocpp/schemas/json/CancelReservation.json +15 -0
- package/dist/ocpp/schemas/json/CancelReservationResponse.json +20 -0
- package/dist/ocpp/schemas/json/ChangeAvailability.json +24 -0
- package/dist/ocpp/schemas/json/ChangeAvailabilityResponse.json +21 -0
- package/dist/ocpp/schemas/json/ChangeConfiguration.json +21 -0
- package/dist/ocpp/schemas/json/ChangeConfigurationResponse.json +22 -0
- package/dist/ocpp/schemas/json/ClearCache.json +8 -0
- package/dist/ocpp/schemas/json/ClearCacheResponse.json +20 -0
- package/dist/ocpp/schemas/json/ClearChargingProfile.json +27 -0
- package/dist/ocpp/schemas/json/ClearChargingProfileResponse.json +20 -0
- package/dist/ocpp/schemas/json/DataTransfer.json +23 -0
- package/dist/ocpp/schemas/json/DataTransferResponse.json +25 -0
- package/dist/ocpp/schemas/json/DiagnosticsStatusNotification.json +22 -0
- package/dist/ocpp/schemas/json/DiagnosticsStatusNotificationResponse.json +8 -0
- package/dist/ocpp/schemas/json/FirmwareStatusNotification.json +25 -0
- package/dist/ocpp/schemas/json/FirmwareStatusNotificationResponse.json +8 -0
- package/dist/ocpp/schemas/json/GetCompositeSchedule.json +27 -0
- package/dist/ocpp/schemas/json/GetCompositeScheduleResponse.json +79 -0
- package/dist/ocpp/schemas/json/GetConfiguration.json +16 -0
- package/dist/ocpp/schemas/json/GetConfigurationResponse.json +40 -0
- package/dist/ocpp/schemas/json/GetDiagnostics.json +30 -0
- package/dist/ocpp/schemas/json/GetDiagnosticsResponse.json +13 -0
- package/dist/ocpp/schemas/json/GetLocalListVersion.json +8 -0
- package/dist/ocpp/schemas/json/GetLocalListVersionResponse.json +15 -0
- package/dist/ocpp/schemas/json/Heartbeat.json +8 -0
- package/dist/ocpp/schemas/json/HeartbeatResponse.json +16 -0
- package/dist/ocpp/schemas/json/MeterValues.json +151 -0
- package/dist/ocpp/schemas/json/MeterValuesResponse.json +8 -0
- package/dist/ocpp/schemas/json/RemoteStartTransaction.json +127 -0
- package/dist/ocpp/schemas/json/RemoteStartTransactionResponse.json +20 -0
- package/dist/ocpp/schemas/json/RemoteStopTransaction.json +15 -0
- package/dist/ocpp/schemas/json/RemoteStopTransactionResponse.json +20 -0
- package/dist/ocpp/schemas/json/ReserveNow.json +33 -0
- package/dist/ocpp/schemas/json/ReserveNowResponse.json +23 -0
- package/dist/ocpp/schemas/json/Reset.json +20 -0
- package/dist/ocpp/schemas/json/ResetResponse.json +20 -0
- package/dist/ocpp/schemas/json/SendLocalList.json +68 -0
- package/dist/ocpp/schemas/json/SendLocalListResponse.json +22 -0
- package/dist/ocpp/schemas/json/SetChargingProfile.json +124 -0
- package/dist/ocpp/schemas/json/SetChargingProfileResponse.json +21 -0
- package/dist/ocpp/schemas/json/StartTransaction.json +32 -0
- package/dist/ocpp/schemas/json/StartTransactionResponse.json +44 -0
- package/dist/ocpp/schemas/json/StatusNotification.json +70 -0
- package/dist/ocpp/schemas/json/StatusNotificationResponse.json +8 -0
- package/dist/ocpp/schemas/json/StopTransaction.json +177 -0
- package/dist/ocpp/schemas/json/StopTransactionResponse.json +37 -0
- package/dist/ocpp/schemas/json/TriggerMessage.json +27 -0
- package/dist/ocpp/schemas/json/TriggerMessageResponse.json +21 -0
- package/dist/ocpp/schemas/json/UnlockConnector.json +15 -0
- package/dist/ocpp/schemas/json/UnlockConnectorResponse.json +21 -0
- package/dist/ocpp/schemas/json/UpdateFirmware.json +27 -0
- package/dist/ocpp/schemas/json/UpdateFirmwareResponse.json +8 -0
- package/dist/ocpp/types.d.ts +106 -0
- package/dist/ocpp/types.js +1 -0
- package/dist/station/authorization.d.ts +20 -0
- package/dist/station/authorization.js +78 -0
- package/dist/station/charging-profile-registry.d.ts +18 -0
- package/dist/station/charging-profile-registry.js +125 -0
- package/dist/station/configuration-commands.d.ts +11 -0
- package/dist/station/configuration-commands.js +29 -0
- package/dist/station/configuration-registry.d.ts +13 -0
- package/dist/station/configuration-registry.js +39 -0
- package/dist/station/configuration.d.ts +7 -0
- package/dist/station/configuration.js +88 -0
- package/dist/station/connector-registry.d.ts +25 -0
- package/dist/station/connector-registry.js +89 -0
- package/dist/station/connector-status.d.ts +7 -0
- package/dist/station/connector-status.js +66 -0
- package/dist/station/local-auth-list.d.ts +8 -0
- package/dist/station/local-auth-list.js +31 -0
- package/dist/station/maintenance-lifecycle.d.ts +25 -0
- package/dist/station/maintenance-lifecycle.js +110 -0
- package/dist/station/meter-value-scheduler.d.ts +21 -0
- package/dist/station/meter-value-scheduler.js +78 -0
- package/dist/station/metering.d.ts +15 -0
- package/dist/station/metering.js +138 -0
- package/dist/station/ocpp-message.d.ts +2 -0
- package/dist/station/ocpp-message.js +9 -0
- package/dist/station/offline-transaction-sync.d.ts +29 -0
- package/dist/station/offline-transaction-sync.js +99 -0
- package/dist/station/payload.d.ts +4 -0
- package/dist/station/payload.js +12 -0
- package/dist/station/persistence.d.ts +28 -0
- package/dist/station/persistence.js +206 -0
- package/dist/station/reservation-rules.d.ts +3 -0
- package/dist/station/reservation-rules.js +18 -0
- package/dist/station/reservation-scheduler.d.ts +11 -0
- package/dist/station/reservation-scheduler.js +33 -0
- package/dist/station/smart-charging.d.ts +45 -0
- package/dist/station/smart-charging.js +251 -0
- package/dist/station/status-scheduler.d.ts +16 -0
- package/dist/station/status-scheduler.js +58 -0
- package/dist/station/transaction-message-retry.d.ts +3 -0
- package/dist/station/transaction-message-retry.js +7 -0
- package/dist/station/transaction-rules.d.ts +7 -0
- package/dist/station/transaction-rules.js +34 -0
- package/dist/station/trigger-message.d.ts +2 -0
- package/dist/station/trigger-message.js +11 -0
- package/dist/station-store.d.ts +41 -0
- package/dist/station-store.js +104 -0
- package/dist/station.d.ts +112 -0
- package/dist/station.js +1201 -0
- package/dist/tui.d.ts +95 -0
- package/dist/tui.js +1601 -0
- package/docs/OCPP_1.6J_CONFORMANCE.md +61 -0
- package/package.json +62 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { existsSync, readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { Validator } from "jsonschema";
|
|
5
|
+
export class OcppSchemaValidator {
|
|
6
|
+
validator = new Validator();
|
|
7
|
+
schemas = new Map();
|
|
8
|
+
constructor(schemaDirectory = findSchemaDirectory()) {
|
|
9
|
+
for (const file of readdirSync(schemaDirectory)) {
|
|
10
|
+
if (!file.endsWith(".json")) {
|
|
11
|
+
continue;
|
|
12
|
+
}
|
|
13
|
+
const schema = JSON.parse(readFileSync(join(schemaDirectory, file), "utf8"));
|
|
14
|
+
const name = file.replace(/\.json$/, "");
|
|
15
|
+
this.schemas.set(name, stripSchemaMetadata(schema, true));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
hasRequestSchema(action) {
|
|
19
|
+
return this.schemas.has(action);
|
|
20
|
+
}
|
|
21
|
+
hasResponseSchema(action) {
|
|
22
|
+
return this.schemas.has(`${action}Response`);
|
|
23
|
+
}
|
|
24
|
+
validateRequest(action, payload) {
|
|
25
|
+
return this.validate(action, payload);
|
|
26
|
+
}
|
|
27
|
+
validateResponse(action, payload) {
|
|
28
|
+
return this.validate(`${action}Response`, payload);
|
|
29
|
+
}
|
|
30
|
+
validate(schemaName, payload) {
|
|
31
|
+
const schema = this.schemas.get(schemaName);
|
|
32
|
+
if (!schema) {
|
|
33
|
+
return {
|
|
34
|
+
valid: false,
|
|
35
|
+
errors: [`No JSON schema found for ${schemaName}`],
|
|
36
|
+
errorNames: ["schema"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
const result = this.validator.validate(payload, schema);
|
|
40
|
+
return {
|
|
41
|
+
valid: result.valid,
|
|
42
|
+
errors: result.errors.map((error) => error.stack),
|
|
43
|
+
errorNames: result.errors.map((error) => error.name)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function stripSchemaMetadata(value, root = false) {
|
|
48
|
+
if (Array.isArray(value)) {
|
|
49
|
+
return value.map((item) => stripSchemaMetadata(item));
|
|
50
|
+
}
|
|
51
|
+
if (!value || typeof value !== "object") {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
54
|
+
const output = {};
|
|
55
|
+
for (const [key, child] of Object.entries(value)) {
|
|
56
|
+
if (key === "$schema" || key === "title" || (root && key === "id")) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
output[key] = stripSchemaMetadata(child);
|
|
60
|
+
}
|
|
61
|
+
return output;
|
|
62
|
+
}
|
|
63
|
+
function findSchemaDirectory() {
|
|
64
|
+
const currentDir = dirname(fileURLToPath(import.meta.url));
|
|
65
|
+
const candidates = [
|
|
66
|
+
join(currentDir, "schemas/json"),
|
|
67
|
+
join(currentDir, "../../src/ocpp/schemas/json")
|
|
68
|
+
];
|
|
69
|
+
for (const candidate of candidates) {
|
|
70
|
+
if (existsSync(candidate)) {
|
|
71
|
+
return candidate;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
throw new Error("OCPP 1.6J JSON schemas were not found");
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:AuthorizeRequest",
|
|
4
|
+
"title": "AuthorizeRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"idTag": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"maxLength": 20
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"required": [
|
|
14
|
+
"idTag"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:AuthorizeResponse",
|
|
4
|
+
"title": "AuthorizeResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"idTagInfo": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"expiryDate": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "date-time"
|
|
13
|
+
},
|
|
14
|
+
"parentIdTag": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"maxLength": 20
|
|
17
|
+
},
|
|
18
|
+
"status": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"enum": [
|
|
22
|
+
"Accepted",
|
|
23
|
+
"Blocked",
|
|
24
|
+
"Expired",
|
|
25
|
+
"Invalid",
|
|
26
|
+
"ConcurrentTx"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false,
|
|
31
|
+
"required": [
|
|
32
|
+
"status"
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"required": [
|
|
38
|
+
"idTagInfo"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:BootNotificationRequest",
|
|
4
|
+
"title": "BootNotificationRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"chargePointVendor": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"maxLength": 20
|
|
10
|
+
},
|
|
11
|
+
"chargePointModel": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"maxLength": 20
|
|
14
|
+
},
|
|
15
|
+
"chargePointSerialNumber": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"maxLength": 25
|
|
18
|
+
},
|
|
19
|
+
"chargeBoxSerialNumber": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"maxLength": 25
|
|
22
|
+
},
|
|
23
|
+
"firmwareVersion": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"maxLength": 50
|
|
26
|
+
},
|
|
27
|
+
"iccid": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"maxLength": 20
|
|
30
|
+
},
|
|
31
|
+
"imsi": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"maxLength": 20
|
|
34
|
+
},
|
|
35
|
+
"meterType": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"maxLength": 25
|
|
38
|
+
},
|
|
39
|
+
"meterSerialNumber": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"maxLength": 25
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": [
|
|
46
|
+
"chargePointVendor",
|
|
47
|
+
"chargePointModel"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:BootNotificationResponse",
|
|
4
|
+
"title": "BootNotificationResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Pending",
|
|
13
|
+
"Rejected"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
"currentTime": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"format": "date-time"
|
|
19
|
+
},
|
|
20
|
+
"interval": {
|
|
21
|
+
"type": "integer"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false,
|
|
25
|
+
"required": [
|
|
26
|
+
"status",
|
|
27
|
+
"currentTime",
|
|
28
|
+
"interval"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:CancelReservationRequest",
|
|
4
|
+
"title": "CancelReservationRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"reservationId": {
|
|
8
|
+
"type": "integer"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"required": [
|
|
13
|
+
"reservationId"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:CancelReservationResponse",
|
|
4
|
+
"title": "CancelReservationResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Rejected"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": [
|
|
18
|
+
"status"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:ChangeAvailabilityRequest",
|
|
4
|
+
"title": "ChangeAvailabilityRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"connectorId": {
|
|
8
|
+
"type": "integer"
|
|
9
|
+
},
|
|
10
|
+
"type": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"enum": [
|
|
14
|
+
"Inoperative",
|
|
15
|
+
"Operative"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": [
|
|
21
|
+
"connectorId",
|
|
22
|
+
"type"
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:ChangeAvailabilityResponse",
|
|
4
|
+
"title": "ChangeAvailabilityResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Rejected",
|
|
13
|
+
"Scheduled"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": [
|
|
19
|
+
"status"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:ChangeConfigurationRequest",
|
|
4
|
+
"title": "ChangeConfigurationRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"key": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"maxLength": 50
|
|
10
|
+
},
|
|
11
|
+
"value": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"maxLength": 500
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": [
|
|
18
|
+
"key",
|
|
19
|
+
"value"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:ChangeConfigurationResponse",
|
|
4
|
+
"title": "ChangeConfigurationResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Rejected",
|
|
13
|
+
"RebootRequired",
|
|
14
|
+
"NotSupported"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": [
|
|
20
|
+
"status"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:ClearCacheResponse",
|
|
4
|
+
"title": "ClearCacheResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Rejected"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": [
|
|
18
|
+
"status"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:ClearChargingProfileRequest",
|
|
4
|
+
"title": "ClearChargingProfileRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"id": {
|
|
8
|
+
"type": "integer"
|
|
9
|
+
},
|
|
10
|
+
"connectorId": {
|
|
11
|
+
"type": "integer"
|
|
12
|
+
},
|
|
13
|
+
"chargingProfilePurpose": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"enum": [
|
|
17
|
+
"ChargePointMaxProfile",
|
|
18
|
+
"TxDefaultProfile",
|
|
19
|
+
"TxProfile"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"stackLevel": {
|
|
23
|
+
"type": "integer"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"additionalProperties": false
|
|
27
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:ClearChargingProfileResponse",
|
|
4
|
+
"title": "ClearChargingProfileResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Unknown"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": [
|
|
18
|
+
"status"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:DataTransferRequest",
|
|
4
|
+
"title": "DataTransferRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"vendorId": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"maxLength": 255
|
|
10
|
+
},
|
|
11
|
+
"messageId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"maxLength": 50
|
|
14
|
+
},
|
|
15
|
+
"data": {
|
|
16
|
+
"type": "string"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": [
|
|
21
|
+
"vendorId"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:DataTransferResponse",
|
|
4
|
+
"title": "DataTransferResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Rejected",
|
|
13
|
+
"UnknownMessageId",
|
|
14
|
+
"UnknownVendorId"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"data": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": [
|
|
23
|
+
"status"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:DiagnosticsStatusNotificationRequest",
|
|
4
|
+
"title": "DiagnosticsStatusNotificationRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Idle",
|
|
12
|
+
"Uploaded",
|
|
13
|
+
"UploadFailed",
|
|
14
|
+
"Uploading"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": [
|
|
20
|
+
"status"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:FirmwareStatusNotificationRequest",
|
|
4
|
+
"title": "FirmwareStatusNotificationRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Downloaded",
|
|
12
|
+
"DownloadFailed",
|
|
13
|
+
"Downloading",
|
|
14
|
+
"Idle",
|
|
15
|
+
"InstallationFailed",
|
|
16
|
+
"Installing",
|
|
17
|
+
"Installed"
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": false,
|
|
22
|
+
"required": [
|
|
23
|
+
"status"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:GetCompositeScheduleRequest",
|
|
4
|
+
"title": "GetCompositeScheduleRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"connectorId": {
|
|
8
|
+
"type": "integer"
|
|
9
|
+
},
|
|
10
|
+
"duration": {
|
|
11
|
+
"type": "integer"
|
|
12
|
+
},
|
|
13
|
+
"chargingRateUnit": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"enum": [
|
|
17
|
+
"A",
|
|
18
|
+
"W"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"required": [
|
|
24
|
+
"connectorId",
|
|
25
|
+
"duration"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:GetCompositeScheduleResponse",
|
|
4
|
+
"title": "GetCompositeScheduleResponse",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"status": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"additionalProperties": false,
|
|
10
|
+
"enum": [
|
|
11
|
+
"Accepted",
|
|
12
|
+
"Rejected"
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
"connectorId": {
|
|
16
|
+
"type": "integer"
|
|
17
|
+
},
|
|
18
|
+
"scheduleStart": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"format": "date-time"
|
|
21
|
+
},
|
|
22
|
+
"chargingSchedule": {
|
|
23
|
+
"type": "object",
|
|
24
|
+
"properties": {
|
|
25
|
+
"duration": {
|
|
26
|
+
"type": "integer"
|
|
27
|
+
},
|
|
28
|
+
"startSchedule": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"format": "date-time"
|
|
31
|
+
},
|
|
32
|
+
"chargingRateUnit": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"enum": [
|
|
36
|
+
"A",
|
|
37
|
+
"W"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"chargingSchedulePeriod": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"startPeriod": {
|
|
46
|
+
"type": "integer"
|
|
47
|
+
},
|
|
48
|
+
"limit": {
|
|
49
|
+
"type": "number",
|
|
50
|
+
"multipleOf" : 0.1
|
|
51
|
+
},
|
|
52
|
+
"numberPhases": {
|
|
53
|
+
"type": "integer"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"required": [
|
|
58
|
+
"startPeriod",
|
|
59
|
+
"limit"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"minChargingRate": {
|
|
64
|
+
"type": "number",
|
|
65
|
+
"multipleOf" : 0.1
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"required": [
|
|
70
|
+
"chargingRateUnit",
|
|
71
|
+
"chargingSchedulePeriod"
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"additionalProperties": false,
|
|
76
|
+
"required": [
|
|
77
|
+
"status"
|
|
78
|
+
]
|
|
79
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
3
|
+
"id": "urn:OCPP:1.6:2019:12:GetConfigurationRequest",
|
|
4
|
+
"title": "GetConfigurationRequest",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"key": {
|
|
8
|
+
"type": "array",
|
|
9
|
+
"items": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"maxLength": 50
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"additionalProperties": false
|
|
16
|
+
}
|