h4de5 / home-assistant-toshiba_ac

Toshiba AC integration into home-assistant.io
GNU General Public License v3.0
113 stars 17 forks source link

unexpected error #142

Closed chaniap closed 2 weeks ago

chaniap commented 10 months ago

How to solve the problem that when I try to enter the password from the toshiba app into the integration it still says this and it's not working. But I can log into the original toshiba app just fine

chaniap commented 10 months ago

image

h4de5 commented 10 months ago

can you have a look at the home-assistant logs? and please confirm you are on the right toshiba app (not Toshiba NA)

chaniap commented 10 months ago

Hi. I have an official toshiba home app

Logger: custom_components.toshiba_ac.config_flow Source: custom_components/toshiba_ac/config_flow.py:41 Integration: toshiba_ac (documentation, issues) First occurred: 09:13:50 (1 occurrences) Last logged: 09:13:50

Unexpected exception Traceback (most recent call last): File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa File "/usr/lib/python3.10/asyncio/base_events.py", line 1089, in create_connection File "/usr/lib/python3.10/asyncio/base_events.py", line 1119, in _create_connection_transport File "/usr/lib/python3.10/asyncio/sslproto.py", line 534, in data_received File "/usr/lib/python3.10/asyncio/sslproto.py", line 188, in feed_ssldata File "/usr/lib/python3.10/ssl.py", line 975, in do_handshake ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)

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

Traceback (most recent call last): File "/home/homeassistant/.homeassistant/custom_components/toshiba_ac/config_flow.py", line 77, in async_step_user data = await validate_input(self.hass, user_input) File "/home/homeassistant/.homeassistant/custom_components/toshiba_ac/config_flow.py", line 41, in validate_input sas_token = await device_manager.connect() File "/home/homeassistant/lib/python3.10/site-packages/toshiba_ac/device_manager.py", line 58, in connect await self.http_api.connect() File "/home/homeassistant/lib/python3.10/site-packages/toshiba_ac/utils/http_api.py", line 116, in connect res = await self.request_api(self.LOGIN_PATH, post=post, headers=headers) File "/home/homeassistant/lib/python3.10/site-packages/toshiba_ac/utils/http_api.py", line 97, in request_api async with method(url, **method_args) as response: File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in aenter self._resp = await self._coro File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request conn = await self._connector.connect( File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect proto = await self._create_connection(req, traces, timeout) File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/connector.py", line 901, in _createconnection , proto = await self._create_direct_connection(req, traces, timeout) File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection raise last_exc File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection transp, proto = await self._wrap_create_connection( File "/home/homeassistant/lib/python3.10/site-packages/aiohttp/connector.py", line 982, in _wrap_create_connection raise ClientConnectorCertificateError(req.connection_key, exc) from exc aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host mobileapi.toshibahomeaccontrols.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:997)')]

h4de5 commented 10 months ago

I cannot reproduce this behaviour. the url in question is provides by azure and has a valid certificate on my side. is it possible that you have any self signed or unverified certificates within your home-assistant or network setup?

chaniap commented 10 months ago

i dont know :-( but from web i can connect it image

elsonico commented 3 months ago

I have this very same issue now. Seems the mobileapi.toshibahomeaccontrols.com has expired again Mar 16 2024:

"Cannot connect to host mobileapi.toshibahomeaccontrols.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1007)')]"

image

h4de5 commented 3 months ago

it seems they noticed Screenshot_20240318-030442

h4de5 commented 2 weeks ago

closed as toshiba has updated their certificate and this issue should be fixed.