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.
I have been running Teslamate for several months now, but I am having a couple of issues. I run the Teslamate docker on a server running unRAID as the OS.

Problem one - every once in a while the docker stops. I am not sure why and all of my other dockers continue to run fine. I don't always use Teslamate on a regular basis, but when I go to use it there will be a few weeks with no data as the docker was not running. Would anyone know why this would happen?

Problem Two - The Drive data on Teslamate is often rather inaccurate. For example, today Teslamate shows my drive starting at an address that is about 6km away from my home - this would have been about 10 minutes after I left my home. Many other drives show me as starting the drive a few hundred metres away from my home. Way is it not very accurate.
 
Problem Two - The Drive data on Teslamate is often rather inaccurate. For example, today Teslamate shows my drive starting at an address that is about 6km away from my home - this would have been about 10 minutes after I left my home. Many other drives show me as starting the drive a few hundred metres away from my home. Way is it not very accurate.
From what I can tell, if the car loses connectivity to Tesla or TeslaMate loses connectivity to Tesla, TeslaMate also loses any information about what the car was doing during that period of time.

Often it seems that the car takes a bit of time to switch to cellular data from wifi when leaving from home - this will lead to gaps at the beginning of drives.

I don't know if the car buffers that data and still sends it to Tesla regardless - but any buffered data if sent, does not make it to TeslaMate as I don't think there's an API to pull historical data from Tesla.
 
Has anyone added fail2ban when using docker, traefik etc.? I didn't find any guide or help if that is even needed to add.

@DaveW What kind of change you made that backup is not failing? You mentioned this on here thread and also on guide but I think that was related clientid and secret.
Manual run fine but automated not.
Because forum don't allow editing.
Fail2ban is nice but not needed. Grafana has default feature login protection. HTTP auth is separated thing but work normally fine.

And also got backup running, needed to check that is run under correct user crontab.
 
I may have made a snafu. I had TeslaMate working great with my Model 3, which I sold in June. To clear the database, I deleted it from the Postgres docker. When I got my Model Y, I was able to start TeslaMate working again and it seems to be working okay for most of the dashboards - except any of the map ones. The map loads okay, but shows no data (no red line showing where it was). This happens on the "visited" and "drive stats" dashboards. Any ideas?

The data seems to be capturing, as it shows the location data on non map panels fine.
 
I look little bit more this fail2ban idea. Seems that was very easy to add.

First enabled traefik log access data to host. Then used other container to handle banning.

 
I may have made a snafu. I had TeslaMate working great with my Model 3, which I sold in June. To clear the database, I deleted it from the Postgres docker. When I got my Model Y, I was able to start TeslaMate working again and it seems to be working okay for most of the dashboards - except any of the map ones. The map loads okay, but shows no data (no red line showing where it was). This happens on the "visited" and "drive stats" dashboards. Any ideas?

The data seems to be capturing, as it shows the location data on non map panels fine.
My drive stats doesn't have a map. Are you seeing the list of locations?

On Visited I have this query:

SELECT
to_timestamp(floor((extract('epoch' FROM date) / 60)) * 60) AT TIME ZONE 'UTC' AS time,
avg(latitude) AS lat,
avg(longitude) AS lng
FROM
positions
WHERE
car_id = $car_id AND
$__timeFilter(date)
GROUP BY
1
ORDER BY
1 ASC


Is yours the same?

Also are the variables still there? Maybe your car_id is still pointing to the old one. The variable should be like this:
SELECT name AS __text, id AS __value FROM cars;
 
My drive stats doesn't have a map. Are you seeing the list of locations?

On Visited I have this query:

SELECT
to_timestamp(floor((extract('epoch' FROM date) / 60)) * 60) AT TIME ZONE 'UTC' AS time,
avg(latitude) AS lat,
avg(longitude) AS lng
FROM
positions
WHERE
car_id = $car_id AND
$__timeFilter(date)
GROUP BY
1
ORDER BY
1 ASC


Is yours the same?

Also are the variables still there? Maybe your car_id is still pointing to the old one. The variable should be like this:
SELECT name AS __text, id AS __value FROM cars;
This is the exact one I imported. My new car’s name shows up fine, but the map is blank.

 
Just realised the time. Some things to try while I get some beauty sleep:

Update to the latest version of Teslamate. IIRC this should replace any dashboards that have been corrupted.
If your query is the same as mine, try removing the where clause to see if the car_id (not the name) is somehow incorrect.