llamafilm / tesla-http-proxy-addon

Tesla HTTP Proxy Add-on for Home Assistant
Apache License 2.0
45 stars 20 forks source link

unable share the vehicle. adding a virtual key for "domain" is prohibited because you have not granted "domain" access to your account. #133

Closed mangio85 closed 4 months ago

mangio85 commented 4 months ago

The problem

Everything seems to be ok. In my tesla account I see the access authorized by the third party created in developer. I also received the confirmation email. Unfortunately I get this error when I try to enroll public key Screenshot_20240719_114459_Tesla

What version of the addon are you using?

2.2.8

What version of Home Assistant Core are you using?

HAOS core-2024.7.2

What type of installation are you running?

Home Assistant OS

What version of Tesla integration are you using?

No response

What region of Tesla API are you using?

Europe, Middle East

What model and year is your vehicle?

TESLA MODEL Y 2023

What is your domain name (FQDN)?

tesla.marso85.duckdns.org

Paste the log output from the addon here

[13:12:29] webui:INFO: Starting Flask server for Web UI...
[13:12:29] werkzeug:INFO: WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
 * Running on all addresses (0.0.0.0)
 * Running on http://127.0.0.1:8099
 * Running on http://172.30.33.8:8099
[13:12:29] werkzeug:INFO: Press CTRL+C to quit
[13:12:30] INFO: Found existing keypair
[13:12:30] INFO: Testing public key...
HTTP/2 200 
server: nginx
date: Fri, 19 Jul 2024 11:12:30 GMT
content-type: text/plain
content-length: 178
last-modified: Fri, 19 Jul 2024 09:38:35 GMT
etag: "669a341b-b2"
strict-transport-security: max-age=31536000; includeSubDomains
accept-ranges: bytes

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAER2PA2Iw0SFCgD8PefLNCdh8b6SlC
vBS3Qy0UYE/d7K0llG+A/+rcX7cqSwSek5FR+EfpPvGckzwYGDjuWucYKA==
-----END PUBLIC KEY-----
[13:12:30] INFO: Starting Tesla HTTP Proxy

Do not listen on a network interface without adding client authentication. Unauthorized clients may
be used to create excessive traffic from your IP address to Tesla's servers, which Tesla may respond
to by rate limiting or blocking your connections.
[13:13:00] werkzeug:INFO: 172.30.32.2 - - [19/Jul/2024 13:13:00] "GET / HTTP/1.1" 200 -
[13:16:10] webui:WARNING: Obtained refresh token: EU_---------------------------------------------------------------
[13:16:10] werkzeug:INFO: 172.30.32.2 - - [19/Jul/2024 13:16:10] "GET /callback?callback_url=https://tesla.marso85.duckdns.org/callback?code%3DEU_d69cfe25136f2232910952fbb3e79d23148dce54633cc0cc34e8f3b20bb0%26state%3D5a340a9b69%26issuer%3Dhttps%253A%252F%252Fauth.tesla.com%252Foauth2%252Fv3 HTTP/1.1" 200 -
[13:16:47] werkzeug:INFO: 172.30.32.2 - - [19/Jul/2024 13:16:47] "GET / HTTP/1.1" 200 -

Any additional context or screenshots that help explain the issue

I read in the issue 83, but I can't regenerate the tesla authentication because I receive this message:

13:32:54] auth:ERROR: Error 422: {"response":null,"error":"Validation failed: Domain has already been taken","error_description":"","txid":"fa1c2bb648a7260bcaabc4717aa414ff"} s6-rc: info: service legacy-services: stopping

llamafilm commented 4 months ago

That's odd. It sounds like it the partner registration step failed. But we won't know for sure without the debug log. Please enable debug logging, then regenerate auth and try again, and post the full output (with client secret redacted).

mangio85 commented 4 months ago

Thanks for now. You are precious. I would like to try immediately, but when I regenerate, I receive this message.

Error 422: {"response":null,"error":"Validation failed: Domain has already been taken","error_description":"","txid":"fa1c2bb648a7260bcaabc4717aa414ff"}
s6-rc: info: service legacy-services: stopping

Maybe I need to create a new point on my tesla developer account?

mangio85 commented 4 months ago

done, solved finished. I completely redid the entire procedure with the addon. It remains a mystery. Thank you very much for your work and for the precious support you provide every day. Thank you with all my heart.

If you like, I will create a guide in Italian.

llamafilm commented 4 months ago

Glad it's working! I'd be happy to accept a PR for new translations. https://github.com/llamafilm/tesla-http-proxy-addon/tree/main/tesla_http_proxy/translations