SetChargingProfile

Installs a charging profile that limits how much current or power a connector may deliver, and when.

Version
OCPP 1.6
Direction
CSMS → Charge Point
Feature profile
Smart Charging

SetChargingProfile also exists in OCPP 2.0.1, with a different payload. See the OCPP 2.0.1 version.

SetChargingProfile is the load-management message. A profile carries a schedule of limits, a purpose that decides what it applies to, and a stack level that decides which profile wins when several apply.

The nesting is the hard part: a profile contains a schedule, and a schedule contains a list of periods whose startPeriod values are seconds relative to the start of the schedule — not wall-clock times.

Request

FieldTypeRequiredDescription
connectorIdintegerRequiredConnector the profile applies to. 0 applies to the whole charge point.
csChargingProfilesChargingProfileRequiredThe profile itself. See the structure below.
json
[2, "19223201", "SetChargingProfile", {
  "connectorId": 1,
  "csChargingProfiles": {
    "chargingProfileId": 100,
    "stackLevel": 0,
    "chargingProfilePurpose": "TxDefaultProfile",
    "chargingProfileKind": "Absolute",
    "chargingSchedule": {
      "chargingRateUnit": "A",
      "chargingSchedulePeriod": [
        { "startPeriod": 0,     "limit": 32.0 },
        { "startPeriod": 21600, "limit": 16.0 }
      ]
    }
  }
}]

Response

FieldTypeRequiredDescription
statusChargingProfileStatusRequiredWhether the profile was stored.
json
[3, "19223201", {
  "status": "Accepted"
}]

Values

ChargingProfilePurpose

ValueMeaning
ChargePointMaxProfileThe physical ceiling for the whole charge point. Set on connector 0.
TxDefaultProfileDefault limits for transactions, including future ones.
TxProfileLimits for one specific running transaction. Requires a transactionId, and is discarded when that transaction ends.

ChargingProfileKind

ValueMeaning
AbsoluteThe schedule is anchored to startSchedule, an explicit timestamp.
RecurringThe schedule repeats, daily or weekly per recurrencyKind.
RelativestartPeriod: 0 is the moment the transaction starts. startSchedule is ignored.

ChargingProfileStatus

ValueMeaning
AcceptedThe profile was stored.
RejectedThe profile was refused — commonly a malformed schedule.
NotSupportedThe charge point does not support this profile purpose.

Implementation notes

Higher `stackLevel` replaces lower — it does not add to it. Within one purpose, the valid profile with the highest stack level wins outright. Across purposes, the effective limit is the lowest of the applicable ChargePointMax, TxDefault and Tx profiles.

`Accepted` means stored, not active. To see the limit the charger will actually follow once everything is combined, call GetCompositeSchedule.

`numberPhases` defaults to 3. On a single-phase installation that default makes a computed power limit three times too high.

Absolute and Recurring require startSchedule. Omitting it is a common bug that chargers handle inconsistently.