.. _everest_api_powermeter_API: ############### powermeter\_API ############### .. container:: everest-api overview .. raw:: html
version 1.1.0AsyncAPI 3.0.0 content type application/jsonlicense Apache-2.0EVerestpowermeter
.. container:: lead EVerest API definition for powermeters API for EVerest API clients implementing powermeter. .. raw:: html

Specification: powermeter_API.yaml · pionix:de:everest:powermeter_API

send the client publishes, EVerest consumes (6) receive EVerest publishes, the client consumes (3)
Servers ======= .. container:: everest-api .. raw:: html

default mqtt

default local MQTT

Host
localhost:1883
Topic prefix
everest_api/1/powermeter/{module_id}
{module_id}

The ID of the module as defined in the EVerest config file.

Operations ========== .. container:: everest-api .. raw:: html
Client to EVerest ----------------- .. _everest_api_powermeter_API_op_send_reply_start_transaction: send\_reply\_start\_transaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: everest-api op send .. raw:: html
send Send reply for start transaction
Topic
Dynamic: the replyTo address from the request's headers. Answers receive_request_start_transaction.
Request to reply. This operation is used to handle the request to start a new transaction on the powermeter (for signed metering according to German Eichrecht). .. raw:: html
Message Start transaction reply message application/json

Message start_transaction_reply

The start transaction reply message contains the request status. It indicates whether the transaction could be started successfully or not. Further values may be added to the message depending on the value of the status.

Payload

object StartTransactionReply

Return value when a transaction is started.

Definition of StartTransactionReply

Example

Example 1
{
        "status": "OK",
        "error": "string",
        "transaction_min_stop_time": "2019-08-24T14:15:22Z",
        "transaction_max_stop_time": "2019-08-24T14:15:22Z"
      }
.. _everest_api_powermeter_API_op_send_reply_stop_transaction: send\_reply\_stop\_transaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: everest-api op send .. raw:: html
send Send reply for stop transaction
Topic
Dynamic: the replyTo address from the request's headers. Answers receive_request_stop_transaction.
Request to reply. This operation is used to handle the request to stop the transaction on the powermeter and ask for the signed metering information in a reply. .. raw:: html
Message Stop transaction reply message application/json

Message stop_transaction_reply

The stop transaction reply message contains the request status. It indicates whether the transaction could be stopped successfully or not. If successful the signed meter value report must be provided in this message too.

Payload

object StopTransactionReply

Report returned when a signed transaction is requested to stop. If successful, includes the signed meter value object. In case of an error, an additional error message can be provided.

Definition of StopTransactionReply

Example

Example 1
{
        "status": "OK",
        "signed_meter_value": {
          "signed_meter_data": "string",
          "signing_method": "string",
          "encoding_method": "string",
          "public_key": "string",
          "timestamp": "2019-08-24T14:15:22Z"
        },
        "error": "string"
      }
.. _everest_api_powermeter_API_op_send_powermeter_values: send\_powermeter\_values ~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: everest-api op send .. raw:: html
send Send powermeter values
Topic
everest_api/1/powermeter/{module_id}/m2e/powermeter_values
Direction: Module to EVerest This operation is used to send a dataset of measured values. The timestamp and the imported energy (in Wh) are required. Other values are optional. .. raw:: html
Message Send powermeter values application/json

Message send_powermeter_values

The send powermeter values message contains the measured dataset. It requires a timestamp and the imported energy in Wh at least. Other values are optional.

Payload

object Powermeter

Measured dataset (AC or DC)

Definition of Powermeter

Example

Example 1
{
        "current_A": {
          "L1": 0,
          "L2": 0,
          "L3": 0,
          "N": 0
        },
        "energy_Wh_import": {
          "L1": 0,
          "L2": 0,
          "L3": 0,
          "total": 0
        },
        "frequency_Hz": {
          "L1": 50.099517822265625,
          "L2": 50.099517822265625,
          "L3": 50.099517822265625
        },
        "meter_id": "THE_POWERMETER",
        "phase_seq_error": false,
        "power_W": {
          "L1": 0,
          "L2": 0,
          "L3": 0,
          "total": 0
        },
        "timestamp": "2024-09-27T07:21:14.127Z",
        "voltage_V": {
          "L1": 228.47914123535156,
          "L2": 228.47914123535156,
          "L3": 228.47914123535156
        }
      }
