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.
Yes it comes from there.
I have no data in the columns relative to "consumption" in any dashboard, or "kWh" column in "Drives", etc.
"Net" and "Gross" boxes in "Overview" are blank.
Maybe i need more charges and drives for it to settle still. But as there was this "db json" error, i was worried that it comes from the install.
 
I've noticed that Teslalogger are publishing aggregated stats a bit like Teslafi. The relevance is I believe Teslamate originated from the same kernel as Teslalogger, and runs in the same way - a self hosted docker environment - so for me I'm now concerned that these docker environments are sending data back to a central database.

The link to see one is - teslalogger 'dot' de 'slash' firmware.php (I'm loathed to put a working link in as I have a real problem wth the idea of undermining the benefits)

I've no idea if Teslamate is doing the same, it's certainly always been assumed they didn't and I've not seen similar centralised dashboards with Tedslamate although I guess they could be feeding teslalogger, but what teslalogger are doing seems to be somewhat contrary to one of the prinary benefits of these slef hosted solutions.
 
Seems like Teslamate was inspired by Teslalogger, but iAdrian built his own, so not using the same software/architecture.
Teslalogger's aggregation was known about in 2021, and I've seen no mention of this in Teslamate.

Wee discussion here:

 
I've noticed that Teslalogger are publishing aggregated stats a bit like Teslafi. The relevance is I believe Teslamate originated from the same kernel as Teslalogger, and runs in the same way - a self hosted docker environment - so for me I'm now concerned that these docker environments are sending data back to a central database.

The link to see one is - teslalogger 'dot' de 'slash' firmware.php (I'm loathed to put a working link in as I have a real problem wth the idea of undermining the benefits)

I've no idea if Teslamate is doing the same, it's certainly always been assumed they didn't and I've not seen similar centralised dashboards with Tedslamate although I guess they could be feeding teslalogger, but what teslalogger are doing seems to be somewhat contrary to one of the prinary benefits of these slef hosted solutions.
They seem pretty clear in the Readme it has a way to do fleet comparison:

Fleet Statistics​

Fleet Statistics can be used by anyone without Teslalogger. To compare your degradation and charging curves with the fleet, you need a Teslalogger.
 
They seem pretty clear in the Readme it has a way to do fleet comparison:

It wasn't accessing the fleet comparison, it was contributing to it. My point was more the perception that if you're self hosting a data logger on your own docker environment you may have been expecting it to be ring fenced in the way teslamate seems to be. The fact your data then leaves your docker environment and sent centrally is what seems to be missing and potentially in controvension of the EU data protection laws if it tracks in any way the location of the car.
 
Hopefully your initial query about the origins of Teslamate have put your mind at rest.
There is another thread that deals with Teslalogger and he does mention early on that sharing is optional. I'm not going to install Teslalogger to see what the default setting is, but my rating is that you have to opt-in rather than it being the default:

 
  • Like
Reactions: cwanja
Hopefully your initial query about the origins of Teslamate have put your mind at rest.
There is another thread that deals with Teslalogger and he does mention early on that sharing is optional. I'm not going to install Teslalogger to see what the default setting is, but my rating is that you have to opt-in rather than it being the default:

Yes thanks - I'll keep my Teslamate running. It just surprised me, and in doing a bit of digging I've also found websites that will run Teslalogger for you for a fee thats very similar to Teslafi which seems a little odd (unless it is Teslalogger) as they do no development and just run the code and pocket the cash. I guess anyone could do that with Teslamate too, but its easy to be fooled. I had "Personal Docker = Safe as you can probably get" on one side and "Teslamate descended from Tesla Logger which Aggregates = Potentially not safe" on the other and it was uncomfortable

I'm cautious about these things, as we all should be, Thanks.
 
  • Like
Reactions: jsight and init6
Sorry if that has been covered, I tried a quick search and trawling the last 5 or 6 pages to see if it's covered.

I've got all my location and car data details being recorded just fine, however my mileage dashboard is very rarely updating, which is making it hard for me to document mileage that I can claim for work use. When I use the trips dashboard, I can see all my charges, elevation etc. but very rarely can I see distance and stats from the individual drives.

Is this an issue that others are seeing, is there a known fix, or a way for me to troubleshoot or bug report on this?

I'm running teslamate locally on a pi 3B+ and have been for quite some time.

See pictures below that demonstrate the odometer is being provided to Tesla but not visible in dashboards.
Top graph is my home assistant entity which is provided via MQTT from teslamate.
Bottom graph is form the teslamate mileage dashboard.

1683761892521.png

1683760859701.png
 
Last edited:
Standard questions for any problem:
What version are you on?
Anything in the logs?

Specifically for your issue:
If MQTT is getting the data then Teslamate is getting the data, so it is either not storing it in the database or Grafana is not reading it properly.

The Mileage chart gets data from the drives table. What does your drives table look like?
 
Standard questions for any problem:
What version are you on?
Anything in the logs?

Specifically for your issue:
If MQTT is getting the data then Teslamate is getting the data, so it is either not storing it in the database or Grafana is not reading it properly.

The Mileage chart gets data from the drives table. What does your drives table look like?
V 1.27.2
Works been mental so haven't been able to check the logs sorry.
Postgres 14 - I say this because i saw an issue on github that looked similar, but seems to be caused by using an older version of postgres.
Drives table looks normal for recent short drive however if I try to see things from the time period I was looking for, it's empty. Maybe an issue that has since been resolved?
 
Can you share an image of your drives dashboard? Would be interesting to see if anything is amiss with the parameters. Set it for a range that captures before and after the problem occurred.

Edit: Check the drive ids of the drives before and after the problem, you may have unclosed drives.
 
Can you share an image of your drives dashboard? Would be interesting to see if anything is amiss with the parameters. Set it for a range that captures before and after the problem occurred.

Edit: Check the drive ids of the drives before and after the problem, you may have unclosed drives.

Here's four views from the same date range.

Teslamate drives (lots of missing drives)
Teslamate mileage
Teslamate trip (lots of blank entries here)
Home assistant MQTT entity from teslamate `teslamate/cars/1/odometer`

I don't really know how to add drive ids to the grafana view but I can see in the drives view that they have large gaps between the drive ids in the url. In that they aren't increasing sequentially.

What would cause drives to not be closed, and how would I go about fixing this moving forward? It does seem that recent drives still aren't showing.

1683940750895.png

1683940788577.png

1683941153767.png

1683941322004.png
 
Here's four views from the same date range.

Teslamate drives (lots of missing drives)
Teslamate mileage
Teslamate trip (lots of blank entries here)
Home assistant MQTT entity from teslamate `teslamate/cars/1/odometer`

I don't really know how to add drive ids to the grafana view but I can see in the drives view that they have large gaps between the drive ids in the url. In that they aren't increasing sequentially.

What would cause drives to not be closed, and how would I go about fixing this moving forward? It does seem that recent drives still aren't showing.

View attachment 937206
View attachment 937207
View attachment 937209
View attachment 937210
I believe there was a thread on GitHub that was referring to the database timeout and increasing that helped prevent drives from remaining open. Will try to find it. Believe it also included a script to close all open drives.
 
  • Like
Reactions: MP3Mike
I believe there was a thread on GitHub that was referring to the database timeout and increasing that helped prevent drives from remaining open. Will try to find it. Believe it also included a script to close all open drives.
Ah awesome. I'll have a search on github. I'm now away from home for a week or so and don't have remote access to my teslamate, so will need to come back to it then.
 
  • Like
Reactions: cwanja