Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token not refreshed when calling webserver endpoints #1330

Open
mss1010 opened this issue Jul 8, 2024 · 0 comments
Open

Token not refreshed when calling webserver endpoints #1330

mss1010 opened this issue Jul 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mss1010
Copy link
Contributor

mss1010 commented Jul 8, 2024

** Append Logfile **

08.07.2024 08:00:01 : #2[Thread Pool Worker:1093]: PostCommand: command/set_sentry_mode - {"on":false}
08.07.2024 08:00:01 : #2[Thread Pool Worker:1093]: Use ProxyServer
08.07.2024 08:00:02 : #2[Thread Pool Worker:1094]: Response: {"error":"token expired (401)"}

Describe the bug
I try to call the command endpoint on the internal webserver according to https://github.com/bassmaster187/TeslaLogger/blob/master/TeslaLogger/WebServer.md

I have the Fleet API active. When I do this shortly after doing other requests, or when the car was online shortly before, it works. But After some hours the token expires and you get the above error.
It seems, that for calling the webserver, a refresh token process is not applied.

To Reproduce
Steps to reproduce the behavior:

Leave the car offline for some hours (3-6 ? I dont know how long the Token is valid)

Expected behavior
A clear and concise description of what you expected to happen.

Teslalogger should refresh the token, if it‘s expired, and then ideally automatically send the last command again (I would see the second part as nice to have. This would enable super simple cronjobs that just call endpoints without handling the response)

Screenshots
If applicable, add screenshots to help explain your problem.

** Teslalogger Type **
Raspberry PI 3 / Raspberry Pi4 / Docker / Selfmade
Did you update the Image with apt-get update & upgrade?

raspi 4 with Docker. Yes the system is up to date.

** Do you use Tasker or iBeacon **

Additional context
Add any other context about the problem here.

@mss1010 mss1010 added the bug Something isn't working label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant