ollo69 / ha-smartthinq-sensors

HomeAssistant custom integration for SmartThinQ LG devices configurable with Lovelace User Interface.
Apache License 2.0
1.03k stars 149 forks source link

Issue with credentials #723

Open antoniovittozzi opened 3 months ago

antoniovittozzi commented 3 months ago

Describe the bug I can't get integration works. Credentials are OK, LG Account is OK.

Environment details:

Output of HA logs 2024-03-21 19:05:12.905 ERROR (MainThread) [custom_components.smartthinq_sensors] Error retrieving OAuth info from ThinQ Traceback (most recent call last): File "/config/custom_components/smartthinq_sensors/init.py", line 135, in get_oauth_info_from_login return await ClientAsync.oauth_info_from_user_login( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1623, in oauth_info_from_user_login result = await Auth.oauth_info_from_user_login(username, password, gateway) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 910, in oauth_info_from_user_login token_info = await gateway.core.auth_user_login( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 540, in auth_user_login raise exc.AuthenticationError(msg) custom_components.smartthinq_sensors.wideq.core_exceptions.AuthenticationError: code: MS.001.02 - message: Wrong Password:1 2024-03-21 19:06:16.309 WARNING (MainThread) [custom_components.smartthinq_sensors] Connection not available. ThinQ platform not ready Traceback (most recent call last): File "/config/custom_components/smartthinq_sensors/init.py", line 252, in async_setup_entry client = await lge_auth.create_client_from_token(refresh_token, oauth2_url) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/init.py", line 151, in create_client_from_token return await ClientAsync.from_token( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1570, in from_token await client.refresh() File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1488, in refresh self._auth = await self.auth.refresh(True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 983, in refresh access_token, token_validity = await self._gateway.core.refresh_auth( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 701, in refresh_auth out = await self._auth_request( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 647, in _auth_request oauth_url = await self.get_oauth_url() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 430, in get_oauth_url async with self._get_session().post( File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 1194, in aenter self._resp = await self._coro ^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 504, in _request with timer: File "/usr/local/lib/python3.12/site-packages/aiohttp/helpers.py", line 735, in exit raise asyncio.TimeoutError from None TimeoutError

Additional context Add any other context about the problem here.

kalmma commented 3 months ago

I have the same problem

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

juanchorossi commented 3 weeks ago

@antoniovittozzi

After reading several related issues, I came across this one: https://github.com/ollo69/ha-smartthinq-sensors/issues/651, which mentions Pi-Hole blocking the traffic. This wasn't the case for me, but I noticed that the URL wasn't reachable even when using curl:

https://ruic-service.lgthinq.com:46030/v1/service/application/dashboard

I then discovered that, for some reason, my router (UDM Pro) was blocking outgoing traffic to that URL.

I modified the router settings, and it worked. Hope this helps!