}
} while (!this.isInAcceptedState() && (registrationRetryCount <= this.getRegistrationMaxRetries() || this.getRegistrationMaxRetries() === -1));
}
- if (this.isInAcceptedState() && this.stationInfo.autoRegister) {
- await this.ocppRequestService.sendBootNotification(this.bootNotificationRequest.chargePointModel,
- this.bootNotificationRequest.chargePointVendor, this.bootNotificationRequest.chargeBoxSerialNumber, this.bootNotificationRequest.firmwareVersion);
- }
if (this.isInAcceptedState()) {
await this.startMessageSequence();
this.stopped && (this.stopped = false);
}
private async startMessageSequence(): Promise<void> {
+ if (this.stationInfo.autoRegister) {
+ await this.ocppRequestService.sendBootNotification(this.bootNotificationRequest.chargePointModel,
+ this.bootNotificationRequest.chargePointVendor, this.bootNotificationRequest.chargeBoxSerialNumber, this.bootNotificationRequest.firmwareVersion);
+ }
// Start WebSocket ping
this.startWebSocketPing();
// Start heartbeat
}
protected handleIncomingRequestError<T>(commandName: IncomingRequestCommand, error: Error, errorOcppResponse?: T): T {
- logger.error(this.chargingStation.logPrefix() + ' Incoming request command ' + commandName + ' error: %j', error);
+ logger.error(this.chargingStation.logPrefix() + ' Incoming request command %s error: %j', commandName, error);
if (errorOcppResponse) {
return errorOcppResponse;
}
}
protected handleRequestError(commandName: RequestCommand, error: Error): void {
- logger.error(this.chargingStation.logPrefix() + ' Request command ' + commandName + ' error: %j', error);
+ logger.error(this.chargingStation.logPrefix() + ' Request command %s error: %j', commandName, error);
throw error;
}
import { StorageType } from './Storage';
import type { WorkerChoiceStrategy } from 'poolifier';
import { WorkerProcessType } from './Worker';
-import { level } from 'winston';
export enum SupervisionUrlDistribution {
ROUND_ROBIN = 'round-robin',
import { WorkerProcessType } from '../types/Worker';
import chalk from 'chalk';
import fs from 'fs';
-import { level } from 'winston';
import path from 'path';
export default class Configuration {