Access the dynamic status updates layer
Access the dynamic status updates layer
The EV dynamic status updates stream is available in a stream layer in a HERE platform catalog.
Technically, the data is available in the evse-update-stream layer in the EVCP2 Updates catalog.
This tutorial provides instructions on how to achieve the following:
- Create the required credentials for the EV dynamic status updates streaming.
- Find the required parameters for the updates streaming.
- Listen to the stream using the OLP CLI.
- Guidance on using other access mechanisms.
NoteThe OLP CLI used in this tutorial is meant only for testing and prototyping purposes. For production use, you need another access mechanism - see the section "Other ways to access the data" below.
Pre-requisites
Before starting, you need to have been on-boarded to the HERE platform as described in the Quick Start.
Also, familiarize yourself with the platform catalogs and layers. The EV updates stream is stored in a stream layer.
Application credentials
Access to your data is possible via the platform applications in your platform realm. Each application can have two sets of OAuth2 credentials, which authorize access. Follow the instructions to get the credentials.
You need to add the application to the group to which the catalog has been shared as described in the Quick Start.
NoteYou must be an Org Admin with management rights enabled for all apps and resources.
NoteYou can use the same credentials you use for accessing the HMC catalog.
Bearer token
The Data API uses bearer tokens for authentication.
Once you have obtained the credentials for an application, you can get the bearer token. Refer to the detailed instructions for production use. For quick testing, use the the OLP CLI:
olp api token get --quiet
to fetch a token.
NoteThe OAuth2 credentials are taken into use as instructed in the section OLP CLI Configuration.
Fetch EV data using the OLP CLI
Using the OLP CLI, the EV status updates stream can be listened by:
olp catalog layer stream get hrn:here:data::olp-here:evcp2-updates-prd evse-update-stream
Response schema
The next example shows the response schema returned when listening to the stream from the evse-update-stream layer. The response to the call
olp catalog layer stream get hrn:here:data::olp-here:evcp2-updates-prd evse-update-stream
is a stream of the following JSON structures. The attributes are:
id: identification of the Location.evses: a structure that contains status update information for EVSEs at the Location.id: identification of the EVSE at the location.status: the latest EVSE status. One of: AVAILABLE, CHARGING, RESERVED, OUT_OF_ORDER, INOPERATIVE, BLOCKED, UNKNOWN. See OCPI v2.2.1 section 8.4.22 for the explanation on the statuses.last_updated: timestamp for the status update.
{
"id":"here:evcp:charginglocation:56u1516726h2-aGVyZS1ldjplY29tb3ZlbWVudDoxMjc3ODgxMDM",
"evses": [ {
"id":"here:evcp:evse:19fe84d8dfd4528eae9c7fce06acb82c4bba1d8b9ed99435395f13a05fa6eefc",
"status":"AVAILABLE",
"last_updated":"2024-04-05T11:37:59Z"
} ]
}
NoteThe stream content is compressed with gzip. When using the OLP CLI or the Java/Scala Data Client Library the client decompresses the stream automatically, but for other access mechanisms the stream needs to be uncompressed separately.
NoteThe
evsesarray in the stream typically contains one record. However, it may be extended in future to have status information for multiple EVSEs for the Location.
Other ways to access the data
In addition to the OLP CLI, there are also other high level SDKs available. For example, for
If you wish to use the Data API, refer to the documentation on how to access the data from a stream layer.
Updated last month