session_cost_consumer_API¶
EVerest API definition for session cost consumer
API for EVerest API clients that consume session cost and tariff information from the session_cost interface. See the Integrate Tariff and Cost how-to guide for OCPP-specific configuration and message flow details.
Specification: session_cost_consumer_API.yaml · pionix:de:everest:session_cost_consumer_API
Servers¶
default mqtt
default local MQTT
- Host
localhost:1883- Topic prefix
everest_api/1/session_cost_consumer/{module_id}{module_id}The ID of the module as defined in the EVerest config file.
Operations¶
Client to EVerest¶
send_request_get_default_price¶
- Topic
everest_api/1/session_cost_consumer/{module_id}/m2e/default_price/get- Reply
- Sent to
$message.header#/replyToas receive_reply_get_default_price.
Request the most recently published (latched) Default Price. 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 Default Price application/json
Message send_request_get_default_price
Request the most recently published (latched) Default Price.
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_request_get_tariff_message¶
- Topic
everest_api/1/session_cost_consumer/{module_id}/m2e/tariff_message/get- Reply
- Sent to
$message.header#/replyToas receive_reply_get_tariff_message.
Request the most recently published (latched) Tariff Message. 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 Tariff Message application/json
Message send_request_get_tariff_message
Request the most recently published (latched) Tariff Message.
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_request_get_session_cost¶
- Topic
everest_api/1/session_cost_consumer/{module_id}/m2e/session_cost/get- Reply
- Sent to
$message.header#/replyToas receive_reply_get_session_cost.
Request the most recently published (latched) Session Cost. 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 Session Cost application/json
Message send_request_get_session_cost
Request the most recently published (latched) Session Cost.
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/session_cost_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_default_price¶
- Topic
everest_api/1/session_cost_consumer/{module_id}/e2m/default_price
Published once on startup and again whenever the applicable default price changes (e.g. after a connectivity state change or a configuration update). Contains human-readable price text in one or more languages. Absent if no default price is configured.
Message Receive default price application/json
Message receive_default_price
Currently applicable default pricing text for this charger
Payload
object DefaultPrice
The currently applicable default pricing text for this charger, independent of any active session. Contains human-readable text only — no computed cost amounts are included. Published once on startup and again whenever the applicable price changes (e.g. after a connectivity state change or a configuration update).
Example
{
"messages": [
{
"content": "string"
}
]
}
receive_tariff_message¶
- Topic
everest_api/1/session_cost_consumer/{module_id}/e2m/tariff_message
Published at authorization time and whenever the CSMS sends updated pricing during a session. Contains human-readable price text in one or more languages.
Message Receive tariff message application/json
Message receive_tariff_message
Tariff and pricing information for a charging session
Payload
Example
{
"messages": [
{
"content": "string"
}
]
}
receive_session_cost¶
- Topic
everest_api/1/session_cost_consumer/{module_id}/e2m/session_cost
Published periodically during a session and once when it ends. Contains session cost broken down into chunks, current and upcoming pricing, and optional display messages.
Message Receive session cost application/json
Message receive_session_cost
Running or final cost of a charging session
Payload
object SessionCost ↗
Session cost object containing the total cost of the session and a list of chunks
Example
{
"session_id": "string",
"currency": {
"code": "AED",
"decimals": 0
},
"status": "Running"
}
receive_reply_get_default_price¶
- Topic
- Dynamic: the
replyToaddress from the request's headers. Answers send_request_get_default_price.
Message Reply to get Default Price request application/json
Message receive_reply_get_default_price
The most recently published Default Price.
Payload
Exactly one of:
-
#1object DefaultPrice
The currently applicable default pricing text for this charger, independent of any active session. Contains human-readable text only — no computed cost amounts are included. Published once on startup and again whenever the applicable price changes (e.g. after a connectivity state change or a configuration update).
-
#2null
Example
{
"messages": [
{
"content": "string"
}
]
}
receive_reply_get_tariff_message¶
- Topic
- Dynamic: the
replyToaddress from the request's headers. Answers send_request_get_tariff_message.
Message Reply to get Tariff Message request application/json
Message receive_reply_get_tariff_message
The most recently published Tariff Message.
Payload
Exactly one of:
-
#2null
Example
{
"messages": [
{
"content": "string"
}
]
}
receive_reply_get_session_cost¶
- Topic
- Dynamic: the
replyToaddress from the request's headers. Answers send_request_get_session_cost.
Message Reply to get Session Cost request application/json
Message receive_reply_get_session_cost
The most recently published Session Cost.
Payload
Exactly one of:
-
#1object SessionCost ↗
Session cost object containing the total cost of the session and a list of chunks
-
#2null
Example
{
"session_id": "string",
"currency": {
"code": "AED",
"decimals": 0
},
"status": "Running"
}
receive_heartbeat¶
- Topic
everest_api/1/session_cost_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¶
Schemas¶
DefaultPrice object¶
The currently applicable default pricing text for this charger, independent of any active session. Contains human-readable text only — no computed cost amounts are included. Published once on startup and again whenever the applicable price changes (e.g. after a connectivity state change or a configuration update).
Additional properties forbidden.
-
messagesarray<object> required
Price text in one or more languages. The first entry uses the configured default language.
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
Schemas from other APIs¶
CertificateHashDataInfo object defined in auth_consumer_API.yaml ↗¶
Contains the certificate information
Additional properties allowed.
-
hashAlgorithmstring required
Used algorithms for the hashes provided
enumSHA256SHA384SHA512 -
issuerNameHashstring required
Hashed value of the Issuer Distinguished Name
max length 128 -
issuerKeyHashstring required
Hashed value of the issuers public key
max length 128 -
serialNumberstring required
The serial number of the certificate
max length 40 -
responderURLstring required
This contains the responder URL
max length 512
CustomIdToken object defined in auth_consumer_API.yaml ↗¶
Type for a custom id token with a free-form type
Additional properties allowed.
-
valuestring required
Arbitrary value of the IdToken
min length 0max length 36 -
typestring required
Custom type of the token
min length 0max length 50
IdToken object defined in auth_consumer_API.yaml ↗¶
Type for an id token
Additional properties allowed.
-
valuestring required
Arbitrary value of the IdToken: This has to be printable case insensitive ascii
min length 0max length 36 -
Type of the token
enumCentraleMAIDMacAddressISO14443ISO15693KeyCodeLocalNoAuthorization -
additional_infoarray<object>
A list of additional custom id tokens than can be used for providing additional information for validation
-
itemsobject CustomIdToken ↗
Type for a custom id token with a free-form type
-
ProvidedIdToken object defined in auth_consumer_API.yaml ↗¶
Type for IdToken provided by auth token providers. Contains additional information about the IdToken like the source and purpose
Additional properties allowed.
-
request_idinteger
Id of the authorization request of this token. Could be used to put remoteStartId of OCPP2.0.1
-
Authorization type of the token.
enumOCPPRFIDAutochargePlugAndChargeBankCardmin length 2max length 32 -
connectorsarray<integer>
A list of connector ids to which the authorization can be assigned
-
itemsintegermin 1
-
-
prevalidatedboolean
Indicates that the id token is already validated by the provider
-
certificatestring
The X.509 certificated presented by EV and encoded in PEM format
max length 5500 -
iso15118CertificateHashDataarray<object>
Contains the information needed to verify the EV Contract Certificate via OCSP
min items 1max items 4-
itemsobject CertificateHashDataInfo ↗
An array of contract certificate infos
-
MessageContent object defined in display_message_API.yaml ↗¶
Contains message details
Additional properties allowed.
-
languagestring
-
contentstring required
ChargingPriceComponent object defined in session_cost_API.yaml ↗¶
Charging price for a category
Additional properties allowed.
Currency object defined in session_cost_API.yaml ↗¶
Currency object containing the currency code and the accuracy of the minor unit according to ISO 4217.
Additional properties allowed.
-
Currency code.
enumAEDAFNALLAMDANGAOAARSAUDAWGAZNBAMBBDBDTBGNBHDBIFBMDBNDBOBBOVBRLBSDBTNBWPBYNBZDCADCDFCHECHFCHWCLFCLPCNYCOPCOUCRCCUCCUPCVECZKDJFDKKDOPDZDEGPERNETBEURFJDFKPGBPGELGHSGIPGMDGNFGTQGYDHKDHNLHTGHUFIDRILSINRIQDIRRISKJMDJODJPYKESKGSKHRKMFKPWKRWKWDKYDKZTLAKLBPLKRLRDLSLLYDMADMDLMGAMKDMMKMNTMOPMRUMURMVRMWKMXNMXVMYRMZNNADNGNNIONOKNPRNZDOMRPABPENPGKPHPPKRPLNPYGQARRONRSDRUBRWFSARSBDSCRSDGSEKSGDSHPSLESLLSOSSRDSSPSTNSVCSYPSZLTHBTJSTMTTNDTOPTRYTTDTWDTZSUAHUGXUSDUSNUYIUYUUYWUZSVEDVESVNDVUVWSTXAFXCDXDRXOFXPFXSUXUAYERZARZMWZWLmin length 3max length 3 -
decimalsinteger
The number of digits after the decimal separator, that are expressed by the minor units of the currency. For example for Euro, Euro cents express 2 digits after the decimal separator. In other words, the price in the main currency units would be the
value * 10^(-decimals).min 0
IdlePrice object defined in session_cost_API.yaml ↗¶
Price components when idle
Additional properties allowed.
-
grace_minutesinteger
Grace period in minutes before idle time is charged. Grace minutes start counting from the timestamp of the message in which state changed from "Charging" to "Idle".
MoneyAmount object defined in session_cost_API.yaml ↗¶
'Money amount is expressed as an amount of minor units of the currency. Example price of 1.23 EUR is expressed as { value: 123 }'
Additional properties allowed.
-
valueinteger required
The amount of minor units of the currency.
NextPeriodPrice object defined in session_cost_API.yaml ↗¶
Pricing for the next period
Additional properties allowed.
-
timestamp_fromstring required
Time when these prices become active, in RFC3339 format.
format date-time -
charging_pricearray<object> required
Price components while charging
-
itemsobject ChargingPriceComponent ↗
Charging price for a category
-
-
idle_priceobject IdlePrice ↗
Price components while idle. Optional if no idle fee charged.
Price object defined in session_cost_API.yaml ↗¶
Price object containing the currency and the value of money.
Additional properties allowed.
-
valueobject requiredMoneyAmount ↗
Value in the minor units of the currency.
SessionCost object defined in session_cost_API.yaml ↗¶
Session cost object containing the total cost of the session and a list of chunks
Additional properties allowed.
-
session_idstring required
The session id
-
currencyobject requiredCurrency ↗
Currency of the session cost. It applies to all chunks.
-
cost_chunksarray<object>
List of cost chunks. The total cost of the session is the sum of all chunks.
-
charging_pricearray<object>
Charging prices.
-
next_periodobject NextPeriodPrice ↗
Charging prices for the next period, starting from the given date/time
-
Session status. Session can be running or finished. Costs of the running session are not final and can change. Only after the session is finished, the session cost can be committed to bank and/or backend.
enumRunningIdleFinished -
messagearray<object>
Message to show to the user containing information about the price
-
itemsobject MessageContent ↗
Message with pricing information in a specific language
-
-
qr_codestring
QR Code with more information. For example when the charging is finished, to download the invoice from
SessionCostChunk object defined in session_cost_API.yaml ↗¶
A chunk of the session cost. The total cost of the session is the sum of all chunks.
Additional properties allowed.
-
timestamp_fromstring
Absolute timestamp for the start of this chunk in RFC3339 format
format date-time -
timestamp_tostring
Absolute timestamp for the end of this chunk in RFC3339 format
format date-time -
metervalue_frominteger
Metervalue (energy Wh import) for the start of this chunk
-
metervalue_tointeger
Metervalue (energy Wh import) for the end of this chunk
-
costobject MoneyAmount ↗
Cost of the energy (or other things like time, base price, ...) consumed during this chunk in the currency specified in the session price
-
Cost category. Typically this is energy, time or a flat fee.
enumEnergyTimeFlatFeeOther
TariffMessage object defined in session_cost_API.yaml ↗¶
Message containing cost information
Additional properties allowed.
-
ocpp_transaction_idstring
Transaction id of ocpp.
-
identifier_idstring
To which token this message is bound.
-
The type of 'identifier_id'. If omitted, type will be session id.
enumIdTokenSessionIdTransactionId -
messagesarray<object> required
Message with session price information to show the user.
-
itemsobject MessageContent ↗
Message with pricing information in a specific language
-