home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.73k stars 30.85k forks source link

Tesla Connection Reset by Peer #30443

Closed dac21 closed 3 years ago

dac21 commented 4 years ago

Home Assistant release with the issue: Home Assistant 0.103.5 Frontend version: 20191204.1 - latest Hass.io

I have one tesla and after one of the recent updates, I cannot connect any longer. I have not changed anything in my tesla setup. I have reset my Tesla password and that works fine on both the ios app and the website.

Logs: 020-01-03 07:38:22 ERROR (MainThread) [homeassistant.setup] Error during setup of component tesla Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/local/lib/python3.7/asyncio/base_events.py", line 954, in create_connection raise exceptions[0] File "/usr/local/lib/python3.7/asyncio/base_events.py", line 941, in create_connection await self.sock_connect(sock, address) File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 464, in sock_connect return await fut File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 494, in _sock_connect_cb raise OSError(err, f'Connect call failed {address}') ConnectionResetError: [Errno 104] Connect call failed ('205.234.31.120', 443)

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 172, in _async_setup_component hass, processed_config File "/usr/src/homeassistant/homeassistant/components/tesla/init.py", line 57, in async_setup await controller.connect(test_login=False) File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 72, in connect cars = await self.get_vehicles() File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 291, in get_vehicles return (await self.connection.get("vehicles"))["response"] File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 87, in get return await self.post(command, "get", None) File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 93, in post auth = await self.open("/oauth/token", "post", data=self.oauth) File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 130, in __open url, headers=headers, data=data File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host owner-api.teslamotors.com:443 ssl:None [Connect call failed ('205.234.31.120', 443)]

probot-home-assistant[bot] commented 4 years ago

Hey there @zabuldon, @alandtse, mind taking a look at this issue as its been labeled with a integration (tesla) you are listed as a codeowner for? Thanks!

alandtse commented 4 years ago

Can you please provide more info about your system? What is the host operating system under hass.io? Are you using any proxies?

The error is indicating the Tesla servers are closing the connection prematurely. Do you have any other persistent connections to Tesla?

dac21 commented 4 years ago

I am running Pi3,

image

I am not running any proxies..

I do have the tesla app on IOS. I ran the following test.

elijah286 commented 4 years ago

I am having the same issue after migrating HA from a rPi to a Ubuntu machine... everything else is working

alandtse commented 4 years ago

@elijah286 Please provide the logs showing the error. Oftentimes Ubuntu based aiohttp errors are tied to not having the right version of certifi or ssl and it's not the same error as reported above.

elijah286 commented 4 years ago

It just says "Unable to communicate with Tesla API: UNAUTHORIZED"

I've confirmed that login is correct and; in fact, it works about 1 out of 3 times after a hassio reboot with no changes to the Tesl config

alandtse commented 4 years ago

@elijah286 Thanks. You have a different issue from this thread. I have a PR #31193 that may address the UNAUTHORIZED issue on reboots. If it doesn't get resolved in the next release, please open up a new thread.

elijah286 commented 4 years ago

Thank you @alandtse. I am eagerly awaiting this update

daconrad0 commented 4 years ago

Any update on this?

elijah286 commented 4 years ago

It was fixed ~2 releases ago

On Sun, Feb 23, 2020 at 8:35 PM daconrad0 notifications@github.com wrote:

Any update on this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant/issues/30443?email_source=notifications&email_token=ABZ5UFUUT2S7OVS3V4IAVL3REMW55A5CNFSM4KCQKWP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWPOHI#issuecomment-590149405, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ5UFXLV6AS3FTWSCKOZGLREMW55ANCNFSM4KCQKWPQ .

alandtse commented 4 years ago

@daconrad0 is referencing the connection reset by peer issue which was different from the unauthorized issue.

The short answer is I haven't been able to reproduce the connection reset by peer issue.

dac21 commented 4 years ago

I am still experiencing this. Here is my log. I was working but stopped after a recent point upgrade

Mon Feb 24 2020 22:15:41 GMT-0500 (EST)

