Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

TeslaMate [megathread]

This site may earn commission on affiliate links.
I was not suggesting this or any authentication site can be trusted.

I was asking the same question. How can we trust any 3rd party site that requires tesla account credentials to be entered.

teslatokengenerator.com doesn't support captcha so is no help, but the code is publically visible.

teslafi has a key generator if you care to trust that. [edit: built in to teslafi login process. So similar should be possible with Teslamate soon. But you still trust developer and system security with your credentials.]

But you already trust 3rd parties when you give account credentials.
Doesn’t that assume that the code running teslatokengenerator.com is the same published in Github or whatever? You’d have no way of knowing for sure.

Realistically the only truly safe way of generating tokens is requesting them yourself from Tesla’s API, using code/scripts you either wrote yourself or have the ability to forensically audit.

This is one of many reasons why I went with TeslaMate in the end. I self host it on infrastructure I control, so short of the server getting hacked I can be sure that my credentials are safe.
 
So, having got my Model 3 on Friday and having the odd Pi or 2 sat around doing very little, I set up TeslaMate on Monday. Not updated it yet and got hit with the Captcha thing initially so used AuthAppForTesla on my phone to generate a code. Now TeslaMate is working direct with the Tesla login again, can I revoke that code by simply changing my password then logging in on TeslaMate again so only I have a valid code? Or am I being over paranoid and I should just wait for the current code to time out in a month or so?
 
Hi @DaveW - first off many thanks for all the work and guides on installing/running Teslamate - invaluable in getting me up and running on a Pi4. Now everything is uu and running though I tried to follow your guide on adding the Supercharger geofences and had a couple of issues. First one was there is a syntax error in the list at TeslaMate - How to bulk import UK Supercharger locations - TeslaEV.co.uk - looks like the quote mark at the end of the site name for the Leicester - Fosse Park entry is wrong which breaks the import. Second thing I noticed was the South Mimms Supercharger seems to be missing from the list - easy enough to add since I'd charged there a couple of times, but just wanted to flag it.
 
  • Like
Reactions: DaveW
Hi @DaveW - first off many thanks for all the work and guides on installing/running Teslamate - invaluable in getting me up and running on a Pi4. Now everything is uu and running though I tried to follow your guide on adding the Supercharger geofences and had a couple of issues. First one was there is a syntax error in the list at TeslaMate - How to bulk import UK Supercharger locations - TeslaEV.co.uk - looks like the quote mark at the end of the site name for the Leicester - Fosse Park entry is wrong which breaks the import. Second thing I noticed was the South Mimms Supercharger seems to be missing from the list - easy enough to add since I'd charged there a couple of times, but just wanted to flag it.
Thanks Kiertrax, glad the guides were helpful, I’ll fix the broken supercharger and add in South Mimms - I initially pulled the list from OpenCharge, but have recently just been adding them manually
 
The "md" command doesn't exist on Unix (that's from Windows), the correct command to create a directory is "mkdir":
Code:
sudo mkdir /backuplocation
sudo docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

I would recommend however that instead of creating the directory within root that you create the backup location within your home directory - you can add a "~" as a shortcut for that. It will remove the necessity to work as "root". You can also swap out "backuplocation" for a simpler name if you'd like.

Code:
mkdir ~/backuplocation
docker-compose exec -T database pg_dump -U teslamate teslamate > ~/backuplocation/teslamate.bck
Thanks mate , this solved my issue
 
Any tips on how to fix this? Sorry. Total novice. I'm sure the community would appreciate a dummy guide for this if anyone can chime in.

On unRAID I added this to my Grafana docker container config to allow the plugin to work, if you have more than one plugin you can put a comma and add the next one "grafana-map-panel, other-plugin"

Having posted on the Teslamate GitHub, Grafana v8 isn't supported yet so I've rolled the Grafana docker back to the last version of v7 which I did by editing the Repository tag to "grafana/grafana:7.5.8". Now everything is back to working as normal.

Screenshot 2021-06-15 at 21.52.37.png
 
Last edited:
I found that my Teslamate backup files were getting quite large (well over 1 Gb) and so went back on this thread and found:
I've made a slight change to the script to automatically compress the file. Its not too bad if you want only 7 days worth, but I'm thinking of keeping a rolling month or year.

Code:
...
sudo /usr/local/bin/docker-compose exec -T database pg_dump -U teslamate teslamate | gzip > /home/pi/tmbackup/teslamate_bck_${now}.gz
rclone copy --max-age 24h /home/pi/tmbackup --include 'teslamate_bck*' gdrive:TeslaMate
This little tweak now means that my daily backup file is now 7 times smaller.
Thankyou @ma9mwah !
 
Couple of questions about TeslaMateAgile if @MattJeanes is around (hum, @ doesn't find him ... @DaveW do you know if he is still around these parts?):

First off - I'm set up for fixed price mode (Octopus Go) but a short 3 minute charge of 0.42 kWh is showing as a cost of 0, not 0.02 as I would expect and as TeslaMate shows for costs it calculated when I was on a "normal" flat rate. Is this expected for such a low cost charge or have I set something up wrong?
Secondly, just wondered if you could set this up for multiple Geofence IDs now some of the SuperChargers have time based variable pricing?

Finally, though probably should have been first - great addition to TeslaMate so thanks for all the work!

Edit - maybe @ does work, just not in the list that pops up ... weird)
 
Couple of questions about TeslaMateAgile if @MattJeanes is around (hum, @ doesn't find him ... @DaveW do you know if he is still around these parts?):

First off - I'm set up for fixed price mode (Octopus Go) but a short 3 minute charge of 0.42 kWh is showing as a cost of 0, not 0.02 as I would expect and as TeslaMate shows for costs it calculated when I was on a "normal" flat rate. Is this expected for such a low cost charge or have I set something up wrong?
Secondly, just wondered if you could set this up for multiple Geofence IDs now some of the SuperChargers have time based variable pricing?

Finally, though probably should have been first - great addition to TeslaMate so thanks for all the work!

Edit - maybe @ does work, just not in the list that pops up ... weird)
Not sure if Matt visits here or not still. For the Supercharger variable prices to work, you'd need an API for them/the pricing I'd imagine, which is how the Agile integration works, gets to check the hourly prices.