Get Latest Meter Value
curl --request GET \
--url https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"connectorId": 123,
"transactionId": 123,
"meterValue": [
{
"timestamp": "<string>",
"sampledValue": [
{
"value": "<string>",
"context": "<string>",
"format": "<string>",
"measurand": "<string>",
"phase": "<string>",
"location": "<string>",
"unit": "<string>"
}
]
}
]
}Connectors
Get Latest Meter Value
GET
/
v3
/
chargers
/
{charger}
/
connectors
/
{connector_id}
/
latest-metervalue
Get Latest Meter Value
curl --request GET \
--url https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.plugchoice.com/api/v3/chargers/{charger}/connectors/{connector_id}/latest-metervalue")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"connectorId": 123,
"transactionId": 123,
"meterValue": [
{
"timestamp": "<string>",
"sampledValue": [
{
"value": "<string>",
"context": "<string>",
"format": "<string>",
"measurand": "<string>",
"phase": "<string>",
"location": "<string>",
"unit": "<string>"
}
]
}
]
}Returns the latest OCPP meter value for a specific connector. This includes detailed sampled values for energy, current, voltage, and other measurands.
The UUID of the charger.
The OCPP connector ID.
Response
The connector ID this meter value belongs to.
The ID of the transaction the meter value relates to, when the reading was taken during an active transaction. May be omitted.
An array of meter value entries.
Show meterValue
Show meterValue
ISO 8601 timestamp of the measurement.
Array of sampled values.
Show sampledValue
Show sampledValue
The measured value.
The context of the reading (e.g.,
Trigger, Sample.Periodic).The value format (e.g.,
Raw).The type of measurement (e.g.,
Energy.Active.Import.Register, Current.Import, Voltage).The phase this value applies to (e.g.,
L1, L2, L3, L1-N). May be null.The measurement location (e.g.,
Outlet, Inlet).The unit of measurement (e.g.,
Wh, A, V).⌘I