Error setting up entry dennis.alan.conrad@gmail.com for tesla Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa File "/usr/local/lib/python3.7/asyncio/base_events.py", line 985, in create_connection ssl_handshake_timeout=ssl_handshake_timeout) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1013, in _create_connection_transport await waiter File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 870, in write n = self._sock.send(data) ConnectionResetError: [Errno 104] Connection reset by peer

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 215, in async_setup hass, self File "/usr/src/homeassistant/homeassistant/components/tesla/init.py", line 125, in async_setup_entry (refresh_token, access_token) = await controller.connect() File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 80, in connect cars = await self.get_vehicles() File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 300, in get_vehicles return (await self.connection.get("vehicles"))["response"] File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 92, in get return await self.post(command, "get", None) File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 107, in post f"{self.api}{command}", method=method, headers=self.head, data=data File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 138, in open url, headers=headers, data=data File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection raise last_exc File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection req=req, client_error=client_error) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host owner-api.teslamotors.com:443 ssl:None [Connection reset by peer]

Dennis Conrad

On Feb 24, 2020, at 10:04 PM, Elijah Kerry notifications@github.com wrote:

It was fixed ~2 releases ago

On Sun, Feb 23, 2020 at 8:35 PM daconrad0 notifications@github.com wrote:

Any update on this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/home-assistant/home-assistant/issues/30443?email_source=notifications&email_token=ABZ5UFUUT2S7OVS3V4IAVL3REMW55A5CNFSM4KCQKWP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMWPOHI#issuecomment-590149405, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZ5UFXLV6AS3FTWSCKOZGLREMW55ANCNFSM4KCQKWPQ .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

daconrad0 commented 4 years ago

This starting after the 0.106 update

sethtipton commented 4 years ago

Experiencing a similar issue on Home Assistant 0.106.5

`Logger: homeassistant.setup First occured: April 19, 2020, 5:18:51 PM (1 occurences) Last logged: April 19, 2020, 5:18:51 PM

Error during setup of component tesla Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 967, in _create_direct_connection traces=traces), loop=self._loop) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 830, in _resolve_host self._resolver.resolve(host, port, family=self._family) File "/usr/local/lib/python3.7/site-packages/aiohttp/resolver.py", line 30, in resolve host, port, type=socket.SOCK_STREAM, family=family) File "/usr/local/lib/python3.7/asyncio/base_events.py", line 788, in getaddrinfo None, getaddr_func, host, port, family, type, proto, flags) File "/usr/local/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): socket.gaierror: [Errno -3] Try again

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/setup.py", line 170, in _async_setup_component hass, processed_config File "/usr/src/homeassistant/homeassistant/components/tesla/init.py", line 88, in async_setup info = await validate_input(hass, config) File "/usr/src/homeassistant/homeassistant/components/tesla/config_flow.py", line 128, in validate_input test_login=True File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 80, in connect cars = await self.get_vehicles() File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 300, in get_vehicles return (await self.connection.get("vehicles"))["response"] File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 92, in get return await self.post(command, "get", None) File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 101, in post auth = await self.open("/oauth/token", "post", data=self.oauth) File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 138, in __open url, headers=headers, data=data File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request timeout=real_timeout File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect proto = await self._create_connection(req, traces, timeout) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection req, traces, timeout) File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 971, in _create_direct_connection raise ClientConnectorError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host owner-api.teslamotors.com:443 ssl:None [Try again]`

boekabart commented 4 years ago

Still happening randomly (but almost always) on HASSIO restart @ raspberry pi 3. Currently on version 0.109.0

2020-04-30 10:44:15 DEBUG (MainThread) [teslajsonpy.connection] Requesting new oauth token using password
2020-04-30 10:44:15 DEBUG (MainThread) [teslajsonpy.connection] post: https://owner-api.teslamotors.com/oauth/token {'client_id': '---', 'client_secret': '---', 'grant_type': 'password', 'email': 'elonmusk@gmail.com', 'password': 'Occupymars2025!'}

Then 14 sec later:

2020-04-30 10:44:29 ERROR (MainThread) [homeassistant.setup] Error during setup of component tesla
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 989, in create_connection
    ssl_handshake_timeout=ssl_handshake_timeout)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1017, in _create_connection_transport
    await waiter
  File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 870, in write
    n = self._sock.send(data)
