-
Notifications
You must be signed in to change notification settings - Fork 18
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
Tesla WAF #42
Comments
Similar issues all around, see teslamate-org/teslamate#1412 and teslamate-org/teslamate@9fee2b5 for a fix. I was wondering if the Useragent is really required or if it shouldn‘t be enough to use the same UA as the official app? |
@uhthomas according to https://golang.org/pkg/net/http/ it should be possible to set |
I think the Go HTTP client will send the There are some more complications, it looks like the clients are heavily rate-limited. Whether it's by IP, token or what, I don't know. The graph shows points in time for where the exporter was able to get through, and where it wasn't. The error becomes
|
Cannot fetch token sounds as if its actually logging in at that time. That should only happen very rarely? |
It happens quite often - these OAuth2 tokens only live for a short while. |
Closed in #43 |
Hi!
So, it looks like Tesla has updated their WAF again. After some experimenting, I've managed to get something working.
https://github.com/uhthomas/tesla/compare/f00d0e07a2b61907751647920f5b7c1f8197c07a..1caf33b692d9258ef27505b335ee3aa8869c1e8d
The changes are:
Accept
with*/*
Accept-Encoding
withgzip, deflate, br
This is paired with a custom round tripper which is capable of decoding gzip responses.
User-Agent
header every 6 hoursThe user agent can't always be random, as logging in is expected to keep the same user agent for the entire flow.
The text was updated successfully, but these errors were encountered: