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.
docker ps
Code:
CONTAINER ID   IMAGE                        COMMAND                  CREATED          STATUS          PORTS                     NAMES
96def03815c3   teslamate/teslamate:latest   "tini -- /bin/sh /en…"   13 minutes ago   Up 13 minutes   0.0.0.0:4000->4000/tcp    docker_teslamate_1
83720b98d377   teslamate/grafana:latest     "/run.sh"                13 minutes ago   Up 13 minutes   0.0.0.0:3000->3000/tcp    docker_grafana_1
1864c4ea17b1   eclipse-mosquitto:2          "/docker-entrypoint.…"   13 minutes ago   Up 13 minutes   1883/tcp                  docker_mosquitto_1
c6ca4034852e   postgres:14                  "docker-entrypoint.s…"   13 minutes ago   Up 13 minutes   5432/tcp                  docker_database_1
05d2a8c43ea8   teslamate/teslamate:latest   "tini -- /bin/sh /en…"   40 hours ago     Up 11 minutes   0.0.0.0:49156->4000/tcp   teslamate-teslamate1
8f62aacde114   teslamate/grafana:latest     "/run.sh"                40 hours ago     Up 11 minutes   0.0.0.0:49155->3000/tcp   teslamate-grafana1

Code:
root@ExtraDrive:/volume1/@docker# docker-compose ps

       Name                     Command               State           Ports
------------------------------------------------------------------------------------
docker_database_1    docker-entrypoint.sh postgres    Up      5432/tcp
docker_grafana_1     /run.sh                          Up      0.0.0.0:3000->3000/tcp
docker_mosquitto_1   /docker-entrypoint.sh mosq ...   Up      1883/tcp
docker_teslamate_1   tini -- /bin/sh /entrypoin ...   Up      0.0.0.0:4000->4000/tcp

