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.
Copy linkConsumption
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 linkProduction
Since the 2024-10-01
API version, Enode supports a single endpoint for fetching statistics for inverters, which is currently the only supported device type for production data. (Legacy API versions have two endpoints, and these have since been deprecated.)
This single 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.
Copy linkHistorical production statistics
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:
Time frame | Resolutions available |
---|---|
30 days prior to linking | QUARTER_HOUR , HOUR , DAY , MONTH , YEAR |
3 months prior to linking | DAY , MONTH , YEAR |
For the avoidance of doubt, "day" refers to the day when the asset was linked and "month" refers to the month it was linked, both in local time of the inverter. For a hypothetical inverter located in UTC timezone, an asset linked at 2024-09-25T20:55:00Z
will have historical statistics available down to:
- 15-minute resolution between
2024-08-26T00:00:00Z
and2024-09-25T20:55:00Z
- 1-day resolution between
2024-06-01T00:00:00Z
and2024-09-25T20:55:00Z
Contact us if you need to backfill more historical data. Backfilling will take some time, but you can track the progress of the work via the webhook event user:inverter:statistics-updated
.
Copy linkImplementation Suggestions
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
nonSmartPrice
represents the price the user would have paid had Enode not shifted in time the charging effort price
represents what the user actually paidestimatedSavings
shows 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.