Open olga2323 opened 1 year ago
Hello,
I just tested this and it didn't throw any validation errors at all:
func test(chargePointID string) {
cProfile := types.ChargingProfile{}
cProfile.ChargingProfileId = 1
cProfile.StackLevel = 0
cProfile.ChargingProfilePurpose = types.ChargingProfilePurposeChargePointMaxProfile
cProfile.ChargingProfileKind = types.ChargingProfileKindAbsolute
phases := 3
cProfile.ChargingSchedule = types.NewChargingSchedule(types.ChargingRateUnitAmperes,
types.ChargingSchedulePeriod{
StartPeriod: 0,
Limit: float64(10),
NumberPhases: &phases,
})
err := centralSystem.SetChargingProfile(chargePointID, func(confirmation *smartcharging.SetChargingProfileConfirmation, err error) {
if err != nil {
logDefault(chargePointID, smartcharging.SetChargingProfileFeatureName).Errorf("error on request: %v", err)
} else {
logDefault(chargePointID, smartcharging.SetChargingProfileFeatureName).Infof("status: %v", confirmation.Status)
}
}, 0, &cProfile)
if err != nil {
fmt.Println(err)
}
}
Is the error being returned on CSMS side or by the charging station? Also, can you confirm what error is being returned specifically?
Dear all,
when using 1.6 and SetChargingProfile like so:
returns an error when using
types.ChargingProfilePurposeChargePointMaxProfile
, withChargingProfilePurposeTxDefaultProfile
it works ok. I could not spot the issue but removing the validationchargingProfilePurpose
brings success, also usingChargingProfilePurposeTxDefaultProfile
works.Lets me know if I can bring more info.
Thanks for all the work.