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 got Teslamate 1.26.1 working by I followed this guide The Idiot-Proof Guide to Upgrading Raspberry Pi from Buster to Bullseye can access ports 4000 & 3000 ok now. After I followed this:-
sudo apt install libseccomp2 -t buster-backports
Here were my instructions for just the backport on the GitHub repo: Raspberry Pi: clock_gettime(CLOCK_MONOTONIC, _) failed: Operation not permitted (1) · Issue #2302 · adriankumpf/teslamate

The Ganfana login over the web, via a domain name is not working, won't accept admin:admin login, any ideas? It asks for pw over WiFi also and admin:admin don't work either.
I had to reset the admin password on Grafana, I ran 'docker-compose exec grafana grafana-cli admin reset-admin-password xxxxxxxxxxxx', where xxxxxxxxxxxx is the new password I wanted. I could then login just fine with the new password.

Good luck
 
  • Like
Reactions: cwanja and init6
did you see the discussion on the last page about running it on a zero? Specifically:

thanks, I did see that but it applies to the manual install of Teslamate. I have been trying to get the Docker version running. I did confirm that postregsql 12 runs fine in a Container on my Raspberry Pi Zero W. It's teslamate and grafana that are failing...
 
I'm trying to get Teslamate to run on my Raspberry Pi Zero W. I've installed Docker and it works fine (albeit slowly). When I run "docker-compose up -d", the database and mosquito processes seem to start up. However both teslamate and grafana keep restarting over and over. No logs are generated at all. Here's what I see:

pi@pi0:~ $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

585f0513a3ee teslamate/teslamate:1.25.0 "tini -- /bin/sh /en…" 7 minutes ago Restarting (139) 21 seconds ago teslamate_teslamate_1
3d5e987bff14 postgres:12 "docker-entrypoint.s…" 7 minutes ago Up 5 minutes 5432/tcp teslamate_database_1
6f50f34519b3 teslamate/grafana:latest "/run.sh" 7 minutes ago Restarting (139) 38 seconds ago teslamate_grafana_1
6f19fac6d66a eclipse-mosquitto:2 "/docker-entrypoint.…" 7 minutes ago Up 5 minutes 1883/tcp teslamate_mosquitto_1


Any ideas what might be wrong?
I've determined that the images for teslamate and grafana don't support Arm v6 architecture which is what the Raspberry Pi Zero W uses. It is probably what is causing the segfault which Docker is reporting as the error code 139 and not creating any log file at all.

Having said that, I decided to try the Google Cloud free option described here. I signed up for GCP, spun up a VM, installed Docker and Teslamate, and got it all working in less than an hour. Works great and hope that the free tier continues to remain free!
 
  • Like
Reactions: chemirocha
I've determined that the images for teslamate and grafana don't support Arm v6 architecture which is what the Raspberry Pi Zero W uses. It is probably what is causing the segfault which Docker is reporting as the error code 139 and not creating any log file at all.

Having said that, I decided to try the Google Cloud free option described here. I signed up for GCP, spun up a VM, installed Docker and Teslamate, and got it all working in less than an hour. Works great and hope that the free tier continues to remain free!
Glad you've got it working. I use GCP. Just be careful with access and remember not to use default passwords.
 
  • Helpful
  • Like
Reactions: Dave EV and cwanja
Yeah, those are great - servethehome.com has been running a series where they have been testing a whole bunch of different makes/models of these refurbed/used "mini-micro" desktop systems with the idea of running them as small, low power servers. Only challenge is finding them at a reasonable price on eBay or similar.

Another option for a low power server are the Protectli line of systems - cost is a bit higher than a used/refurbed mini-micro, but pretty easy to spec out and you can get them with Ubuntu pre-installed so it's ready to go. There are similar systems to the Protectli off Aliexpress and eBay for similar if you shop around as well.

Let us know how much power your g2 uses at idle. One nice thing of the Pi is that the idle power is <= 4 W if I remember right, but I'm always worried about the SD card wearing out / crashing - SSDs are a lot more reliable in my experience.

