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.
Could someone help me with importing TeslaFi to Teslamate please. My first few attempts were useless -- I have 28 months of data and attempting to import them all at once just overloaded the poor GCP micro VM. Now I've upgraded it to GCP standard machine and am trying a few months at a time, it is much faster.

However now after starting the import and watching whirling circles next to all the files for a time, I get the first one on the import list marked with a green tick, and the others get a dot with a curved forward-pointing arrow over them. I thought this might mean "in progress" but they are never finishing; and I thought it might mean "click here to process" but the field isn't clickable.
Also the refresh button on the import screen is not clickable so the only way I seem to be able to try again with fewer/different files is to restart TeslaMate.

None of the data, even the ticked ones, seems to be getting into TeslaMate. The first couple I tried did get in (I can see them on Drives) but nothing since then. I have tried restarting (docker-compose down; docker-compose up). After each import it does log "Import complete!".

Advice most welcome, thanks.
 

Attachments

  • Screenshot 2020-08-10 at 16.00.45.png
    Screenshot 2020-08-10 at 16.00.45.png
    58 KB · Views: 95
Last edited:
Made an improvement but still stuck. I had built the VM with Ubuntu out of habit/comfort. I nuked the VM and started again with Debian 9 and that got it to digest the first year's worth.
Now I am back to the curved arrow icons. Meanwhile the log is reporting "[info] Repairing drive #633 ..." and working down from there. After 10 mins there are still 470 to go.
 

Attachments

  • Screenshot 2020-08-10 at 17.40.24.png
    Screenshot 2020-08-10 at 17.40.24.png
    311.8 KB · Views: 67
Last edited:
  • Like
Reactions: DaveW
556A1A17-3939-4781-B3F9-6BB2B2B01CF0.png
How can I make corrections to the database for drives data?
I have a drive from the SuC Metz in France to the SuC Urmond in the Netherlands where in Belgium the MCU reset for some reason and now I see this drive split in two drives in Teslamate with no km’s and no end SoC-% showing for the first leg.

Anybody here knows how I can correct the Teslamate database to join the two legs of this drive so the kms and dependant metrics will show correct in Grafana?
 
Hey guys, I stumbled on this thread trawling the forum while waiting for my car to be delivered. I am so glad I did! What amazing work you guys have collectively done and the guides helped massively. I managed to get it installed on my pi (which is also running pihole). I added my static dns to my yml file. I was able to get pages to load and even customised my grafana. Imported both superchargers and UK network into my dB.
I have however hit a few stumbling blocks. 1) I'm unable to see any of these chargers on the map
2) nor am I able to log in to my tesla account.
3) I also failed to integrate the matts agile code, but was able to pull it into docker. I wasn't sure where on the yml to insert the variables and services. I had quite a few issues in copying it over and adding in the static dns ip.
I was hoping for some support
 

Attachments

  • Screenshot_20200812_215235.jpg
    Screenshot_20200812_215235.jpg
    73.9 KB · Views: 60
Hey guys, I stumbled on this thread trawling the forum while waiting for my car to be delivered. I am so glad I did! What amazing work you guys have collectively done and the guides helped massively. I managed to get it installed on my pi (which is also running pihole). I added my static dns to my yml file. I was able to get pages to load and even customised my grafana. Imported both superchargers and UK network into my dB.
I have however hit a few stumbling blocks. 1) I'm unable to see any of these chargers on the map
2) nor am I able to log in to my tesla account.
3) I also failed to integrate the matts agile code, but was able to pull it into docker. I wasn't sure where on the yml to insert the variables and services. I had quite a few issues in copying it over and adding in the static dns ip.
I was hoping for some support
Update:
I managed to sort out a few of my issues, but the big one seems to be logging into my Tesla account! I noticed a few people were able to get into theirs before getting their car but I can't seem to find anyone else who had this issue. Not sure how to get a log of the error either.
Anyone?
 
