Statistics
Statistics allow you to retrieve time series and aggregated data about devices as they consume and produce electricity.
It’s important to be aware that different devices have slightly different ways of delivering statistics. This guide will help you understand these differences and assist you in making a successful integration.
Statistics are supported for the following entities:
| Statistics type | Asset type |
|---|---|
| HEM System statistics | inverter, battery, meter |
| Solar inverter statistics | inverter |
| EV Charging statistics | vehicle, charger |
Copy linkHEM system statistics
For use cases such as historical data insights involving solar inverters, home batteries, and their bundled meters (inverter, battery, meter), the HEM System APIAPI should be used. This API provides direct access to vendor statistics that Enode forwards synchronously and with minimal processing.
Rather than manually aggregating data from individual devices, the HEM System API centralizes access to consistent, vendor-aligned data, simplifying integration and delivering an experience identical to what consumers see in their native apps.
The API supports two resolutions:
| Type | Query example | Interval | Bucket size |
|---|---|---|---|
High resolution: DAY | /hem-systems/:id/statistics?YYYY-MM-DD | 1 day | 5 or 15 minutes |
Low resolutions: MONTH | /hem-systems/:id/statistics?YYYY-MM | 1 month | 1 day |
And returns the following data points in a time series:
- generation (from solar)
- import (from grid)
- export (to grid)
- charge (of the home batteries of the system)
- discharge (of the home batteries of the system)
- consumption (of the household)
- SoC (of the home batteries of the system, only available for
DAYintervals)
For additional guidance on how to use the API, refer to our integration guide.
Copy linkConsiderations
- The data a HEM System has access to depends on two criteria:
- real-world composition of the system (a system without a battery will not have battery data)
- the scopes granted when linking (a missing battery scope will cause missing battery data even though a battery exists in the real world)
- A partially linked HEM System (e.g. an existing battery was not linked) will only provide data it has access to.
- Data is available up until the installation date (even prior to linking).
- The API is synchronous to the OEM cloud and hence best suited to power historical views in energy apps. In case of batch processing of multiple days/month, beware of potential rate limits and avoid parallel requests to the same system.
- Individual energy flows such as
generation,chargeordischargeare aggregated for a plant/site. If your system has multiple solar inverters or batteries that run in parent-child mode, those get consolidated into holistic plant/site-level data points.
Copy linkSolar inverter statistics
Since the 2024-10-01 API version, Enode supports a single device level endpoint for fetching statistics for inverters, which is currently the only supported device type for production data. (API versions before 2024-10-01 have two endpoints, both deprecated.)
This single inverter statisticsAPI endpoint will deliver statistics for devices since they were linked to Enode. And where available, we provide the same statistics for a device as the vendor themselves do.
Statistics from before linking will also be available for most devices. By default, historical statistics will be available for the following time frames and resolutions:
| Linking date | Time frame | Resolutions available |
|---|---|---|
| ≥ 2024-10-01 | Since 30 days prior to linking day | QUARTER_HOUR |
| ≥ 2024-10-01 | Since 3 months prior to linking month | DAY |
| < 2024-10-01 | Since 30 days prior to 2024-10-01 | QUARTER_HOUR |
| < 2024-10-01 | Since 3 months prior to 2024-10-01 | DAY |
For the avoidance of doubt, "linking day" refers to the date when the asset was linked, and "linking month" refers to the month it was linked; both in the timezone of the inverter.
Example: For a hypothetical inverter located in the Australia/Melbourne timezone and linked on 2024-11-26 (Melbourne time), statistics are available in:
- 15-minute resolution starting from 2024-10-26 (Melbourne time)
- 1-day resolution starting from 2024-08-01 (Melbourne time)
Example: For a hypothetical inverter located in the America/Chicago timezone and linked before 2024-10-01, on 2023-11-15 (Chicago time), statistics are available in:
- 15-minute resolution starting from 2024-09-01 (Chicago time)
- 1-day resolution starting from 2024-07-01 (Chicago time)
Backfilling will take some time, but you can track the progress of the work via the webhook event user:inverter:statistics-updated. An event is sent both when data is initially retrieved, and on any subsequent updates. For example, data for the current day will usually be updated multiple times as it progresses.
Copy linkEV charging statistics
There are two different ways for reading statistics data:
- Time bucketsAPI give power consumption over a period of time, binned into buckets of a chosen resolution.
- SessionsAPI give power consumption binned into sessions. A session is defined by at least two consecutive data points from the device showing consumption.
The choice of which method to use is very dependent on your use case. If you wish to show aggregated statistics for a whole year, or month, it would be wise to use the time buckets functionality. Alternatively, if you want to show individual consumption sessions, then the sessions endpoint should be used.
Copy linkPrice
The consumption endpoints can return price data that reflects the price of kWh consumed. To have price information returned the charging session must have happened at a registered LocationAPI. This ensures we have the correct price area, and thus price information, for the charging session. If Enode does not have market prices for the Location, you must have provided valid tariffs for the Location.
Copy linkSmart Charging
If you use smart charging from Enode you will be able to measure its impact in Consumption statistics.
Broadly speaking, smart charging works as follows: at the time of plug in, Enode calculates how much time is required to charge a vehicle; and shifts that effort in time to a period which is cheaper. The effects of this shift will be represented by the nonSmartPrice and the price fields:
- The
nonSmartPricerepresents the price the user would have paid had Enode not shifted in time the charging effort pricerepresents what the user actually paidestimatedSavingsshows the difference between these two.
If any of these fields are not present then the time frame or session for which you are requesting statistics was not part of a smart charging effort.
It is recommended you use the sessions endpoint when wanting to show the benefits of smart charging. The time bucket endpoint can have some corner cases that are avoided by using sessions.
Copy linkAccuracy
Statistics are generated in a variety of ways to get as accurate results as possible. Accuracy can vary based on device, model, reachability, and so on. The statistics are not revenue-grade, since there will be slight discrepancies between usage reported at a meter compared to statistics. More details on accuracy can be provided upon request.
Vehicle chargers generally offer better accuracy than vehicles due to loss and other factors. If obtaining good charging statistics is important, it would be advisable to encourage the connection of a charger as well.
As an upper bound, the from and to values of the sessions that Enode reports in our API can deviate 15 minutes from reality. The vast majority of sessions will have much less drift in these fields.
Devices with poor reachability may also have incorrect session statistics. If a device that has an active session becomes unreachable we will after a few hours automatically stop the session. These gaps can lead session statistics to look different from reality.