h4de5 / home-assistant-toshiba_ac

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

Integration stopped working and reinstall gives "Unknown error occurred" #206

Open ozmafin opened 2 months ago

ozmafin commented 2 months ago

Hi everyone, before anything I would like to thank all the contributors for this HA integration! Thank you so much <3

Home Assistant Core 2024.9.3 Frontend 20240909.1 HACS version 2.0.1 HACS Toshiba AC plugin version 2024.9.0

AC model: RAS-B13N4KVRG-E AC Adapter version 2.4.00

The integration stopped working. Tried to reconfigure Toshiba AC HACS plugin and got "Unexpected error". Username is LLNNNNN password is LlllllllllNNN (L = Uppercase letter, l = lowercase letter, N = number). Changed password for user, didn't help. Tried to log in with different user (have 3 of them) - didn't help. Tried #151 and it's good. I can log in to the service from iOS app with all 3 users.

I also tried to compare if this is something to do with #72 but I couldn't figure out if I needed to do something or if this is the same.

Logs:

2024-10-01 10:15:13.906 ERROR (MainThread) [custom_components.toshiba_ac.config_flow] Toshiba connection OK
2024-10-01 10:15:13.906 ERROR (MainThread) [custom_components.toshiba_ac.config_flow] Unexpected exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 520, in wait_for
    return await fut
           ^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/toshiba_ac/utils/__init__.py", line 90, in wrapper
    return await func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/toshiba_ac/utils/http_api.py", line 100, in request_api
    async with method(url, **method_args) as response:
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1353, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 657, in _request
    conn = await self._connector.connect(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 564, in connect
    proto = await self._create_connection(req, traces, timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 975, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 1301, in _create_direct_connection
    hosts = await self._resolve_host(host, port, traces=traces)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/connector.py", line 911, in _resolve_host
    return await asyncio.shield(resolved_host_task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError

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

Traceback (most recent call last):
  File "/config/custom_components/toshiba_ac/config_flow.py", line 82, in async_step_user
    data = await validate_input(self.hass, user_input)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/toshiba_ac/config_flow.py", line 43, in validate_input
    sas_token = await device_manager.connect()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/toshiba_ac/device_manager.py", line 63, in connect
    await self.http_api.connect()
  File "/usr/local/lib/python3.12/site-packages/toshiba_ac/utils/http_api.py", line 120, in connect
    res = await self.request_api(self.LOGIN_PATH, post=post, headers=headers)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/toshiba_ac/utils/__init__.py", line 63, in wrapper
    return await asyncio.wait_for(func(*args, **kwargs), timeout=timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/asyncio/tasks.py", line 519, in wait_for
    async with timeouts.timeout(timeout):
  File "/usr/local/lib/python3.12/asyncio/timeouts.py", line 115, in __aexit__
    raise TimeoutError from exc_val
TimeoutError
Sabreu commented 1 month ago

I have same issue since updating to HA 2024.10. Nothing seems to help.

Toshiba app working fine.

timongrob commented 1 month ago

Same here. Integration stopped working, toshiba app working fine

timongrob commented 1 month ago

I went back to version 2024.6.1 and all is working fine again in Home Assistant