Skip to content

rsaikali/linkystat

Repository files navigation

linkystat CodeQL Deploy to production

Monitoring for Linky device (French electricity meter) through Grafana

Monitoring for Linky device (French electricity meter) through Grafana

Hardware Requirements

  • RaspberryPi (or any other computer that can stand 24/7 next to your Linky electricity meter 😉)

  • Micro Teleinfo V3.0 dongle. It is plugged in the RaspberryPi through USB port and connected to the Teleinfo Linky pins. The USB dongle is available on Tindie.

  • Linky electricity meter.

Software Requirements

  • Docker
  • Docker Compose

Installation

# Clone the repository
git clone https://github.com/rsaikali/linkystat.git

# Change directory
cd linkystat

Configuration file

# Copy the example environment file
cp env/.env.example .env

# Edit the environment file (see next section for details)
nano .env
Name Description Default value
LINKY_USB_DEVICE Micro Teleinfo USB port /dev/ttyACM0
OPENWEATHER_API_KEY OpenWeather API key
OPENWEATHER_LATITUDE Latitude used by OpenWeather
OPENWEATHER_LONGITUDE Longitude used by OpenWeather
MYSQL_ROOT_PASSWORD MySQL root password root_password
MYSQL_DATABASE MySQL Linkystat database linky
MYSQL_USER MySQL Linkystat user linky
MYSQL_PASSWORD MySQL Linkystat password linky
GRAFANA_MYSQL_USER MySQL Grafana user grafana
GRAFANA_MYSQL_PASSWORD MySQL Grafana password grafana
GF_SECURITY_ADMIN_USER Grafana admin user admin
GF_SECURITY_ADMIN_PASSWORD Grafana admin password admin
GF_SECURITY_ADMIN_EMAIL Grafana admin email

Note: Grafana will be exposed on port 3000. You should configure an external reverse proxy (Traefik, Caddy, nginx, etc.) to handle HTTPS and domain routing.

# Build and start the containers
docker compose --env-file ./.env up -d

# Open Grafana in your browser
http://<raspberry_ip_address>:3000

Docker

Launch docker compose using the previously edited .env file.

# Build and start the containers
docker compose --env-file ./.env up -d

Configuration in Grafana

Open Grafana in your browser: http://<raspberry_ip_address>:3000 and login with the previously created admin user:

Linkystat Grafana login page

Then go to Settings>Variables to setup personalized variables for your installation:

Linkystat Grafana variables

Here you have to setup the first four variables (keep the others to their default values):

Name Description
jour_releve_compteur Day of provider meter reading
abonnement Subscription price
prix_hp Peak hours kWh price
prix_hc Off-peak hours kWh price

You can now enjoy your Linkystat Grafana dashboard!

License

MIT

About

Monitoring for Linky device (French electricity meter) through Grafana

Topics

Resources

License

Stars

Watchers

Forks

Contributors