You didn't mention how you ran it.
I think you need to clean everything up and start fresh. You are running two instances of Grafana and two of TeslaMate. And you are running Postgres 14 which may not be compatible with TeslaMate (I'm running version 12). You are also using the /volume1/@docker directory which isn't correct. You should be in /volume1/docker

To delete all the docker-compose stuff (this will wipe everything so if there's any actual TeslaMate data, don't do this!):

Code:
docker-compose down --rmi all --volumes --remove-orphans

Next go into the Synology Docker GUI and delete everything everywhere (containers, images, networks, volumes, basically go section by section just clearing everything out).

Then go back to SSH session and do a

Code:
docker ps

And confirm no containers are running.

Now move your docker-compose.yml file to /volume1/docker
Code:
mv /volume1/@docker/docker-compose.yml /volume1/docker/
and try again (
Code:
docker-compose up -d
).

Also, where did you get the docker-compose.yml as you shouldn't need to fiddle with anything assuming you have a good one?
 
You've got multiple teslamates running. How are you starting these?

1/ running docker-compose up -d to start everything
2/ something else?
I have run in windows powershell:
docker-compose up -d
To start it.
I have also pressed start in the container:
Teslamate.jpg
 
I have run in windows powershell:
docker-compose up -d
To start it.
I have also pressed start in the container:
View attachment 823582
Just use the docker-compose command.
So close it all down again - you can use the GUI if that's easier, but don't use the GUI to start anything. The docker-compose up -d command should do everything for you. You can then check the GUI or run the ps command.
 
I think you need to clean everything up and start fresh. You are running two instances of Grafana and two of TeslaMate. And you are running Postgres 14 which may not be compatible with TeslaMate (I'm running version 12). You are also using the /volume1/@docker directory which isn't correct. You should be in /volume1/docker

To delete all the docker-compose stuff (this will wipe everything so if there's any actual TeslaMate data, don't do this!):

Code:
docker-compose down --rmi all --volumes --remove-orphans

Next go into the Synology Docker GUI and delete everything everywhere (containers, images, networks, volumes, basically go section by section just clearing everything out).

Then go back to SSH session and do a

Code:
docker ps

And confirm no containers are running.

Now move your docker-compose.yml file to /volume1/docker
Code:
mv /volume1/@docker/docker-compose.yml /volume1/docker/
and try again (
Code:
docker-compose up -d
).

Also, where did you get the docker-compose.yml as you shouldn't need to fiddle with anything assuming you have a good one?
After running:
docker-compose down --rmi all --volumes --remove-orphans

It looks like everything is stopped by running:
docker ps

I still have files in:
root@ExtraDrive:/volume1/@docker# ls -la
Code:
total 28
drwx--x--x  1 root    root    262 Jul  1 08:47 .
drwxr-xr-x  1 root    root    492 Jun 30 18:31 ..
drwx-----x  1 root    root     20 Jun 29 15:50 btrfs
drwx--x--x  1 root    root    132 Jun 29 12:53 buildkit
drwx--x--x  1 root    root     12 Jun 29 12:53 containerd
drwx-----x  1 root    root    256 Jul  1 09:59 containers
-rwxrwxrwx+ 1 docfxit users  1587 Jul  1 08:38 docker-compose.yml
-rw-r--r--  1 root    root  12288 Jun 29 18:46 .docker-compose.yml.swp
drwx------  1 root    root     10 Jun 29 12:53 image
drwxr-xr-x  1 root    root      0 Jun 30 15:45 import
drwxr-x---  1 root    root     10 Jun 29 12:53 network
drwx------  1 root    root     20 Jun 29 12:53 plugins
drwx------  1 root    root      0 Jun 30 18:34 runtimes
drwx------  1 root    root      0 Jun 29 12:53 swarm
-rw-------  1 root    root  12288 Jun 29 18:27 .swp
drwx------  1 root    root      0 Jun 30 18:34 tmp
drwx------  1 root    root      0 Jun 29 12:53 trust
drwx-----x  1 root    root    568 Jul  1 09:59 volumes

This is what I have in:
root@ExtraDrive:/volume1/docker# ls -la
Code:
total 0
drwxr-xr-x+ 1 root    root   22 Jun 29 15:46 .
drwxr-xr-x  1 root    root  492 Jun 30 18:31 ..
drwxrwxrwx+ 1 root    root    8 Jun 30 18:31 @eaDir
drwxr-xr-x+ 1 docfxit users  36 Jul  1 10:02 Files

Should I delete the files in @docker before I get it going?
 
After starting it up again this is what I have:

Code:
root@ExtraDrive:/volume1/@docker# docker ps
CONTAINER ID   IMAGE                        COMMAND                  CREATED              STATUS              PORTS                    NAMES
f4e5b01ae669   eclipse-mosquitto:2          "/docker-entrypoint.…"   About a minute ago   Up About a minute   1883/tcp                 docker_mosquitto_1
0b3e091ec8dd   teslamate/teslamate:latest   "tini -- /bin/sh /en…"   About a minute ago   Up About a minute   0.0.0.0:4000->4000/tcp   docker_teslamate_1
3fd63776b613   postgres:14                  "docker-entrypoint.s…"   About a minute ago   Up About a minute   5432/tcp                 docker_database_1
3eb2e8050d02   teslamate/grafana:latest     "/run.sh"                About a minute ago   Up About a minute   0.0.0.0:3000->3000/tcp   docker_grafana_1

The connection was reset

With the correct IP address
Still doesn't work.

I currently don't see any links on the Synology desktop to show the containers.
 
Last edited:
I removed everything again with this:
Code:
docker-compose.yml
-rw-r--r--  1 root    root  12288 Jun 29 18:46 .docker-compose.yml.swp

I saw the last two containers were still there and not running.
I deleted the last two containers.
I started them up again with this:
docker-compose up -d
Now I only have the first four containers running.

http://192.168.XXX.XXX:4000/
The connection was reset
With the correct IP address
Still doesn't work.

This is very frustrating. It seams like it should be very easy.
I can't figure out what I am doing wrong.
 
Don't get frustrated - we're in a much better place. Now you only have 4 containers running which is what you want. The other containers were making it difficult to understand what is happening.


Do you have a firewall on your synology box?

What errors are you seeing in the logs?
 
Don't get frustrated - we're in a much better place. Now you only have 4 containers running which is what you want. The other containers were making it difficult to understand what is happening.


Do you have a firewall on your synology box?

What errors are you seeing in the logs?
Thank you for your encouragement.

The firewall on my Synology is turned off.
The firewall on my Windows is turned off.
Defender is turned off.

I see in the Docker Log:
Code:
Import container from [docker-compose.yml] failed: [Invalid file format]
Add image from docker-compose.yml failed: [Invalid file format]

Is there another log I should be looking at?

Code:
version: "3"

services:
  teslamate:
    image: teslamate/teslamate:latest
    restart: always
    environment:
      - ENCRYPTION_KEY=<correct key is inserted here>
      - DB_USER=teslamate
      - DB_PASS=secret
      - DB_NAME=teslamate
      - DB_HOST=db
      - MQTT_HOST=mosquitto
      - VIRTUAL_HOST=192.168.xxx.xxx       #<correct IP is running in live file>
        # if you're going to access the UI from another machine replace
        # "localhost" with the hostname / IP address of the docker host.
      - TZ=US/Pacific # (optional) replace to use local time in debug logs. See "Configuration".
    ports:
      - 4000:4000
    volumes:
      - ./import:/opt/app/import
    cap_drop:
      - all

  database:
    image: postgres:14
    restart: always
    environment:
      - POSTGRES_USER=teslamate
      - POSTGRES_PASSWORD=secret
      - POSTGRES_DB=teslamate
    volumes:
      - teslamate-db:/var/lib/postgresql/data

  grafana:
    image: teslamate/grafana:latest
    restart: always
    environment:
      - DATABASE_USER=teslamate
      - DATABASE_PASS=secret
      - DATABASE_NAME=teslamate
      - DATABASE_HOST=database
    ports:
      - 3000:3000
    volumes:
      - teslamate-grafana-data:/var/lib/grafana

  mosquitto:
    image: eclipse-mosquitto:2
    restart: always
    command: mosquitto -c /mosquitto-no-auth.conf
    # ports:
    #   - 1883:1883
    volumes:
      - mosquitto-conf:/mosquitto/config
      - mosquitto-data:/mosquitto/data

volumes:
  teslamate-db:
  teslamate-grafana-data:
  mosquitto-conf:
  mosquitto-data: