external_energy_limits_consumer_API¶
EVerest API definition for external energy limits
API to allow EVerest API clients to set energy limits.
Specification: external_energy_limits_consumer_API.yaml · pionix:de:everest:external_energy_limits_consumer_API
Servers¶
default mqtt
default local MQTT
- Host
localhost:1883- Topic prefix
everest_api/1/external_energy_limits_consumer/{module_id}{module_id}The ID of the module as defined in the EVerest config file.
Operations¶
Client to EVerest¶
send_set_external_limits¶
- Topic
everest_api/1/external_energy_limits_consumer/{module_id}/m2e/set_external_limits
Message Send external energy limits application/json
Message send_set_external_limits
External energy limits
Payload
Example
{
"schedule_import": [
{
"timestamp": "2019-08-24T14:15:22Z",
"limits_to_root": {
"total_power_W": {
"value": 0,
"source": "string"
},
"ac_max_current_A": {
"value": 0,
"source": "string"
},
"ac_min_current_A": {
"value": 0,
"source": "string"
},
"ac_max_phase_count": {
"value": 0,
"source": "string"
},
"ac_min_phase_count": {
"value": 0,
"source": "string"
},
"ac_supports_changing_phases_during_charging": true,
"ac_number_of_active_phases": 1
},
"limits_to_leaves": {
"total_power_W": {
"value": 0,
"source": "string"
},
"ac_max_current_A": {
"value": 0,
"source": "string"
},
"ac_min_current_A": {
"value": 0,
"source": "string"
},
"ac_max_phase_count": {
"value": 0,
"source": "string"
},
"ac_min_phase_count": {
"value": 0,
"source": "string"
},
"ac_supports_changing_phases_during_charging": true,
"ac_number_of_active_phases": 1
},
"conversion_efficiency": 1,
"price_per_kwh": {
"timestamp": "2019-08-24T14:15:22Z",
"value": 0,
"currency": "str"
}
}
],
"schedule_export": [
{
"timestamp": "2019-08-24T14:15:22Z",
"limits_to_root": {
"total_power_W": {
"value": 0,
"source": "string"
},
"ac_max_current_A": {
"value": 0,
"source": "string"
},
"ac_min_current_A": {
"value": 0,
"source": "string"
},
"ac_max_phase_count": {
"value": 0,
"source": "string"
},
"ac_min_phase_count": {
"value": 0,
"source": "string"
},
"ac_supports_changing_phases_during_charging": true,
"ac_number_of_active_phases": 1
},
"limits_to_leaves": {
"total_power_W": {
"value": 0,
"source": "string"
},
"ac_max_current_A": {
"value": 0,
"source": "string"
},
"ac_min_current_A": {
"value": 0,
"source": "string"
},
"ac_max_phase_count": {
"value": 0,
"source": "string"
},
"ac_min_phase_count": {
"value": 0,
"source": "string"
},
"ac_supports_changing_phases_during_charging": true,
"ac_number_of_active_phases": 1
},
"conversion_efficiency": 1,
"price_per_kwh": {
"timestamp": "2019-08-24T14:15:22Z",
"value": 0,
"currency": "str"
}
}
],
"schedule_setpoints": [
{
"timestamp": "2019-08-24T14:15:22Z",
"setpoint": {
"ac_current_A": 0,
"total_power_W": 0,
"frequency_table": [
{
"frequency_Hz": 0,
"total_power_W": 0
}
],
"priority": 1000,
"source": "string"
}
}
]
}
send_request_get_capabilities¶
- Topic
everest_api/1/external_energy_limits_consumer/{module_id}/m2e/capabilities/get- Reply
- Sent to
$message.header#/replyToas receive_reply_get_capabilities.
Request the most recently published (latched) Capabilities. The reply will be sent to the replyTo address specified in the message headers. If no latched value is available yet, a null payload will be sent.
Message Request current Capabilities application/json
Message send_request_get_capabilities
Request the most recently published (latched) Capabilities.
Payload
-
headersobject
-
replyTostring
Address to send the response to. Omit it to discard the response. An invalid address, see the EVerest API explanation, rejects the request.
min length 1
-
Example
{
"headers": {
"replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
}
}
send_communication_check¶
- Topic
everest_api/1/external_energy_limits_consumer/{module_id}/m2e/communication_check
Message Send communication check application/json
Message send_communication_check
Signal to EVerest that communication is good or check shall be stopped
Payload
Send true at least every cfg_communication_check_to_s seconds to signal that the client is alive, otherwise EVerest raises a CommunicationFault, which the next message clears. Send false to stop the check until the module restarts.
Example
true
EVerest to client¶
receive_reply_get_capabilities¶
- Topic
- Dynamic: the
replyToaddress from the request's headers. Answers send_request_get_capabilities.
Message Reply to get Capabilities request application/json
Message receive_reply_get_capabilities
The most recently published Capabilities.
Payload
Exactly one of:
-
#1object CapabilityLimits
Configured/rated maximum limits of an energy node
-
#2null
Example
{
"max_current_A": 0,
"max_phase_count": 0,
"nominal_voltage_V": 1,
"total_power_W": 0
}
receive_heartbeat¶
- Topic
everest_api/1/external_energy_limits_consumer/{module_id}/e2m/heartbeat
Message Receive heartbeat application/json
Message receive_heartbeat
Heartbeat produced by EVerest as configured via cfg_heartbeat_interval_ms in the EVerest configuration
Payload
64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached
Example
42
Messages¶
Message Receive energy node capabilities application/json
Message receive_capabilities
Capabilities of the energy node
Payload
object CapabilityLimits
Configured/rated maximum limits of an energy node
Example
{
"max_current_A": 16,
"max_phase_count": 3,
"nominal_voltage_V": 230,
"total_power_W": 11040
}
Schemas¶
ExternalLimits object¶
External Limits data type
Additional properties allowed.
-
schedule_importarray<object> required
Energy import/limits time series. The first entry is special as it will be active already now even if the timestamp is in the future, so it is good practice to set the first entry to current time. The time series can have arbitrary time difference between entries and all timestamps are absolute points in time. The last entry is valid for any time after the schedule ends.
-
schedule_exportarray<object> required
Energy export/limits time series. The first entry is special as it will be active already now even if the timestamp is in the future, so it is good practice to set the first entry to current time. The time series can have arbitrary time difference between entries and all timestamps are absolute points in time. The last entry is valid for any time after the schedule ends.
-
schedule_setpointsarray<object> required
Setpoints time series. The first entry is special as it will be active already now even if the timestamp is in the future, so it is good practice to set the first entry to current time. The time series can have arbitrary time difference between entries and all timestamps are absolute points in time.
FrequencyWattPoint object¶
A point of a frequency-watt curve
Additional properties allowed.
-
frequency_Hznumber required
The frequency in Hz
-
total_power_Wnumber required
The total power in W
IntegerWithSource object¶
Simple number type with source information
Additional properties allowed.
-
valueinteger required
Value
-
sourcestring required
Source of the value
LimitsReq object¶
Energy flow limiting object request (Evses to EnergyManager)
Additional properties allowed.
-
total_power_Wobject NumberWithSource
Total power limit in Watt. Can be used for DC or as additional limit for AC.
-
ac_max_current_Aobject NumberWithSource
Max current limit (per phase) in Ampere. AC only.
-
ac_min_current_Aobject NumberWithSource
Min AC current limit per phase in Ampere. Values below that value indicate the device will not work properly, i.e. it will not charge below 6 amps. AC only.
-
ac_max_phase_countobject IntegerWithSource
Limit to number of phases. Omit if number of phases are not limited.
-
ac_min_phase_countobject IntegerWithSource
Minimal number of phases. Omit if number of phases are not limited.
-
ac_supports_changing_phases_during_chargingboolean
Indicate whether phase switching is allowed during charging or not
-
ac_number_of_active_phasesinteger
Number of phases currently offered to the vehicle (1ph or 3ph mode)
min 1max 3
LimitsRes object¶
Energy flow limiting object Result (Energy manager to Evses)
Additional properties allowed.
-
total_power_Wobject NumberWithSource
Total power limit in Watt. Can be used for DC or as additional limit for AC. Negative numbers mean export to grid direction.
-
ac_max_current_Aobject NumberWithSource
Max current limit (per phase) in Ampere. AC only. Negative numbers mean export to grid direction.
-
ac_max_phase_countobject IntegerWithSource
Limit to number of phases. Omit if number of phases are not limited.
NumberWithSource object¶
Simple number type with source information
Additional properties allowed.
-
valuenumber required
Value
-
sourcestring required
Source of the value
PricePerkWh object¶
Price information for this timepoint
Additional properties allowed.
-
timestampstring required
Absolute timestamp for this sample in RFC3339 format
format date-time -
valuenumber required
Price per kWh (cost)
-
currencystring required
Currency in 3 digit ISO 4217
min length 3max length 3
ScheduleReqEntry object¶
One entry for the time series (request)
Additional properties allowed.
-
timestampstring required
Absolute timestamp for this sample in RFC3339 format
format date-time -
limits_to_rootobject requiredLimitsReq
Limit for this timestamp, for the root facing side
-
limits_to_leavesobject requiredLimitsReq
Limit for this timestamp, for the leaves facing side
-
conversion_efficiencynumber
Conversion efficiency from root to leaves side (e.g. AC/DC efficiency). Defaults to one if not specified.
min 0max 1
ScheduleResEntry object¶
One entry for the time series (result)
Additional properties allowed.
-
timestampstring required
Absolute timestamp for this sample in RFC3339 format
format date-time -
limits_to_rootobject requiredLimitsRes
Limit for this timestamp, for the root facing side
ScheduleSetpointEntry object¶
One entry for the time series (setpoint request)
Additional properties allowed.
-
timestampstring required
Absolute timestamp for this sample in RFC3339 format
format date-time
SetpointType object¶
Defines a setpoint
Additional properties allowed.
-
ac_current_Anumber
The target value in amps per phase for either charging or discharging depending on the sign. Positive values indicate charging, while negative values indicate discharging. Do not set ac_current_A, total_power_W and frequency_table properties simultaneously.
-
total_power_Wnumber
The target value for the total power for either charging or discharging depending on the sign. Positive values indicate charging, while negative values indicate discharging. Do not set ac_current_A, total_power_W and frequency_table properties simultaneously.
-
frequency_tablearray<object>
Frequency table for the setpoint. When used it must contain at least two coordinates to specify a power-frequency table to use during this period. If the array is empty, no frequency setpoint is set. Do not set ac_current_A, total_power_W and frequency_table properties simultaneously.
-
priorityinteger required
If multiple conflicting setpoints are specified in the tree, the priority selects which one is used. Highest priority is 0, lowest priority is 1000.
min 0max 1000 -
sourcestring required
Source of the setpoint
CapabilityLimits object¶
Configured/rated maximum limits of an energy node
Additional properties allowed.
-
max_current_Anumber required
Max current limit (per phase) in Ampere.
min 0 -
max_phase_countinteger required
Number of phases covered by this fuse
min 0max 3 -
nominal_voltage_Vnumber required
Nominal AC voltage between a single phase and neutral in Volt
min 1 -
total_power_Wnumber required
Total power limit in Watt. For AC energy nodes, this usually is: nominal_voltage_V x max_current_A x max_phase_count
CommunicationCheck boolean¶
Send true at least every cfg_communication_check_to_s seconds to signal that the client is alive, otherwise EVerest raises a CommunicationFault, which the next message clears. Send false to stop the check until the module restarts.
HeartBeatId integer¶
64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached