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.
Hi guys, I'm trying to set up teslamate on a google cloud instance but it's not working.

I just followed the complete guide in this thread and the installation itself is fine.

When I go to the url that I have put in the .env file I get a prompt for a username and login but this popup keeps coming back and whatever I put in as username and password is not working.

Also recreated the .htpasswd file many time, redid the complete installation from scratch a couple times now but still no joy.

However grafana is working fine and I'm able to login with the credentials specified in the .env file.

Also, when I login to grafana, I see the log being appended and I do see my own ip-adress from where I'm connecting.

However, when connecting to the teslamate url I don't see anything being logged so it's like no information is passing from the webpage to the backend (or something)

Does anybody has any idea what could be the cause. I'm out of ideas ...
 
Hi @mac500

So the grafana. URL works OK (other than no data)?
It really does sound like the .htpasswd prompt from what you’ve said, although you’ve also explained you’ve done that several times over.

In the .env file, did it ask you to specify both urls (grafana and tm)?

Feel free to paste that in here with the domain details blanked out
 
Hi,

I am using Teslamate and Grafana after some struggles during the installation. But now finally running. Thanks for the great guides and many answers in the thread.

Two things missing that I cannot solve with searches in this thread or elsewere.

How do I use Grafana in the car (3LR) browser?
When trying to login I get a blank screen and "401 Unauthorized error"

Is there any way to key in a default cost per kwh to be used when calculating trip costs?

Thanks,
Smeicy
 
Hi @mac500

So the grafana. URL works OK (other than no data)?
It really does sound like the .htpasswd prompt from what you’ve said, although you’ve also explained you’ve done that several times over.

In the .env file, did it ask you to specify both urls (grafana and tm)?

Feel free to paste that in here with the domain details blanked out

Hi,

Thanks for the feedback. I've got it working. Seems I made a error hashing the password that I put in the .htpasswd file

It's all working now :)
 
  • Like
Reactions: DaveW
hello,

can anyone help me in configuring Teslamate on my docker server.
I have installed tesla mate on docker server by following instructions as per the below page
https://docs.teslamate.org/docs

i was able to install and connect to my car. i did a drive and i can see the drive details

can anyone please help me the below

1. i have downloaded data from teslafi for about 2 months. I have imported the data by following the guide on Import from TeslaFi (BETA) | TeslaMate
i see that data has been imported but nothing is being shown up on the dashboards
2. how can i organize the data in dashboards ? ( when i click on each url like charge level, charges etc i can see the data. i want to organize few fields in the main dashboard so that i can see the data)
3. i want to cancel teslafi account and rely on telsamate ( is teslamate worth ) ?
4. i want to install a vps machine on my home pc and install teslamate ( docker) or can i do this installation on a raspberry pie ?
5. i already have homeassitant installed on my home pc and configured all my home automation stuff. can i use teslamate on home assistant too ?
 
Hi guys,

I've got TeslaMate running in a docker, and I'm having issues trying to back it up. Any thoughts?

sudo docker-compose stop
sudo docker-compose exec -T database pg_dump -U teslamate teslamate > teslamate_backup_29Dec20.bck

ERROR: No container found for database_1


(or would it just be easier to backup my .yml file and the contents of /var/lib/docker/volumes/ ?)
 
Last edited:
How do I use Grafana in the car (3LR) browser?
When trying to login I get a blank screen and "401 Unauthorized error"

Not sure what you're running TeslaMate on but if using a raspberry pi, it won't be exposed to the web by default so you won't be able to access from your cars browser.

There's a guide here for exposing your pi to the internet: Advanced installation with Traefik, Let's Encrypt & HTTP Basic Auth | TeslaMate
I chose to host on a web server using vultr, there's a guide here: Try Self-Hosted TeslaMate for a Penny in a Vultr Cloud Instance | graydonschwartz.com
Or use @DaveW 's guide for setting up on Google Cloud Platform here: How to setup and run TeslaMate for free on Google Cloud - TeslaEV.co.uk

Is there any way to key in a default cost per kwh to be used when calculating trip costs?

Use the geofence option within the Teslamate settings to add a rate per kW, then when the car charges at that location, it'll automatically record the kW used and the cost for that charge.
 
1. i have downloaded data from teslafi for about 2 months. I have imported the data by following the guide on Import from TeslaFi (BETA) | TeslaMate

If the data has been imported successfully it should be showing. Ensure the range of the graph that you're looking at is set sufficiently in the past in order to see the imported data, if it is, then please provide some further info, e.g. which dashboard are you looking at and what are you expecting to see.

2. how can i organize the data in dashboards ? ( when i click on each url like charge level, charges etc i can see the data. i want to organize few fields in the main dashboard so that i can see the data)

Login to grafana as admin, duplicate any dashboards you wish to make changes to then edit as required. You can't edit the default Teslamate dashboards so you'll need to have your own set in addition to the Teslamate ones if you wish to modify them.

3. i want to cancel teslafi account and rely on telsamate ( is teslamate worth ) ?

I've previously run both and have recently cancelled TeslaFi. The only missing functionality IMO is the commands TeslaFi can send to the car (open remotely, schedule charging etc). I have other apps that manage the charging schedule for me and the other controls that I require can be done in the Tesla app.

5. i already have homeassitant installed on my home pc and configured all my home automation stuff. can i use teslamate on home assistant too ?

