1 import type { JsonObject
} from
'./JsonType';
3 export type ChargingStationData
= {
4 stationInfo
: ChargingStationInfo
;
7 bootNotificationResponse
: BootNotificationResponse
;
8 connectors
: ConnectorStatus
[];
9 automaticTransactionGeneratorStatuses
?: Status
[];
12 export type ChargingStationInfo
= {
14 chargingStationId
?: string;
15 chargePointModel
: string;
16 chargePointVendor
: string;
17 firmwareVersion
?: string;
18 numberOfConnectors
?: number | number[];
21 templateHash
?: string;
22 chargeBoxSerialNumber
?: string;
23 chargePointSerialNumber
?: string;
24 meterSerialNumber
?: string;
25 maximumPower
?: number; // Always in Watt
26 maximumAmperage
?: number; // Always in Ampere
27 supervisionUrls
?: string | string[];
28 supervisionUrlOcppConfiguration
?: boolean;
29 supervisionUrlOcppKey
?: string;
30 supervisionUser
?: string;
31 supervisionPassword
?: string;
32 ocppVersion
?: OCPPVersion
;
33 ocppProtocol
?: OCPPProtocol
;
34 ocppStrictCompliance
?: boolean;
35 ocppPersistentConfiguration
?: boolean;
36 stationInfoPersistentConfiguration
?: boolean;
37 authorizationFile
?: string;
43 powerSharedByConnectors
?: boolean;
44 currentOutType
?: CurrentType
;
46 numberOfPhases
?: number;
47 useConnectorId0
?: boolean;
48 randomConnectors
?: boolean;
50 autoRegister
?: boolean;
51 autoReconnectMaxRetries
?: number;
52 reconnectExponentialDelay
?: boolean;
53 registrationMaxRetries
?: number;
54 enableStatistics
?: boolean;
55 mustAuthorizeAtRemoteStart
?: boolean;
56 amperageLimitationOcppKey
?: string;
57 amperageLimitationUnit
?: AmpereUnits
;
58 beginEndMeterValues
?: boolean;
59 outOfOrderEndMeterValues
?: boolean;
60 meteringPerTransaction
?: boolean;
61 transactionDataMeterValues
?: boolean;
62 mainVoltageMeterValues
?: boolean;
63 phaseLineToLineVoltageMeterValues
?: boolean;
64 customValueLimitationMeterValues
?: boolean;
65 commandsSupport
?: CommandsSupport
;
68 export enum OCPP16IncomingRequestCommand
{
70 CLEAR_CACHE
= 'ClearCache',
71 CHANGE_AVAILABILITY
= 'ChangeAvailability',
72 UNLOCK_CONNECTOR
= 'UnlockConnector',
73 GET_CONFIGURATION
= 'GetConfiguration',
74 CHANGE_CONFIGURATION
= 'ChangeConfiguration',
75 SET_CHARGING_PROFILE
= 'SetChargingProfile',
76 CLEAR_CHARGING_PROFILE
= 'ClearChargingProfile',
77 REMOTE_START_TRANSACTION
= 'RemoteStartTransaction',
78 REMOTE_STOP_TRANSACTION
= 'RemoteStopTransaction',
79 GET_DIAGNOSTICS
= 'GetDiagnostics',
80 TRIGGER_MESSAGE
= 'TriggerMessage',
83 export type IncomingRequestCommand
= OCPP16IncomingRequestCommand
;
85 export const IncomingRequestCommand
= {
86 ...OCPP16IncomingRequestCommand
,
89 export enum OCPP16RequestCommand
{
90 BOOT_NOTIFICATION
= 'BootNotification',
91 HEARTBEAT
= 'Heartbeat',
92 STATUS_NOTIFICATION
= 'StatusNotification',
93 AUTHORIZE
= 'Authorize',
94 START_TRANSACTION
= 'StartTransaction',
95 STOP_TRANSACTION
= 'StopTransaction',
96 METER_VALUES
= 'MeterValues',
97 DIAGNOSTICS_STATUS_NOTIFICATION
= 'DiagnosticsStatusNotification',
100 export type RequestCommand
= OCPP16RequestCommand
;
102 export const RequestCommand
= {
103 ...OCPP16RequestCommand
,
106 export type BootNotificationResponse
= OCPP16BootNotificationResponse
;
108 export enum OCPP16RegistrationStatus
{
109 ACCEPTED
= 'Accepted',
111 REJECTED
= 'Rejected',
114 export interface OCPP16BootNotificationResponse
extends JsonObject
{
115 status: OCPP16RegistrationStatus
;
120 export interface CommandsSupport
{
121 incomingCommands
: Record
<IncomingRequestCommand
, boolean>;
122 outgoingCommands
?: Record
<RequestCommand
, boolean>;
125 export enum OCPPVersion
{
130 export enum OCPPProtocol
{
135 export enum CurrentType
{
140 export enum Voltage
{
147 export enum AmpereUnits
{
154 export type ConnectorStatus
= {
155 availability
: AvailabilityType
;
156 bootStatus
?: ChargePointStatus
;
157 status?: ChargePointStatus
;
158 authorizeIdTag
?: string;
159 idTagAuthorized
?: boolean;
160 localAuthorizeIdTag
?: string;
161 idTagLocalAuthorized
?: boolean;
162 transactionRemoteStarted
?: boolean;
163 transactionStarted
?: boolean;
164 transactionId
?: number;
165 transactionIdTag
?: string;
166 energyActiveImportRegisterValue
?: number; // In Wh
167 transactionEnergyActiveImportRegisterValue
?: number; // In Wh
170 export type AvailabilityType
= OCPP16AvailabilityType
;
172 export enum OCPP16AvailabilityType
{
173 INOPERATIVE
= 'Inoperative',
174 OPERATIVE
= 'Operative',
177 export type ChargePointStatus
= OCPP16ChargePointStatus
;
179 export enum OCPP16ChargePointStatus
{
180 AVAILABLE
= 'Available',
181 PREPARING
= 'Preparing',
182 CHARGING
= 'Charging',
183 OCCUPIED
= 'Occupied',
184 SUSPENDED_EVSE
= 'SuspendedEVSE',
185 SUSPENDED_EV
= 'SuspendedEV',
186 FINISHING
= 'Finishing',
187 RESERVED
= 'Reserved',
188 UNAVAILABLE
= 'Unavailable',
192 export type Status
= {
198 authorizeRequests
?: number;
199 acceptedAuthorizeRequests
?: number;
200 rejectedAuthorizeRequests
?: number;
201 startTransactionRequests
?: number;
202 acceptedStartTransactionRequests
?: number;
203 rejectedStartTransactionRequests
?: number;
204 stopTransactionRequests
?: number;
205 acceptedStopTransactionRequests
?: number;
206 rejectedStopTransactionRequests
?: number;
207 skippedConsecutiveTransactions
?: number;
208 skippedTransactions
?: number;