.. _everest_api_powermeter_API_op_send_public_key_ocmf: send\_public\_key\_ocmf ~~~~~~~~~~~~~~~~~~~~~~~ .. container:: everest-api op send .. raw:: html
send Send the public key
Topic
everest_api/1/powermeter/{module_id}/m2e/public_key_ocmf
.. raw:: html
Message Send the public key application/json

Message send_public_key_ocmf

Provide the public key used to sign the OCMF data

Payload

The public key as string used to sign the OCMF data

Example

Example 1
"THE_KEY"
.. _everest_api_powermeter_API_op_send_capabilities: send\_capabilities ~~~~~~~~~~~~~~~~~~ .. container:: everest-api op send .. raw:: html
send Send power meter capabilities
Topic
everest_api/1/powermeter/{module_id}/m2e/capabilities
Direction: Module to EVerest This operation is used to send the capabilities of the power meter. Optional: meters without restrictions do not need to publish this. If supported, publish at least once during start up and on every change. Absence of individual fields means no restriction. .. raw:: html
Message Send power meter capabilities application/json

Message send_capabilities

Capabilities of the power meter, e.g. the minimum current above which the meter measures within its accuracy class (required by the German Calibration Law, Eichrecht). Publish at least once during start up and on every change if supported. Absence of individual fields means no restriction.

Payload

object Capabilities

Capabilities of this power meter. All fields are optional; an absent field means no restriction / not supported.

Definition of Capabilities

Example

Capabilities example
{
        "min_import_current_A": 10,
        "min_export_current_A": 10
      }
.. _everest_api_powermeter_API_op_send_communication_check: send\_communication\_check ~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: everest-api op send .. raw:: html
send Send communication check
Topic
everest_api/1/powermeter/{module_id}/m2e/communication_check
.. raw:: html
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

Example 1
true
EVerest to client ----------------- .. _everest_api_powermeter_API_op_receive_request_start_transaction: receive\_request\_start\_transaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: everest-api op receive .. raw:: html
receive Request start transaction
Topic
everest_api/1/powermeter/{module_id}/e2m/start_transaction
Reply
Sent to $message.header#/replyTo as send_reply_start_transaction.
Request to reply. This operation is used to handle the request to start a new transaction on the powermeter (for signed metering according to German Eichrecht). .. raw:: html
Message Start transaction request message application/json

Message start_transaction_req

The start transaction request message contains the required input parameter for starting an OCMF transaction. These values will be included in the signed OCMF packet of the stop transaction reply.

Payload

object

Additional properties allowed.

Example

Minimal payload generated from the schema generated
{
        "headers": {
          "replyTo": "string"
        },
        "payload": {
          "evse_id": "string",
          "transaction_id": "string",
          "identification_status": "ASSIGNED",
          "identification_flags": [
            "RFID_NONE"
          ],
          "identification_type": "NONE"
        }
      }
.. _everest_api_powermeter_API_op_receive_request_stop_transaction: receive\_request\_stop\_transaction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. container:: everest-api op receive .. raw:: html
receive Request stop transaction
Topic
everest_api/1/powermeter/{module_id}/e2m/stop_transaction
Reply
Sent to $message.header#/replyTo as send_reply_stop_transaction.
Request to reply. This operation is used to handle the request to stop the transaction on the powermeter and ask for the signed metering information in a reply. .. raw:: html
Message Stop transaction request message application/json

Message stop_transaction_req

The stop transaction request message contains the transaction id to stop the corresponding transaction.

Payload

object

Additional properties allowed.

  • headersobject required
    • replyTostring required

      The topic to which to send the reply. If this information is missing, the command will still be accepted, but no response will be sent.

  • payloadstring required

    The transaction id from the start transaction request, as a plain JSON string. An empty string stops all open transactions; EVerest sends it at start-up.

Examples

