alandtse / tesla

Tesla custom integration for Home Assistant. This requires a refresh token be generated by third-party apps to login.
Apache License 2.0
588 stars 100 forks source link

re-authentication successful but fails to setup - also on v.3.20.2 #899

Closed iainbullock closed 6 months ago

iainbullock commented 6 months ago

Thanks for everyone's hard work on this.

The Issue described in #895 is still occurring for me when 'Use Fleet API Proxy' is selected. v3.20.2 has fixed it when 'Use Fleet API Proxy' is not selected.

Here's a description of the problem:

In the config flow I select 'Use Fleet API Proxy', I then fill in the config parameters:

After a while the dialog appears saying Success! Created configuration for myemailaddress@gmail.com

However the integration instance says Failed to Setup, and no entities are created.

Debug logs as follows:

2024-03-13 07:10:33.705 DEBUG (MainThread) [custom_components.tesla_custom.config_flow] Credentials successfully connected to the Tesla API
2024-03-13 07:10:33.707 DEBUG (MainThread) [custom_components.tesla_custom] <ssl.SSLContext object at 0x7f4f33ecdf50>
2024-03-13 07:10:33.747 DEBUG (MainThread) [teslajsonpy.controller] 552 endpoints loaded
2024-03-13 07:10:33.747 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 16:49:27
2024-03-13 07:10:33.747 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-13 07:10:33.747 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-13 07:10:34.902 DEBUG (MainThread) [teslajsonpy.connection] Received bad auth response:
2024-03-13 07:10:34.903 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-13 07:10:36.435 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 16:49:24
2024-03-13 07:10:36.435 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-13 07:10:36.435 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-13 07:10:37.695 DEBUG (MainThread) [teslajsonpy.connection] Received bad auth response:
2024-03-13 07:10:37.695 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-13 07:10:40.503 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 16:49:20
2024-03-13 07:10:40.504 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-13 07:10:40.504 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-13 07:10:42.063 DEBUG (MainThread) [teslajsonpy.connection] Received bad auth response:
2024-03-13 07:10:42.063 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-13 07:10:46.749 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 16:49:14
2024-03-13 07:10:46.749 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-13 07:10:46.749 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-13 07:10:47.925 DEBUG (MainThread) [teslajsonpy.connection] Received bad auth response:
2024-03-13 07:10:47.925 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-13 07:10:48.749 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 16:49:12
2024-03-13 07:10:48.749 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-13 07:10:48.749 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-13 07:10:49.572 DEBUG (MainThread) [teslajsonpy.connection] Received bad auth response:
2024-03-13 07:10:49.572 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-13 07:10:49.572 WARNING (MainThread) [homeassistant.config_entries] Config entry 'myemailaddress@gmail.com' for tesla_custom integration could not authenticate
andershagenhansen commented 6 months ago

Also the same for me 😊

2024-03-13 12:53:28.430 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 11:06:32
2024-03-13 12:53:28.431 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-13 12:53:28.431 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-13 12:53:28.813 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-13 12:53:28.813 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'login_required', 'error_description': 'Login required', 'referenceID': 'b2d0fbbf-2e52-4181-97ca-47d752a1c9ce-1710330808689'}
2024-03-13 12:53:32.265 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 11:06:28
2024-03-13 12:53:32.265 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2024-03-13 12:53:32.265 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2024-03-13 12:53:32.723 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
2024-03-13 12:53:32.723 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'login_required', 'error_description': 'Login required', 'referenceID': 'c432f8e3-f3cd-4413-90f5-133074309c68-1710330812596'}
2024-03-13 12:53:32.725 WARNING (MainThread) [homeassistant.config_entries] Config entry 'my@email-address.com' for tesla_custom integration could not authenticate
traveler6666 commented 6 months ago

Same with me.

TGrounds commented 6 months ago

I have been receiving an error since yesterday - I just installed the new version and I'm still getting an error - I am NOT using the Fleet API Proxy - here is the log:

