Analyze your electrical consumption with your Linky data and Warp 10.

Analyze your electrical consumption provided by Linky easily with Warp 10.
Introduction
In France, electricity suppliers recently adopted a smart meter called Linky (https://fr.wikipedia.org/wiki/Linky). There are 3 ways to access its data:
- Plug a Raspberry (or something similar) directly to the Linky, but you can't access historical data
- use the Enedis APIs: https://datahub-enedis.fr/
- you need to declare an app, have a public HTTPS URL (even for tests) and implement OAuth
- and then use the Enedis customer portal: https://espace-client-particuliers.enedis.fr
Prerequisites
The easiest way is to use the Enedis customer portal. At first, you need to activate your account on https://espace-client-particuliers.enedis.fr and verify you have access to your consumption data.
Sadly, you can only fetch data at a 30 minutes granularity and between two dates. You cannot have real-time data as the Linky data are gathered each night.
Then, you need a Warp 10 instance and access tokens. For this step, you can rely on our Sandbox: https://sandbox.senx.io/
How to access and analyze your electrical consumption with your Linky data and Warp 10 Share on XSetup
To retrieve your historical data, you can use the code at https://github.com/Giwi/warp10-web-linky
Edit src/conf.json
in order to set some informations:
Then, create src/test.js
:
You should see the number of data points uploaded to Warp 10.
Analysis
Now verify on Warp 10 (http://studio.senx.io/) by fetching data for the last 30 days with a simple WarpScript:
As you can see, you have details, but if you want to improve the visibility, you have 2 choices:
LTTB
The LTTB
function downsamples a Geo Time Series or list thereof using the LTTB (Largest Triangle Three Buckets) algorithm. This algorithm downsamples a GTS by selecting the data points from the original GTS which will preserve the overall shape of the graphical representation of the data.
BUCKETIZE
You can also bucketize (more info) your series to resample it at your desired rate:
Add your subscribed power
As you have seen, we added your subscribed power limit to a label called "subscribed". Now, display it on the chart:

Consumption evolution
And now, we will accumulate the consumption over time:
Using INTEGRATE:
Load duration curve
A load duration curve illustrates the variation of a certain load in a downward form such that the greatest load is plotted on the left and the smallest one on the right. On the time axis, the time duration for which each certain load continues during the day is given. (learn more)
Detect outliers
Here is the final part: detecting outliers in my power consumption. We will use ESDTEST (extreme studentized deviate test).
Conclusion
This is a short example of how to analyze your electrical consumption data. I'm sure, there is a lot of additional analysis to do with it. WarpScript offers tons of powerful capabilities, which help you to go further in the analysis, like pattern detection, time period comparison, outlier detection, and so on.
I chose the easy way to collect data, but with a bit of DIY, you will be able to gather data in real-time directly plugged onto the meter. The historical data can be fetched through the customer portal.
Let us know on Twitter what kind of analysis you have done with your own data.
Read more
Real-time failure... Clock drift!
UFO sightings datasets, the truth is out there... Part 3
Industrie du futur : les données sur le chemin critique - Partie 2

Senior Software Engineer