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

TeslaMate Super Thread

This site may earn commission on affiliate links.
At a minimum, I recommend you back up your database before trying any manual changes. The procedure to perform a database backup is covered at Backup and Restore | TeslaMate.

I did this successfully when upgrading Postgres without an issue.
Yep, that is the plan. Backup, wipe, initialize and see if those values come in.

If they do, I might duplicate my backup, modify the backup file to include the missing values and then restore the modified database backup. If that fails, I will just nuke it and initialize and keep an empty database. Again, only 45 miles - a few drives, cities and geolocations saved.

Appreciate the response!
 
Brand new database, same issue:
Code:
docker-compose exec db psql teslamate teslamate -c \ "select * from cars;"
 id |       eid        |     vid      | model | efficiency |     inserted_at     |     updated_at     |        vin        |   name   | trim_badging | settings_id | exterior_color | spoiler_type | wheel_type | display_priority
----+------------------+--------------+-------+------------+---------------------+---------------------+-------------------+----------+--------------+-------------+----------------+--------------+------------+------------------
  1 | 1493058266263777 | 265533451232 |       |            | 2021-12-08 03:55:23 | 2021-12-08 03:56:34 | 5YJSA1E5XMF4548-- | Catalina | 100D         |           1 | SolidBlack     | None         | Cardenio19 |                1
(1 row)
 
  • Like
Reactions: jebinc
I will say, it seems specific to a LR. Both @jebinc and @WilliamG have Plaids. So if it is a configuration data preset in the database, I am at the mercy of the developer. Otherwise, my Tesla is not providing the data to TeslaMate.

Looking at the data returned against the https://owner-api.teslamotors.com/api/1/vehicles/?id=VID, no efficiency data point is there. Leading me to believe the Model and Efficiency is inserted into the database based upon one of the codes returned compared to a configuration file in the application. And as such, there is no code for the refreshed Model S LR. But there is one for the Plaid (maybe a generic performance model?).
 
  • Informative
Reactions: focher and WilliamG
Because I apparently have all the time in the world on my hands and do not give up, checked the api/1/vehicles/{ID}/vehicle_data end point this morning and reviewed the data. Not sure how TeslaMate would map a Model S to the car, as there is no designation of the model it seems in the response and the option code responses are useless as of 2019.

However, it does have a trim_badging response of 100d. So I am not sure if the trim badging maps to a configuration file in the application and because TeslaMate cannot identify the car as a the Model S, TeslaMate cannot then map to a trim_badging to log the efficiency. Obviously I have no clue and just pray Adrian responds :) also taking you all on my journey here.
 
  • Helpful
Reactions: M3-Florida
I guess let me update this so maybe the next poor sap does not go through a headache like I did.

Just read the FAQs. As simple as that. 🤷🏽‍♂️ Efficiency designation will be calculated (and updated) as more charing sessions are performed.

Still not clear to me why the Model designation keeps getting erased, but I think TeslaMade was designed around the API to send the Model letter (S, X, 3 or Y) and the API seems to be sending the model internal code name.
Code:
"car_type":"lychee"
 
Hello all, I am fairly new to the Tesla Forum - I have a new to me 2019 Tesla Model 3 LR AWD - I am enjoying the car a lot, I decided to install Teslamate on a Rasp Pi 3B+ that I had lying around. I used Tesla_auth.exe to get the api and refresh token. It seems that after about 9 days it stopped gathering data. I would like to keep consistent data and I suspect the Token / API was the trouble. Can anyone help me try to figure out if there is token issues or a way to get the 2 days of data I don't have now in Teslamate. Sorry I'm super new to this and I'm trying my best to figure things out!..

Thank you
 
Sorry if allready been asked & answered:

I'm running Teslamate on a 30GB virtual HD, but it now seems to be full after only about 2 years (50K driving) is this normal? Is there any way of clearing up some disk space or do I need to just add more?

Thanks!
 
Hi all,

new in the forum here and hope you can answer my question:
I`m running Teslamate on my Raspi4 using Docker.
I need to unplug my raspi and move it to a different location, so I`m not sure what`s happening with my containers.
My understanding, i need to run the docker-compose.yml again, but I don`t know with the persistent volumes which has been created during the initial setup?

