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.
Maybe I have something configured wrong, but I don't see temp in TeslaMate, I see a map of my car's location and this info:

Tessie
Model S P85D

Status falling asleep for 14 h, 8 min
Range (rated) 336.98 km
Range (est.) 214.91 km
State of Charge 85% (87%)
Mileage 64405 km
Version 2020.48.12.1

Techinically my car is a P85D rather than a P85D as I got the Ludicrous upgrade. Is that not available in the API or does TeslaMate not reflect that.

Edit - so my car most have woken up, as I now see:
Tessie

Model S P85D


Status online for 14 h, 35 min
Range (rated) 338.62 km
Range (est.) 215.97 km
Scheduled Charging 5:30:00 AM
Charge Limit 90%
State of Charge 86%
Outside Temperature 1.5 °C
Inside Temperature 22.5 °C
Mileage 64405 km
Version 2020.48.12.1

On the second set of data there where the car has "woken up", that is something that has been initiated by you for preconditioning by the looks of it, as the inside temperature is 22.5C whilst outside is 1.5C, so heater is definitely on :)
 
It's just looking at my last drive when I click any date.
The URL appears as this: https://<My vanity URL>/d/FkUpJpQZk/trip?orgId=1&from=${__data.fields.date_from}&to=${__data.fields.date_to}
Thanks! I can see the issue now. I'd only been looking at the table as a whole, not clicking on the dates in the in the period column.

If this did work I'm not sure what it should show though? The values in max power/duration/speed/distance are the max recorded for any drive in that month, so each could refer to a different drive. I guess the period shouldn't be a hyperlink and the 4 columns should link to the drive record in which the maximum was recorded or at least the period link could show all drives for that month.

I'll see if I can work out what to change in the JSON.
 
I'm trying to Teslamate on Google, I keep getting this error.
"E: Malformed entry 7 in list file /etc/apt/sources.list (Component)E: The list of sources could not be read.E: Malformed entry 7 in list file /etc/apt/sources.list (Component)E: The list of sources could not be read."

I got it on a raspberryPi, needs rebooting every couple of weeks, unable to access.
 
Hi, I am new in this group and I discovered Teslmate which looks awsome. I am trying to install it on my unraid server but as I am not a linux pro I don't know how to do it (I have only installed apps from the community app in docker, like plex, netxcloud...). As it seems that some members did install Teslamate with success, I wonder to know if someone would be kind enough to help me ? Thanks a lot for your help.
 
Hi, I am new in this group and I discovered Teslmate which looks awsome. I am trying to install it on my unraid server but as I am not a linux pro I don't know how to do it (I have only installed apps from the community app in docker, like plex, netxcloud...). As it seems that some members did install Teslamate with success, I wonder to know if someone would be kind enough to help me ? Thanks a lot for your help.
go to page 60 (back 1 page) someone has talked about already.

Don't know whether you saw that?
 
I’ve had it twice now that’s Teslamate tells me that the health check failed and during that period the car appeared to sleep while we actually went for a drive.

Any idea what is causing this? Restarting the docker image works and it is online again after that. Btw I am running Teslamate on Google Cloud.
 
I’ve had it twice now that’s Teslamate tells me that the health check failed and during that period the car appeared to sleep while we actually went for a drive.

Any idea what is causing this? Restarting the docker image works and it is online again after that. Btw I am running Teslamate on Google Cloud.
So if you look here:
MQTT Integration | TeslaMate
the docs say under the MQTT section, it's the health of the logger.
not exactly sure whether that means the in car logger, or a logger on the Tesla api servers for this car, or maybe the teslamate logger.
 
Hi, I am new in this group and I discovered Teslmate which looks awsome. I am trying to install it on my unraid server but as I am not a linux pro I don't know how to do it (I have only installed apps from the community app in docker, like plex, netxcloud...). As it seems that some members did install Teslamate with success, I wonder to know if someone would be kind enough to help me ? Thanks a lot for your help.
I got it working and it wasn't too bad but I probably did a lot more manual things than what would be required if I knew what I was doing. I mainly used the instructions in this thread on reddit: https://www.reddit.com/r/unRAID/comments/hdnb6j/teslamate_docker/. Note that these instructions were not 100% correct and I had to play around with a few things. For example, that thread seems to have the wrong info in some instances, like in the Teslamate docker it says to use a database user name of postres but you have to change that to teslamate.

Here is the document that I started working on. I am not sure it is complete but it should be able to help you a lot:
TeslaMate Docker on unRAID
Instructions here https://www.reddit.com/r/unRAID/comments/hdnb6j/teslamate_docker/

1. Install Grafana docker from apps – set IP address or your unRAID server in key 1 before creating and use secret as key 2

