~npen/teleinfo-logger

My personnal application for recording teleinfo data to a database
Fix topic for power discovery
Add power discovery message, set retain flag

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~npen/teleinfo-logger
read/write
git@git.sr.ht:~npen/teleinfo-logger

You can also use your local clone with git send-email.

#teleinfo-logger

A small application I'm using to log my electrical meter data (using the french "Teleinfo" protocol) to a PostgreSQL database.

This might serve as an example on how to use the teleinfo-parser library.

I recently added some optional MQTT capabitilies:

  • log also boiler consumption and solar production coming from MQTT
  • expose on MQTT the data received from the Teleinfo bus

#Testing

Create a local tty by connecting on a TCP serial exposed by ser2net:

socat PTY,link=/tmp/ttyS0,rawer TCP:192.168.2.105:2000,keepalive,interval=10

Create a temporary database using Docker, and initialize the model using the telinfo-db project:

sudo docker run --rm --name teleinfo-db -e POSTGRES_PASSWORD=teleinfo -e POSTGRES_USER=teleinfo -p 5432:5432 postgres

mvn process-resources -Dliquibase.url=jdbc:postgresql://localhost:5432/teleinfo -Dliquibase.username=teleinfo -Dliquibase.password=teleinfo

Run the program with:

cargo run

(the file .cargo/config.toml includes some default environment variables for testing)