Don't know the answer but am currently looking into this. Would be great if you could share what you find. I'm looking at hass.io, and trying to install on the same docker container as Teslamate.
 
Hi guys,

I've got TeslaMate running in a docker, and I'm having issues trying to back it up. Any thoughts?

sudo docker-compose stop
sudo docker-compose exec -T database pg_dump -U teslamate teslamate > teslamate_backup_29Dec20.bck

ERROR: No container found for database_1


(or would it just be easier to backup my .yml file and the contents of /var/lib/docker/volumes/ ?)
Try replacing 'database' with 'db'. Alternatively, check what the name of the database is set to in your 'docker-compose.yml'.
 
Try replacing 'database' with 'db'. Alternatively, check what the name of the database is set to in your 'docker-compose.yml'.

I tried db and got "ERROR: No such service: db", so database must be correct. I believe teslamate is the name of the db too...

(from docker-compose.yml):

services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=xxxxxxxxx
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto
 
I tried db and got "ERROR: No such service: db", so database must be correct. I believe teslamate is the name of the db too...

(from docker-compose.yml):

services:
teslamate:
image: teslamate/teslamate:latest
restart: always
environment:
- DATABASE_USER=teslamate
- DATABASE_PASS=xxxxxxxxx
- DATABASE_NAME=teslamate
- DATABASE_HOST=database
- MQTT_HOST=mosquitto

This may help?

Code:
root@medved77:~# docker exec -it root_database_1 psql -U teslamate
psql (12.5 (Debian 12.5-1.pgdg100+1))
Type "help" for help.

teslamate=# sudo docker-compose exec -T database pg_dump -U teslamate teslamate > teslamate_backup_29Dec20.bck
teslamate-# \q
root@medved77:~# ls
acme  docker-compose.yml  docker-compose.yml.save  docker-compose.yml.save.1  import  installer.sh  teslamate_backup_29Dec20.bck  teslamate.bck
root@medved77:~#

Stop the Teslamate service only, not the DB. Then I accessed the db first, before running the backup script.
 
This may help?

Code:
root@medved77:~# docker exec -it root_database_1 psql -U teslamate
psql (12.5 (Debian 12.5-1.pgdg100+1))
Type "help" for help.

teslamate=# sudo docker-compose exec -T database pg_dump -U teslamate teslamate > teslamate_backup_29Dec20.bck
teslamate-# \q
root@medved77:~# ls
acme  docker-compose.yml  docker-compose.yml.save  docker-compose.yml.save.1  import  installer.sh  teslamate_backup_29Dec20.bck  teslamate.bck
root@medved77:~#

Stop the Teslamate service only, not the DB. Then I accessed the db first, before running the backup script.

Thanks, a variation of that worked :)
I stopped the teslamate service only, but when I then connected to the database and ran the backup script, the output file was 0 bytes. I tried again after exiting the database and it worked without error and is around 2.9Mb in size. Key was to stop the teslamate service only (makes sense when you think about it!!!)

Thanks for the help!
 
  • Like
Reactions: Medved_77
Not sure what you're running TeslaMate on but if using a raspberry pi, it won't be exposed to the web by default so you won't be able to access from your cars browser.

graydonschwartz.com
Or use @DaveW 's guide for setting up on Google Cloud Platform here: How to setup and run TeslaMate for free on Google Cloud - TeslaEV.co.uk

Sorry - I should have been more specific. I am using DaveW's guide and running Teslamate on Google Cloud. It's possible to access Teslamate in the car but nothing happens when I try to go to Grafana. Also not when entering the URL directly into to browser.

But I would love to access Grafana in the car's browser if anyway possible.

Thanks.
 
Hi guys,

I've got TeslaMate running in a docker, and I'm having issues trying to back it up. Any thoughts?

sudo docker-compose stop
sudo docker-compose exec -T database pg_dump -U teslamate teslamate > teslamate_backup_29Dec20.bck

ERROR: No container found for database_1


(or would it just be easier to backup my .yml file and the contents of /var/lib/docker/volumes/ ?)

You could try:

docker exec teslamate_database_1 pg_dump -U teslamate teslamate > backup_filename.bck

This should also work from a script too - I kept getting an error that docker-compose wouldn't work from a script file via cron but the above command works flawlessly.
 
  • Like
Reactions: WhosAsking
i have tried importing all 36 csv files downloaded form teslafi site. i cannot see any data except for 1 month. when i imported the data, it shows as imported
i had to restart container and import 1 file at a time

is there a way to look into the database using GUI whether the data has been imported or not
 
Hi all,
A new M3LR owner, and an aspiring Teslamate user here :)

To cut a long story short, I have installed the Teslamate and managed to "successfully" connect it to the car etc.
Usability wise, it seems that I have access to both, teslamate and grafana hosted on a web server ( not raspberry pi etc. )

However, most of the data seems to be missing - and the one that is in the account seems inaccurate.

For example, today I have driven 72miles divided into 2 separate drives approx. 2hrs apart, but the below screenshot indicates the following:

  • 62 miles ( not the 72 that I've driven )
  • Updating 8.23 - 10.03 ( I am not aware of any updates taking place )
  • Asleep 10.03 - 17.50 ( I left home around 14.00 and returned probably around the 17.50 time )

Have I done something wrong, or is there simply not enough data there yet to compose the graphs accurately? :)

teslamate.png