asyncio.exceptions.CancelledError: Global task timeout 2024-03-13 09:47:24.087 WARNING (MainThread) [homeassistant.bootstrap] Setup timed out for stage 2 - moving forward 2024-03-13 09:48:05.938 DEBUG (MainThread) [teslajsonpy.controller] 552 endpoints loaded 2024-03-13 09:48:05.939 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 14:11:55 2024-03-13 09:48:05.939 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected 2024-03-13 09:48:05.939 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token 2024-03-13 09:48:06.086 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token 2024-03-13 09:48:06.086 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': 'bb40e0c2-c211-4369-920f-01b0a54d37a0-1710341286048'} 2024-03-13 09:48:07.979 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 14:11:53 2024-03-13 09:48:07.979 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected 2024-03-13 09:48:07.979 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token 2024-03-13 09:48:08.125 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token 2024-03-13 09:48:08.125 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '6c075826-2e1b-452b-9b6e-409247c0b864-1710341288084'} 2024-03-13 09:48:10.518 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 14:11:50 2024-03-13 09:48:10.518 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected 2024-03-13 09:48:10.518 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token 2024-03-13 09:48:10.715 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token 2024-03-13 09:48:10.715 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '71222da4-4ded-447e-b5c2-5675bc93b45f-1710341290654'} 2024-03-13 09:48:14.965 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 14:11:46 2024-03-13 09:48:14.965 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected 2024-03-13 09:48:14.965 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token 2024-03-13 09:48:17.195 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token 2024-03-13 09:48:17.195 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '497da178-6aa4-402e-8f7a-f6a530adca4b-1710341297143'} 2024-03-13 09:48:20.940 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19796 days, 14:11:40 2024-03-13 09:48:20.941 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected 2024-03-13 09:48:20.941 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token 2024-03-13 09:48:21.116 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token 2024-03-13 09:48:21.116 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '24581346-560f-4651-a3b8-8dce6615d645-1710341301062'} 2024-03-13 09:48:21.116 WARNING (MainThread) [homeassistant.config_entries] Config entry 'myemail@email.com' for tesla_custom integration could not authenticate

TGrounds commented 6 months ago

The integration seems to be working again - I had an update to the HAOS that came through this afternoon and I reauthenticated successfully.

iainbullock commented 6 months ago

V3.30.2 fixes the problem if you are not using the Fleet API Proxy, but still fails for some people if this option is selected. Could it be a regional thing?

llamafilm commented 6 months ago

@TGrounds your issue is different than this one, and already fixed in 3.30.2. Please don't gang up on other unrelated issues. Also, when posting logs it's very helpful to format the text as a code block.

@andershagenhansen your login_required issue is also different than this one. You should open a new issue, describing exactly what you've done, and any troubleshooting steps attempted.

@iainbullock please post the output of the Tesla proxy addon.

iainbullock commented 6 months ago

@llamafilm I am using my own version of the proxy (its a fork of yours running in a docker container), not the HA add on. The proxy logs show it is not receiving any connections from this integration. I appreciate this problem might well be to do with my own setup, so will do some debugging of my own and close this Issue.

The URL to my proxy is https://192.168.1.5:4430 could you confirm this is the correct format to enter in the Proxy URL box in the config flow?

Thanks a lot for your work on this project

llamafilm commented 6 months ago

The IP address won't work; it needs to be a domain name which matches the TLS cert.

iainbullock commented 6 months ago

I will close this and reply in https://github.com/llamafilm/tesla-http-proxy-addon/issues/6

Lockie85 commented 6 months ago

Hey,

@llamafilm I think this still belongs here. I'm on v3.20.4 and I get the following errors:

