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

  • id

type

string

format

uuid

  • name

const

set_charging_profile

  • type

const

request

  • data

type

object

properties

  • evse_id

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

  • charging_profile

#/definitions/ChargingProfileType

definitions

  • ChargingProfileKindEnumType

Indicates the kind of schedule.

type

string

enum

Absolute, Recurring, Relative

  • ChargingProfilePurposeEnumType

Defines the purpose of the schedule transferred by this profile

type

string

enum

ChargingStationExternalConstraints, ChargingStationMaxProfile, TxDefaultProfile, TxProfile

  • ChargingRateUnitEnumType

The unit of measure Limit is expressed in.

type

string

enum

W, A

  • RecurrencyKindEnumType

Indicates the start point of a recurrence.

type

string

enum

Daily, Weekly

  • ChargingProfileType

A ChargingProfile consists of ChargingSchedule, describing the amount of power or current that can be delivered per time interval.

type

object

properties

  • id

Id of ChargingProfile.

type

integer

  • stack_level

Value determining level in hierarchy stack of profiles. Higher values have precedence over lower values. Lowest level is 0.

type

integer

  • charging_profile_purpose

#/definitions/ChargingProfilePurposeEnumType

  • charging_profile_kind

#/definitions/ChargingProfileKindEnumType

  • recurrency_kind

#/definitions/RecurrencyKindEnumType

  • valid_from

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

  • valid_to

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

  • charging_schedule

type

array

items

#/definitions/ChargingScheduleType

additionalItems

False

maxItems

3

minItems

1

  • transaction_id

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

  • ChargingSchedulePeriodType

Charging schedule period structure defines a time period in a charging schedule.

type

object

properties

  • start_period

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

  • limit

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

  • number_phases

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

  • phase_to_use

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

  • ChargingScheduleType

Charging schedule structure defines a list of charging periods, as used in: GetCompositeSchedule.conf and ChargingProfile.

type

object

properties

  • id

Identifies the ChargingSchedule.

type

integer

  • start_schedule

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

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

  • charging_rate_unit

#/definitions/ChargingRateUnitEnumType

  • charging_schedule_period

type

array

items

#/definitions/ChargingSchedulePeriodType

additionalItems

False

maxItems

1024

minItems

1

  • min_charging_rate

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

  • id

type

string

format

uuid

  • name

const

set_charging_profile

  • type

const

response

  • data

type

object

properties

  • status

enum

accepted, rejected

  • status_info

#/definitions/StatusInfoType

definitions

  • StatusInfoType

Element providing more information about the status.

type

object

properties

  • reason_code

A predefined code for the reason why the status is returned in this response. The string is case-insensitive.

type

string

maxLength

20

  • additional_info

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"
    }
  }
}