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.
No sooner had my head hit the pillow than I wondered if I'd removed the tabs from the empty lines. Not sure what difference it makes, but here's one without the tabs. If the first doesn't work, try this one.
(And I'm sure I don't need to say, don't edit this in Windows, just copy it to your synology box and rename.)
 

Attachments

  • docker-composeDocfxit.yml.zip
    828 bytes · Views: 58
Since I'm having so many problems getting Teslamate running I thought maybe I should try a different docker-compose.yml file. So I tried this file:

Code:
version: "3"

services:

  teslamate:
    image: teslamate/teslamate:latest
    container_name: teslamate
    hostname: teslamate
    restart: unless-stopped
    expose:
      - "4000"
    environment:
      - DATABASE_USER=teslamate
      - DATABASE_PASS=${INTERNAL_PASSWORD}
      - DATABASE_NAME=teslamate
      - DATABASE_HOST=database
      - DATABASE_PORT=5432
      - DISABLE_MQTT=true
      - LETSENCRYPT_EMAIL=${SSL_EXPIRE_EMAIL}
      - VIRTUAL_HOST=${TESLAMATE_MAIN_DOMAIN}
      - VIRTUAL_PATH=/
      - VIRTUAL_PORT=4000
      - LETSENCRYPT_HOST=${TESLAMATE_MAIN_DOMAIN}
      - TZ=${TESLAMATE_TZ}
    volumes:
      - ${CONFIG_BASE}/import:/opt/app/import
    cap_drop:
      - all
    network_mode: "bridge"
    links:
      - "database"

  grafana:
    image: teslamate/grafana:latest
    container_name: grafana
    hostname: grafana
    restart: unless-stopped
    expose:
      - "3000"
    environment:
      - DATABASE_USER=teslamate
      - DATABASE_PASS=${INTERNAL_PASSWORD}
      - DATABASE_NAME=teslamate
      - DATABASE_HOST=database
      - LETSENCRYPT_EMAIL=${SSL_EXPIRE_EMAIL}
      - VIRTUAL_HOST=${TESLAMATE_MAIN_DOMAIN}
      - VIRTUAL_PATH=/grafana/
      - VIRTUAL_PORT=3000
      - LETSENCRYPT_HOST=${TESLAMATE_MAIN_DOMAIN}
      - GF_SERVER_ROOT_URL=https://${TESLAMATE_MAIN_DOMAIN}/grafana
      - GF_SERVER_SERVE_FROM_SUB_PATH=true
    volumes:
      - teslamate-grafana-data:/var/lib/grafana
    network_mode: "bridge"
    links:
      - "database"

  database:
    image: postgres:14
    container_name: database
    hostname: database
    expose:
      - "5432"
    restart: unless-stopped
    environment:
      - POSTGRES_USER=teslamate
      - POSTGRES_PASSWORD=${INTERNAL_PASSWORD}
      - POSTGRES_DB=teslamate
    volumes:
      - teslamate-db:/var/lib/postgresql/data
    network_mode: "bridge"

  #nginx-proxy:
  #  image: nginxproxy/nginx-proxy@sha256:fc0187f6e93dad7718c0870372cf682f71b5a469ab48425dc9eb204e95db8ece
  #  restart: unless-stopped
  #  container_name: nginx-proxy
  #  ports:
  #    - "80:80"
  #    - "443:443"
  #  volumes:
  #    - ${CONFIG_BASE}/nginx/htpasswd:/etc/nginx/htpasswd
  #    - ${CONFIG_BASE}/nginx/conf:/etc/nginx/conf.d
  #    - ${CONFIG_BASE}/nginx/vhost:/etc/nginx/vhost.d
  #    - ${CONFIG_BASE}/nginx/html:/usr/share/nginx/html
  #    - ${CONFIG_BASE}/nginx/dhparam:/etc/nginx/dhparam
  #    - ${CONFIG_BASE}/nginx/certs:/etc/nginx/certs:ro
  #    - /var/run/docker.sock:/tmp/docker.sock:ro
  #  network_mode: "bridge"

  #acme-companion:
  #  image: nginxproxy/acme-companion:latest
  #  restart: unless-stopped
  #  container_name: nginx-proxy-acme
  #  volumes_from:
  #    - nginx-proxy
  #  volumes:
  #    - ${CONFIG_BASE}/nginx/certs:/etc/nginx/certs:rw
  #    - ${CONFIG_BASE}/nginx/acme:/etc/acme.sh
  #    - /var/run/docker.sock:/var/run/docker.sock:ro
  #  network_mode: "bridge"
volumes:
  teslamate-db:
  teslamate-grafana-data:

I'm still getting the same error:

Code:
Import container from [docker-compose.yml] failed: [Invalid file format]
Add image from docker-compose.yml failed: [Invalid file format]

I can't figure out what "Invalid file format" means.

Does it have to do with the Version 3 at the top of the file?
Does that correspond with the version of Docker I'm running?
 
For those of us new to docker, how would we go about the update and pruning?
These are the instructions I followed to upgrade Postgres 12 to 14. Be very careful that you understand each step because the process is: create a backup / destroy the old Postgres / install a blank new Postgres / restore the backup. My TeslaMate runs in a VM so I was able to take a snapshot before starting, just in case anything failed (the snapshot wasn't needed, the upgrade worked absolutely perfectly).


To prune (make sure your containers are RUNNING so it doesn't prune them!):

Code:
docker system prune

 
Trying to install teslamate on Unraid. It seems like it's interfacing with postgres fine, the logs look like it created the database and all the fields. But the webUI is broken - looks like this, sign in is grayed out, and it switches to a "this page is not working HTTP ERROR 431" after a few seconds (even if I don't interact). The teslamate logs don't look like there are errors...


2022-07-04 08:48:33.517 [info] Running TeslaMateWeb.Endpoint with cowboy 2.9.0 at :::4000 (http)
2022-07-04 08:48:33.518 [info] Access TeslaMateWeb.Endpoint at http://192.168.0.108
2022-07-04 08:48:36.757 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Wed, 16 Mar 2022 13:36:02 GMT.
2022-07-04 08:48:38.514 [info] Tzdata has updated the release from 2021e to 2022a
2022-07-04 08:48:52.068 [info] GET /
2022-07-04 08:48:52.086 [info] Sent 302 in 17ms


EDIT - works in chrome incognito window, not sure why that is necessary, but at least it's working now.



1656942767609.png
 
Trying to install teslamate on Unraid. It seems like it's interfacing with postgres fine, the logs look like it created the database and all the fields. But the webUI is broken - looks like this, sign in is grayed out, and it switches to a "this page is not working HTTP ERROR 431" after a few seconds (even if I don't interact). The teslamate logs don't look like there are errors...


2022-07-04 08:48:33.517 [info] Running TeslaMateWeb.Endpoint with cowboy 2.9.0 at :::4000 (http)
2022-07-04 08:48:33.518 [info] Access TeslaMateWeb.Endpoint at http://192.168.0.108
2022-07-04 08:48:36.757 [info] tzdata release in place is from a file last modified Fri, 22 Oct 2021 02:20:47 GMT. Release file on server was last modified Wed, 16 Mar 2022 13:36:02 GMT.
2022-07-04 08:48:38.514 [info] Tzdata has updated the release from 2021e to 2022a
2022-07-04 08:48:52.068 [info] GET /
2022-07-04 08:48:52.086 [info] Sent 302 in 17ms


EDIT - works in chrome incognito window, not sure why that is necessary, but at least it's working now.



View attachment 824671
Clear you cache and or temporary internet files. Seems like something is preventing the CSS from styling.
 
Another dumb question from the newbie ... have installed TeslaMate in anticipation of receiving our M3. Have received our VIN so a car has been allocated to our order and have received an invoice with build date etc.
Will my TM database begin being populated when the car is either on wifi or 4G when it is started at the destination port for unloading?
Would be fantastic if it did! I know I'm just dreaming but you never know.
 
No. It won't be visible by TM until after you accept delivery via the app and the vehicle is fully added to your account. (At least that is how it works in the US.)
I think there was one rare instance I have read about that someone had it show up before delivery. But overall, this is the way it works.

I think you will also need to log out / in from TeslaMate to pickup the car as well.
 
  • Like
Reactions: garylovesbeer