Stop one transaction
{
        "headers": {
          "replyTo": "everest_api/1/powermeter/pm/m2e/reply/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0"
        },
        "payload": "55f31fea-548b-4d41-9887-bfb964141a5e"
      }
Stop every open transaction (start up)
{
        "headers": {
          "replyTo": "everest_api/1/powermeter/pm/m2e/reply/0f1e2d3c-4b5a-6978-8796-a5b4c3d2e1f0"
        },
        "payload": ""
      }
.. _everest_api_powermeter_API_op_receive_heartbeat: receive\_heartbeat ~~~~~~~~~~~~~~~~~~ .. container:: everest-api op receive .. raw:: html
receive Receive heartbeat
Topic
everest_api/1/powermeter/{module_id}/e2m/heartbeat
.. raw:: html
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 ======== .. container:: everest-api .. raw:: html
MessageSummaryUsed by
start_transaction_req
Start transaction request message

The start transaction request message contains the required input parameter for starting an OCMF transaction. These values will be included in the signed OCMF packet of the stop transaction reply.

receive_request_start_transaction
start_transaction_reply
Start transaction reply message

The start transaction reply message contains the request status. It indicates whether the transaction could be started successfully or not. Further values may be added to the message depending on the value of the status.

send_reply_start_transaction
stop_transaction_req
Stop transaction request message

The stop transaction request message contains the transaction id to stop the corresponding transaction.

receive_request_stop_transaction
stop_transaction_reply
Stop transaction reply message

The stop transaction reply message contains the request status. It indicates whether the transaction could be stopped successfully or not. If successful the signed meter value report must be provided in this message too.

send_reply_stop_transaction
send_powermeter_values
Send powermeter values

The send powermeter values message contains the measured dataset. It requires a timestamp and the imported energy in Wh at least. Other values are optional.

send_powermeter_values
send_public_key_ocmf
Send the public key

Provide the public key used to sign the OCMF data

send_public_key_ocmf
send_capabilities
Send power meter capabilities

Capabilities of the power meter, e.g. the minimum current above which the meter measures within its accuracy class (required by the German Calibration Law, Eichrecht). Publish at least once during start up and on every change if supported. Absence of individual fields means no restriction.

send_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
Schemas ======= .. container:: everest-api .. raw:: html
Capabilities object
object

Capabilities of this power meter. All fields are optional; an absent field means no restriction / not supported.

Additional properties forbidden.

OCMFIdentificationFlags string
string
  • RFID_NONE: No assignment via RFID
  • RFID_PLAIN: Assignment via external RFID card reader
  • RFID_RELATED: Assignment via protected RFID card reader
  • RFID_PSK: A previously known shared key (pre-shared key) was used, e.g. with a secured RFID card.
  • OCPP_NONE: No user assignment by OCPP
  • OCPP_RS: Assignment by OCPP RemoteStart method
  • OCPP_AUTH: Assignment by OCPP Authorize method
  • OCPP_RS_TLS: Assignment by OCPP RemoteStart method, obtained via a secured TLS connection.
  • OCPP_AUTH_TLS: Assignment by OCPP Authorize method, obtained via a secured TLS connection.
  • OCPP_CACHE: Assignment by authorization cache of OCPP
  • OCPP_WHITELIST: Assignment by whitelist from OCPP
  • OCPP_CERTIFIED: A certificate of the backend was used which certifies the user mapping.
  • ISO15118_NONE: no user assignment by ISO 15118
  • ISO15118_PNC: Plug & Charge was used
  • PLMN_NONE: no user assignment
  • PLMN_RING: call
  • PLMN_SMS: short message
