ha-smartthinq-sensors icon indicating copy to clipboard operation
ha-smartthinq-sensors copied to clipboard

Connection not available. ThinQ platform not ready

Open kalmma opened this issue 1 year ago • 21 comments
trafficstars

Describe the bug Connection not available. ThinQ platform not ready

I have been experiencing a problem with the integration for a few weeks now.

Screenshots

Scherm­afbeelding 2024-04-17 om 12 29 30

Environment details:

  • Environment (HASSIO, Raspbian, etc): Hassio
  • Home Assistant version installed: 2024.4.3
  • Component version installed:
  • Last know working version: unknown

Output of HA logs Paste the relavant output of the HA log here.

This error originated from a custom integration.

Logger: custom_components.smartthinq_sensors Source: custom_components/smartthinq_sensors/init.py:252 integration: SmartThinQ LGE Sensors (documentation, issues) First occurred: 12:03:47 PM (1 occurrences) Last logged: 12:03:47 PM

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

Connection not available. ThinQ platform not ready

kalmma avatar Apr 17 '24 10:04 kalmma

Same exact issue here. I think it stopped working after the HA core 2024.4.3 update. I also have an update in HACS available from v0.38.7 to v0.39.0 but it is not updating.

pjoter1337666 avatar Apr 22 '24 10:04 pjoter1337666

I have the same error, mine has occured because I had to 1) log into the app to accept updated terms and condtition, and 2) i had misplaced my username/password so I had to reset password for my LG account. Now I am trying to work out how to 'refresh' my username/password for LG app in HA and I am not having any luck.

Is it possibly you guys recently changed username/password or logged into your mobile ThinQ app?

someevil avatar Apr 22 '24 12:04 someevil

I had the same issue about accepting terms and conditions a few days (weeks?) ago but now it's broken again with a similar log

2024-04-22 14:11:37.235 WARNING (MainThread) [custom_components.smartthinq_sensors] Connection not available. ThinQ platform not ready Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 603, in _request resp = await req.send(conn) ^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 723, in send await writer.write_headers(status_line, self.headers) File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 130, in write_headers self._write(buf) File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 75, in _write raise ConnectionResetError("Cannot write to closing transport") ConnectionResetError: Cannot write to closing transport

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

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 617, in _request raise ClientOSError(*exc.args) from exc aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport

fgimenezm avatar Apr 22 '24 17:04 fgimenezm

same here also ...

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(

joelquadros avatar Apr 22 '24 17:04 joelquadros

hmmm... this is odd... I enabled debug logging on the integration and I can see the devices being returned from the LG API calls. Maybe LG changed something today?

fgimenezm avatar Apr 22 '24 17:04 fgimenezm

I too am having issues with this integration as of today. I have a ThinQ refrigerator.

shwarnock avatar Apr 22 '24 17:04 shwarnock

I am also running into this issue. Curious what the resolution will be.

DIntriglia avatar Apr 22 '24 17:04 DIntriglia

Same problem. The LG android app got an update, HA lost all connection.

RedWheiler80 avatar Apr 22 '24 17:04 RedWheiler80

Same issue since 2 hours. Had also an update on android. Both apps on Android and iOS work fine. integration now broken work the same token log error. All terms and conditions are accepted AFAIK

erkr avatar Apr 22 '24 18:04 erkr

EDIT: Working again now for me, same as posts below. Didn't have to do anything, just started working.

Got this issue just now after restarting. Integration was working fine approx ~2 hours ago, reporting cooktop state etc. Then restarted Home Assistant and it's not connecting and all devices unavailable.

A few days ago there was terms of service update in ThinQ app (US) on iOS but don't see anything there now. App appears to work fine but not the integration.

This error originated from a custom integration.

Logger: custom_components.smartthinq_sensors
Source: custom_components/smartthinq_sensors/__init__.py:252
integration: SmartThinQ LGE Sensors (documentation, issues)
First occurred: 2:05:33 PM (1 occurrences)
Last logged: 2:05:33 PM

Connection not available. ThinQ platform not ready
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 603, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 723, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 130, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 75, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

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

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 617, in _request
    raise ClientOSError(*exc.args) from exc
aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport

SeanPM5 avatar Apr 22 '24 18:04 SeanPM5

Edited: Seems to work again.

Same issue for me, not sure what breaks it in HA. I just noticed this today, my LG app still showing functional appliances.

Error logs:

Logger: custom_components.smartthinq_sensors
Source: custom_components/smartthinq_sensors/__init__.py:252
integration: SmartThinQ LGE Sensors ([documentation](https://github.com/ollo69/ha-smartthinq-sensors), [issues](https://github.com/ollo69/ha-smartthinq-sensors/issues))
First occurred: 11:38:58 AM (1 occurrences)
Last logged: 11:38:58 AM

Connection not available. ThinQ platform not ready
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client.py", line 603, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 723, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 130, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.12/site-packages/aiohttp/http_writer.py", line 75, in _write
    raise ConnectionResetError("Cannot write to closing transport")
ConnectionResetError: Cannot write to closing transport

lylydang avatar Apr 22 '24 18:04 lylydang

I was having the same problem, but it just started working again at this very moment.

If it's not working for you guys, try re-adding the integration with your login credentials.

diegocjorge avatar Apr 22 '24 18:04 diegocjorge

Yes it works for me as well (not restarted) since 8 minutes!

erkr avatar Apr 22 '24 18:04 erkr

Yup, fixed for me too.

fgimenezm avatar Apr 22 '24 18:04 fgimenezm

Works again for me.

RedWheiler80 avatar Apr 22 '24 18:04 RedWheiler80

Yup confirmed it works again

shwarnock avatar Apr 22 '24 19:04 shwarnock

For me it's not working.

This error originated from a custom integration.

Logger: custom_components.smartthinq_sensors Source: custom_components/smartthinq_sensors/init.py:252 integration: SmartThinQ LGE Sensors (documentation, issues) First occurred: 9:44:44 PM (1 occurrences) Last logged: 9:44:44 PM

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

kalmma avatar Apr 22 '24 19:04 kalmma

It's back in business here

joelquadros avatar Apr 22 '24 20:04 joelquadros

@kalmma Error looks the same. Maybe some terms & conditions open to agree with?

erkr avatar Apr 22 '24 20:04 erkr

For me it's not working. Logged out of the iPhone app and back in with no issues. Deleted and tried to re-add the integration and it fails:

Logger: custom_components.smartthinq_sensors Source: custom_components/smartthinq_sensors/init.py:252 integration: SmartThinQ LGE Sensors (documentation, issues) First occurred: 12:11:25 AM (1 occurrences) Last logged: 12:11:25 AM

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

jkosharek avatar Apr 23 '24 04:04 jkosharek

I was forced to accept new terms in the mobile app a week or two ago, which included requiring an SMS sent code, which is new (and somewhat had me wondering if it would cause trouble for this integration). The app wouldn't take the old password so I had to change it, twice, as the first password change wouldn't allow me to login. I finally checked it on this intergration today and was greeted with this issue's error. I deleted the integration and re-added it with the new credentials. It detected all 7 devices and knew what rooms they belonged in. All seems well.

LongDono avatar Apr 27 '24 00:04 LongDono

Close this because seems issue is fixed. Open a new one in case of specific problem

ollo69 avatar May 04 '24 09:05 ollo69