Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LG webOS TV not (always) detected after being powered off unless HA is restarted/log spamming #43492

Closed
majorsl opened this issue Nov 21, 2020 · 41 comments · Fixed by #65267
Closed

Comments

@majorsl
Copy link

majorsl commented Nov 21, 2020

The problem

When the LG TV is OFF or ON, webostv media player can't be used until HA restart. Often when HA loses detection of the webos TV (when previously working), the connection is not restored/checked again until HA is rebooted.

Environment

  • Home Assistant Core release with the issue: 0.118.1
  • Last working Home Assistant Core release (if known): NA
  • Operating environment (OS/Container/Supervised/Core): Home Assistant Container
  • Integration causing this issue: LG webOS Smart TV
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/webostv/

Problem-relevant configuration.yaml

webostv:
    host: 10.0.1.213
    name: Living Room TV
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: "_removed_"

Traceback/Error logs

Updating webostv media_player took longer than the scheduled update interval 0:00:10
12:26:25 PM – Media player (WARNING) - message first occurred at November 20, 2020, 10:02:17 PM and shows up 5179 times

Additional information

Example: webOS TV has been working fine days, suddenly, this morning when the TV was powered on, HA thinks it is still off. If I reboot HA it'll detect the TV just fine.

Also, as other have reported for years now (see community forums), when the TV is powered "off" which is really "standby", the logs will get spammed every 10sec. In my example above, we hit "power" on the remote at 10:02:17pm and went to bed, and the log was spammed since and this was also the morning we turned the TV "on" and HA didn't detect that it was in an on state. HOWEVER, as soon as I rebooted HA the TV was detected just fine leading me to believe it is an issue with HA and not the webOS TV software.

Possibly related to: #6542 & #43349

@Tomibeck
Copy link

I just bought a new LG Web OS TV and I'm seeing a similar behavior. Difference being that i cant fix the Media player component by a restart. I have to remove and add the Integration again.

@rapi3
Copy link

rapi3 commented Feb 12, 2021

Problem it is not fixed in latest:
Version core-2021.2.3
Version supervisor-2021.02.6
Operating System Home Assistant OS 5.11

