Teslamate: How frequently does TM fetch vehicles

Created on 7 Sep 2019  路  7Comments  路  Source: adriankumpf/teslamate

Hey Adrian,

first of all thanks for the great project. Happy to see some kind of good tech knowledge going on here. ;)

My question: How often does TM look for new vehicles?

Reason I'm asking is i'm still looking forward to take delivery of our Tesla in a bit and I wanna be prepared to start logging as early as possible. I already did set up everything and as far as I can say without any vehicle data it works just fine. Everything including the login in to the account works (did a public setup behind SSL, will post the docker-compose example later).

Of course I can't say if tracking will work and also I'm not sure if I better restart the stack once I have the car or if it should pull everything by itself and how long it might take to do so.

Thanks for helping!

question

All 7 comments

Thanks! :)The vehicle(s) linked to your Tesla account are fetched whenever TM starts. Since you already have everything set up, you'll only have to restart TM when the time comes. The car will then be polled immediately by TM .

alright, thanks. That cries for a sophisticated restart mechanism that can easily be triggered from the phone. Probably gonna build something that costs more and takes more time than just logging in via ssh and give it a restart but hey... why not, right? ;)

Yeah, of course! Somehow one has to bridge the waiting time until delivery :D

I see we're talking the same language.

Just wanna add this in case someone else comes up with the need to do so.

As I wanted to start logging ASAP after taking delivery of the car i found the easiest way would be to utilize the API of the VPS provider to reboot the server. Luckily the one I use (Hetzner) has a fairly nice API that offer APCI soft reboot. Tested it and works. I found HTTPBot to be a nice iOS app to send out the request including the Auth header so I'm probably going to use that to give the server a kick once the car appears in my account.

Still need to find a way to quickly check if logging is working without needing the check the log files.

But now i'm leaving for Zulassungsstelle to get the number plates registered. It's finally getting serious.

Nice! On iOS Shortcuts can also send out HTTP Requests. But it's probably not as intuitive as HTTPBot. However, you could trigger the restart with Siri 馃ぃ To quickly check if TM is working you could call /api/car/1/logging/resume. It it returns a 204 you're good to go.

@adriankumpf nice one with the api check - thanks.

I wasn't sure if shortcuts would also let me modify the http header hence I looked for a more curl style approach with an app. it's not really intuitive but a nice app anyway.

Also I just noticed it might be worth having a cronjob that starts the docker stack again after a reboot as the autostart might not always work depending on the restart selection. Here's my line as a starter.

@reboot (sleep 30s ; cd /opt/teslamate ; /usr/bin/docker-compose up -d )&

The siri thing definitely makes me wanna try the shortcuts way too 馃懐鈥嶁檪

Was this page helpful?
0 / 5 - 0 ratings

Related issues

russinating picture russinating  路  4Comments

DrMichael picture DrMichael  路  4Comments

natrlhy picture natrlhy  路  6Comments

bastrik picture bastrik  路  3Comments

Try2Fly picture Try2Fly  路  5Comments