Skip to content
Générateur de graphiques de consommation d'électricité Linky pour affichage sur Kindle
Python Shell
Branch: master
Clone or download

Latest commit

outadoc Add proper Linky library + upload to PyPI (#6)
* Make cleaner package out of Linky module

* Use a class for linkpy

* Add proper README and subdir

* Remove non-external dependencies

* Add pypi badge
Latest commit a69e00b May 2, 2019

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Reformat files according to strict PEP8 checks, add PyCharm files Sep 25, 2017
.vscode Add proper Linky library + upload to PyPI (#6) May 2, 2019
assets Update assets Oct 30, 2016
linkpy Add proper Linky library + upload to PyPI (#6) May 2, 2019
out Commit out/ directory Oct 31, 2016
.gitignore Reformat files according to strict PEP8 checks, add PyCharm files Sep 25, 2017
LICENSE Add license and readme Oct 30, 2016
README.md Add proper Linky library + upload to PyPI (#6) May 2, 2019
gen_graphs.sh Add proper Linky library + upload to PyPI (#6) May 2, 2019
kindle_colors.gif Fixed image generation for Kindle Nov 30, 2016
linky_plot.py Add proper Linky library + upload to PyPI (#6) May 2, 2019

README.md

Linkindle

Linkpy library

PyPI version

This repository includes Linkpy, an easy-to-use Python package for reading Linky data from the Enedis website.

Check it out here.

What is this project?

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.

Linky

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.

Example output

The script will generate the same graphs as the ones available on Enedis' website, that is to say:

  • Hourly consumption
  • Daily consumption
  • Monthly consumption
  • Yearly consumption

Here's what it looks like:

The daily consumption graph generated by the script

Requirements

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:

  • python3
  • python3-numpy
  • python3-dateutil
  • python3-matplotlib
  • texlive
  • texlive-latex-extra
  • dvipng

Usage

Set up environment variables containing your Enedis email and password.

export LINKY_USERNAME="jean.dupont@gmal.com"
export LINKY_PASSWORD="passwordnaze"

Then, just start linky_plot.py to generate the graphs.

python3 linky_plot.py -o <output directory>
You can’t perform that action at this time.