Proof of concept for a Munin plugin to monitor your Tesla car. Put up quickly together so others could (try to) use it and/or contribute. You really shouldn't write munin plugins this way. It ignores best practices and is far from being production ready. Currently it tracks battery, climate, odometer, range and speed.
It depends on TeslaPy by tdorssers.
Please note: it seems like v2.0.0 of TeslaPy no longer supports headless login as Tesla added ReCaptcha to the SSO service.
For plugin to work you need current status generated by TeslaPy
/usr/bin/python3 ~/TeslaPy/cli.py -e you@ma.il -g | grep -v ^Product > /var/run/munin/tesla_status.txt
For plugin to work you need also jq
and bc
packages.
Known issues: a lot.
If you want to have your car monitored but this code looks too scary for you feel free to reach out.
Copyright (C) 2021 Gandalf gandalf@hive.io