Will I have my data back after running the docker-compose command again or do I need to perform a restore (have done a backup using the following command:
docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

Any help/input?

Thx
Tom
 
Hi all,

new in the forum here and hope you can answer my question:
I`m running Teslamate on my Raspi4 using Docker.
I need to unplug my raspi and move it to a different location, so I`m not sure what`s happening with my containers.
My understanding, i need to run the docker-compose.yml again, but I don`t know with the persistent volumes which has been created during the initial setup?

Will I have my data back after running the docker-compose command again or do I need to perform a restore (have done a backup using the following command:
docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

Any help/input?

Thx
Tom
Welcome to our happy place!

I have the same setup. Just run docker again. The containers should be stored on the micro SD card. Using the pi browser, you will also have to input the IP address :3000 and :4000) to see the reports.

Tip: Put a USB battery in line to keep it powered during moves or brief power outages/glitches!

@EndlessPlaid
 
I am trying to install in GCP free tier.. but having issues.. I dont have a domain name. Can i just use the external ip address with port number to configure?
That should work fine, but there are also free dynamic DNS services that would allow you to create a DNS entry to the IP.

I did see this article but didn’t read through it. Maybe it helps.
 
I am trying to set up Tesla mate on rpi4. I am headless and am able to ssh.
I have installed docker, docker compose and even portainer. I cannot figure out how to
a. create yml file on a Mac
B. Where or how to put this file to use?

I’ve searched for hours and can’t find a tutorial that I understand.
 
I am trying to set up Tesla mate on rpi4. I am headless and am able to ssh.
I have installed docker, docker compose and even portainer. I cannot figure out how to
a. create yml file on a Mac
B. Where or how to put this file to use?

I’ve searched for hours and can’t find a tutorial that I understand.
To create YML file, just create a file in Text Edit and save the file with extension yml. Then move the yml file to your Pi in any directory you would like. Probably easiest in /home/[youruser]/Documents/teslamate/YMLFILEHERE. You would need to create the "teslamate" directory, but also not required.

Then run docker-compose up -d and it will load up TeslaMate.
 
To create YML file, just create a file in Text Edit and save the file with extension yml. Then move the yml file to your Pi in any directory you would like. Probably easiest in /home/[youruser]/Documents/teslamate/YMLFILEHERE. You would need to create the "teslamate" directory, but also not required.

Then run docker-compose up -d and it will load up TeslaMate.
Thank you so much! I figured it out!
 
  • Love
  • Like
Reactions: cwanja and jebinc
I am trying to set up Tesla mate on rpi4. I am headless and am able to ssh.
I have installed docker, docker compose and even portainer. I cannot figure out how to
a. create yml file on a Mac
B. Where or how to put this file to use?

I’ve searched for hours and can’t find a tutorial that I understand.

If you are able to SSH into your rpi4, I would recommend using nano. You can also use vi, but unless you're a bare-metal Linux/Unix geek, I would recommend nano instead. This allows you to create your docker-compose file right on your rpi4 and no need to use scp or FTP to get the file from your Mac to your rpi4.

I created a folder named Amperelicious in the home folder (/home/pi/Amperelicious). In there I created the docker-compose.yml. I followed the instructions @ Advanced installation with Traefik, Let's Encrypt & HTTP Basic Auth | TeslaMate which uses Lets's Encrypt and Traefik, so you can block anonymous access, force the use of SSL, etc. and have a more secure setup.

From the screenshot below, you can see my paths and files -- I've got more stuff there but that's because I experimented a bit. Notice the .htpasswd and .env files. These are required if using the Teslamate Traefik setup. The SSL certificates generated via this setup are usually good for 2-3 months but they auto-renew so no maintenance on your part.

Just keep an eye on the site to see when there's a new update. If you're using Portainer I recommend installing Watchtower. That'll monitor your containers and send you an email when there are updates. Then you can just run the following commands to upgrade (after making a backup of your database, of course):

docker-compose pull
docker-compose up -d

1646358698047.png
 
  • Love
Reactions: cwanja
Forgive the newbie question, still learning about my new M3 and Teslamate…

The two drives below are from home to my daughter’s school and then back again. Exact same route to and from. How is efficiency calculated and why would it be so different?
 

Attachments

  • 105DBB96-D9ED-4C11-8EBA-8A7E27C2FD59.jpeg
    105DBB96-D9ED-4C11-8EBA-8A7E27C2FD59.jpeg
    164.4 KB · Views: 51
Forgive the newbie question, still learning about my new M3 and Teslamate…

The two drives below are from home to my daughter’s school and then back again. Exact same route to and from. How is efficiency calculated and why would it be so different?
You only used .2 kWh to get there. But .7 to get back. Notice the larger consumption. So the top (I assume return) drive was "less efficient".
 
why would it be so different?
Teslamate (and others) just report what the BMS is giving them. Since you only used 0.2 kwh and 0.7 on the two trips, that is a VERY VERY low number where even a tenth will make a large difference. I don't know what the precision of the data the BMS provides over the API, but you can bet it's not terribly precise. Couple that with that value is an "average" of the thousands of cell readings, and you can see where imprecision might occur.

Try a longer drive, like much longer. And look at consumption trends over time to get a real value of how your car is behaving.
 
Last edited: