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.
How long does it wake up for and how often? An status graph would be handy.

parked the car at 22:00
the vehicle woke up 3 times so far, all for under 13mins

i never had this problem before, not sure if the updated version really has anything to do with it
i doubt my wife is launching the Tesla app on her phone because most of the time this happens in the early hours

i'm still on 2023.44.30.8
I did reboot the MCU and docker since the upgrade
 
My TM installation (on Google Cloud free tier) has been working flawlessly for over 3 years, until this morning......

I spotted there was a TM update available, so did my usual update procedure:

Login to my GCP instance via SSH
sudo docker-compose down
sudo docker-compose pull
sudo docker-compose up -d

..however I am now getting Bad Gateway as opposed to my TM page. It's definitely somewhat up, as it asks me for my TM username and password which authenticates correctly, but then I just get the Bad Gateway presented. I've stopped and started services, even did a full reboot of the server, but same result.

I'm suspecting something related to postgres based on the outputs from docker-compose ps, as the db seems to be in a restartiung/up loop:

Tue Feb 13 12:40:13 UTC 2024
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------
my_instance_database_1 docker-entrypoint.sh postgres Restarting
my_instance_grafana_1 /run.sh Up 3000/tcp
my_instance_mosquitto_1 /docker-entrypoint.sh /usr ... Up 127.0.0.1:1883->1883/tcp
my_instance_portainer_1 /portainer -H unix:///var/ ... Up 8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp
my_instance_proxy_1 /entrypoint.sh --global.se ... Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
my_instance_teslamate_1 tini -- /bin/sh /entrypoin ... Up 4000/tcp

my_instance@tm-f1-micro:~$ date;sudo docker-compose ps
Tue Feb 13 13:05:13 UTC 2024
Name Command State Ports
------------------------------------------------------------------------------------------------------------
my_instance_database_1 docker-entrypoint.sh postgres Up 5432/tcp
my_instance_grafana_1 /run.sh Up 3000/tcp
my_instance_mosquitto_1 /docker-entrypoint.sh /usr ... Up 127.0.0.1:1883->1883/tcp
my_instance_portainer_1 /portainer -H unix:///var/ ... Up 8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp
my_instance_proxy_1 /entrypoint.sh --global.se ... Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
my_instance_teslamate_1 tini -- /bin/sh /entrypoin ... Up 4000/tcp

my_instance@tm-f1-micro:~$ date;sudo docker-compose ps
Tue Feb 13 13:07:23 UTC 2024
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------
my_instance_database_1 docker-entrypoint.sh postgres Restarting
my_instance_grafana_1 /run.sh Up 3000/tcp
my_instance_mosquitto_1 /docker-entrypoint.sh /usr ... Up 127.0.0.1:1883->1883/tcp
my_instance_portainer_1 /portainer -H unix:///var/ ... Up 8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp
my_instance_proxy_1 /entrypoint.sh --global.se ... Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
my_instance_teslamate_1 tini -- /bin/sh /entrypoin ... Up 4000/tcp
 
My TM installation (on Google Cloud free tier) has been working flawlessly for over 3 years, until this morning......

I spotted there was a TM update available, so did my usual update procedure:

Login to my GCP instance via SSH
sudo docker-compose down
sudo docker-compose pull
sudo docker-compose up -d

..however I am now getting Bad Gateway as opposed to my TM page. It's definitely somewhat up, as it asks me for my TM username and password which authenticates correctly, but then I just get the Bad Gateway presented. I've stopped and started services, even did a full reboot of the server, but same result.

I'm suspecting something related to postgres based on the outputs from docker-compose ps, as the db seems to be in a restartiung/up loop:

Tue Feb 13 12:40:13 UTC 2024
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------
my_instance_database_1 docker-entrypoint.sh postgres Restarting
my_instance_grafana_1 /run.sh Up 3000/tcp
my_instance_mosquitto_1 /docker-entrypoint.sh /usr ... Up 127.0.0.1:1883->1883/tcp
my_instance_portainer_1 /portainer -H unix:///var/ ... Up 8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp
my_instance_proxy_1 /entrypoint.sh --global.se ... Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
my_instance_teslamate_1 tini -- /bin/sh /entrypoin ... Up 4000/tcp

my_instance@tm-f1-micro:~$ date;sudo docker-compose ps
Tue Feb 13 13:05:13 UTC 2024
Name Command State Ports
------------------------------------------------------------------------------------------------------------
my_instance_database_1 docker-entrypoint.sh postgres Up 5432/tcp
my_instance_grafana_1 /run.sh Up 3000/tcp
my_instance_mosquitto_1 /docker-entrypoint.sh /usr ... Up 127.0.0.1:1883->1883/tcp
my_instance_portainer_1 /portainer -H unix:///var/ ... Up 8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp
my_instance_proxy_1 /entrypoint.sh --global.se ... Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
my_instance_teslamate_1 tini -- /bin/sh /entrypoin ... Up 4000/tcp

