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

can't authenticate - Unknown error 412 #1043

Open
2 tasks done
naps62 opened this issue Sep 16, 2024 · 7 comments
Open
2 tasks done

can't authenticate - Unknown error 412 #1043

naps62 opened this issue Sep 16, 2024 · 7 comments
Labels
car For items that relate to Tesla vehicles triage New issues raised that need initial attention

Comments

@naps62
Copy link

naps62 commented Sep 16, 2024

Is there an existing issue for this?

  • I have searched both the existing open issues & recently closed issues and did not find a duplicate of this issue.

I have read about the Fleet API and understand I may need to use it

  • I understand issues relating to read only commands will be auto closed if not using the Fleet API.

Version of the Tesla component

3.24.1

Version of the Tesla car software

2024.26.7 b7e14964b659

Model

Model Y

Current Behavior

I've set up everything regarding the Fleet API Proxy. Had some trouble with that setup, but I believe that side is now working.

However, I can't authenticate with this component, always getting the following:
image

Some searches suggested this could be due to rate limiting, so I have tried leaving it on pause for a day and try again. the result was the same

Expected Behavior

succesful authentication

Debug logs

Logger: custom_components.tesla_custom
Source: custom_components/tesla_custom/__init__.py:220
integration: Tesla Custom Integration (documentation, issues)
First occurred: 4:36:43 PM (3 occurrences)
Last logged: 4:56:10 PM
Unable to communicate with Tesla API: UNKNOWN_ERROR_412

Anything else?

Debug log of the Tesla HTTP Proxy add-on:

[16:45:35] werkzeug:INFO: 172.30.32.2 - - [16/Sep/2024 16:45:35] "GET / HTTP/1.1" 200 -
[16:45:36] webui:DEBUG: Callback URL: https://tesla.n62.casa/callback?locale=en-US&code=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&state=abd938523c&issuer=https%3A%2F%2Fauth.tesla.com%2Foauth2%2Fv3
[16:45:36] webui:DEBUG: code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[16:45:36] urllib3.connectionpool:DEBUG: Starting new HTTPS connection (1): auth.tesla.com:443
[16:45:37] urllib3.connectionpool:DEBUG: https://auth.tesla.com:443 "POST /oauth2/v3/token HTTP/1.1" 200 2273
[16:45:37] webui:WARNING: Obtained refresh token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[16:45:37] werkzeug:INFO: 172.30.32.2 - - [16/Sep/2024 16:45:37] "GET /callback?callback_url=https://tesla.n62.casa/callback?locale%3Den-US%26code%XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX%26state%3Dabd938523c%26issuer%3Dhttps%253A%252F%252Fauth.tesla.com%252Foauth2%252Fv3 HTTP/1.1" 200 -
[16:45:39] werkzeug:INFO: 172.30.32.2 - - [16/Sep/2024 16:45:39] "GET / HTTP/1.1" 200 -
2024-09-16T16:46:25+01:00 [info ] Received GET request for /api/1/products
2024-09-16T16:46:25+01:00 [debug] Forwarding request to https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/products
2024-09-16T16:46:28+01:00 [info ] Received GET request for /api/1/products
2024-09-16T16:46:28+01:00 [debug] Forwarding request to https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/products
2024-09-16T16:46:31+01:00 [info ] Received GET request for /api/1/products
2024-09-16T16:46:31+01:00 [debug] Forwarding request to https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/products
2024-09-16T16:46:36+01:00 [info ] Received GET request for /api/1/products
2024-09-16T16:46:36+01:00 [debug] Forwarding request to https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/products
2024-09-16T16:46:40+01:00 [info ] Received GET request for /api/1/products
2024-09-16T16:46:40+01:00 [debug] Forwarding request to https://fleet-api.prd.na.vn.cloud.tesla.com/api/1/products
@naps62 naps62 added car For items that relate to Tesla vehicles triage New issues raised that need initial attention labels Sep 16, 2024
@naps62
Copy link
Author

naps62 commented Oct 21, 2024

@cydrezz nope. unfortunately doesn't solve it for me

@naps62
Copy link
Author

naps62 commented Oct 21, 2024

That's what I have been doing this whole time

@Jvgvisser
Copy link

Jvgvisser commented Nov 27, 2024

I've exactly the same issue, did you find a solution in the end? I have a working public and all, but it fails to setup.

@naps62
Copy link
Author

naps62 commented Nov 27, 2024

no. I've tried this a few different times, but always with the same result

@cydrezz
Copy link

cydrezz commented Nov 27, 2024

I've exactly the same issue, did you find a solution in the end? I have a working public and all, but it fails to setup.

For Me the following link worked but apperently does not work for everyone.

llamafilm/tesla-http-proxy-addon#111

tesla changed the token and not all token generator work anymore "Tesla HTTP proxy addon web-interface" works for me

@Condorello
Copy link

+1, it seems that the proxy make the ask with country US and obtain a token which starts with NA_ while i'm from Europe and tesla expect a EU_ token.

@naps62
Copy link
Author

naps62 commented Jan 15, 2025

FYI seems the new version of Tesla Fleet's plugin no longer requires this proxy.

it's still tricky to set up, but what got me there was this guide: https://www.wswapps.com/books/home-assistant/page/tesla-fleet-setup

The key step there is this (which also hints at the original issue here about the integrations assuming US-only and failing for EU clients):

This assumes Tesla North America or Asia-Pacific. If you're in a different region like Europe, find your URL here and update the audience field: https://developer.tesla.com/docs/fleet-api/getting-started/base-urls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
car For items that relate to Tesla vehicles triage New issues raised that need initial attention
Projects
None yet
Development

No branches or pull requests

4 participants