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.
The latest update now forces you to change the password so it can’t be left on the default.
Not forced, just prompted. You can still skip it.

Edit: and actually it has always prompted you to change the login since I started using TeslaMate in 2019. It was just you never had to login to use Grafana. With the recent exposure, Grafana now requires a login upon launch. But you can still bypass it by using the default and skipping changing it. Mine is not exposed to the internet, so the default is fine with me.
 
Last edited:
Wonder if a Teslamate/Grafana guru can help with this. On the statistics page, I'd like to add an additional column that shows costs, but those specific to a geolocation (my home) - so I can basically see home charging costs on a monthly basis. The current column shows overall costs regardless of home charging, supercharging, etc etc. Can anyone help with this please?

View attachment 759909
That would honestly be easier going to "Charging Stats" and then changing the dashboard statistics to "last 30 days" or the date range you want. You could construct the SQL logic do it by geofence, but you would need to migrate that to its own dashboard so it is not overwritten each time you upgrade TeslaMate depending on your installation.
 
That would honestly be easier going to "Charging Stats" and then changing the dashboard statistics to "last 30 days" or the date range you want. You could construct the SQL logic do it by geofence, but you would need to migrate that to its own dashboard so it is not overwritten each time you upgrade TeslaMate depending on your installation.
Yes this is how I currently do it, but I'd like a summary view of each month (as you do with the statistics page) so I've got easily trendable data on the page. Happy to duplicate the stats dashboard and play with it - but I literally have no idea where to start. I can't get my head around the querying.
 
Yes this is how I currently do it, but I'd like a summary view of each month (as you do with the statistics page) so I've got easily trendable data on the page. Happy to duplicate the stats dashboard and play with it - but I literally have no idea where to start. I can't get my head around the querying.
Short of helping you with the actual query, the logic (in a super simplified format) would be something along the lines of:
calculate costs from geofence ID for variable of time period from dashboard
I would throw the request into the "Discussion" on the GitHub repo as an "Idea". A ton of talented people track that repo.
 
Short of helping you with the actual query, the logic (in a super simplified format) would be something along the lines of:

I would throw the request into the "Discussion" on the GitHub repo as an "Idea". A ton of talented people track that repo.
Think I've worked it out. Created a duplicate stats dash and amended the query to include 'geofence_id = 1'. This gives the correcrt figures for home charging at least. When I get chance I'll see if I can work out how to get both on the same dash.
 
  • Like
Reactions: cwanja
I have no YML file, probably deleted that years ago..

But the instructions need updating to say that, at least.
Created a pull request with that update.

You definitely might need to start from scratch. Not sure how you are going to extract your data though, as the backup methods require docker-compose and the credentials to the database.
 
  • Helpful
Reactions: Dave EV
Think I've worked it out. Created a duplicate stats dash and amended the query to include 'geofence_id = 1'. This gives the correcrt figures for home charging at least. When I get chance I'll see if I can work out how to get both on the same dash.
I was just having a look at that. I was going to go down the route of making the Geolocation selectable in a variable. Bear in mind you can't (easily) change the original dashboards. It's easier to save them as a new dashboard. Hence I have a lot of dashboards such as Overview2, Drives2 :)
 
My variable:
Screenshot 2022-01-25 at 17.48.27.png
And the extra line of code (might not be very neat, but it works :))

Code:
  geofence_id in (select id from geofences where geofences.name IN ($Geo_id) )
 
I am not a security expert, but it looks like the 19 year old that hacked into Teslas used a vulnerability from some Teslamate users:

Has there been discussion about that in this thread?
basically, someone stumbled across an unprotected teslamate instance, and then (probably via shodan) found more, and as we know, any headline with "Tesla" gets attention, he also made some (in my opinion) pretty wild claims at the time...

1643143658026.png


i'm no expert, but pretty sure you can't control the browser/apps via the API (someone, please correct me if i'm wrong as this would be awesome instead of using the sometimes sluggish UI)

but the long and short of it is... it's pretty much a non-issue if you're at all sensible about how you deploy teslamate. In my opinion there is absolutely no reason for an instance to directly accessible from the public internet, if you do need remote access the documented basic HTTP auth procedure isn't really much better, I'd strongly suggest people consider something like cloudflare access.
 
i'm no expert, but pretty sure you can't control the browser/apps via the API (someone, please correct me if i'm wrong as this would be awesome instead of using the sometimes sluggish UI)
You can, or at least you could in the past, share a YouTube video with the car from your phone, so I assume the API could do that as well. Of course, it wouldn't work while you are driving. There is also limited audio controls available via the API.
 
  • Like
Reactions: cwanja
  • Like
Reactions: Bobly and cwanja
Yes you can, surprisingly..

It's not actually clear what happens if you send a video link.. the docs we have seem to suggest it's still related to navigation, but I'm not sure how - "The address or video URL to set as the navigation destination."
Thanks! I wasn't aware of the sharing endpoint, that's pretty awesome - if i can have a one click button to play a video I will actually use that, as it sometimes takes so long to get youtube/netflix up when charging I rarely bother