/linky-to-influxdb

Linky crawler that stores data to InfluxDB

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Linky to InfluxDB

Linky to InfluxDB is a Docker image that stores Enedis's Linky daily power consumption to InfluxDB.

With a Chronograf or a Grafana connected to the InfluxDB database, such representations will be possible :

Chronograf

Principles

Docker image

Image retrieving

docker pull barasher/linky-to-influxdb:[tag]
  • [version] : linux 386 version, sample : barasher/linky-to-influxdb:1.3.1
  • [version]-armv7 : armv7 version (raspberry pi, ...), sample : barasher/linky-to-influxdb:1.3.1-armv7

Image building

docker build -t barasher/linky-to-influxdb:latest .

Execution

Environment variables :

  • LTI_LINKY_USER: Enedis account login, required
  • LTI_LINKY_PASS: Enedis account password, required
  • LTI_IDB_URL: InfluxDB URL, required (ex : http://192.168.0.2:8086)
  • LTI_IDB_DB: InfluxDB database, required
  • LTI_IDB_LOC: Location, required (No space and special character)

Retrieve yesterday's data

docker run --rm
  --env LTI_LINKY_USER=[Enedis login]
  --env LTI_LINKY_PASS=[Enedis password]
  --env LTI_IDB_URL=[InfluxDB URL]
  --env LTI_IDB_DB=[InfluxDB database]
  --env LTI_IDB_LOC=[Localisation]
  barasher/linky-to-influxdb:latest

Retrieve specific period data

docker run --rm
  --env LTI_LINKY_USER=[Enedis login]
  --env LTI_LINKY_PASS=[Enedis password]
  --env LTI_IDB_URL=[InfluxDB URL]
  --env LTI_IDB_DB=[InfluxDB database]
  --env LTI_IDB_LOC=[Localisation]
  barasher/linky-to-influxdb:latest ./recover.sh [first date (format dd/mm/yyyy)] [how many days]

To retrieve data concerning the 31st of December 2018, here is the full command line :

docker run --rm 
  --env LTI_LINKY_USER=[Enedis login]
  --env LTI_LINKY_PASS=[Enedis password]
  --env LTI_IDB_URL=[InfluxDB URL]
  --env LTI_IDB_DB=[InfluxDB database]
  --env LTI_IDB_LOC=[Localisation]
  barasher/linky-to-influxdb:latest ./recover.sh 31/12/2018 1

To retrieve data concerning 12 days from the 1st of February 2018 (included), here is the full command line :

docker run --rm 
  --env LTI_LINKY_USER=[Enedis login]
  --env LTI_LINKY_PASS=[Enedis password]
  --env LTI_IDB_URL=[InfluxDB URL]
  --env LTI_IDB_DB=[InfluxDB database]
  --env LTI_IDB_LOC=[Localisation]
  barasher/linky-to-influxdb:latest ./recover.sh 01/02/2018 12

Changelog