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-compose logs teslamate will give you the logs. I don't use a pi so can't confirm what directory it should be in. I take it you followed the docker install instruction linked to from the page you posted?
Yup
Also I don't see in those instructions a reference to install apache. The only mention of Apache is in the advanced guide which is not the one you linked to.
Actually I installed the Apache 2 prior to the docker install from the listed page. Is that a conflict?
 
to check if your containers are running ok and the correct ports are "published" check the output of "docker container ls" your configuration is the bascially the docker-compose.yml and .env (and if you're doing the apache setup - /etc/apache2/sites-available/teslamate.conf) files you'll have created as part of the setup instructions
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d39e7725264a postgres:13 "docker-entrypoint.s…" 47 hours ago Up 47 hours 5432/tcp teslamate_database_1
b9eb372c891a teslamate/grafana:latest "/run.sh" 2 days ago Up 47 hours 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp pi_grafana_1
9f1f6b6e7072 postgres:13 "docker-entrypoint.s…" 2 days ago Up 47 hours 5432/tcp pi_database_1
30f9ff8ed8e2 teslamate/teslamate:latest "tini -- /bin/sh /en…" 2 days ago Restarting (1) 4 seconds ago pi_teslamate_1
0826cafc9b47 eclipse-mosquitto:2 "/docker-entrypoint.…" 2 days ago Up 47 hours 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp pi_mosquitto_1
pi@raspberrypi:~ $

pi@raspberrypi:~ $ ls -al /etc/apache2/sites-available
total 20
drwxr-xr-x 2 root root 4096 Oct 18 11:46 .
drwxr-xr-x 8 root root 4096 Oct 18 11:46 ..
-rw-r--r-- 1 root root 1332 Aug 8 2020 000-default.conf
-rw-r--r-- 1 root root 6338 Aug 8 2020 default-ssl.conf
pi@raspberrypi:~ $


No teslamate.conf !
 
doesn't look like the docs have been updated in a while, so should be the same


check the output of "docker-compose logs teslamate"
I do not have the file "docker-compose logs teslamate". Only "docker-compose" which is a small python3 script.
 
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d39e7725264a postgres:13 "docker-entrypoint.s…" 47 hours ago Up 47 hours 5432/tcp teslamate_database_1
b9eb372c891a teslamate/grafana:latest "/run.sh" 2 days ago Up 47 hours 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp pi_grafana_1
9f1f6b6e7072 postgres:13 "docker-entrypoint.s…" 2 days ago Up 47 hours 5432/tcp pi_database_1
30f9ff8ed8e2 teslamate/teslamate:latest "tini -- /bin/sh /en…" 2 days ago Restarting (1) 4 seconds ago pi_teslamate_1
0826cafc9b47 eclipse-mosquitto:2 "/docker-entrypoint.…" 2 days ago Up 47 hours 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp pi_mosquitto_1
pi@raspberrypi:~ $


pi@raspberrypi:~ $ ls -al /etc/apache2/sites-available
total 20
drwxr-xr-x 2 root root 4096 Oct 18 11:46 .
drwxr-xr-x 8 root root 4096 Oct 18 11:46 ..
-rw-r--r-- 1 root root 1332 Aug 8 2020 000-default.conf
-rw-r--r-- 1 root root 6338 Aug 8 2020 default-ssl.conf
pi@raspberrypi:~ $


No teslamate.conf !
looks like you've not finished the apache config part (assuming you're aiming for the "advanced" install with apache as a reverse proxy as you're missing the config there (see my earlier post on why I think this is a bad idea personally).

and also there seems to be an issue with your teslamate container as it's restarting

Code:
30f9ff8ed8e2   teslamate/teslamate:latest   "tini -- /bin/sh /en…"   2 days ago     Restarting (1) 4 seconds ago                                               pi_teslamate_1

check the output of "docker-compose logs teslamate" for some clues as to why... maybe you missed the .env file too?
 
it's not a file, it's a command to view the logs from the teslamate container
Ran the command and the following lines were at line ~83+ of 110,000 lines. Looks like a from scratch build is in my future.

^[[36mteslamate_1 |^[[0m * The database does not exist
^[[36mteslamate_1 |^[[0m * The "schema_migrations" table, which Ecto uses for managing
^[[36mteslamate_1 |^[[0m migrations, was defined by another library
^[[36mteslamate_1 |^[[0m * There is a deadlock while migrating (such as using concurrent
^[[36mteslamate_1 |^[[0m indexes with a migration_lock)
^[[36mteslamate_1 |^[[0m
^[[36mteslamate_1 |^[[0m To fix the first issue, run "mix ecto.create".
^[[36mteslamate_1 |^[[0m
^[[36mteslamate_1 |^[[0m To address the second, you can run "mix ecto.drop" followed by
^[[36mteslamate_1 |^[[0m "mix ecto.create". Alternatively you may configure Ecto to use
^[[36mteslamate_1 |^[[0m another table and/or repository for managing migrations:
^[[36mteslamate_1 |^[[0m
^[[36mteslamate_1 |^[[0m config :teslamate, TeslaMate.Repo,
^[[36mteslamate_1 |^[[0m migration_source: "some_other_table_for_schema_migrations",
^[[36mteslamate_1 |^[[0m migration_repo: AnotherRepoForSchemaMigrations
^[[36mteslamate_1 |^[[0m
^[[36mteslamate_1 |^[[0m The full error report is shown below.
^[[36mteslamate_1 |^[[0m
^[[36mteslamate_1 |^[[0m ** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2931ms. This means requests are coming in and your conne$

What instructions should I follow? There seem to be many and they are all slightly different.
 
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
d39e7725264a postgres:13 "docker-entrypoint.s…" 47 hours ago Up 47 hours 5432/tcp teslamate_database_1
b9eb372c891a teslamate/grafana:latest "/run.sh" 2 days ago Up 47 hours 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp pi_grafana_1
9f1f6b6e7072 postgres:13 "docker-entrypoint.s…" 2 days ago Up 47 hours 5432/tcp pi_database_1
30f9ff8ed8e2 teslamate/teslamate:latest "tini -- /bin/sh /en…" 2 days ago Restarting (1) 4 seconds ago pi_teslamate_1
0826cafc9b47 eclipse-mosquitto:2 "/docker-entrypoint.…" 2 days ago Up 47 hours 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp pi_mosquitto_1
pi@raspberrypi:~ $


pi@raspberrypi:~ $ ls -al /etc/apache2/sites-available
total 20
drwxr-xr-x 2 root root 4096 Oct 18 11:46 .
drwxr-xr-x 8 root root 4096 Oct 18 11:46 ..
-rw-r--r-- 1 root root 1332 Aug 8 2020 000-default.conf
-rw-r--r-- 1 root root 6338 Aug 8 2020 default-ssl.conf
pi@raspberrypi:~ $


No teslamate.conf !
oh just noticed you have 2 stacks... one from a directory called "pi" probably and one from a directory called "teslamate" - just choose one and bring the other one down, easy way is "docker-compose down" from the directory where the "docker-compose.yml" for the stack you don't want (then maybe delete the file too).
 
oh just noticed you have 2 stacks... one from a directory called "pi" probably and one from a directory called "teslamate" - just choose one and bring the other one down, easy way is "docker-compose down" from the directory where the "docker-compose.yml" for the stack you don't want (then maybe delete the file too).
Removed the pi version. That also removed the yml file from the pi directory. Rebooted and now the :3000 and the :4000 are refused.

Currently reformatting and rebuilding.
 
Last edited:
Removed the pi version. That also removed the yml file from the pi directory. Rebooted and now the :3000 and the :4000 are refused.

Currently reformatting and rebuilding.

I installed the 'simple' (no apache, no firewall, no ssl certs) several times this week both for myself and for a buddy on a Pi4.

This worked great to prep the pi: Installing Docker and Docker Compose on the Raspberry Pi in 5 Simple Steps

Then the 'simple' docker instructions from the telsamate docs: Docker install | TeslaMate

The only snag I ran into is that once logged in, the "Dashboards" tab wasn't showing on the web page. I had to click the Gear and go down to fill in the grapha url, which was (for me) http://raspberrypi.local:4000
 
  • Like
Reactions: init6
How do you want to aggregate them? Average?
Not sure yet, either average or plotting all data points. Maybe something like this?
BT85_s85_May-August2019.png.b90db18239b2d30f567b0a550ffbe0d7.png
 
I just learned by amending the existing dashboards until I understood how it all hung together. I'm not a DBA by any means (thankfully) so simple stuff I can do, but more complex queries take me a bit longer. I've set myself a challenge to produce what you want, but it won't be quick.
 
I installed the 'simple' (no apache, no firewall, no ssl certs) several times this week both for myself and for a buddy on a Pi4.

This worked great to prep the pi: Installing Docker and Docker Compose on the Raspberry Pi in 5 Simple Steps

Then the 'simple' docker instructions from the telsamate docs: Docker install | TeslaMate

The only snag I ran into is that once logged in, the "Dashboards" tab wasn't showing on the web page. I had to click the Gear and go down to fill in the grapha url, which was (for me) http://raspberrypi.local:4000
Did a clean OS build and OS updates. No additions (except for the .bash_aliases file).
Reboot. Completed the Docker install, no errors reported.
Reboot. Completed the Teslamate install, no errors.
Reboot.
Open the WEB browser.....
IP:3000 Grafana OK
IP:4000 "This site can not be reached"
"192.xxx.yyy.zzz refused to connect"

Yes, the yml file has the "ports: - 4000:4000" config set within the teslamate section
.
pi@raspberrypi:~/Docker/Teslamate $ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cd8254c58f59 eclipse-mosquitto:2 "/docker-entrypoint.…" 18 minutes ago Up 12 minutes 0.0.0.0:1883->1883/tcp, :::1883->1883/tcp teslamate_mosquitto_1
1b1bc5bfebc2 postgres:13 "docker-entrypoint.s…" 18 minutes ago Up 12 minutes 5432/tcp teslamate_database_1
0cb581c312ca teslamate/teslamate:latest "tini -- /bin/sh /en…" 18 minutes ago Restarting (1) 15 seconds ago teslamate_teslamate_1
99ec61f9e253 teslamate/grafana:latest "/run.sh" 18 minutes ago Up 12 minutes 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp teslamate_grafana_1
pi@raspberrypi:~/Docker/Teslamate $