This project was made to visualise data from the Lelit MaraX coffee machine.
Sources for this project :
For this project you need at least :
- USB to TTL com RS232 (got it from Amazon, with a PL2303TA chip)
- Raspberry pi with wifi (I used a pi zero W + OTG USB type A to micro USB)
Connect the USB to TTL on your coffee Machine. Pin 0 (closer th the edge/outside) is not connected, then green to PIN 1 and white to PIN 2.
Connect th USB to the rpi. You can see the raw data in /dev/ttyUSB0.
You can verify everything is correct with this command
~# tail -f /dev/ttyUSB0
- ~# python -m venv /MYPATH/MyVenv
- ~# source /MYPATH/MyVenv/bin/activate
- ~# python -m pip install -r requirements.txt
- ~# deactivate
- #!/MYPATH/MyVenv/bin/python
- ~# chmod +x reporters.py
- ~# nohup ./reporters.py >/dev/null 2>&1 &
You can add a service to restart the script every day. It is also easier to restart the app if it crash.
Place the pyLelit.service file in /etc/systemd/system/
- To see the status : systemctl status pyLelit
- To restart : systemctl restart pyLelit
You can install docker on your raspberry pi, or use a server.
I used my nas to host thoses containers.
You can install InfluxDB and Grafana, bare metal, on your raspberry if you don't want docker.
By default, the docker compose create db0 database.
Chronograf can only by accessed by the host machine.
If you want to create a DB and user manually, connect to your container.
- ~# docker container ls
- ~# docker exec -it <CONTAINER_NAME> /bin/bash
Then you can create databases and users directly from the container.
- ~# inlfux
- > SHOW DATABASES
In grafana add a datasource : InfluxDB
Specify your credentials here :
Then you can import the dashboard :