Set Charging Profile¶
Description.
Control the charge rate of an EVSE.
The request and response defined on this page are are based on OCPP 2.0.1’s SetChargingProfile.
- The difference with OCPP are:
data.evse_id is not a number, instead it’s a string like “DE*SEV*E123456789”
all fields use snake_case notation, whereas OCPP uses camelCase
SalesTariffs are not supported
SetChargingProfileRequest¶
Topic: ocpp/smart_charging. |
|||
type |
object |
||
properties |
|||
|
type |
string |
|
format |
uuid |
||
|
const |
set_charging_profile |
|
|
const |
request |
|
|
type |
object |
|
properties |
|||
|
Optional. When missing, profile targets no specific EVSE but the whole charging station. The lack of an evse_id has the same meaning as an OCPP SetChargingProfile request addressing EVSE 0. |
||
type |
string |
||
|
#/definitions/ChargingProfileType |
||
definitions |
|||
|
Indicates the kind of schedule. |
||
type |
string |
||
enum |
Absolute, Recurring, Relative |
||
|
Defines the purpose of the schedule transferred by this profile |
||
type |
string |
||
enum |
ChargingStationExternalConstraints, ChargingStationMaxProfile, TxDefaultProfile, TxProfile |
||
|
The unit of measure Limit is expressed in. |
||
type |
string |
||
enum |
W, A |
||
|
Indicates the start point of a recurrence. |
||
type |
string |
||
enum |
Daily, Weekly |
||
|
A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval. |
||
type |
object |
||
properties |
|||
|
Id of ChargingProfile. |
||
type |
integer |
||
|
Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0. |
||
type |
integer |
||
|
#/definitions/ChargingProfilePurposeEnumType |
||
|
#/definitions/ChargingProfileKindEnumType |
||
|
#/definitions/RecurrencyKindEnumType |
||
|
Point in time at which the profile starts to be valid. If absent, the profile is valid as soon as it is received by the Charging Station. |
||
type |
string |
||
pattern |
^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(\.\d{1,3})?([Zz]|([+-])\d{2}:\d{2})?$ |
||
format |
date-time |
||
|
Point in time at which the profile stops to be valid. If absent, the profile is valid until it is replaced by another profile. |
||
type |
string |
||
pattern |
^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(\.\d{1,3})?([Zz]|([+-])\d{2}:\d{2})?$ |
||
format |
date-time |
||
|
type |
array |
|
items |
#/definitions/ChargingScheduleType |
||
additionalItems |
False |
||
maxItems |
3 |
||
minItems |
1 |
||
|
SHALL only be included if ChargingProfilePurpose is set to TxProfile. The transactionId is used to match the profile to a specific transaction. |
||
type |
string |
||
maxLength |
36 |
||
|
Charging schedule period structure defines a time period in a charging schedule. |
||
type |
object |
||
properties |
|||
|
Start of the period, in seconds from the start of schedule. The value of StartPeriod also defines the stop time of the previous period. |
||
type |
integer |
||
|
Charging rate limit during the schedule period, in the applicable chargingRateUnit, for example in Amperes (A) or Watts (W). Accepts at most one digit fraction (e.g. 8.1). |
||
type |
number |
||
|
The number of phases that can be used for charging. If a number of phases is needed, numberPhases=3 will be assumed unless another number is given. |
||
type |
integer |
||
|
Values: 1..3, Used if numberPhases=1 and if the EVSE is capable of switching the phase connected to the EV, i.e. ACPhaseSwitchingSupported is defined and true. It’s not allowed unless both conditions above are true. If both conditions are true, and phaseToUse is omitted, the Charging Station / EVSE will make the selection on its own. |
||
type |
integer |
||
|
Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile. |
||
type |
object |
||
properties |
|||
|
Identifies the ChargingSchedule. |
||
type |
integer |
||
|
Starting point of an absolute schedule. If absent the schedule will be relative to start of charging. |
||
type |
string |
||
pattern |
^\d{4}-\d{2}-\d{2}[Tt]\d{2}:\d{2}:\d{2}(\.\d{1,3})?([Zz]|([+-])\d{2}:\d{2})?$ |
||
format |
date-time |
||
|
Duration of the charging schedule in seconds. If the duration is left empty, the last period will continue indefinitely or until end of the transaction if chargingProfilePurpose = TxProfile. |
||
type |
integer |
||
|
#/definitions/ChargingRateUnitEnumType |
||
|
type |
array |
|
items |
#/definitions/ChargingSchedulePeriodType |
||
additionalItems |
False |
||
maxItems |
1024 |
||
minItems |
1 |
||
|
Minimum charging rate supported by the EV. The unit of measure is defined by the chargingRateUnit. This parameter is intended to be used by a local smart charging algorithm to optimize the power allocation for in the case a charging process is inefficient at lower charging rates. Accepts at most one digit fraction (e.g. 8.1) |
||
type |
number |
Example:
{
"id": "bb9655e5-21e0-482d-8bc1-67ffdf23539c",
"name": "set_charging_profile",
"type": "request",
"data": {
"evse_id": "GB*SEV*E123456789",
"charging_profile": {
"id": 1,
"stack_level": 1,
"charging_profile_purpose": "TxDefaultProfile",
"charging_profile_kind": "Recurring",
"recurrency_kind": "Daily",
"charging_schedule": [
{
"id": 1,
"start_schedule": "2023-05-15T17:00:00+01:00",
"duration": 86400,
"charging_rate_unit": "A",
"charging_schedule_period": [
{
"start_period": 0,
"limit": 10
}
]
}
]
}
}
}
SetChargingProfileResponse¶
Topic: smart_charging/ocpp. Used by Smart Charging Service to respond to a SetChargingProfileRequest |
|||
type |
object |
||
properties |
|||
|
type |
string |
|
format |
uuid |
||
|
const |
set_charging_profile |
|
|
const |
response |
|
|
type |
object |
|
properties |
|||
|
enum |
accepted, rejected |
|
|
#/definitions/StatusInfoType |
||
definitions |
|||
|
Element providing more information about the status. |
||
type |
object |
||
properties |
|||
|
A predefined code for the reason why the status is returned in this response. The string is case-insensitive. |
||
type |
string |
||
maxLength |
20 |
||
|
Additional text to provide detailed information. |
||
type |
string |
||
maxLength |
512 |
Example:
{
"id": "bb9655e5-21e0-482d-8bc1-67ffdf23539c",
"name": "set_charging_profile",
"type": "response",
"data": {
"status": "rejected",
"status_info": {
"reason_code": "InvalidProfile",
"additional_info": "TxProfile must contain transaction id"
}
}
}