ollo69 / ha-smartthinq-sensors

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

ThinQ Platform not ready #630

Closed JBakers closed 1 year ago

JBakers commented 1 year ago

Describe the bug LG ThinQ Devices integration not working anymore

Expected behavior Working entities

Screenshots

Environment details:

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

Connection not available. ThinQ platform not ready
Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 558, in _request
    resp = await req.send(conn)
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 670, in send
    await writer.write_headers(status_line, self.headers)
  File "/usr/local/lib/python3.11/site-packages/aiohttp/http_writer.py", line 130, in write_headers
    self._write(buf)
  File "/usr/local/lib/python3.11/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 251, 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 150, in create_client_from_token
    return await ClientAsync.from_token(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1446, in from_token
    await client.refresh()
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 1364, in refresh
    self._auth = await self.auth.refresh(True)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 941, in refresh
    access_token, token_validity = await self._gateway.core.refresh_auth(
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 659, in refresh_auth
    out = await self._auth_request(
          ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 605, in _auth_request
    oauth_url = await self.get_oauth_url()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/smartthinq_sensors/wideq/core_async.py", line 390, in get_oauth_url
    async with self._get_session().post(
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1141, in __aenter__
    self._resp = await self._coro
                 ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 572, in _request
    raise ClientOSError(*exc.args) from exc
aiohttp.client_exceptions.ClientOSError: Cannot write to closing transport

Additional context Add any other context about the problem here.

JBakers commented 1 year ago

LG APP + AC is working normally.

santo76 commented 1 year ago

The same error for me, just start this error about one hour ago

anclement commented 1 year ago

Same error for me. App is still working. Is LQ blocking HA?

Dylanwoldhuis commented 1 year ago

Same problem here.

blooest commented 1 year ago

Odds are this is most likely going to affect all users of this integration when their auth needs to be reloaded; I'd say LG almost definitely changed something, but whether it's intentionally blocking us or not is beyond my ken.

samwiseg0 commented 1 year ago

Same problem here. Full logs. home-assistant_smartthinq_sensors_2023-10-31T18-27-58.394Z.log

Dylanwoldhuis commented 1 year ago

Same problem here.

Mine is working again

samwiseg0 commented 1 year ago

Same problem here.

Mine is working again

Same here. I guess this was a temporary outage.

JBakers commented 1 year ago

Same here, working again.

santo76 commented 1 year ago

yes, working againg.