This repo has become outdated due to changes in Enedis' website and authentication system. I highly recommend that you migrate to an up-to-date and better maintained project such as guillaumezin/DomoticzLinky.
The original repo stays here for reference purposes. Thank you. 🙏
This repository includes Linkpy, an easy-to-use Python package for reading Linky data from the Enedis website.
I wanted a way to display my energetic consumption on my wall, like on a weather station. I looked into different display solutions, and it turns out the nicest and easiest seems to be hacking a Kindle into displaying images refreshed periodically.
I therefore started making a graph generator that would take the data reported by my Linky electricity meter. The data is sent periodically to Enedis, which in turn offers a webpage which displays it - and makes it available through a private JSON API.
A few hours later, I had a Python script that could log into the Enedis website and download the meter's data. It can then be processed by the Python script, to generate PNG files of graphs that I will then display on the Kindle.
The script will generate the same graphs as the ones available on Enedis' website, that is to say:
Here's what it looks like:
The scripts require a Python 3 environment with some packages, as well as a LaTeX distribution for generating the graphs. Here's a list for a Debian system:
Set up environment variables containing your Enedis email and password.
export LINKY_USERNAME="[email protected]" export LINKY_PASSWORD="passwordnaze"
Then, just start
linky_plot.py to generate the graphs.
python3 linky_plot.py -o <output directory>