Glad you've sorted out the other issues @s88ats - I've never tried logging in when there's no car attached, so really not sure what is happening there, are there any logs on the Pi that maybe spell out what the error means, as Error: Unknown doesn't give a lot to go on :)
 
Glad you've sorted out the other issues @s88ats - I've never tried logging in when there's no car attached, so really not sure what is happening there, are there any logs on the Pi that maybe spell out what the error means, as Error: Unknown doesn't give a lot to go on :)
Hey Dave, yes almost lost my fringe trying to not break the pi, again! Once again thanks for your guide, I was able to overcome most of the issues.
No idea where I should look for the error log on the pi if there was one thrown out. Any command you need me to run?
 
  • Like
Reactions: DaveW
Hey Dave, yes almost lost my fringe trying to not break the pi, again! Once again thanks for your guide, I was able to overcome most of the issues.
No idea where I should look for the error log on the pi if there was one thrown out. Any command you need me to run?

From an SSH session to your Pi run:
Code:
docker ps

Make a note of the container ID of your teslamate container; then run:
Code:
docker logs xxxxx
Where xxxxx is the container ID noted above.
 
  • Like
  • Helpful
Reactions: s88ats and DaveW
From an SSH session to your Pi run:
Code:
docker ps

Make a note of the container ID of your teslamate container; then run:
Code:
docker logs xxxxx
Where xxxxx is the container ID noted above.
Thanks for this - i was able to get to the log. I wasn't sure how to export it, but it looks like i have bigger issue than i thought. I specified my static ip in the yml file i still seem to have a dns issue (damn Pihole and unbound).

