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’ve obviously missed a trick here, how do you make it auto- update? (spot the unix noob!)
So I'm using docker-compose. The first one is something called Watchtower that will look for updates to containers and then pull and update them. It needs access to the docker.sock for this to work. I also have it set to only update them at 4am and only containers where I put a label on them.

Put this in a folder and a file called docker-compose.yml

Code:
version: "3.5"

services:
  watchtower:
    image: v2tec/watchtower
    container_name: watchtower
    restart: always
    network_mode: none
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --label-enable --schedule "0 0 4 * * *" --cleanup
    environment:
      - TZ=Europe/London
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

Now run docker compose up -d

It'll be running but won't do anything yet, the key is you need to add the label "com.centurylinklabs.watchtower.enable=true" to containers you want to automatically update.

I've cut a lot out here but for Teslamate it'll have these bits in it:

Code:
version: "3.5"

services:
  teslamate:
    image: teslamate/teslamate:latest
    container_name: teslamate
    restart: always
    ...
    ...
    ...
    ...
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  database:
    image: postgres:14
    container_name: teslamate-db
    restart: always
    ...
    ...
    ...
    ...
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  grafana:
    image: teslamate/grafana:latest
    container_name: teslamate-grafana
    restart: always
    ...
    ...
    ...
    ...
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

  mosquitto:
    image: eclipse-mosquitto:2
    container_name: teslamate-mosquitto
    restart: always
    ...
    ...
    ...
    ...
    labels:
      - "com.centurylinklabs.watchtower.enable=true"

Here's where someone tells me I have it pinned to some old components but I've not touched it for 1.5 years. :)

Or you can just take out --label-enable on the watchtower one and then it will update everything you are running in docker when it sees something new at 4am. I just wanted a bit more control is all.
 
Not sure if it's a blip but tonight the status just went back to asleep again
I just had a look through my Teslamate States history & most of the asleeps are shown as offline. However, there was one a couple of nights ago that was shown as asleep. Looks like a glitch then. It's weird because the Tesla app can tell the difference between asleep & offline, so it's being reported, just not to the public-facing (private) API.
 
I have created Teslamate dashboard for my personal use which focuses on speed and temperature related statistics. There are few options on the top of the dashboard to finetune the panels, selected date range also affects the panel data.
This is working well & I've followed instructions above for my other query to add a button to the dashboards. However, adding this dashboard to the list seems to have thrown off a couple of other things:

(1) On the Teslamate screen, there's no Dashboard link to this particular dashboard.
(2) On the Teslamate screen, the link to the Statistics dashboard no longer works. This is fine from a Grafana screen, just not from the Teslamate screen. I wonder whether this is related to some sort of reordering of the URLs & Teslamate not knowing that there's an extra dashboard (same issue as (1))?

Any help for this noob would be appreciated. Not the end of the world, but this is a learning activity for me.
 
This is working well & I've followed instructions above for my other query to add a button to the dashboards. However, adding this dashboard to the list seems to have thrown off a couple of other things:

(1) On the Teslamate screen, there's no Dashboard link to this particular dashboard.
There won't be. The Teslamate page only shows the built-in dashboards. You will see it in the dashboards drop down on GRafana if you've followed the above.
(2) On the Teslamate screen, the link to the Statistics dashboard no longer works.
Noobs should look at the Github page in the first instance :)

 
This particular noob has tried to navigate Github before & got hopelessly lost! I thought this was related to the installation of the new dashboard, but forgot that I had updated Teslamate at some stage too. Thank you!
I use a little known website to do my searching. It begins with a G
:)
For something like this I just go straight to the issues page and have a quick scan. If need be you can search for a keyword in your problem e.g. Statistics and it should bring up any issues
 
When I get some time and if I can decipher the code I'm hoping to fork it and add an option to "treat offline as asleep" (like TeslaFi has). My OCD is bad with it always showing "offline" now, when I know it isn't.

The TeslaMate devs are reticent to conflate "offline" with "asleep", which i get, but at the same time it seems like everyone sees "offline" now, including Ryzen people, so there will come a point where "asleep" basically doesn't get seen as a state.
 
When I get some time and if I can decipher the code I'm hoping to fork it and add an option to "treat offline as asleep" (like TeslaFi has). My OCD is bad with it always showing "offline" now, when I know it isn't.
Is your OCD not bothered if it's marked asleep when it's really offline? :)

But seriously, it would be nice to have the option. Would keep the fakers and purists happy.

Edit: with further thought, it would be very easy to duplicate the grafana dashboards and make the changes there, while preserving the raw data.
 
Last edited:
  • Like
Reactions: cwanja and Durzel