2. Install postgres11 from apps with Postgres_password=secret, postgres_user=teslamate and postgres_db as teslmate

3. Install teslamate. Add in Variables and keys – except use teslamate as user. To add in a Variable, ext click on +Add another Path, Port, Variable or Device. For example, click on this button, select Variable and then use name=DATABASE_NAME, key=DATABASE_NAME, value=teslamate and Description="Container Variable:". I can't remember exactly but I think you have to do this for DATABASE_USER, DATABASE_NAME, DATABASE_HOST and DATABASE_PASS. Add whatever other stuff is missing and use this snapshot as your guideline:

5hjw3Vu.png


Manually install dashboards by copying json files into Grafana. Click Manage, then Import. Go to Github/dashboards and click on a .json file. Click on Raw, copy all and paste back in Grafana. Click load, then import. Repeat for all dashboards (note - there is likely an automated way of doing this)

SSH into your unraid server and start a bash prompt in the Grafana docker and Manually install Grafana plugins using :

docker exec -it Grafana /bin/bash
grafana-cli plugins install pr0ps-trackmap-panel 2.1.0
grafana-cli plugins install natel-discrete-panel 0.1.0
grafana-cli plugins install grafana-piechart-panel 1.6.1
grafana-cli --pluginUrl https://github.com/panodata/grafana-map-panel/releases/download/0.14.0/grafana-map-panel-0.14.0.zip plugins install grafana-worldmap-panel-ng

Sorry if those instructions are not clear - it was a bit of trial and error for me, but it didn't take too long to get up and running.

It is worth it as Teslamate is awesome, even though I rarely drive these days due to Covid lockdown so I don't have much data in the system. Let us know if it works, and maybe update my instructions so that it is easier for the next person, and/or you and I if we have to reinstall in the future.

edit - I now do have Teslamate working. You need to set MQTT_HOST in the Teslamate docker to the IP address of your MQTT broker. I am not sure how to set the MQTT port but that isn't an issue for me, at least not so far.
 