my_instance@tm-f1-micro:~$ date;sudo docker-compose ps
Tue Feb 13 13:07:23 UTC 2024
Name Command State Ports
-----------------------------------------------------------------------------------------------------------------
my_instance_database_1 docker-entrypoint.sh postgres Restarting
my_instance_grafana_1 /run.sh Up 3000/tcp
my_instance_mosquitto_1 /docker-entrypoint.sh /usr ... Up 127.0.0.1:1883->1883/tcp
my_instance_portainer_1 /portainer -H unix:///var/ ... Up 8000/tcp, 0.0.0.0:9000->9000/tcp, 9443/tcp
my_instance_proxy_1 /entrypoint.sh --global.se ... Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
my_instance_teslamate_1 tini -- /bin/sh /entrypoin ... Up 4000/tcp
Do you TM on Google Kubernetes Engine or just on compute?
can you write a tutorial and link it here?

TIA
 
Stealing @init6 thunder here. What do the logs say?
2024/02/10 19:31:52,stdout, (phoenix_live_view 0.17.14) lib/phoenix_live_view/diff.ex:494: anonymous fn/4 in Phoenix.LiveView.Diff.traverse_dynamic/7
2024/02/10 19:31:52,stdout, (teslamate 1.28.3) lib/teslamate_web/live/car_live/summary.html.heex:157: anonymous fn/2 in TeslaMateWeb.CarLive.Summary.render/1
2024/02/10 19:31:52,stdout,"2024-02-11 00:31:52.738 [error] #PID<0.2783.0> running TeslaMateWeb.Endpoint (connection #PID<0.2770.0>, stream id 4) terminated
2024/02/10 19:31:52,stdout, (timex 3.7.11) lib/format/datetime/formatter.ex:55: Timex.Format.DateTime.Formatter.lformat!/4
2024/02/10 19:31:52,stdout,"2024-02-11 00:31:52.738 [error] #PID<0.2783.0> running TeslaMateWeb.Endpoint (connection #PID<0.2770.0>, stream id 4) terminated
 
@cwanja we need to be more specific :)

What do the teslamate logs say?
Nothing at the time I observe the “500 error”. These before and after in the log

docker-teslamate-1 | 2024-02-10 18:37:39.151 [notice] :alarm_handler: {:clear, TeslaMate.Vehicles.Vehicle_1_api_error}

docker-teslamate-1 | 2024-02-10 22:01:57.217 [warning] TeslaApi.Error / %{"error" => "{\"error\": \"timeout\"}", "error_description" => "", "response" => nil}
 
Also @Olyts, what is your timezone environment variable set to? Reference:
 
  • Like
Reactions: init6
Also @Olyts, what is your timezone environment variable set to? Reference:
Will Check that, thanks for the info!
 
First, I want to thank everyone who has been willing to step up and provide support since Adrian moved on to other things.
TeslaMate is an awesome program. I have been using it for around 6 months since we got our Tesla. It is running on a dedicated Raspberry Pi 4.
I would like to get to the point where I could assist too, but I currently know nothing about Elixir or Docker so I am at the beginning of a learning curve.

I am a little confused by these recent Teslamate API issues. I have been running 1.28.2 with no problems. I am aware that 1.28.3 is now available which incorporates a fix for the API change. But, I have re-started (just re-started again a couple of hours ago) and TeslaMate continues to work just fine for me. My impression was that it would work with the old version until it was re-started and then it would break,

Am I missing something? Should I update even though it does not appear that I need to right now?
 
First, I want to thank everyone who has been willing to step up and provide support since Adrian moved on to other things.
TeslaMate is an awesome program. I have been using it for around 6 months since we got our Tesla. It is running on a dedicated Raspberry Pi 4.
I would like to get to the point where I could assist too, but I currently know nothing about Elixir or Docker so I am at the beginning of a learning curve.

I am a little confused by these recent Teslamate API issues. I have been running 1.28.2 with no problems. I am aware that 1.28.3 is now available which incorporates a fix for the API change. But, I have re-started (just re-started again a couple of hours ago) and TeslaMate continues to work just fine for me. My impression was that it would work with the old version until it was re-started and then it would break,

Am I missing something? Should I update even though it does not appear that I need to right now?
I’m pretty much in the same position - everything is fine on 1.28.2, and I’ve avoided updating as I’m really not sure what will happen. The biggest difference is mine hasn’t restarted recently…

Interested in the replies…