Smart Charging¶
Accessing Smart Charging data is only available with the Smart Charging product and can be accessed via our HTTP endpoint:
https://sdk.viriciti.com
All information that is sent will be in JSON format, and an x-api-key
header needs to be provided with every request.
Static¶
Charger Group Info¶
GET https://sdk.viriciti.com/api/v1/smartcharging/chargergroup/:group_id
Gets information about current active profile for a given charger group:
- title - Charger group name
- id - Charger group ID
- groupLimit - Charger group limit
- timeframes - Active peak shaving settings – their names, peak shaving limits, and their time frames with times represented as cron time. Note: in cron time, first day of week is Sunday (0 = Sunday).
Use the static Charging Stations API to retrieve the current charger - group relation.
The example below gets the current settings for charger group ViriCitiGroup
:
GET https://sdk.viriciti.com/api/v1/smartcharging/chargergroup/ViriCitiGroup
Example response from the query will look like:
{
"title": "ViriCiti Group",
"id": "ViriCitiGroup",
"groupLimit": 400,
// Since the timeframes are only set from 00:00-08:00 and 16:00-00:00,
// from the time of 08:00-16:00 the groupLimit of 400 will be set
"timeframes": [ // Only active time frames will be shown
{
// For this timeframe the limit of 200 will be active
// everyday (Sun,M,T,W,Th,F,Sat) from 16:00 to 00:00
"active" : true,
"start" : "0 16 * * 0,1,2,3,4,5,6",
"end" : "0 0 * * 0,1,2,3,4,5,6",
"limit" : 200,
"name" : "16:00-00:00"
},
{
// For this timeframe the limit of 100 will be active
// everyday (Sun,M,T,W,Th,F,Sat) from 00:00 to 08:00
"active" : true,
"start" : "0 0 * * 0,1,2,3,4,5,6",
"end" : "0 8 * * 0,1,2,3,4,5,6",
"limit" : 100,
"name" : "00:00-08:00"
}
]
}
Set Charger Group Limit¶
POST https://sdk.viriciti.com/api/v1/smartcharging/grouplimit/:group_id
Allows to set the group limit for a charger group for a period of time. Once the request is successfully received, the Smart Charging system will adapt to the new value and limit all individual chargers accordingly. See Get Charger Group Limit for response details. The external limit will override all limits set in the system (default and scheduled group limits). The only checks on the group limit are that it is a positive integer value. When the expiration of the external group limit is reached, the normal SmartCharging limit logic is used, which is if a scheduled limit is active use that, otherwise use default.
Parameter | Description |
---|---|
groupLimit* | Max power used by group (kW) |
endTime* | Time which the groupLimit will be used for. The format is ISO 8601 and she be respective of the time zone configured the group |
The example below will set a groupLimit
of 450 kW
for the group ViriCitiChargers
from now until 10 Feb 2021 16:20 GMT
Example request body:
curl -X POST https://sdk.viriciti.com/api/v1/smartcharging/grouplimit/ViriCitiChargers?apiKey=XXX \
-H "Content-Type: application/json" \
-d '{"groupLimit" : 450, "endTime" : "2021-02-10T16:20:00.000+00.00"}'
Example response body:
{
"default": {
"limit": 500
},
"activeLimit": "external",
"external": {
"limit": 450,
"start": "2021-02-10T16:00:00.000+00.00",
"end": "2021-02-10T16:20:00.000+00.00"
}
}
Note 1: Group limit may not be changed too often, because the system needs time to adapt and chargers do too.
Note 2: Groups need to be configured to accept external limits, which users aren't able to do at this time. When a group is configured, any limit set through this API will override all values you have set in Portal
Get Charger Group Limit¶
GET https://sdk.viriciti.com/api/v1/smartcharging/grouplimit/:group_id
Fetches the current scheduling across all possible limits and signifies the limit that is being used for calculations. If all values exists the hierarchy is as follows: external, upcoming, scheduled, default. For upcoming, it looks ahead to anticipate a drop in limit (not rise).
Example request body:
curl -X GET https://sdk.viriciti.com/api/v1/smartcharging/grouplimit/ViriCitiChargers?apiKey=XXX \
Example response from the query will look like:
{
"activeLimit": "external",
"default": {
"limit": 500
},
"external": {
"limit": 200,
"start": "2021-03-09T16:20:00.000+00:00",
"end": "2021-03-09T16:50:00.000+00:00"
},
"scheduled": {
"limit": 300,
"start" : "0 16 * * 0,1,2,3,4,5,6",
"end" : "0 20 * * 0,1,2,3,4,5,6"
}
}
Time Series¶
Important! The Time Series API for Smart Charging can be queried for a max period of 31 days.
Power limits¶
GET https://sdk.viriciti.com/api/v1/smartcharging/time/:group_id
Request historical measurements data between 2 two points in time for a specific Charger Group. Note: historical queries will be a representation of all chargers in a group at the specified time, if chargers change groups, the data will be of the charger group at that time and not the current charger group.
Use the static Charging Stations API to retrieve the current charger - group relation.
Parameter | Description |
---|---|
start* | Start time of the time stream in Unix timestamp (milliseconds) |
end* | End time of the time stream in Unix timestamp (milliseconds) |
The example below will retrieve limit
measurements from group_1
between 16 July 2020 09:00 GMT
and 17 July 2020 09:00 GMT
GET https://sdk.viriciti.com/api/v1/smartcharging/time/group_1?start=1594890000000&end=1594976400000
Example result from this query will look like:
[
{
"limits": [
{
"limit": 100,
"chargestation": "charger_1",
"position": 1
},
{
"limit": 100,
"chargestation": "charger_1",
"position": 2
},
{
"limit": 50,
"chargestation": "charger_2",
"position": 1
}
],
"groupLimit": 250,
"time":"2020-07-16T16:20:05.000Z"
},
...
]