...2021-02-12 08:57:33 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 08:57:40 ERROR (MainThread) [homeassistant.util.logging] Exception in async_signal_handler when dispatching 'webostv': ({'entity_id': ['media_player.living_room_tv'], 'button': 'EXIT', 'method': 'async_button'},)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 155, in async_signal_handler
await getattr(self, data["method"])(**params)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 92, in wrapper
await func(obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 456, in async_button
await self._client.button(button)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 676, in button
await self.input_command(message)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 668, in input_command
await self.input_connection.send(message)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
2021-02-12 08:57:43 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 08:57:44 ERROR (MainThread) [homeassistant.util.logging] Exception in async_signal_handler when dispatching 'webostv': ({'entity_id': ['media_player.living_room_tv'], 'button': 'EXIT', 'method': 'async_button'},)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 155, in async_signal_handler
await getattr(self, data["method"])(**params)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 92, in wrapper
await func(obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 456, in async_button
await self._client.button(button)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 676, in button
await self.input_command(message)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 668, in input_command
await self.input_connection.send(message)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
2021-02-12 08:57:53 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 08:57:57 ERROR (MainThread) [homeassistant.util.logging] Exception in async_signal_handler when dispatching 'webostv': ({'entity_id': ['media_player.living_room_tv'], 'button': 'DOWN', 'method': 'async_button'},)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 155, in async_signal_handler
await getattr(self, data["method"])(**params)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 92, in wrapper
await func(obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 456, in async_button
await self._client.button(button)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 676, in button
await self.input_command(message)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 668, in input_command
await self.input_connection.send(message)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
2021-02-12 08:58:03 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 08:58:13 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 08:58:14 ERROR (MainThread) [homeassistant.util.logging] Exception in async_signal_handler when dispatching 'webostv': ({'entity_id': ['media_player.living_room_tv'], 'button': 'ENTER', 'method': 'async_button'},)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 155, in async_signal_handler
await getattr(self, data["method"])(**params)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 92, in wrapper
await func(obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 456, in async_button
await self._client.button(button)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 676, in button
await self.input_command(message)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 668, in input_command
await self.input_connection.send(message)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
2021-02-12 09:06:43 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 09:06:53 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 09:07:03 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140617971858544] code = 1006 (connection closed abnormally [internal]), no reason
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 827, in transfer_data
message = await self.read_message()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 136, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1455, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1490, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 595, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 632, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 92, in wrapper
await func(obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 340, in async_volume_up
await self._client.volume_up()
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 868, in volume_up
return await self.request(ep.VOLUME_UP)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 626, in request
await self.command(cmd_type, uri, payload, uid)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 616, in command
await self.connection.send(json.dumps(message))
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
2021-02-12 09:07:03 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 09:07:07 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140617971858544] code = 1006 (connection closed abnormally [internal]), no reason
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 827, in transfer_data
message = await self.read_message()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 136, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1455, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1490, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 595, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 632, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 92, in wrapper
await func(obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 340, in async_volume_up
await self._client.volume_up()
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 868, in volume_up
return await self.request(ep.VOLUME_UP)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 626, in request
await self.command(cmd_type, uri, payload, uid)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 616, in command
await self.connection.send(json.dumps(message))
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
2021-02-12 09:07:12 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140617971858544] code = 1006 (connection closed abnormally [internal]), no reason
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 827, in transfer_data
message = await self.read_message()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
frame = await self.read_data_frame(max_size=self.max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
frame = await self.read_frame(max_size)
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
frame = await Frame.read(
File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
data = await reader(2)
File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
await self._wait_for_data('readexactly')
File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
await self._waiter
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 136, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1455, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1490, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 595, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 632, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 92, in wrapper
await func(obj, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 345, in async_volume_down
await self._client.volume_down()
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 872, in volume_down
return await self.request(ep.VOLUME_DOWN)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 626, in request
await self.command(cmd_type, uri, payload, uid)
File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 616, in command
await self.connection.send(json.dumps(message))
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
await self.ensure_open()
File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
2021-02-12 09:07:13 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 09:07:23 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-02-12 09:07:33 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10

@Nephiel
Copy link

Nephiel commented Mar 8, 2021

Still experiencing this issue in core-2021.3.2.

@m4dm4xi
Copy link

m4dm4xi commented Mar 18, 2021

I have the same problem in core-2021.3.4:

Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:605
Integration: Mediaplayer (documentation, issues)
First occurred: 15. März 2021, 4:13:16 (18035 occurrences)
Last logged: 22:00:59

Updating webostv media_player took longer than the scheduled update interval 0:00:10

@kongo09
Copy link

kongo09 commented Apr 4, 2021

I have the same problem in core-2021.3.4:

2021-04-04 22:01:52 WARNING (MainThread) [homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10
2021-04-04 22:01:52 WARNING (MainThread) [homeassistant.helpers.entity] Update of media_player.lg_fernseher is taking over 10 seconds

@probot-home-assistant
Copy link

Hey there @bendavid, mind taking a look at this issue as its been labeled with an integration (webostv) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

@bendavid
Copy link
Contributor

bendavid commented Apr 5, 2021

There are several important bug fixes in the client library which are present in core-2021.4 and MIGHT improve the situation, though it's not entirely clear to me what the issue is.

From the backtraces from @rapi3 it looks like some combination of connection issues between HA and the TV, and a backlog of commands sent while the connection was broken. Is the network connection between HA and the TV reliable in this case?

@kongo09
Copy link

kongo09 commented Apr 5, 2021

Is the network connection between HA and the TV reliable in this case?

In my case it is all wired on GBit ethernet

@kongo09
Copy link

kongo09 commented Apr 5, 2021

I have a hunch: I noticed that my Raspi 4 was slowing down and filling up, loosing a bit of its snappy responsiveness that I had with a fresh HA installation. Digging into this, I discovered some errors around recorder about not being able to do a purge. That has been going on since last year, resulting in the SQLite database slowly but surely filling my SD card. The database file by now has grown to over 8 GB.

I read some reports of people who had their HA setup becoming slow and dropping things with database files of a few hundred MB. Could this somehow be related? I've now replaced SQLite with MariaDB from the Supervisor Add-on store. Let's see if that makes any difference for this connectivity problem or not. I'll report back.

@rapi3
Copy link

rapi3 commented Apr 5, 2021

My connection it is also on LAN gigabit, no wifi involved here.
I notice maybe a pattern:
I have an automation that turn on LG Tv in the morning, play a channel on Kodi and set the volume and after 30 sec it display a message.
If I turn OFF Tv before the message it is displayed then it is a high chance that problem start next time when I turn TV ON from HA using a web remote control and quick press another key on HA remote...
p.s.
I have also few automation that display messages on Tv without checking if TV is ON.

@majorsl
Copy link
Author

majorsl commented Apr 5, 2021

I am also on LAN gigabit as well.

@bendavid
Copy link
Contributor

bendavid commented Apr 5, 2021

Yes it's possible this is related, you could try temporarily removing all of the notify messages from your automations to see if this improves the situation. (The protections in both home assistant and aiopylgtv are a bit different/probably less robust for sending messages vs commands at the moment.)

@Nephiel
Copy link

Nephiel commented May 5, 2021

On my system this issue no longer happens with the client library update in core 2021.4.

@kongo09
Copy link

kongo09 commented May 5, 2021

I'll report back.

I've watched this for a month now after changing to MariaDB. The error doesn't show anymore, which might or might not be related.

@Nephiel
Copy link

Nephiel commented May 20, 2021

On my system this issue no longer happens with the client library update in core 2021.4.

Spoke too soon, the issue persists. I see over 6000 Updating webostv media_player took longer than... log entries and the TV state is not recognized as ON until HA is restarted.

@bendavid
Copy link
Contributor

@Nephiel do you use notifications from home assistant to the TV?

@rapi3
Copy link

rapi3 commented May 20, 2021

I updated for some time to version:
core-2021.5.0
supervisor-2021.04.3
Home Assistant OS 5.13
and I made all automation to test for TV ON before any notification on LG TV and I don't notice any more problems.
I hope will stay like this from now on.

p.s.
It is possible to define a time that notification it is displayed on TV or to be displayed until confirm with OK ?

@bendavid
Copy link
Contributor

bendavid commented May 20, 2021

Ok, if you can confirm that sending notifications with TV off is actually what provokes the issue this could help fixing the underlying problem and making things more robust.

It's likely that the endpoint "system.notifications/createAlert" not yet documented can be used to create persistent notifications. Needs some more work to figure out the needed parameters. See related discussion at home-assistant/home-assistant.io#17685

@rapi3
Copy link

rapi3 commented May 20, 2021

YES I am 99.99% sure that sending notifications with TV OFF is/was the problem for me.

Thank you for link I have to study it.

@Nephiel
Copy link

Nephiel commented May 23, 2021

@Nephiel do you use notifications from home assistant to the TV?

Yes, I do have a notify group that sends notifications to multiple notify services, and the WebOS TV is one of them. That may indeed be sending notifications while the TV is off.

@alucar-d
Copy link

alucar-d commented Jun 4, 2021

I'm experiencing same problem, but I don't send notifications. Instead I have an automation that changes the volume based on the source of the tv.
When TV turned On it's detected as a source change and the automation is executed. Maybe the command is sended before the TV get ready?
The base problem may be the same as sending notifications.

@rapi3
Copy link

rapi3 commented Jun 8, 2021

New log, maybe will help.
This time problem started after I turned Tv On and it show internal notification on Tv for some App available for update.
I was pressing few buttons on HA - LG remote. .. as usual only HA restart can fix.

Version | core-2021.5.0
Installation Type | Home Assistant OS
Development | false
Supervisor | true
Docker | true
Virtual Environment | false
Python Version | 3.8.9
Operating System Family | Linux
Operating System Version | 5.4.109
CPU Architecture | x86_64
Timezone | Europe/Warsaw
Host Operating System | Home Assistant OS 5.13
Update Channel | stable
Supervisor Version | supervisor-2021.04.3
Docker Version | 19.03.15
Disk Total | 5.2 GB
Disk Used | 3.4 GB
Healthy | true
Supported | true
Board | ova
Supervisor API | ok
Version API | timeout
Installed Add-ons | Samba share (9.3.1), File editor (5.2.0), Log Viewer (0.9.1), Duck DNS (1.12.5), NGINX Home Assistant SSL proxy (3.0.1), Terminal ; SSH (9.0.2)
Logger: homeassistant.util.logging
Source: util/logging.py:105
First occurred: 9:35:48 PM (8 occurrences)
Last logged: 9:36:43 PM

Exception in async_signal_handler when dispatching 'webostv': ({'entity_id': ['media_player.living_room_tv'], 'button': 'ENTER', 'method': 'async_button'},) Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message frame = await self.read_data_frame(max_size=self.max_size) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame frame = await self.read_frame(max_size) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame frame = await Frame.read( File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read data = await reader(2) File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly await self._wait_for_data('readexactly') File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data await self._waiter File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received data = self._sock.recv(self.max_size) OSError: [Errno 113] Host is unreachable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 156, in async_signal_handler await getattr(self, data["method"])(**params) File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 93, in wrapper await func(obj, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 455, in async_button await self._client.button(button) File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 721, in button await self.input_command(message) File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 713, in input_command await self.input_connection.send(message) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send await self.ensure_open() File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Exception in async_signal_handler when dispatching 'webostv': ({'entity_id': ['media_player.living_room_tv'], 'button': 'EXIT', 'method': 'async_button'},) Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message frame = await self.read_data_frame(max_size=self.max_size) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame frame = await self.read_frame(max_size) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame frame = await Frame.read( File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read data = await reader(2) File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly await self._wait_for_data('readexactly') File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data await self._waiter File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received data = self._sock.recv(self.max_size) OSError: [Errno 113] Host is unreachable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 156, in async_signal_handler await getattr(self, data["method"])(**params) File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 93, in wrapper await func(obj, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 455, in async_button await self._client.button(button) File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 721, in button await self.input_command(message) File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 713, in input_command await self.input_connection.send(message) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send await self.ensure_open() File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Exception in async_signal_handler when dispatching 'webostv': ({'entity_id': ['media_player.living_room_tv'], 'button': 'DOWN', 'method': 'async_button'},) Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message frame = await self.read_data_frame(max_size=self.max_size) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame frame = await self.read_frame(max_size) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame frame = await Frame.read( File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read data = await reader(2) File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly await self._wait_for_data('readexactly') File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data await self._waiter File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received data = self._sock.recv(self.max_size) OSError: [Errno 113] Host is unreachable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 156, in async_signal_handler await getattr(self, data["method"])(**params) File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 93, in wrapper await func(obj, *args, **kwargs) File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 455, in async_button await self._client.button(button) File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 721, in button await self.input_command(message) File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 713, in input_command await self.input_connection.send(message) File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send await self.ensure_open() File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open raise self.connection_closed_exc() websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Source: components/webostv/media_player.py:339
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:51:00 PM (1 occurrences)
Last logged: 9:51:00 PM

[140655815251184] code = 1006 (connection closed abnormally [internal]), no reason
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 827, in transfer_data
    message = await self.read_message()
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
    frame = await Frame.read(
  File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
    data = await reader(2)
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
    data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 167, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 726, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 93, in wrapper
    await func(obj, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 339, in async_volume_up
    await self._client.volume_up()
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 917, in volume_up
    return await self.request(ep.VOLUME_UP)
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 665, in request
    await self.command(cmd_type, uri, payload, uid)
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 655, in command
    await self.connection.send(json.dumps(message))
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
    await self.ensure_open()
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason
Source: components/webostv/media_player.py:344
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 9:50:54 PM (1 occurrences)
Last logged: 9:50:54 PM

[140655815251184] code = 1006 (connection closed abnormally [internal]), no reason
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 827, in transfer_data
    message = await self.read_message()
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 895, in read_message
    frame = await self.read_data_frame(max_size=self.max_size)
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 971, in read_data_frame
    frame = await self.read_frame(max_size)
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 1047, in read_frame
    frame = await Frame.read(
  File "/usr/local/lib/python3.8/site-packages/websockets/framing.py", line 105, in read
    data = await reader(2)
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 723, in readexactly
    await self._wait_for_data('readexactly')
  File "/usr/local/lib/python3.8/asyncio/streams.py", line 517, in _wait_for_data
    await self._waiter
  File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 848, in _read_ready__data_received
    data = self._sock.recv(self.max_size)
OSError: [Errno 113] Host is unreachable

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

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 167, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1481, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1516, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await self.hass.helpers.service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 658, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 726, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 695, in _handle_entity_call
    await result
  File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 93, in wrapper
    await func(obj, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/components/webostv/media_player.py", line 344, in async_volume_down
    await self._client.volume_down()
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 921, in volume_down
    return await self.request(ep.VOLUME_DOWN)
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 665, in request
    await self.command(cmd_type, uri, payload, uid)
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 655, in command
    await self.connection.send(json.dumps(message))
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 555, in send
    await self.ensure_open()
  File "/usr/local/lib/python3.8/site-packages/websockets/protocol.py", line 803, in ensure_open
    raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedError: code = 1006 (connection closed abnormally [internal]), no reason

@alucar-d
Copy link

alucar-d commented Jul 3, 2021

The log of the error I'm getting

ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 342, in ping_handler
    await asyncio.wait_for(ping_waiter, timeout=timeout)
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
websockets.exceptions.ConnectionClosedOK: code = 1001 (going away), reason = server shutting down
ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiopylgtv/webos_client.py", line 342, in ping_handler
    await asyncio.wait_for(ping_waiter, timeout=timeout)
  File "/usr/local/lib/python3.8/asyncio/tasks.py", line 494, in wait_for
    return fut.result()
websockets.exceptions.ConnectionClosedOK: code = 1001 (going away), reason = server shutting down

And then every 10 seconds

[homeassistant.components.media_player] Updating webostv media_player took longer than the scheduled update interval 0:00:10

@igorgoc
Copy link

igorgoc commented Sep 10, 2021

On core 9.5 similar behavior:

2021-09-10 08:19:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/aiopylgtv/webos_client.py", line 340, in ping_handler
ping_waiter = await ws.ping()
File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 657, in ping
await self.ensure_open()
File "/usr/local/lib/python3.9/site-packages/websockets/legacy/protocol.py", line 735, in ensure_open
raise self.connection_closed_exc()
websockets.exceptions.ConnectionClosedOK: code = 1001 (going away), reason = server shutting down

@jfparis
Copy link
Contributor

jfparis commented Oct 26, 2021

Hello

I have my TV connected via ethernet and I am experiencing the same issue as described here. In a nutshell

  • Start home assistant
  • The LG TV is detected
  • I can operate the TV from Home Assistant
  • Turn it off and back on, everything is still working
  • Turn off the TV, wait long enough and the connection is dropped somehow in the background.
  • The wake_on_lan action will turn off the TV but it is "dead" to Home Assistant, meaning it cannot read the TV status nor operate it

If you are experiencing the same symptoms I believe I have some sort of patch that test status after the Wake on lan action and reconnect if necessary

If you are interested in testing, it is available here
https://github.com/jfparis/core/tree/webos_reconnection/homeassistant/components/webostv

To install

  • clone the repository and copy the content of the webostv directory in your custom_components/webostv
  • enable logging (optional) by adding this in your configuration.yaml file
logger:
  default: warning
  logs:
    custom_components.webostv: debug
  • restart home assistant
  • if you are lucky it's plug and play. If not, you have a new tv entity (my tv was media_player.livingroom and the new one was media_player.livingroom_2

NB: given the fact we need to wait for a timeout (to avoid killing healthy connection), it might take 30 seconds for the home assistant to reconnect with the tv

To uninstall (take the above in reverse order)

If it works for more than me, I will clean and PR

@holdestmade
Copy link

@jfparis

Just tried your patch and works great for me. If I disconnect the LAN cable, goes offline in HA and then goes back online in HA when LAN cable is reconnected. This would not work before. Great work, thanks.

@jfparis
Copy link
Contributor

jfparis commented Jan 2, 2022

Hi @holdestmade

With the holiday I have reworked the patch a bit (I encountered a weird race condition with the previous one). I am ready to submit a PR and would appreciate a second test / validation on your setup (mins is OK)

jf

@holdestmade
Copy link

@jfparis - all works well here so far

@rapi3
Copy link

rapi3 commented Jan 2, 2022

Hi @holdestmade

With the holiday I have reworked the patch a bit (I encountered a weird race condition with the previous one). I am ready to submit a PR and would appreciate a second test / validation on your setup (mins is OK)

jf

Hi,

I also have situations where my LG tv become unavailable until HA restart and your first version of patch can't seem to fix it.
Hope your repo it is updated as I am updating from there now.

@rapi3
Copy link

rapi3 commented Jan 2, 2022

I have this error on latest patch

Logger: homeassistant.setup
Source: setup.py:310
First occurred: 1:39:32 PM (2 occurrences)
Last logged: 1:39:32 PM

Unable to prepare setup for platform webostv.media_player: Platform not found (cannot import name 'MediaPlayerDeviceClass' from 'homeassistant.components.media_player' (/usr/src/homeassistant/homeassistant/components/media_player/__init__.py)).

@jfparis
Copy link
Contributor

jfparis commented Jan 2, 2022

@rapi3
How are you testing this?
Are you run this as a custom_component (as described above) and on the latest stable version of home assistant?

@rapi3
Copy link

rapi3 commented Jan 2, 2022

I am testing as described above - custom... in virtual box NOT the latest HA
I revered back and as old version works.

Version | core-2021.5.0
Python Version | 3.8.9
Operating System Family | Linux
Operating System Version | 5.4.109
Host Operating System | Home Assistant OS 5.13
Update Channel | stable
Supervisor Version | supervisor-2021.04.3
Docker Version | 19.03.15

@jfparis
Copy link
Contributor

jfparis commented Jan 2, 2022

Quite an old version. I recently merged with the latest "dev". There is apparently some updates to the API and class definitions

@rapi3
Copy link

rapi3 commented Jan 2, 2022

Unfortunately yes.
I delay as much I can HA update because I run offline from www HA - update servers and after update I have a high chance to break my working stuff.

@jfparis
Copy link
Contributor

jfparis commented Jan 2, 2022

@rapi3 the patch is pretty simple. You might be able to rebase it to your own version of the core.

@holdestmade I pushed a final update and this is now as good as it will get. I will leave it a couple of weeks (as those connection drops are slow to occur anyway), remove the spurious logs and submit a PR

@jfparis
Copy link
Contributor

jfparis commented Jan 17, 2022

Hi @holdestmade

Happy new year

Can I ask you to test a new version.
The previous version did reconnect if you woke up the TV using home assistant but did not reconnect properly to home assistant if you woke up the TV IRL (using the remove).
The new version should work in all cases. I would appreciate if you or anyone else want to test

@Nephiel
Copy link

Nephiel commented Jan 17, 2022

I can test it as well, will report anything unusual.

@holdestmade
Copy link

I've installed it, I'll let you know how it goes

@rapi3
Copy link

rapi3 commented Jan 27, 2022

@jfparis

Tested and for me it looks OK now - with and without IR remote control no problems.
Thank you for your patch ( I applied to old version )

@rapi3
Copy link

rapi3 commented Jan 29, 2022

That was to good to be true...
Error appeared after LG tv was turned off with:

  - service: media_player.turn_off
    target:
      entity_id: media_player.living_room_tv

errors:

Logger: homeassistant.components.media_player
Source: helpers/entity_platform.py:657
Integration: Media player (documentation, issues)
First occurred: 6:14:25 PM (18 occurrences)
Last logged: 6:17:16 PM

Updating webostv media_player took longer than the scheduled update interval 0:00:10
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:527
First occurred: 6:14:26 PM (1 occurrences)
Last logged: 6:14:26 PM

Update of media_player.living_room_tv is taking over 10 seconds

@jfparis
Copy link
Contributor

jfparis commented Jan 29, 2022

Sorry to read
I think it's all-important to try the new beta or wait for the release this Wednesday. (there has been some extensive rework)
We can have another go at this next week

@thecode thecode mentioned this issue Jan 30, 2022
22 tasks
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.