Enode Developers

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 typeAsset type
Consumption statisticsvehicle, charger, hvac
Production statisticsinverter

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. (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.

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:

Linking dateTime frameResolutions available
≥ 2024-10-01Since 30 days prior to linking dayQUARTER_HOUR
≥ 2024-10-01Since 3 months prior to linking monthDAY
< 2024-10-01Since 30 days prior to 2024-10-01QUARTER_HOUR
< 2024-10-01Since 3 months prior to 2024-10-01DAY

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)

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. 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 progress.

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 paid
  • estimatedSavings 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.

Was this article helpful?