Line  21: 2024-03-17 10:57:20.821 WARNING (SyncWorker_2) [homeassistant.loader] We found a custom integration tesla_custom which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
Line 102: 2024-03-17 10:57:23.003 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'local_calendar', 'oralb', 'blueprint', 'scene', 'schedule', 'pfsense', 'home_connect', 'shopping_list', 'assist_pipeline', 'repairs', 'asusrouter', 'tag', 'dlna_dmr', 'input_datetime', 'application_credentials', 'device_automation', 'stt', 'system_health', 'counter', 'octopus_energy', 'homekit_controller', 'hue', 'generic', 'spotify', 'watchman', 'hacs', 'automation', 'auth', 'tapo', 'powerwall', 'input_number', 'rest_command', 'map', 'zone', 'timer', 'sensor', 'lovelace', 'conversation', 'telegram_bot', 'input_select', 'image_upload', 'search', 'mobile_app', 'tts', 'nest', 'google_assistant_sdk', 'wake_word', 'tautulli', 'frigate', 'samsungtv', 'radio_browser', 'plex', 'input_button', 'history', 'fully_kiosk', 'diagnostics', 'logbook', 'onboarding', 'ffmpeg', 'script', 'netatmo', 'group', 'tesla_custom', 'govee', 'input_text', 'my', 'ibeacon', 'ipp', 'stream', 'analytics', 'default_config', 'camera', 'expose_camera_stream_source', 'cast', 'mqtt', 'tesla_wall_connector', 'backup', 'media_source', 'speedtestdotnet', 'notify', 'tplink', 'google_home', 'aqara_gateway', 'hardware', 'bluetooth_adapters', 'local_todo', 'config', 'waste_collection_schedule', 'skyq', 'trace', 'thread', 'input_boolean', 'homeassistant_alerts', 'met', 'energy', 'esphome', 'babybuddy', 'uptime', 'file_upload', 'person', 'google_assistant', 'sun', 'persistent_notification'}
Line 148: 2024-03-17 10:57:24.016 INFO (MainThread) [homeassistant.setup] Setting up tesla_wall_connector
Line 149: 2024-03-17 10:57:24.016 INFO (MainThread) [homeassistant.setup] Setup of domain tesla_wall_connector took 0.0 seconds
Line 328: 2024-03-17 10:57:26.668 INFO (MainThread) [backoff] Backing off async_request(...) for 0.3s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 467: 2024-03-17 10:57:27.501 INFO (MainThread) [homeassistant.setup] Setting up tesla_custom
Line 468: 2024-03-17 10:57:27.501 INFO (MainThread) [homeassistant.setup] Setup of domain tesla_custom took 0.0 seconds
Line 545: 2024-03-17 10:57:28.058 INFO (MainThread) [backoff] Backing off async_request(...) for 1.0s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 601: 2024-03-17 10:57:30.052 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 640: 2024-03-17 10:57:42.834 WARNING (MainThread) [homeassistant.config_entries] Config entry 'someaddress@email.com' for tesla_custom integration could not authenticate
Line 657: 2024-03-17 11:01:16.382 INFO (MainThread) [homeassistant.components.automation.lauren_close_to_home] Initialized trigger Tesla Close To Home
Line 661: 2024-03-17 11:01:16.382 INFO (MainThread) [homeassistant.components.automation.tesla_peak_charging] Initialized trigger Tesla Peak Charging
Line 667: 2024-03-17 11:01:16.382 INFO (MainThread) [homeassistant.components.automation.tesla_is_on_the_move] Initialized trigger Tesla doors unlocked
Line 678: 2024-03-17 11:01:16.383 INFO (MainThread) [homeassistant.components.automation.tesla_arrival_time] Initialized trigger Tesla Arrival Time
Line 680: 2024-03-17 11:01:16.383 INFO (MainThread) [homeassistant.components.automation.tesla_update] Initialized trigger Tesla Update
Line 689: 2024-03-17 11:01:16.804 INFO (MainThread) [backoff] Backing off async_request(...) for 0.4s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 696: 2024-03-17 11:01:18.159 INFO (MainThread) [backoff] Backing off async_request(...) for 0.2s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 697: 2024-03-17 11:01:19.154 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionError: Error while communicating with Wall Connector at 192.168.30.61: Cannot connect to host 192.168.30.61:80 ssl:default [Connect call failed ('192.168.30.61', 80)])
Line 718: 2024-03-17 11:01:30.543 INFO (MainThread) [backoff] Backing off async_request(...) for 0.1s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 719: 2024-03-17 11:01:31.680 INFO (MainThread) [backoff] Backing off async_request(...) for 0.8s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 720: 2024-03-17 11:01:32.594 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionError: Error while communicating with Wall Connector at 192.168.30.61: Cannot connect to host 192.168.30.61:80 ssl:default [Connect call failed ('192.168.30.61', 80)])
Line 721: 2024-03-17 11:01:53.855 INFO (MainThread) [backoff] Backing off async_request(...) for 0.6s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 722: 2024-03-17 11:01:55.463 INFO (MainThread) [backoff] Backing off async_request(...) for 1.8s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 723: 2024-03-17 11:01:58.216 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 724: 2024-03-17 11:02:39.692 INFO (MainThread) [backoff] Backing off async_request(...) for 1.0s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 725: 2024-03-17 11:02:41.685 INFO (MainThread) [backoff] Backing off async_request(...) for 0.9s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 726: 2024-03-17 11:02:43.547 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 727: 2024-03-17 11:04:04.767 INFO (MainThread) [backoff] Backing off async_request(...) for 0.7s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 728: 2024-03-17 11:04:06.491 INFO (MainThread) [backoff] Backing off async_request(...) for 0.7s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 729: 2024-03-17 11:04:08.181 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 739: 2024-03-17 11:05:29.520 INFO (MainThread) [backoff] Backing off async_request(...) for 0.8s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 740: 2024-03-17 11:05:31.300 INFO (MainThread) [backoff] Backing off async_request(...) for 0.9s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 741: 2024-03-17 11:05:33.181 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 744: 2024-03-17 11:06:54.630 INFO (MainThread) [backoff] Backing off async_request(...) for 0.5s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 756: 2024-03-17 11:06:56.102 INFO (MainThread) [backoff] Backing off async_request(...) for 0.2s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 757: 2024-03-17 11:06:56.689 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionError: Error while communicating with Wall Connector at 192.168.30.61: Cannot connect to host 192.168.30.61:80 ssl:default [Connect call failed ('192.168.30.61', 80)])
Line 762: 2024-03-17 11:08:18.108 INFO (MainThread) [backoff] Backing off async_request(...) for 0.3s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 763: 2024-03-17 11:08:19.381 INFO (MainThread) [backoff] Backing off async_request(...) for 0.2s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 764: 2024-03-17 11:08:20.209 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionError: Error while communicating with Wall Connector at 192.168.30.61: Cannot connect to host 192.168.30.61:80 ssl:default [Connect call failed ('192.168.30.61', 80)])
Line 770: 2024-03-17 11:09:41.593 INFO (MainThread) [backoff] Backing off async_request(...) for 0.3s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 771: 2024-03-17 11:09:42.922 INFO (MainThread) [backoff] Backing off async_request(...) for 0.8s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 772: 2024-03-17 11:09:44.694 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 786: 2024-03-17 11:11:06.176 INFO (MainThread) [backoff] Backing off async_request(...) for 0.2s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 787: 2024-03-17 11:11:07.329 INFO (MainThread) [backoff] Backing off async_request(...) for 0.4s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 788: 2024-03-17 11:11:08.273 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionError: Error while communicating with Wall Connector at 192.168.30.61: Cannot connect to host 192.168.30.61:80 ssl:default [Connect call failed ('192.168.30.61', 80)])
Line 797: 2024-03-17 11:12:29.453 INFO (MainThread) [backoff] Backing off async_request(...) for 0.8s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 798: 2024-03-17 11:12:31.248 INFO (MainThread) [backoff] Backing off async_request(...) for 1.0s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 799: 2024-03-17 11:12:33.290 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 805: 2024-03-17 11:13:54.593 INFO (MainThread) [backoff] Backing off async_request(...) for 0.9s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 806: 2024-03-17 11:13:56.478 INFO (MainThread) [backoff] Backing off async_request(...) for 0.4s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 807: 2024-03-17 11:13:57.900 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 820: 2024-03-17 11:15:19.062 INFO (MainThread) [backoff] Backing off async_request(...) for 0.1s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 821: 2024-03-17 11:15:20.132 INFO (MainThread) [backoff] Backing off async_request(...) for 0.8s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 822: 2024-03-17 11:15:21.137 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionError: Error while communicating with Wall Connector at 192.168.30.61: Cannot connect to host 192.168.30.61:80 ssl:default [Connect call failed ('192.168.30.61', 80)])
Line 827: 2024-03-17 11:16:35.631 DEBUG (MainThread) [teslajsonpy.connection] Connecting with existing access token
Line 828: 2024-03-17 11:16:35.633 DEBUG (MainThread) [teslajsonpy.controller] 552 endpoints loaded
Line 829: 2024-03-17 11:16:35.633 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -2 days, 6:10:53
Line 830: 2024-03-17 11:16:35.633 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
Line 831: 2024-03-17 11:16:35.633 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
Line 832: 2024-03-17 11:16:36.046 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
Line 833: 2024-03-17 11:16:36.046 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '2b0aa6de-0c5d-4340-b754-b37bd911ce77-1710674195942'}
Line 834: 2024-03-17 11:16:37.190 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -2 days, 6:10:51
Line 835: 2024-03-17 11:16:37.190 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
Line 836: 2024-03-17 11:16:37.190 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
Line 837: 2024-03-17 11:16:37.560 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
Line 838: 2024-03-17 11:16:37.560 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '06076e67-64ad-419f-b2a6-c14f86c16ab6-1710674197455'}
Line 839: 2024-03-17 11:16:40.491 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -2 days, 6:10:48
Line 840: 2024-03-17 11:16:40.491 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
Line 841: 2024-03-17 11:16:40.491 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
Line 842: 2024-03-17 11:16:40.743 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
Line 843: 2024-03-17 11:16:40.743 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '953e530c-2227-42db-8064-5d04b1b3a1f5-1710674200639'}
Line 844: 2024-03-17 11:16:42.457 INFO (MainThread) [backoff] Backing off async_request(...) for 0.0s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 845: 2024-03-17 11:16:43.489 INFO (MainThread) [backoff] Backing off async_request(...) for 1.4s (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 846: 2024-03-17 11:16:44.966 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -2 days, 6:10:44
Line 847: 2024-03-17 11:16:44.966 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
Line 848: 2024-03-17 11:16:44.966 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
Line 849: 2024-03-17 11:16:45.207 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
Line 850: 2024-03-17 11:16:45.207 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '17ac8080-bd5e-4a57-8eb1-323c29198076-1710674205101'}
Line 851: 2024-03-17 11:16:45.886 ERROR (MainThread) [backoff] Giving up async_request(...) after 3 tries (tesla_wall_connector.exceptions.WallConnectorConnectionTimeoutError: Timeout while connecting to Wall Connector at 192.168.30.61)
Line 852: 2024-03-17 11:16:50.634 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -2 days, 6:10:38
Line 853: 2024-03-17 11:16:50.634 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
Line 854: 2024-03-17 11:16:50.634 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
Line 855: 2024-03-17 11:16:50.877 DEBUG (MainThread) [teslajsonpy.connection] Unable to refresh sso oauth token
Line 856: 2024-03-17 11:16:50.877 DEBUG (MainThread) [teslajsonpy.connection] Auth returned {'error': 'unauthorized_client', 'error_description': "We don't recognize this client_id and client_secret combination", 'referenceID': '641dc5eb-9513-4810-9fe3-c28e48059d2f-1710674210773'}
Line 857: 2024-03-17 11:16:50.877 WARNING (MainThread) [homeassistant.config_entries] Config entry 'someaddress@email.com' for tesla_custom integration could not authenticate

I should say I've had the problem for a few days but not got around to posting about it. Also worth noting I've tried every update since v3.20.0 where the issues seemed to begin and each update has resulted in the same/similar problem.

Right now I'm unable to rollback to v3.19.11 as it appears to have dropped of the list to allow me to select it and roll back (unless there is another way).

Please let me know if I should post this within a different issue or create a new one. Happy to provide additional logs etc. on request to help resolve the problem.

Many Thanks.

ingo916 commented 6 months ago

I can’t rollback to v3.19.11 which was working for me. And version above this will not work for me.

llamafilm commented 6 months ago

@Lockie85 please open a new issue as it seems to be different. I would not recommend downgrading. Delete the car from HA and add it back again using the latest version, then share the debug logs. If you are not using the proxy, or don’t know what that means, then don’t check the box for it.

Trobabparati commented 6 months ago

Did deleting the car and re-adding it fix this issue? I am afraid up upgrade past 3.19.11

Lockie85 commented 6 months ago

Did deleting the car and re-adding it fix this issue? I am afraid up upgrade past 3.19.11

I deleted the app from HACS, reinstalled it and setup the car again using this app to get my token: https://github.com/sebmatton/TeslaApiTokenGenerator

All looks to be working fine now.