Last edited:
I need help with configuring mosquito with Teslamate. I manually installed Teslamate, including postgres and grafana in dockers on my unRAID server last week. The dashboards are working fine.I have had a MQTT docker running for years (although I don't really use it, but it could be useful for some things, like interfacing with my HA system).

In my container logs it says "2021-02-20 11:24:17.821 [warn] MQTT publishing failed: :timeout"

In my Teslamate docker settings I have MQTT_HOST set to MQTT. My MQTT docker is called "MQTT". My MQTT docker uses port 1883 and port 9001. What else do I need to configure to allow Teslamate to publish to MQTT?
 
I need help with configuring mosquito with Teslamate. I manually installed Teslamate, including postgres and grafana in dockers on my unRAID server last week. The dashboards are working fine.I have had a MQTT docker running for years (although I don't really use it, but it could be useful for some things, like interfacing with my HA system).

In my container logs it says "2021-02-20 11:24:17.821 [warn] MQTT publishing failed: :timeout"

In my Teslamate docker settings I have MQTT_HOST set to MQTT. My MQTT docker is called "MQTT". My MQTT docker uses port 1883 and port 9001. What else do I need to configure to allow Teslamate to publish to MQTT?
My MQTT server is on a different machine, I just set the IP and the port in the docker file and it worked.
 
My MQTT server is on a different machine, I just set the IP and the port in the docker file and it worked.
My setting is currently wrong as I imagine that MQTT_HOST should be the IP address of my MQTT server and not "MQTT".

I changed the MQTT_HOST to the correct IP and it appears that this is working. In the MQTT docker logs I see it has received info from Teslamate. But I still wonder how it knows what port to use, unless the MQTT port is hard coded to a constant port.

edit - Removed stuff about MQTT port. In the docs for Teslamate I found that there is an env variable for MQTT_PORT but that this is optional. I don't need it as my MQTT broker is using the default entry of 1883 and I guess that is what Teslamate uses unless you specify something else.
 
Last edited:
Here is the document that I started working on. I am not sure it is complete but it should be able to help you a lot:
TeslaMate Docker on unRAID
Instructions here https://www.reddit.com/r/unRAID/comments/hdnb6j/teslamate_docker/

1. Install Grafana docker from apps – set IP address or your unRAID server in key 1 before creating and use secret as key 2

2. Install postgres11 from apps with Postgres_password=secret, postgres_user=teslamate and postgres_db as teslmate

3. Install teslamate. Add in Variables and keys – except use teslamate as user. To add in a Variable, ext click on +Add another Path, Port, Variable or Device. For example, click on this button, select Variable and then use name=DATABASE_NAME, key=DATABASE_NAME, value=teslamate and Description="Container Variable:". I can't remember exactly but I think you have to do this for DATABASE_USER, DATABASE_NAME, DATABASE_HOST and DATABASE_PASS. Add whatever other stuff is missing and use this snapshot as your guideline:
[/QUOTE]

Hi and thanks for your help. I have installed Grafana, Postgress1 and Teslamate but when I start Teslamate I Have errors in the log of Postgress...

PostgreSQL Database directory appears to contain a database; Skipping initialization
2021-02-21 16:01:15.708 CET [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2021-02-21 16:01:15.708 CET [1] LOG: listening on IPv6 address "::", port 5432
2021-02-21 16:01:15.713 CET [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-02-21 16:01:15.723 CET [24] LOG: database system was shut down at 2021-02-21 16:01:14 CET
2021-02-21 16:01:15.728 CET [1] LOG: database system is ready to accept connections
2021-02-21 16:01:37.096 CET [31] LOG: incomplete startup packet
2021-02-21 16:01:37.503 CET [32] FATAL: password authentication failed for user "teslamate"
2021-02-21 16:01:37.503 CET [32] DETAIL: Role "teslamate" does not exist.
Connection matched pg_hba.conf line 95: "host all all all md5"
2021-02-21 16:01:37.503 CET [33] FATAL: password authentication failed for user "teslamate"
2021-02-21 16:01:37.503 CET [33] DETAIL: Role "teslamate" does not exist.
Connection matched pg_hba.conf line 95: "host all all all md5"
2021-02-21 16:01:39.408 CET [34] FATAL: password authentication failed for user "teslamate"
2021-02-21 16:01:39.408 CET [34] DETAIL: Role "teslamate" does not exist.
Connection matched pg_hba.conf line 95: "host all all all md5"
2021-02-21 16:01:40.359 CET [35] FATAL: password authentication failed for user "teslamate"
2021-02-21 16:01:40.359 CET [35] DETAIL: Role "teslamate" does not exist.
Connection matched pg_hba.conf line 95: "host all all all md5"

and in the Teslamate logs...


2021-02-21 15:59:24.228 [error] Postgrex.Protocol (#PID<0.167.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "teslamate"
2021-02-21 15:59:24.228 [error] Postgrex.Protocol (#PID<0.166.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "teslamate"
2021-02-21 15:59:25.803 [error] Postgrex.Protocol (#PID<0.167.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "teslamate"
2021-02-21 15:59:26.520 [error] Postgrex.Protocol (#PID<0.166.0>) failed to connect: ** (Postgrex.Error) FATAL 28P01 (invalid_password) password authentication failed for user "teslamate"
2021-02-21 15:59:27.249 [error] Could not create schema migrations table. This error usually happens due to the following:

* The database does not exist
* The "schema_migrations" table, which Ecto uses for managing
migrations, was defined by another library
* There is a deadlock while migrating (such as using concurrent
indexes with a migration_lock)

To fix the first issue, run "mix ecto.create".

To address the second, you can run "mix ecto.drop" followed by
"mix ecto.create". Alternatively you may configure Ecto to use
another table and/or repository for managing migrations:


config :teslamate, TeslaMate.Repo,
migration_source: "some_other_table_for_schema_migrations",
migration_repo: AnotherRepoForSchemaMigrations

The full error report is shown below.

** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2983ms. This means requests are coming in and your connection pool cannot serve them fast enough. You can address this by:

1. Tracking down slow queries and making sure they are running fast enough
2. Increasing the pool_size (albeit it increases resource consumption)
3. Allowing requests to wait longer by increasing :queue_target and :queue_interval

See DBConnection.start_link/2 for more information

(ecto_sql 3.5.4) lib/ecto/adapters/sql.ex:751: Ecto.Adapters.SQL.raise_sql_call_error/1
(elixir 1.11.3) lib/enum.ex:1411: Enum."-map/2-lists^map/1-0-"/2
(ecto_sql 3.5.4) lib/ecto/adapters/sql.ex:838: Ecto.Adapters.SQL.execute_ddl/4
(ecto_sql 3.5.4) lib/ecto/migrator.ex:669: Ecto.Migrator.verbose_schema_migration/3
(ecto_sql 3.5.4) lib/ecto/migrator.ex:498: Ecto.Migrator.lock_for_migrations/4
(ecto_sql 3.5.4) lib/ecto/migrator.ex:413: Ecto.Migrator.run/4
(ecto_sql 3.5.4) lib/ecto/migrator.ex:145: Ecto.Migrator.with_repo/3
(teslamate 1.21.5) lib/teslamate/release.ex:9: anonymous fn/2 in TeslaMate.Release.migrate/0

I am sure to have same password and user in both apps. It seems that there is no database...
Did you get the same error ? I don't understand what is the fix proposed (in red)?
Thanks again for your help.