Closed chowdarygm closed 7 months ago
The root cause of this issue is not visible in your logs because it would have occurred earlier. Please turn on the “regenerate auth” setting and restart the addon, then post the full log output.
The root cause of this issue is not visible in your logs because it would have occurred earlier. Please turn on the “regenerate auth” setting and restart the addon, then post the full log output.
Here it is
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service webui: starting
s6-rc: info: service webui successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[08:41:27] webui:INFO: Starting Flask server for Web UI...
[08:41:27] 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.4:8099
[08:41:27] werkzeug:INFO: Press CTRL+C to quit
[08:41:28] INFO: Found existing keypair
[08:41:28] INFO: Testing public key...
HTTP/2 200
date: Tue, 16 Apr 2024 13:41:29 GMT
content-length: 178
accept-ranges: bytes
etag: "b2-6162b62e1c4ca"
last-modified: Mon, 15 Apr 2024 23:57:38 GMT
cf-cache-status: DYNAMIC
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=L6xzx0iQPQUq9blziC%2BtLEyu5PYdI2A4PfGw6m%2BeSQXp1f2OpULSC4lHCM3KnFH0UjLYUPDm2%2FgP%2B3dFZRRcBX2ca44e1UurmK2%2Bh7bn93oixrfOAgciB4%2Bk9MxdhNUgHWWht1jRyT%2FQNQs%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 875497d8a877e259-ORD
alt-svc: h3=":443"; ma=86400
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEgAHbFuyom91f6pQtPqWo098QwQrh
q3lF+FrviKF1Vkx7W8ATdGNLOMDNoYlg/gj+U5DeE1DQZcWch5Dgj4gUvg==
-----END PUBLIC KEY-----
[08:41:29] INFO: Running auth.py
[08:41:29] auth:INFO: Generating Partner Authentication Token
[08:41:29] urllib3.connectionpool:DEBUG: Starting new HTTPS connection (1): auth.tesla.com:443
[08:41:29] urllib3.connectionpool:DEBUG: https://auth.tesla.com:443 "POST /oauth2/v3/token HTTP/1.1" 200 762
[08:41:29] auth:DEBUG: {"access_token":"_redacted_","expires_in":28800,"token_type":"Bearer"}
[08:41:29] auth:INFO: Registering Tesla account...
[08:41:29] urllib3.connectionpool:DEBUG: Starting new HTTPS connection (1): fleet-api.prd.na.vn.cloud.tesla.com:443
[08:41:30] urllib3.connectionpool:DEBUG: https://fleet-api.prd.na.vn.cloud.tesla.com:443 "POST /api/1/partner_accounts HTTP/1.1" 200 541
[08:41:30] auth:DEBUG: {"response":{"account_id":"_redacted_","domain":"","name":"Homeassistant2","description":"created second account for Homeassistant","csr":null,"client_id":"_redacted_","ca":null,"created_at":"2024-04-15T05:41:38.552Z","updated_at":"2024-04-16T13:41:30.635Z","enterprise_tier":"free","issuer":null,"csr_updated_at":null,"public_key":"048001db16eca89bdd5fea942d3ea5a8d3df10c10ae1ab7945f85aef88a175564c7b5bc01374634b38c0cda18960fe08fe5390de1350d065c59c8790e08f8814be"}}
[08:41:30] urllib3.connectionpool:DEBUG: Starting new HTTP connection (1): supervisor:80
[08:41:30] urllib3.connectionpool:DEBUG: http://supervisor:80 "GET /addons/self/options/config HTTP/1.1" 200 230
[08:41:30] urllib3.connectionpool:DEBUG: Starting new HTTP connection (1): supervisor:80
[08:41:31] urllib3.connectionpool:DEBUG: http://supervisor:80 "POST /addons/self/options HTTP/1.1" 200 25
[08:41:31] 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.
2024-04-16T08:41:32-05:00 [debug] Creating proxy
2024-04-16T08:41:32-05:00 [info ] Listening on 0.0.0.0:443
2024/04/16 08:42:35 http: TLS handshake error from 192.155.88.231:55780: read tcp 172.30.33.4:443->192.155.88.231:55780: read: connection reset by peer
2024/04/16 09:15:19 http: TLS handshake error from :57625: read tcp 172.30.33.4:443->45.79.168.172:57625: read: connection reset by peer
2024-04-16T09:15:57-05:00 [info ] Received GET request for /rY0a
2024-04-16T09:15:57-05:00 [error] Returning error Forbidden
From your screenshot, I thought the partner registration request had failed. But your log shows that succeeded, so I’m not sure. Are you the legal owner of this vehicle? I remember seeing some similar issue in vehicle-command for leases.
The TLS error might be a separate issue. I only tested this with the tesla_custom integration from HACS. Are you using something else? This request does not look like a normal URI:
Received GET request for /rY0a
This is my brand new car and I am the first owner. Something weird happened. Out of nowhere, the key got accepted in the subsequent trial by the App and said it was successful. Now I took that authentication code and put it in the Tesla custom integration under Fleet API settings, I am getting 'failed to setup' error and no devices are shown. Here is the log from debugging mode of Tesla custom integration and I know this is different integration but any suggestions ?
2024-04-16 11:38:53.780 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19830 days, 12:21:07
2024-04-16 11:38:53.780 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-04-16 11:38:53.780 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-04-16 11:38:54.032 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-04-16 11:38:54.032 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'login_required', 'error_description': 'Login required', 'referenceID': '4ec0e81e-9315-403e-9dcd-8ffaf04f35c6-1713285533978'}
2024-04-16 11:38:58.063 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19830 days, 12:21:02
2024-04-16 11:38:58.064 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-04-16 11:38:58.064 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-04-16 11:39:00.278 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-04-16 11:39:00.278 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'login_required', 'error_description': 'Login required', 'referenceID': '3d146338-e44e-4334-a241-b02fd818a07b-1713285540232'}
2024-04-16 11:39:04.096 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19830 days, 12:20:56
2024-04-16 11:39:04.096 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-04-16 11:39:04.096 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-04-16 11:39:04.295 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-04-16 11:39:04.295 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'login_required', 'error_description': 'Login required', 'referenceID': '52b703bc-9e85-43e4-ba42-fa4ddc087c10-1713285544252'}
2024-04-16 11:39:04.295 WARNING (MainThread) [homeassistant.config_entries] Config entry 'xxx@gmail.com' for tesla_custom integration could not authenticate
@chowdarygm this seems quite odd:
Token expiration in -19830 days
That's 54y ago ... 1970, that's the year "clock" started. Proper date is required for encryption to work. Make sure the date is properly set.
Second thought... maybe your computer's date is ok and perhaps it's the token that has wrong date of creation. I'm not sure but something related to date seems wrong somewhere.
Second thought... maybe your computer's date is ok and perhaps it's the token that has wrong date of creation. I'm not sure but something related to date seems wrong somewhere.
But I am not setting the token expiration date anywhere right?
I deleted the Tesla custom integration again and restarted the whole process and now I was able to successfully add the vehicle key and vehicle to the integration. Don't know what happened till now as I did not change anything in the steps this time.
The problem
I am having an issue with - This third party isn't registered with Tesla. We can't grant them access at the time. I checked other threads with similar issue but couldn't find a solution.
I am using the cloudflare process mentioned in this blog . Setup two times but still end up with this issue and unable to figure out what's wrong. Able to access public key just fine.
Appreciate any help on this
This is the log from Tesla Proxy addon
This is the log from Apache addon
What version of the addon are you using?
2.2.3
What version of Home Assistant Core are you using?
core-2024.4.3
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?
North America, Asia-Pacific
What model and year is your vehicle?
2024 MY
What is your domain name (FQDN)?
Paste the log output from the addon here
No response
Any additional context or screenshots that help explain the issue
No response