enumRFID_NONERFID_PLAINRFID_RELATEDRFID_PSKOCPP_NONEOCPP_RSOCPP_AUTHOCPP_RS_TLSOCPP_AUTH_TLSOCPP_CACHEOCPP_WHITELISTOCPP_CERTIFIEDISO15118_NONEISO15118_PNCPLMN_NONEPLMN_RINGPLMN_SMS
OCMFIdentificationLevel string
string
  • NONE: There is no user assignment. The other data for user assignment have no significance.
  • HEARSAY: The assignment is unsecured; e.g. by reading an RFID UID.
  • TRUSTED: The mapping can be trusted to some extent, but there is no absolute reliability. Example: Authorization by backend.
  • VERIFIED: The assignment has been verified by the signature component and special measures.
  • CERTIFIED: The assignment was verified by the signature component using a cryptographic signature that certifies the assignment.
  • SECURE: The mapping was established by a secure feature (e.g. secure RFID card, ISO 15118 with plug and charge, etc.).
  • MISMATCH: Error; UIDs do not match.
  • INVALID: Error; certificate not correct (check negative).
  • OUTDATED: Error; referenced trust certificate expired.
  • UNKNOWN: Certificate could not be successfully verified (no matching trust certificate found).
enumNONEHEARSAYTRUSTEDVERIFIEDCERTIFIEDSECUREMISMATCHINVALIDOUTDATEDUNKNOWN
OCMFIdentificationType string
string
  • NONE: No assignment available
  • DENIED: Assignment currently not available (due to two-factor authorization)
  • UNDEFINED: Type not specified
  • ISO14443: UID of an RFID card according to ISO 14443. Represented as 4 or 7 bytes in hexadecimal notation.
  • ISO15693: UID of an RFID card according to ISO 15693. Represented as 8 bytes in hexadecimal notation.
  • EMAID: Electro-Mobility-Account-ID according to ISO/IEC 15118 (string with length 14 or 15)
  • EVCCID: ID of an electric vehicle according to ISO/IEC 15118 (maximum length 6 characters)
  • EVCOID: EV Contract ID according to DIN 91286.
  • ISO7812: Identification card format according to ISO/IEC 7812 (credit and bank cards, etc.)
  • CARD_TXN_NR: Card transaction number (CardTxNbr) for a payment with credit or bank card used in a terminal at the charging point.
  • CENTRAL: Centrally generated ID. No exact format defined, can be e.g. a UUID. (OCPP 2.0)
  • CENTRAL_1: Centrally generated ID, e.g. by start via SMS. No exact format defined. (until OCPP 1.6)
  • CENTRAL_2: Centrally generated ID, e.g. by operator start. No exact format defined. (until OCPP 1.6)
  • LOCAL: Locally generated ID. No exact format defined, might be e.g. a UUID. (OCPP 2.0)
  • LOCAL_1: Locally generated ID, e.g. ID generated internally by the charge point. No exact format defined. (until OCPP 1.6)
  • LOCAL_2: Locally generated ID, for other cases. No exact format defined. (until OCPP 1.6)
  • PHONE_NUMBER: International phone number with leading "+".
  • KEY_CODE: User-related private key code. No exact format defined.
enumNONEDENIEDUNDEFINEDISO14443ISO15693EMAIDEVCCIDEVCOIDISO7812CARD_TXN_NRCENTRALCENTRAL_1CENTRAL_2LOCALLOCAL_1LOCAL_2PHONE_NUMBERKEY_CODE
OCMFUserIdentificationStatus string
string

General status for user assignment

  • ASSIGNED: user successfully assigned
  • NOT_ASSIGNED: user not assigned
enumASSIGNEDNOT_ASSIGNED
Powermeter object
object

Measured dataset (AC or DC)

Additional properties allowed.

SendPublicKeyOCMF string
string

The public key as string used to sign the OCMF data

StartTransactionReply object
object

Return value when a transaction is started.

Additional properties allowed.

StartTransactionRequest object
object

Additional properties allowed.

StopTransactionReply object
object

Report returned when a signed transaction is requested to stop. If successful, includes the signed meter value object. In case of an error, an additional error message can be provided.

Additional properties allowed.

Temperature object
object

Temperature sensor expressed in C and a description (vendor specific) allowing to identify its purpose or meaning

Additional properties allowed.

TransactionStatus string
string

Status of a start or stop transaction - used in start or stop transaction reply.

enumOKNOT_SUPPORTEDUNEXPECTED_ERROR
units any
any

Unit types

units_signed any
any

Unit types signed

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