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

TeslaMate: Yet another self-hosted data logger for your Tesla

This site may earn commission on affiliate links.
When I click on this link I get a refused to connect error....fails to connect....can't figure out what I am missing here
Check if the ip address is correct. Are you using my pi image? I just had that issue with the one running on my pi image

Just change the ip to the correct one and it will let you go.
Mind you this doesn't change the cost for all charges just that particular one. That's why you have to make another template with cost built in
 
Yes....using your pi image...Thanks for this! i thought that ip address looked strange should have figured that one out myself.
How do I make another template with cost built in? Can I correct the ip address the link goes to??
Thanks much for your help!!
 
Was looking for a way to autoupdate the docker image. Found this great program that will auto update docker images

To install just login and run

sudo docker run -d --name ouroboros \
-v /var/run/docker.sock:/var/run/docker.sock \
pyouroboros/ouroboros

Wait a few minutes and everything gets updated.

This was a hidden gem of a post. Just wanted to say thank you, this works and is awesome to keep this logger up to date!
 
  • Like
Reactions: jroydog
I'm trying to update Postgress version from version 11 to 12 and am following the documentation here. I backed up my database and then shutdown the container, but when I issue the command to delete the database, I receive the following error message:

@ubuntu:~$ docker volume rm teslamate_teslamate-db
Error: No such volume: teslamate_teslamate-db

Also, looking ahead to restoring the database, the Postgress instructions tell you to startup Teslamate again, but then the first step of the Restore Process is to shut it down. Are both of those steps required so that an empty database gets created first with the newer Postgress version, before restoring data back into it?

Thanks in advance for your help.
Stach
 
Hi, I want to setup this and kind of confused how would I go when I already have docker setup with traefik 2.1 and grafana for HASS
I do already have Postgres for another service (tiny rss), now how would add yours. Where is the .env file location ?

thanks.
 
Hi, I want to setup this and kind of confused how would I go when I already have docker setup with traefik 2.1 and grafana for HASS
I do already have Postgres for another service (tiny rss), now how would add yours. Where is the .env file location ?

thanks.

Well, I haven't heard any info until now, I copied the teslamate and Postgres service from the docker compose.yaml and added to my dockercompose.yaml and ran it, I was able to login with my Tesla credentials and few min later the teslamate side showed up my car's location and details, great. Does this mean that its collecting data and storing into the teslamate database? even though I still haven't figured out how to get the grafana dashboard into my existing grafana instance running other dashboards.

I also tried to explore the teslmate database on pgadmin, it shows no tables though, I remember seeing log of teslamate creating a lot of tables when it ran first time and wondering where they are.

Any help to setup the grafana datasource and import the dashboards would be great. Thanks.
 
Drives typically don't get recorded (or the beginning isn't recorded showing a straight line jump from where you parked to where it started gathering data) when Teslamate stops polling the car to let it go to sleep. This is controlled in your settings and can be anything from a few minutes to 30 minutes of not-polling. If the car is driven during this "not polling" period, Teslamate doesn't know about it and gathers no data.

There is a command you can send that will cancel the "not polling" mode and have it start polling again. Many people set up a phone shortcut to activate when the phone connects to the car so that it will be polling when you drive. There are details for that on the Github page.
 
  • Like
Reactions: Zorba
For those of you running Teslamate on a raspberry pi using Tony's image file and haven't figured out a way to backup your data, the following works for me.

I had to "sudo docker-compose up" first then was able to create the teslamate.bck file with the "sudo docker-compose exec db pg_dump -U teslamate teslamate > teslamate.bck" command. It was important to do the "up" command first otherwise a database error was generated.
If you backup the teslamate.bck file created on your pi to windows using WinSCP you have a simple archive to at least reconstruct a pi with some historical data.

I now have a good level of confidence at least all the data accruing in Teslamate can now be backed up.
 
I have 2 more issues, on version 1.18.2:
- when Sentry Mode is activated, it happens regularly that 1 drive is logged 2 times. One of those will finish when leaving the car, but the other one will always keep running until the car goes to sleep/offline (ie Sentry disabled)

- when trying to manually terminate the second drive mentioned above, I use the command written in the 'Manually fixing data' section of docs.teslamate.org (Manually fixing data | TeslaMate).
However, when executing the command in Terminal (of course changing 9999 with the correct driveID):
Code:
docker-compose exec teslamate bin/teslamate rpc \
"TeslaMate.Repo.get!(TeslaMate.Log.Drive, 9999) |> TeslaMate.Log.close_drive()"

I get an error '-ash !' or something like that.

Is there an error in the command mentioned on the website?
 
Update:
I was now able to terminate a drive, apparently the correct command should be:
Code:
docker-compose exec teslamate bin/teslamate rpc \
"TeslaMate.Repo.get(TeslaMate.Log.Drive, 9999) |> TeslaMate.Log.close_drive()"

So without the exclamation mark.
 
Great tool. Love it. Kudos here.
I have installed it using Docker on my QNAP Nas
I put all the teslafi in the import folder before the first ever start

A couple issues:
1. MQTT wasnt starting at first. add to find a mosquito.config on the web and put it in the config folder
2. when i go to the url it always goes to the import page. Even after import. Had to dig into the code to find the sign in url
3. I do not have a main page showing the location and stats. Even after clearing cache, restarting and all, it always lands on the import page.
4. I've gone on a couple ride but i dont see any data being added to the database
5. Where can we add the cost of kwh for home

Other than that, once all these little issues are fixed i will cancel my teslafi account.

Great work.
 
Great tool. Love it. Kudos here.
I have installed it using Docker on my QNAP Nas
I put all the teslafi in the import folder before the first ever start

A couple issues:
1. MQTT wasnt starting at first. add to find a mosquito.config on the web and put it in the config folder
2. when i go to the url it always goes to the import page. Even after import. Had to dig into the code to find the sign in url
3. I do not have a main page showing the location and stats. Even after clearing cache, restarting and all, it always lands on the import page.
4. I've gone on a couple ride but i dont see any data being added to the database
5. Where can we add the cost of kwh for home

Other than that, once all these little issues are fixed i will cancel my teslafi account.

Great work.

Check the import instructions again I believe you have to delete the import folder/data after you did the import to not get the import page as the home page.
 
  • Like
Reactions: drklain