goecharger / go-eCharger-API-v2

New API specification for V3 and V4 go-eCharger
90 stars 21 forks source link

OCPP unable to clear ChargeProfile when using StackLevel 0 #187

Open evolit-ambrosch opened 8 months ago

evolit-ambrosch commented 8 months ago

When using stackLevel 0, the ClearChargingProfile returns the status Unknown, after successfully setting a Charge Profile. When repeating the same requests with stackLevel 1 instead, it works (status Accepted). SetChargingProfile Request (successful):

[OCPP e3b21ae176874cd39ee55cc0778be4d0] Sending request SetChargingProfile (UniqueId cc93a691d64c44e7b94366b91e46cd93): {"connectorId":1,"csChargingProfiles":{"chargingProfileId":1,"stackLevel":0,"chargingProfilePurpose":"TxProfile","chargingProfileKind":"Absolute","chargingSchedule":{"startSchedule":"2023-12-22T10:10:55.4265487Z","chargingRateUnit":"A","chargingSchedulePeriod":[{"startPeriod":0,"limit":0,"numberPhases":1}]}}}

[OCPP` e3b21ae176874cd39ee55cc0778be4d0] Received response to SetChargingProfile (UniqueId cc93a691d64c44e7b94366b91e46cd93): {"status":"Accepted"}

Trying to ClearChargingProfile afterwards:

[OCPP e3b21ae176874cd39ee55cc0778be4d0] Sending request ClearChargingProfile (UniqueId 0074f10871be4781b847373aa82e2f7e): {"connectorId":1,"chargingProfilePurpose":"TxProfile","stackLevel":0}

[OCPP e3b21ae176874cd39ee55cc0778be4d0] Received response to ClearChargingProfile (UniqueId 0074f10871be4781b847373aa82e2f7e): {"status":"Unknown"}

Hardware: go-e charger gemini 11kw flex, and fronius wattpilot go 11kw

Firmware: 55.8, and 56.1Beta

evolit-ambrosch commented 8 months ago

The Problem here is that the OCPP specification specifically includes and suggests using stacklevel 0, and other ocpp implementations of other brands ONLY work with stack level 0, so this affects cross compatibility.