Display that a smart charging scenario is up for the user
When a compatible electric vehicle is connected to the platform by the end user, Datanumia automatically activates a control scenario calledDREEV_SMART_CHARGING.
This scenario will use the charging needs defined by the user. Based on his needs and his energy contract, Datanumia will make sure to charge the electric vehicle during the right time to ensure a reduction in the user’s energy bill.
By using the endpoint : GET /api/v1/sites/{site-id}/control-scenarios, this new scenario can then be displayed to the user to let them know that the optimization scenario is running.
Description : This API returns all control scenarios available for a site, including electic vehicle smart charging ones. The API output provides information on each scenario, such as the status (whether they are in use or not), if the scenario is editable, etc.
Note that the DREEV_SMART_CHARGING scenario is in a readonly mode, meaning the user cannot deactivate the scenario by himself (readonly=True).
Input :
- Path parameter: The site identifier (
site-id) - Query parameter (optional): The scenario mode to filter scenarios on their mode
AUTOorMANUAL
Example :
GET /api/v1/sites/1dab569e-778b-4c46-9588-34ca3aeae293/control-scenarios
Visualize smartcharging sessions and control scenarios gains
Datanumia provides an API that can be used to retrieve the history of a site charging sessions. The output provides information about each charging transaction alongside the gains associated with the use of a smart charging control scenario. This API output is paginated and, by default, ten charging sessions are displayed per page. Endpoint :GET /api/v2/sites/{site-id}/control-scenarios/executions
Input :
- Path parameter: A site identifier (
site-id) - Required query parameters:
beginTs: Begin date of the requested period (included)endTs: End date of the requested period (excluded)
- Optional query parameter:
scenarioId: scenario identifiersize: number of retrieved transaction per page. By default, size=10page: output page to display
beginTs and end strictly before endTs.
The scenarioId field is not a mandatory query parameter. However, in order to retrieve charging transactions only, it must be set to scenarioId=DREEV_SMART_CHARGING.
Output :
- A list of charging sessions
executionswith information such as transaction duration, cost, start and end times, total energy consumed, energy consumed via smart charging, smart ratio (quantity of energy consumed via smart charging over total), etc. The charging sessions are sorted in reverse chronological order, i.e. the most recent transaction is the first returned by the APIenergyMeter: energy consumption in kWhtotal: total amount of energy consumed during the sessionsmart: amount of energy consumed in smart mode during the sessionunoptimized: amount of energy consumed in unoptimized mode during the sessionsmartRatio: intelligent charging utilization rate
cost: object displaying the real charging session cost (realCost) and the estimated cost (fullUnoptimizedEstimatedCost) the user would have paid if charging session had not been optimized at all. Therefore thefullUnoptimizedEstimatedCostis by definition higher than or equal to therealCost.gain: the gain of a charging session is the difference between the real charging session cost (realCost) and the cost the user would have paid if charging session had not been optimized at all (fullUnoptimizedEstimatedCost). The gain value is necessarily positive.gain=fullUnoptimizedEstimatedCost-realCost
- A
totalConsumptionobject displaying aggregated information over all transactions included in the API output (all pages): energyMeter consumption, cost and gain. - A
pageobject with the number of transaction per page, the total number of transactions, the total number of page and the current page.
fullUnoptimizedEstimatedCost is not available, or if the fullUnoptimizedEstimatedCost is lower than realCost, the gain will be sent to 0.
Example :
GET /api/v2/sites/:site-id/control-scenarios/executions?beginTs=2025-01-01T00:00:00Z&endTs=2025-03-18T00:00:00Z&page=0&scenarioId=DREEV_SMART_CHARGING