just to update on this, I've had it plugged into a basic smart plug for that does power monitoring for the last week. It's probably not the most precise thing ever but it's reporting about 5W at idle.. (ignore the name, it's the one I usually use for the Christmas tree on the lawn).

1645128663331.png



for whatever reason, it will only report "apparent power" in VA historically, but (if I'm understanding correctly, with an assumed power factor of 0.7 that gives about 5w at idle too). I have no idea when it comes to electronics, so could be wildly wrong there, but seems to make sense.


1645128626177.png


one more thing that the more nerdy folks may find useful... I thought up a neat way of authenticating my own teslajs scripts now I have headroom to put more stuff on the Teslamate box.... just grab the current access token directly from the teslamate postgres container. This way I don't need to worry about having credentials or tokens lying around in multiple places, or bothering with refreshing the token myself as Teslamate takes care of it.. e.g.

1645129209933.png

(I know this is a bit wonky as the function should probably return the token, not set to a global - but still getting my head around the whole synchronous stuff in JS).
 
Last edited:
  • Like
Reactions: Dave EV and init6
Hi all,

new in the forum here and hope you can answer my question:
I`m running Teslamate on my Raspi4 using Docker.
I need to unplug my raspi and move it to a different location, so I`m not sure what`s happening with my containers.
My understanding, i need to run the docker-compose.yml again, but I don`t know with the persistent volumes which has been created during the initial setup?

Will I have my data back after running the docker-compose command again or do I need to perform a restore (have done a backup using the following command:
docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

Any help/input?

Thx
Tom
 
Hi all,

new in the forum here and hope you can answer my question:
I`m running Teslamate on my Raspi4 using Docker.
I need to unplug my raspi and move it to a different location, so I`m not sure what`s happening with my containers.
My understanding, i need to run the docker-compose.yml again, but I don`t know with the persistent volumes which has been created during the initial setup?

Will I have my data back after running the docker-compose command again or do I need to perform a restore (have done a backup using the following command:
docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

Any help/input?

Thx
Tom
Surely all you are doing is changing you IP address? Is this what you mean? The yml is read every time you reboot so not sure why you'd lose data.
 
Assuming you are going to the Grafana URL and not the Telsmate URL, you can change the home page by:
  1. Select Preferences from the Profile menu (you'll find this toward the bottom of the Grafana menu bar on the left side of the screen)
  2. In the Preferences view, under the Preferences group select the Home Dashboard you want as your default.
  3. Click on Save.
 
  • Like
Reactions: yessuz
Hi all,

new in the forum here and hope you can answer my question:
I`m running Teslamate on my Raspi4 using Docker.
I need to unplug my raspi and move it to a different location, so I`m not sure what`s happening with my containers.
My understanding, i need to run the docker-compose.yml again, but I don`t know with the persistent volumes which has been created during the initial setup?

Will I have my data back after running the docker-compose command again or do I need to perform a restore (have done a backup using the following command:
docker-compose exec -T database pg_dump -U teslamate teslamate > /backuplocation/teslamate.bck

Any help/input?

Thx
Tom
If you just mean relocate in your house, I think you should be OK to just shutdown the Pi cleanly (sudo shutdown...) relocate then plug back in and it should (note, should!) restart the docker containers for you - pretty sure that work clean for me last time I updated my Pi OS and did a reboot - the TeslaMate stuff just started up (running with -d). If you want to be "safe" running a back up before you shutdown the Pi never hurts.
 
  • Helpful
Reactions: Dave EV
i wonder if there is a way to understand why tesla is not sleeping? is there a way to drill down the state graph to see the reasons?

also, on the settings, what does the "Try to sleep" does?
I don’t think so.

Try to sleep is a timer where once Teslamate detects the vehicle is idle for a few minutes it suspends polling to make sure it falls asleep. However you should use streaming api mode so you don’t even see those settings.