The following error has plagued the log:
Last message: {#Reference<0.708500180.3539992579.41791>, {:error, %Mint.Transpor tError{reason: :nxdomain}}}
 
Thanks for this - i was able to get to the log. I wasn't sure how to export it, but it looks like i have bigger issue than i thought. I specified my static ip in the yml file i still seem to have a dns issue (damn Pihole and unbound).

The following error has plagued the log:
Last message: {#Reference<0.708500180.3539992579.41791>, {:error, %Mint.Transpor tError{reason: :nxdomain}}}
Weirdly I am still able to run hello world from docker, and docker apt-get which shows its connected to the outside world.
Plot thickens.
 
Weirdly I am still able to run hello world from docker, and docker apt-get which shows its connected to the outside world.
Plot thickens.
Looks like this has been seen before, and traced back to an outdated Docker install. Might be worth checking if there's any patches available? Otherwise you might have to check the Container network config.
TeslaMate.Api => Error: unknown => Mint.TransportError{reason: :nxdomain} · Issue #588 · adriankumpf/teslamate

Check your resolv file to make sure your DNS servers are correctly set, mine points to 127.0.0.11 which is the docker host:
Code:
docker exec -it <container ID> cat /etc/resolv.conf

Or if you prefer you can grab a shell within the container and ping/nslookup from inside:
Code:
docker exec -it <container ID> /bin/bash
 
Looks like this has been seen before, and traced back to an outdated Docker install. Might be worth checking if there's any patches available? Otherwise you might have to check the Container network config.
TeslaMate.Api => Error: unknown => Mint.TransportError{reason: :nxdomain} · Issue #588 · adriankumpf/teslamate

Check your resolv file to make sure your DNS servers are correctly set, mine points to 127.0.0.11 which is the docker host:
Code:
docker exec -it <container ID> cat /etc/resolv.conf

Or if you prefer you can grab a shell within the container and ping/nslookup from inside:
Code:
docker exec -it <container ID> /bin/bash

Thanks for this, mine points to the same as yours 127.0.0.11. I assumed this needed to point to my static ip for my pihole, but when i sudo nano docker <container ID> /etc/resolv.conf it does come up as my static ip.
I wasnt able to run the second command - threw the following error:
docker exec -it 75765cdd1f20 /bin/bash
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown

I'm on a jun 2020 docker build, is there a newer version?
 
Thanks for this, mine points to the same as yours 127.0.0.11. I assumed this needed to point to my static ip for my pihole, but when i sudo nano docker <container ID> /etc/resolv.conf it does come up as my static ip.
I wasnt able to run the second command - threw the following error:
docker exec -it 75765cdd1f20 /bin/bash
OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"/bin/bash\": stat /bin/bash: no such file or directory": unknown

I'm on a jun 2020 docker build, is there a newer version?

Try /bin/sh instead of /bin/bash on the second command... I don't actually run Teslamate on a Pi so your distro is probably different!

"sudo nano docker <container ID> /etc/resolv.conf" won't achieve what you want it to though, that command would create a text file called docker! What you actually need to do is to get a shell inside the container (as per the second command), and then you can use nano to amend resolv.conf.
 
Try /bin/sh instead of /bin/bash on the second command... I don't actually run Teslamate on a Pi so your distro is probably different!

"sudo nano docker <container ID> /etc/resolv.conf" won't achieve what you want it to though, that command would create a text file called docker! What you actually need to do is to get a shell inside the container (as per the second command), and then you can use nano to amend resolv.conf.
bin/sh worked and i was able to create the shell like you suggested. I tried to ping www.google.com (bad address) and nslookup (no servers could be reached), Am I missing a trick here?
 
bin/sh worked and i was able to create the shell like you suggested. I tried to ping www.google.com (bad address) and nslookup (no servers could be reached), Am I missing a trick here?

Probably best we take further troubleshooting off of this board to PM, but your output suggests that there's another issue going on.

If resolv.conf is correctly set on your Pi and you have DNS resolution there, then by default you should have it within a container if you're using 127.0.0.11 - as that's a virtual address that docker uses to redirect requests to those defined in the Pi/host's resolv.conf (using IPTables).

The last comment on the Teslamate issue below though seems similar to the behaviour you're seeing, which does make me wonder if there's a recent bug that you're hitting somewhere.

Probably worth confirming within the container that manually changing resolv.conf (or using the "server x.x.x.x" command inside nslookup to temporarily change servers) to confirm that DNS itself is functioning - and that this is specific to the Docker internal DNS server.
 
Almost certainly unrelated to the above, but if there's no vehicle in your account you'll likely get an 'Internal Server Error' from TeslaMate during the first setup. In my case it has registered the token in the DB so I'm hoping as soon as the car is active (collecting tomorrow!) then it should all 'just work' :)
 
Almost certainly unrelated to the above, but if there's no vehicle in your account you'll likely get an 'Internal Server Error' from TeslaMate during the first setup. In my case it has registered the token in the DB so I'm hoping as soon as the car is active (collecting tomorrow!) then it should all 'just work' :)
I was hoping mine would have been just that, but it kind of spiralled into something bigger. o_O
 
Almost certainly unrelated to the above, but if there's no vehicle in your account you'll likely get an 'Internal Server Error' from TeslaMate during the first setup. In my case it has registered the token in the DB so I'm hoping as soon as the car is active (collecting tomorrow!) then it should all 'just work' :)

BIG tip from me. Restart docker (or the device running it) when the car appears in the app.

It didn't 'just work' by itself for me when I had Teslamate up and running and waiting for the car. It just required a simple restart. But frustratingly (from an OCD perspective) it means I didn't capture the initial data from collection to bringing it back home.
 
New Tesla - Check
Pi with TeslaMate running - Check
Data pulling through - Check
Right foot too heavy, not sure...
Recent drives summary
upload_2020-8-21_16-10-9.png


The top three were just pottering around town, one is missing a calc and the other two seem poor.
Any max power above 180 is me "testing" acceleration :rolleyes:

Does this look normal compared to other people?

Thanks
 

Attachments

  • upload_2020-8-21_16-9-0.png
    upload_2020-8-21_16-9-0.png
    90.3 KB · Views: 68