SetChargingProfile
Installs a charging profile limiting current or power on a schedule. The stacking model is unchanged from 1.6.
- Version
- OCPP 2.0.1
- Direction
- CSMS → Charge Point
- Functional block
- Smart Charging
SetChargingProfile also exists in OCPP 1.6, with a different payload. See the OCPP 1.6 version.
The concepts carry over from 1.6 intact: purposes, stack levels, schedule periods with startPeriod in seconds relative to the schedule start, and higher stack level replacing lower rather than adding to it.
What changed is the surrounding structure. Profiles attach to an evseId rather than a connector, chargingSchedule is an array so a profile can offer alternatives, and 2.0.1 adds ChargingStationExternalConstraints for limits imposed by a local energy management system.
Request
| Field | Type | Required | Description |
|---|---|---|---|
evseId | integer | Required | The EVSE. 0 applies to the whole station. |
chargingProfile | ChargingProfileType | Required | id, stackLevel, chargingProfilePurpose, chargingProfileKind, chargingSchedule[], and transactionId for a TxProfile. |
[2, "19223201", "SetChargingProfile", {
"evseId": 1,
"chargingProfile": {
"id": 100,
"stackLevel": 0,
"chargingProfilePurpose": "TxDefaultProfile",
"chargingProfileKind": "Absolute",
"chargingSchedule": [{
"id": 1,
"chargingRateUnit": "A",
"chargingSchedulePeriod": [
{ "startPeriod": 0, "limit": 32.0 },
{ "startPeriod": 21600, "limit": 16.0 }
]
}]
}
}]Response
| Field | Type | Required | Description |
|---|---|---|---|
status | ChargingProfileStatusEnumType | Required | Accepted or Rejected. |
statusInfo | StatusInfoType | Optional | Reason code — worth reading, Rejected alone says little. |
[3, "19223201", {
"status": "Accepted"
}]Values
ChargingProfilePurposeEnumType
| Value | Meaning |
|---|---|
ChargingStationMaxProfile | Physical ceiling for the whole station. Set on evseId 0. |
TxDefaultProfile | Default limits for transactions. |
TxProfile | One specific running transaction. Requires transactionId. |
ChargingStationExternalConstraints | New in 2.0.1: a limit imposed by an external energy management system. |
ChargingProfileKindEnumType
| Value | Meaning |
|---|---|
Absolute | Anchored to startSchedule. |
Recurring | Repeats daily or weekly. |
Relative | startPeriod: 0 is when the transaction starts. |
Implementation notes
`NotSupported` is gone from the status set. 2.0.1 has only Accepted and Rejected, so statusInfo.reasonCode is the only thing distinguishing a malformed schedule from an unsupported purpose.
Higher stack level still replaces lower, not adds. Across purposes the effective limit is the lowest applicable one — same rule as 1.6.
`numberPhases` still defaults to 3. On single-phase hardware that default makes a computed power limit three times too high, exactly as in 1.6.
chargingSchedule is an array in 2.0.1. Most implementations send one entry; several are used for ISO 15118 negotiation.