external_energy_limits_consumer_API

version 1.1.0AsyncAPI 3.0.0 content type application/jsonlicense Apache-2.0EVerestexternal energy limits

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

send the client publishes, EVerest consumes (3) receive EVerest publishes, the client consumes (2)

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

send Send external energy 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

object ExternalLimits

External Limits data type

Definition of ExternalLimits

Example

Set enforced limits
{
  "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

send Request current Capabilities
Topic
everest_api/1/external_energy_limits_consumer/{module_id}/m2e/capabilities/get
Reply
Sent to $message.header#/replyTo as 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

object
  • 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

Example 1
{
  "headers": {
    "replyTo": "everest_api/1/{interface_type}/{module_id}/e2m/{operation_name}/{uuid}"
  }
}

send_communication_check

send 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

CommunicationCheck
true

EVerest to client

receive_reply_get_capabilities

receive Reply to get Capabilities request
Topic
Dynamic: the replyTo address 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

oneOf

Exactly one of:

Example

Minimal payload generated from the schema generated
{
  "max_current_A": 0,
  "max_phase_count": 0,
  "nominal_voltage_V": 1,
  "total_power_W": 0
}

receive_heartbeat

receive 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

integer HeartBeatId

64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached

Example

Heartbeat
42

Messages

MessageSummaryUsed by
send_set_external_limits
Send external energy limits

External energy limits

send_set_external_limits
receive_capabilities
Receive energy node capabilities

Capabilities of the energy node

not used by an operation
send_request_get_capabilities
Request current Capabilities

Request the most recently published (latched) Capabilities.

send_request_get_capabilities
receive_reply_get_capabilities
Reply to get Capabilities request

The most recently published Capabilities.

receive_reply_get_capabilities
receive_heartbeat
Receive heartbeat

Heartbeat produced by EVerest as configured via cfg_heartbeat_interval_ms in the EVerest configuration

receive_heartbeat
send_communication_check
Send communication check

Signal to EVerest that communication is good or check shall be stopped

send_communication_check
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

Definition of CapabilityLimits

Example

Example 1
{
  "max_current_A": 16,
  "max_phase_count": 3,
  "nominal_voltage_V": 230,
  "total_power_W": 11040
}

Schemas

ExternalLimits object
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
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
object

Simple number type with source information

Additional properties allowed.

  • valueinteger required

    Value

  • sourcestring required

    Source of the value

LimitsReq object
object

Energy flow limiting object request (Evses to EnergyManager)

Additional properties allowed.

LimitsRes object
object

Energy flow limiting object Result (Energy manager to Evses)

Additional properties allowed.

NumberWithSource object
object

Simple number type with source information

Additional properties allowed.

  • valuenumber required

    Value

  • sourcestring required

    Source of the value

PricePerkWh object
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
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

    Definition of LimitsReq

  • limits_to_leavesobject requiredLimitsReq

    Limit for this timestamp, for the leaves facing side

    Definition of LimitsReq

  • conversion_efficiencynumber

    Conversion efficiency from root to leaves side (e.g. AC/DC efficiency). Defaults to one if not specified.

    min 0max 1
  • price_per_kwhobject PricePerkWh

    Price information for this timepoint

    Definition of PricePerkWh

ScheduleResEntry object
object

One entry for the time series (result)

Additional properties allowed.

ScheduleSetpointEntry object
object

One entry for the time series (setpoint request)

Additional properties allowed.

SetpointType object
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
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
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
integer

64bit unsigned integer. The id of every heartbeat increases by 1 and overflows when the maximum representable value is reached