wrong paramName
MODIFY
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action-get-composite-schedule.json
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action-get-composite-schedule.json
"type": "number",
"sanitize": "mongo"
},
- "schedulingUnit": {
+ "chargingRateUnit": {
"type": "string",
"sanitize": "mongo",
"enum": ["A", "W"]

MODIFY
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action.json
src/assets/server/rest/v1/schemas/chargingstation/chargingstation-action.json
"sanitize": "mongo",
"enum": ["A", "W"]
},
- "schedulingUnit": {
- "type": "string",
- "sanitize": "mongo",
- "enum": ["A", "W"]
- },
"chargingProfilePurpose": {
"$ref": "chargingstation.json#/definitions/chargingProfile/properties/profile/properties/chargingProfilePurpose"
},

MODIFY
src/integration/charging-station-vendor/ChargingStationVendorIntegration.ts
src/integration/charging-station-vendor/ChargingStationVendorIntegration.ts
import { ChargingProfile, ChargingProfileKindType, ChargingProfilePurposeType, ChargingRateUnitType, ChargingSchedule, ChargingSchedulePeriod, RecurrencyKindType } from '../../types/ChargingProfile';
import ChargingStation, { ChargePoint, ConnectorCurrentLimit, ConnectorCurrentLimitSource, StaticLimitAmps } from '../../types/ChargingStation';
-import { OCPPChangeConfigurationCommandResult, OCPPChargingProfileStatus, OCPPClearChargingProfileCommandResult, OCPPClearChargingProfileStatus, OCPPConfigurationStatus, OCPPGetCompositeScheduleCommandResult, OCPPSetChargingProfileCommandResult, SchedulingUnitRate } from '../../types/ocpp/OCPPClient';
+import { OCPPChangeConfigurationCommandResult, OCPPChargingProfileStatus, OCPPClearChargingProfileCommandResult, OCPPClearChargingProfileStatus, OCPPConfigurationStatus, OCPPGetCompositeScheduleCommandResult, OCPPSetChargingProfileCommandResult } from '../../types/ocpp/OCPPClient';
import BackendError from '../../exception/BackendError';
import ChargingStationClientFactory from '../../client/ocpp/ChargingStationClientFactory';
@@ -332,7 +332,7 @@ export default abstract class ChargingStationVendorIntegration {
}
public async getCompositeSchedule(tenant: Tenant, chargingStation: ChargingStation, chargePoint: ChargePoint,
- connectorID: number, durationSecs: number, schedulingUnit?: SchedulingUnitRate): Promise<OCPPGetCompositeScheduleCommandResult> {
+ connectorID: number, durationSecs: number, chargingRateUnit?: ChargingRateUnitType): Promise<OCPPGetCompositeScheduleCommandResult> {
// Check if feature is supported
if (!chargingStation.capabilities?.supportChargingProfiles) {
throw new BackendError({
@@ -365,7 +365,7 @@ export default abstract class ChargingStationVendorIntegration {
const result = await chargingStationClient.getCompositeSchedule({
connectorId: connectorID,
duration: durationSecs,
- schedulingUnit: schedulingUnit
+ chargingRateUnit
});
// Convert
result.chargingSchedule = this.convertFromVendorChargingSchedule(chargingStation, chargePoint, result.connectorId, result.chargingSchedule);

MODIFY
src/server/rest/v1/service/ChargingStationService.ts
src/server/rest/v1/service/ChargingStationService.ts
@@ -1756,14 +1756,14 @@ export default class ChargingStationService {
// Connector ID > 0
const chargePoint = Utils.getChargePointFromID(chargingStation, connector.chargePointID);
result.push(await chargingStationVendor.getCompositeSchedule(
- req.tenant, chargingStation, chargePoint, connector.connectorId, filteredRequest.args.duration, filteredRequest.args.schedulingUnit));
+ req.tenant, chargingStation, chargePoint, connector.connectorId, filteredRequest.args.duration, filteredRequest.args.chargingRateUnit));
}
} else {
// Connector ID > 0
const connector = Utils.getConnectorFromID(chargingStation, filteredRequest.args.connectorId);
const chargePoint = Utils.getChargePointFromID(chargingStation, connector?.chargePointID);
result = await chargingStationVendor.getCompositeSchedule(
- req.tenant, chargingStation, chargePoint, filteredRequest.args.connectorId, filteredRequest.args.duration, filteredRequest.args.schedulingUnit);
+ req.tenant, chargingStation, chargePoint, filteredRequest.args.connectorId, filteredRequest.args.duration, filteredRequest.args.chargingRateUnit);
}
return result;
}

MODIFY
src/types/ocpp/OCPPClient.ts
src/types/ocpp/OCPPClient.ts
@@ -129,16 +129,10 @@ export enum OCPPChargingProfileStatus {
REJECTED = 'Rejected',
NOT_SUPPORTED = 'NotSupported'
}
-
-export enum SchedulingUnitRate {
- A = 'A',
- W = 'W'
-}
-
export interface OCPPGetCompositeScheduleCommandParam extends OCPPCommandParam {
connectorId: number;
duration: number;
- schedulingUnit?: SchedulingUnitRate;
+ chargingRateUnit?: ChargingRateUnitType;
}
export interface OCPPGetCompositeScheduleCommandResult {

wrong paramName