ConnectionResetError: [Errno 104] Connection reset by peer

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/tesla/__init__.py", line 93, in async_setup
    info = await validate_input(hass, config)
  File "/usr/src/homeassistant/homeassistant/components/tesla/config_flow.py", line 140, in validate_input
    test_login=True
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 265, in connect
    cars = await self.get_vehicles()
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 349, in get_vehicles
    return (await self.__connection.get("vehicles"))["response"]
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 98, in get
    return await self.post(command, "get", None)
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 107, in post
    auth = await self.__open("/oauth/token", "post", data=self.oauth)
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 151, in __open
    url, headers=headers, data=data
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
    timeout=real_timeout
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
    req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
    req=req, client_error=client_error)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host owner-api.teslamotors.com:443 ssl:None [Connection reset by peer]

Could it be that the PI is just too busy during startup to handle this connection?

Real question is: This is clearly a 'Transient' error, not a config mistake. @zabuldon, @alandtse, shouldn't the component just retry ??

k-korn commented 4 years ago

Could it be that the PI is just too busy during startup to handle this connection?

Happens here on Intel NUC with plenty of CPU power as well, while the car is sleeping.

GET /api/1/vehicles/{id} API endpoint is expected to timeout if vehicle in question is sleeping, so this should not generate visible errors.

alandtse commented 4 years ago

These are not timeout errors. Connection reset by peer is the Tesla server actively ending the connection. There is no retry needed because the next poll will try to connect.

Timeout errors are dealt with without any error messages. The teslajsonpy just returns None if that happens.

mat1990dj commented 4 years ago

It also happens to me if the car is sleeping. Having to remove and add the integration every day

Edit: added logs

2020-05-04 15:03:16 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry XXXX for tesla
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 989, in create_connection
    ssl_handshake_timeout=ssl_handshake_timeout)
  File "/usr/local/lib/python3.7/asyncio/base_events.py", line 1017, in _create_connection_transport
    await waiter
  File "/usr/local/lib/python3.7/asyncio/selector_events.py", line 870, in write
    n = self._sock.send(data)
ConnectionResetError: [Errno 104] Connection reset by peer

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 216, in async_setup
    hass, self
  File "/usr/src/homeassistant/homeassistant/components/tesla/__init__.py", line 141, in async_setup_entry
    CONF_WAKE_ON_START, DEFAULT_WAKE_ON_START
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 265, in connect
    cars = await self.get_vehicles()
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/controller.py", line 349, in get_vehicles
    return (await self.__connection.get("vehicles"))["response"]
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 98, in get
    return await self.post(command, "get", None)
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 115, in post
    f"{self.api}{command}", method=method, headers=self.head, data=data
  File "/usr/local/lib/python3.7/site-packages/teslajsonpy/connection.py", line 151, in __open
    url, headers=headers, data=data
  File "/usr/local/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
    timeout=real_timeout
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
    req, traces, timeout)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
    raise last_exc
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
    req=req, client_error=client_error)
  File "/usr/local/lib/python3.7/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host owner-api.teslamotors.com:443 ssl:None [Connection reset by peer]
2020-05-04 15:03:18 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 124, in async_init
    flow, flow.init_step, data, init_done
  File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 196, in _async_handle_step
    result: Dict = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/heos/config_flow.py", line 30, in async_step_ssdp
    friendly_name = f"{discovery_info[ssdp.ATTR_UPNP_FRIENDLY_NAME]} ({hostname})"
KeyError: 'friendlyName'
alandtse commented 4 years ago

@mat1990dj You shouldn't need to readd the component everyday as it should still retry unless it never works. When my vehicles are asleep, they return a VEHICLE_UNAVAILABLE error. If you're saying that you consistently see the connection reset by peer when your vehicles are asleep and otherwise it works, then I can modify the code so it suppresses that error message and treats it the same.

My concern is that this was originally reported as never connecting for users which would mean hiding it would mean it would fail silently.

mat1990dj commented 4 years ago

In my case for some reason, even if I start homeassistant with the car woken up it would fail with the error copied above. I just tried now. And it seems that it's not retrying as there are no further logs.

boekabart commented 4 years ago

There is no retry needed because the next poll will try to connect.

That's the whole problem - there is no next poll, it seems. All entities have the 'unavailable' state until I actually restart Hass Core (AND then only if the initial connect works then).

alandtse commented 4 years ago

For those experiencing this issue, you may want to try the linked PR. It allows you to disable SSL checking by setting verify_ssl to False. I have no idea if it will change anything for you as I have no idea about the root cause of why Tesla is rejecting your connection. I added this option as a hail mary.

mat1990dj commented 4 years ago

