SetChargingProfile
Sent by the CSMS to set or update a charging profile on a specific EVSE, controlling the power delivery schedule during a transaction.
Quick Reference
Required Fields
evseId integer EVSE to apply the profile to. Use 0 for a station-wide profile.
chargingProfile ChargingProfileType The charging profile to set, including schedule, purpose, and stack level
chargingProfile.id integer Unique identifier for the charging profile
chargingProfile.stackLevel integer Higher stack level takes priority (0 = lowest)
chargingProfile.chargingProfilePurpose ChargingProfilePurposeEnumType ChargingStationMaxProfile, TxDefaultProfile, or TxProfile
chargingProfile.chargingProfileKind ChargingProfileKindEnumType Absolute, Recurring, or Relative
chargingProfile.chargingSchedule array[ChargingScheduleType] One or more schedule periods defining power limits over time
Optional Fields
chargingProfile.validFrom string (date-time) Timestamp from which the profile is valid
chargingProfile.validTo string (date-time) Timestamp until which the profile is valid
chargingProfile.transactionId string(36) Transaction the profile applies to (for TxProfile purpose)
Example Payload
{
"evseId": 1,
"chargingProfile": {
"id": 1,
"stackLevel": 0,
"chargingProfilePurpose": "TxDefaultProfile",
"chargingProfileKind": "Relative",
"chargingSchedule": [
{
"id": 1,
"chargingRateUnit": "W",
"chargingSchedulePeriod": [
{
"startPeriod": 0,
"limit": 7400
},
{
"startPeriod": 3600,
"limit": 3700
}
]
}
]
}
} Example Full Frame
[
2,
"msg-001",
"SetChargingProfile",
{
"evseId": 1,
"chargingProfile": {
"id": 1,
"stackLevel": 0,
"chargingProfilePurpose": "TxDefaultProfile",
"chargingProfileKind": "Relative",
"chargingSchedule": [
{
"id": 1,
"chargingRateUnit": "W",
"chargingSchedulePeriod": [
{
"startPeriod": 0,
"limit": 7400
},
{
"startPeriod": 3600,
"limit": 3700
}
]
}
]
}
}
]
Format: [MessageType, MessageId, Action, Payload]
Overview
SetChargingProfile applies a power delivery schedule to an EVSE. This is the foundation of OCPP smart charging — it lets the CSMS control how much power is delivered and when.
When to Send
- To limit peak power demand during high-load periods
- To schedule overnight charging at off-peak rates
- To apply a specific power limit for a transaction
Expected Response
status:Accepted,Rejected, orNotSupported
Key Differences from OCPP 1.6J
chargingScheduleis now an array (multiple schedules per profile possible)- Each
ChargingScheduleTypenow has its ownidfield transactionIdis now a string instead of an integer- More precise rate limiting with
limitBeyondSoCsupport
Usage Notes
- Stack level: higher values override lower ones for the same EVSE
- TxProfile only applies during a specific transaction (must include
transactionId) - TxDefaultProfile applies to any transaction on the EVSE
- ChargingStationMaxProfile sets the absolute maximum for the whole station
Testing Tips
- Test a
TxDefaultProfilelimiting power to 7.4 kW and verify it applies - Test stacking two profiles and verify the higher stack level takes effect
- Test a
Recurringprofile for daily scheduled charging
Common Errors
TypeConstraintViolation
Cause: transactionId is an integer (from 1.6J pattern)
Solution: In OCPP 2.0.1, transactionId is a string (max 36 chars)
PropertyConstraintViolation
Cause: chargingSchedule array is empty
Solution: Include at least one ChargingScheduleType with at least one chargingSchedulePeriod