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

FieldTypeRequiredDescription
evseIdintegerRequiredThe EVSE. 0 applies to the whole station.
chargingProfileChargingProfileTypeRequiredid, stackLevel, chargingProfilePurpose, chargingProfileKind, chargingSchedule[], and transactionId for a TxProfile.
json
[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

FieldTypeRequiredDescription
statusChargingProfileStatusEnumTypeRequiredAccepted or Rejected.
statusInfoStatusInfoTypeOptionalReason code — worth reading, Rejected alone says little.
json
[3, "19223201", {
  "status": "Accepted"
}]

Values

ChargingProfilePurposeEnumType

ValueMeaning
ChargingStationMaxProfilePhysical ceiling for the whole station. Set on evseId 0.
TxDefaultProfileDefault limits for transactions.
TxProfileOne specific running transaction. Requires transactionId.
ChargingStationExternalConstraintsNew in 2.0.1: a limit imposed by an external energy management system.

ChargingProfileKindEnumType

ValueMeaning
AbsoluteAnchored to startSchedule.
RecurringRepeats daily or weekly.
RelativestartPeriod: 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.