In my case I recently configured my HA exposing 443 with a valid SSL certificate and now the plugin doesn't disconnect anymore

Obtener Outlook para Androidhttps://aka.ms/ghei36


From: Alan Tse notifications@github.com Sent: Sunday, May 31, 2020 4:26:39 AM To: home-assistant/core core@noreply.github.com Cc: mat1990dj mathew.ls@outlook.com; Mention mention@noreply.github.com Subject: Re: [home-assistant/core] Tesla Connection Reset by Peer (#30443)

For those experiencing this issue, you may want to try the linked PR. It allows you to disable SSL checking. I have no idea if it will change anything for you as I have no idea about the root cause of why Tesla is rejecting your connection. I added this option as a hail mary.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/30443#issuecomment-636411029, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABH2NWYTWYLGG3EZMQ2EI63RUG557ANCNFSM4KCQKWPQ.

alandtse commented 4 years ago

For those still having this problem, you should provide your openssl version openssl version.

Please also note there's another PR to potentially try if you only get the connection reset on some HA restarts. If you never can connect, that's another issue.

mat1990dj commented 4 years ago

My bad, it's not working again, how do I check the openssl version?

alandtse commented 4 years ago

Login to the system and type openssl version.

mat1990dj commented 4 years ago

I have a HomeAssistant running on docker and actually don't know how to get the OpenSSL version.

Obtener Outlook para Androidhttps://aka.ms/ghei36


From: Alan Tse notifications@github.com Sent: Sunday, June 7, 2020 10:09:04 AM To: home-assistant/core core@noreply.github.com Cc: mat1990dj mathew.ls@outlook.com; Mention mention@noreply.github.com Subject: Re: [home-assistant/core] Tesla Connection Reset by Peer (#30443)

Login to the system and type openssl version.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/home-assistant/core/issues/30443#issuecomment-640175225, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABH2NW7ZXH5SAZFBLOJ3K5DRVNDKBANCNFSM4KCQKWPQ.

alandtse commented 4 years ago

If it's hassio:

docker exec -it homeassistant bash
# you should be inside your container
openssl version
exit
mat1990dj commented 4 years ago

Sorry for the delay Version is OpenSSL 1.1.1g 21 Apr 2020

pvmil commented 4 years ago

I possibly have the same issue in the most recent, 0.115.4:

Logger: homeassistant.components.tesla
Source: components/tesla/__init__.py:151
Integration: Tesla (documentation, issues)
First occurred: 16:53:11 (1 occurrences)
Last logged: 16:53:11

Unable to communicate with Tesla API: UNAUTHORIZED

Upon inital install the plugin worked fine, after multiple restarts of HA it does not anymore (do not know exactly when this broke).

OpenSSL version is idential to mat1990dj version: OpenSSL 1.1.1g 21 Apr 2020 (which is part of the standard home assistant install.

Any updates on this issue? More information required? Is this the same issue or should I create a new one?

alandtse commented 4 years ago

@pvmil You have a different issue. Unauthorized means Tesla is rejecting your credentials for some reason which is unrelated to what was reported here.

pvmil commented 4 years ago

@pvmil You have a different issue. Unauthorized means Tesla is rejecting your credentials for some reason which is unrelated to what was reported here.

Thanks for feedback, removing integration and re-adding solved my issue (when this happens again I'll submit a new bug on this)

github-actions[bot] commented 3 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

skrenes commented 3 years ago

Not sure if there's an issue on Tesla's end (the app is working fine), but I'm getting a similar error on latest version of HA:

2021-02-01 14:54:09 ERROR (MainThread) [homeassistant.components.tesla.config_flow] Unable to communicate with Tesla API:
2021-02-01 14:54:09 ERROR (MainThread) [homeassistant.setup] Setup failed for tesla: Integration failed to initialize.
k-korn commented 3 years ago

Not sure if there's an issue on Tesla's end (the app is working fine), but I'm getting a similar error on latest version of HA:

2021-02-01 14:54:09 ERROR (MainThread) [homeassistant.components.tesla.config_flow] Unable to communicate with Tesla API:
2021-02-01 14:54:09 ERROR (MainThread) [homeassistant.setup] Setup failed for tesla: Integration failed to initialize.

That's another issue - Tesla changed their auth api. See https://github.com/home-assistant/core/issues/44777