+ async handleRequestUnlockConnector(commandPayload): Promise<UnlockResponse> {
+ const connectorId = Utils.convertToInt(commandPayload.connectorId);
+ if (connectorId === 0) {
+ logger.error(this._logPrefix() + ' Try to unlock connector ' + connectorId.toString());
+ return Constants.OCPP_RESPONSE_UNLOCK_NOT_SUPPORTED;
+ }
+ if (this.getConnector(connectorId).transactionStarted) {
+ const stopResponse = await this.sendStopTransaction(this.getConnector(connectorId).transactionId, StopTransactionReason.UNLOCK_COMMAND);
+ if (stopResponse.idTagInfo?.status === AuthorizationStatus.ACCEPTED) {
+ return Constants.OCPP_RESPONSE_UNLOCKED;
+ }
+ return Constants.OCPP_RESPONSE_UNLOCK_FAILED;
+ }
+ await this.sendStatusNotification(connectorId, ChargePointStatus.AVAILABLE);
+ return Constants.OCPP_RESPONSE_UNLOCKED;
+ }
+
+ _getConfigurationKey(key: string): ConfigurationKey {