-
Notifications
You must be signed in to change notification settings - Fork 102
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
UnknownError using tesla_custom.api #145
Comments
You don't have a network connection to Tesla. Fix that then remove and readd. |
No way, I use Ping connection https://auth.tesla.cn The connection was successful. The same token can also log in to teslamate |
I'm not here to argue with you. I'm pointing out what the logs say. You're welcome to self debug it if you know better. |
Dupe of #72. We provide no support for use of tesla_custom.api as it's a dev feature. |
For use in China, please turn off any network proxy, because Tesla certification seems to detect the country where the IP is located, and Chinese users can only log in with a Chinese IP address for certification |
There is no network proxy. |
Can't seem to get any tesla_custom.api service calls to work.
Both the above examples return an UnknownError immediately. I imagine i'm doing something wrong, but not sure what. I grabbed the vehicle_id from teslafi - it should always be the same, right?
Version of the custom_component
Configuration
Describe the bug
A clear and concise description of what the bug is.
Debug log
2022-02-10 16:53:42 DEBUG (MainThread) [teslajsonpy.controller] 320 endpoints loaded
2022-02-10 16:53:42 DEBUG (MainThread) [teslajsonpy.connection] Token expiration in -19034 days, 7:06:18
2022-02-10 16:53:42 DEBUG (MainThread) [teslajsonpy.connection] Oauth expiration detected
2022-02-10 16:53:42 DEBUG (MainThread) [teslajsonpy.connection] Refreshing access token with refresh_token
2022-02-10 16:53:42 DEBUG (MainThread) [teslajsonpy.connection] Saved new auth info {'access_token': '8Awy40BhR4loGGH4Z6FmAHy7D9DBmKo3vzynnWkh0QozHy09D6x5JafbsE5ca9vMHFgdB3K8FDsTxW_yAdq3F12czP8yi83yECS1V-ec-kt-n8Z1o7i9', 'refresh_token': '', 'expires_in': 1644533822}
2022-02-10 16:53:42 DEBUG (MainThread) [teslajsonpy.connection] Exchanging bearer token with access token:
2022-02-10 16:54:13 INFO (MainThread) [teslajsonpy.controller] Backing off get_vehicles(...) for 0.6s (httpx.ConnectError: All connection attempts failed)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 203, in async_init
flow, result = await task
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 221, in _async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 740, in async_create_flow
raise data_entry_flow.UnknownHandler
homeassistant.data_entry_flow.UnknownHandler
2022-02-10 16:54:46 ERROR (MainThread) [teslajsonpy.controller] Giving up get_vehicles(...) after 2 tries (httpx.ConnectError: All connection attempts failed)
2022-02-10 16:54:46 ERROR (MainThread) [aiohttp.server] Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 127, in try_connect
stream = await asynclib.connect_tcp(remote_host, remote_port, local_address)
File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 1518, in connect_tcp
await get_running_loop().create_connection(StreamProtocol, host, port,
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
return await fut
File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 537, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('52.81.252.153', 443)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 8, in map_exceptions
yield
File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 101, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
File "/usr/local/lib/python3.9/site-packages/anyio/_core/_sockets.py", line 184, in connect_tcp
raise OSError('All connection attempts failed') from cause
OSError: All connection attempts failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
yield
File "/usr/local/lib/python3.9/site-packages/httpx/_transports/default.py", line 308, in handle_async_request
resp = await self._pool.handle_async_request(req)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 244, in handle_async_request
raise exc
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection_pool.py", line 228, in handle_async_request
response = await connection.handle_async_request(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 86, in handle_async_request
raise exc
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 63, in handle_async_request
stream = await self._connect(request)
File "/usr/local/lib/python3.9/site-packages/httpcore/_async/connection.py", line 111, in _connect
stream = await self._network_backend.connect_tcp(**kwargs)
File "/usr/local/lib/python3.9/site-packages/httpcore/backends/auto.py", line 23, in connect_tcp
return await self._backend.connect_tcp(
File "/usr/local/lib/python3.9/site-packages/httpcore/backends/asyncio.py", line 101, in connect_tcp
stream: anyio.abc.ByteStream = await anyio.connect_tcp(
File "/usr/local/lib/python3.9/contextlib.py", line 137, in exit
self.gen.throw(typ, value, traceback)
File "/usr/local/lib/python3.9/site-packages/httpcore/_exceptions.py", line 12, in map_exceptions
raise to_exc(exc)
httpcore.ConnectError: All connection attempts failed
The above exception was the direct cause of the following exception
The text was updated successfully, but these errors were encountered: