I noticed Teslamate wasn’t updated. In fact, I hadn’t had any data captured in nearly a month and I’ve been too busy to notice. I was concerned something had happened, but I wasn’t sure what.
This is part of a series that covers my experience with a Tesla Model Y.
Troubleshooting
I saw a few notes online that said to restart things, which I did. When I went to the home page of my installation, everything looked fine, but not data for the last 20 something days. On the settings page, I saw a message that I needed to include an encryption key as an environment variable, nothing else.
One post said that I should delete the entry in the tokens table in the database to force a new login. So, I did that. I connected to the container with:
docker compose exec database psql teslamate teslamate
Then I ran a delete statement.
When I went back to the home page, I did see a login page. Fortunately, I had the Tesla Tokens app on my phone and it generated new API keys for me. If you don’t have this, you need it.
I still had the encryption key message and I didn’t have any data, so I decided to upgrade.
Adding an Encryption Key
In my Docker Compose file, I decided to add the encryption key. In the old file, I didn’t have the encryption key, so I copied the environment variable from the docs and added this in my file.
ENCRYPTION_KEY=somekeyvalueImadeup
No, that isn’t my password, but you can see the file below.
Once this was done, I checked the update page and it said to be sure you were on docker compose v2. I wasn’t sure where I was, but I know I hadn’t updated Docker Desktop in awhile, so I went to that app, downloaded the update and applied it.
Now I was ready.
Upgrading Teslamate
This is really easy. This is on the docs page. First, stop your containers with this:
docker-compose down
Next, run this
docker compose pull
As you can see, it started the update and had to pull down new images.
Once this was done, I ran docker compose up and things were running. I got to the teslamate page, where it wanted me to log in again. Fortunately, I’d saved my API tokens. I entered them and I was in:
Before this, the “Tina” in the upper left dropdown was nul and none of the temp values were populated.
Hopefully I’ll have this working for some time, but I’ll set a reminder to upgrade things a couple times a year.