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.
Everyone starts somewhere! Well worth persevering as the command line is where you can most easily get tasks plumbed together.

Why not turn the backup command into a script that runs weekly and backs up the db to a file on a different drive with the current date? No more having to remember to backup!
I will do it - actually planned long time ago but other priorities took my time :D
 
Try this:

pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

your username/password may be different.

can't check it because - well docker :)


more here:

pg_dump -U teslamate teslamate > /tmp/teslamate.bck
pg_dump: error: connection to database "teslamate" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
 
Last edited:
pg_dump -U teslamate teslamate > /tmp/teslamate.bck
pg_dump: error: connection to database "teslamate" failed: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
Check your teslamate configuration for the values it uses, it seems like you may not have chosen some defaults for Postgres.

You can then pass those connection options to pg_dump (pg_dump)
 
  • Like
Reactions: init6
I tried to setup via GCP but the only guide I can seem to find is very out of date (made in 2020). Also a few sections on it that are assuming a bit too much that I know how to 'create subdomains' and attach to my VM..

Any up to date guides anywhere for setting up on any platform?? Preferably connected to internet so can view outside of my home LAN?
 
Which guide did you use?
from teslaev co uk website , it seems to be only one I can find for working with GCP? Maybe I gave up too easily and should ask:

guide says:

Create a subdomain

TeslaMate instructions now recommend creating a single teslamate subdomain, it can be simply teslamate.mydomain.com (replacing mydomain.com with your domain name) or something else, this is completely up to you, you’ll just need to make changes in the .env file later on to make sure this works for you.

For this subdomain, you need to change the DNS setup so that the subdomain has an A records that point to your public facing IP address for your GCP micro VM instance.

Do I buy a subdomain online frm a website? How do I change the DNS setup as it describes? How do I attach the domain to the GCP VM IP?

Could I go to a website like namesilo and register Hazmattstesla.uk and all these settings are found there?
 
Last edited:
Thanks - I used it now and I can ping through to my vm so thats good.

Now struggling through installation of docker on the vm, again seems to be doing different things to the guide but I shall struggle through it!
The main reason for wanting a domain is so that you cat setup a SSL certificate using something like let's encrypt so you can use HTTPS to access Teslamate.

I would setup a VPN on the VM and only have that exposed to the internet - you do not need a domain for that. That way you are not going to be relying on the security of Teslamate as it will be effectively on a private network. When you want to access, you just connect to the VPN on your computer or phone.
 
The main reason for wanting a domain is so that you cat setup a SSL certificate using something like let's encrypt so you can use HTTPS to access Teslamate.

I would setup a VPN on the VM and only have that exposed to the internet - you do not need a domain for that. That way you are not going to be relying on the security of Teslamate as it will be effectively on a private network. When you want to access, you just connect to the VPN on your computer or phone.

Interesting - is there a real security risk involved?

How about hosting locally at home on a Pi and creating a VPN into my home network?
 
Interesting - is there a real security risk involved?

How about hosting locally at home on a Pi and creating a VPN into my home network?
Teslamate (and any other service like it) holds an access token to your Tesla account... so there is some risk as someone can see where the car is. Not sure if it would be possible to use the token to perform actions that are possible in the App? The API is not particularly well documented.
 
Teslamate (and any other service like it) holds an access token to your Tesla account... so there is some risk as someone can see where the car is. Not sure if it would be possible to use the token to perform actions that are possible in the App? The API is not particularly well documented.
The API is well documented, the access token can be used to do anything the app does
 
  • Like
Reactions: cwanja and jsight
So I've been driving all day yesterday (LA < -- > Bay Area) and had a weird bug where for 2 of the short charges (<7 minutes), it doesn't log it correctly. For one, for example, it logged as 1 minute. When driving polling is every 5 second increments. In Trip Overview I see a sudden jump in my battery from 22% to 28%, and "Charging" doesn't start until 2023-06-18 17:58:25 and only "lasts" for 1 minute. The 2 minutes before that are just... mysteriously gone. This happened again for another View attachment 948785
 

Attachments

  • WeChat Screenshot_20230619215242.png
    WeChat Screenshot_20230619215242.png
    17 KB · Views: 75
  • WeChat Screenshot_20230619215304.png
    WeChat Screenshot_20230619215304.png
    102.9 KB · Views: 33