HA LG WebOS integration stops working

Hi @jfparis, I was experiencing the same problems with the LG TV media player card indicating that the TV was off when it wasn’t. Only a restart of Home Assistant would fix the issue. Now running with your changes, and have done some quick testing this morning. It seems that the TV still disconnects, but with the retries that you have included, the connection is now recovered after a short delay. Here is an extract of the log which shows the changes working. Is that what you would expect? It certainly seems like an improvement.

2022-01-22 09:48:49 DEBUG (MainThread) [custom_components.webostv.media_player] Turning on the TV
2022-01-22 09:48:51 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Suspend', 'processing': 'Prepare Resume'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Request disconnection
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Suspend', 'processing': 'Prepare Resume'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Request disconnection
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Suspend', 'processing': 'Prepare Resume'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Request disconnection
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Suspend', 'processing': 'Prepare Resume'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Request disconnection
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Suspend', 'processing': 'LastInput Ready'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Request disconnection
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Suspend', 'processing': 'Screen On'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Request disconnection
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:48:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:54 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active'}
2022-01-22 09:48:54 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:54 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active'}
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] call disconnection
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:48:55 DEBUG (MainThread) [custom_components.webostv.media_player] disconnected
2022-01-22 09:49:01 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:01 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:02 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:02 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:02 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] call disconnection
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] call disconnection
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] call disconnection
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] call disconnection
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] call disconnection
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] call disconnection
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] disconnected
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] disconnected
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] disconnected
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] disconnected
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] disconnected
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] disconnected
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:49:03 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:11 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:11 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:12 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:12 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:12 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:13 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:49:13 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:49:13 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:21 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:23 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:49:23 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:49:23 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:29 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:31 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:33 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:49:33 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:49:33 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:39 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:39 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:39 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:39 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:39 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:39 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:40 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'subscribed': True, 'returnValue': True, 'state': 'Active'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:41 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:43 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:49:43 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:49:43 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:51 DEBUG (MainThread) [custom_components.webostv.media_player] Requesting connection
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active', 'processing': 'Request Power Off'}
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active', 'processing': 'Request Active Standby'}
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active', 'processing': 'Prepare Active Standby'}
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:52 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active', 'processing': 'Prepare Active Standby'}
2022-01-22 09:49:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:53 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {}
2022-01-22 09:49:53 DEBUG (MainThread) [custom_components.webostv.media_player] System info: None
2022-01-22 09:49:53 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state
2022-01-22 09:49:55 DEBUG (MainThread) [custom_components.webostv.media_player] Power state: {'returnValue': True, 'state': 'Active Standby'}
2022-01-22 09:49:55 DEBUG (MainThread) [custom_components.webostv.media_player] System info: {'returnValue': True, 'features': {'3d': False, 'dvr': True}, 'receiverType': 'dvb', 'modelName': '43UH668V-ZA'}
2022-01-22 09:49:55 DEBUG (MainThread) [custom_components.webostv.media_player] Write HA state

Yes However I understand that there are some bigger change in progress in the development branch of home assistant.

I am going to wait for the next version to be released and have another go

has there been any update on this?

yesterday all of a sudden the webos integration just stopped working for me for no apparent reason (haven’t changed anything). worked for a year w/o problems before

This is happening to me at random.
The LGTV integration stops working ana I need to remove it and add it every time.
I hope it will be fixed soon.

Having same issue, any updates?

Same problem here, for me it works for a couple days then it stops working and even if i turn on the tv from the tv’s remote it would not detect that it’s on and it won’t let me control anything, to fix this i reload the integration but some times i need to restart home assistant, also some times even when the integration works the power button disappears from lovelace and i have to go to the Trigger Device is requested to turn on automation erase and re-type something to make the save button visible then I click save and it works.
Any solution?

same here :frowning:

Same issue. Connects fine. Then loses connection maybe 20-30 mins after. Will only work again after rebooting HA.

Same problem here

Same problem - becomes unavailable. Sometimes it starts working but restart of home assistant doesn’t always help.
What I found - when TV becomes unavailable (both webostv integration and dlna integration) - I can ping TV from my laptop, TV can connect to internet perfectly etc, BUT I can’t ping it from HA (from Terminal & SSH console). At the same time I can ping my laptop/router and other devices from HA. IP of the TV is not changing - assigned by DHCP with static lease.

I didn’t find a way how to connect to host to check arp records at least. Running hassos on raspbery pi.
Found somewhere that I have to type “login” but it asks for username/password and none of my users/passwords match. Maybe somebody can help with this and I’ll continue investigation.

It seems something blocks network communication. It can be either HA or LG TV (who knows if they have some king of IP banning).
Would be nice to know if there is a way to run tcpdump on HA host - this would speedup finding the root cause.

1 Like

Same issue here. I got a new LG TV and added it to HA. Worked fine for a few days and then it stayed offline in HA.
I remove the integration, readded it and it worked fine again for a few days. Since 2 days the TV shows as offline for the past 2 days while this is not true and have been on for quite a bit.

So not a solution but a workaround, i added a reload integration button in my Lovelace so everytime the tv does not respond to the power on command or the tv is on but it shows off, i click the reload button and after couple of seconds it works normally

type: custom:mushroom-entity-card
double_tap_action:
  action: none
hold_action:
  action: none
secondary_info: none
tap_action:
  action: call-service
  service: homeassistant.reload_config_entry
  target:
    entity_id: media_player.living_room_tv
icon: mdi:reload
name: Reload Tv
entity: media_player.living_room_tv

If you are logged in as normal user (not admin) trying to push this button will throw a unauthorized error so you can work around this by creating a autoomation and a input button helper.

LOVELACE:

type: custom:mushroom-entity-card
entity: input_button.reload_tv
double_tap_action:
  action: none
hold_action:
  action: none
secondary_info: none
tap_action:
  action: toggle

AUTOMATION:

alias: Reload Tv Integration
description: ""
trigger:
  - platform: state
    entity_id:
      - input_button.reload_tv
    to: null
condition: []
action:
  - service: homeassistant.reload_config_entry
    target:
      entity_id: media_player.living_room_tv
    data: {}
mode: single

I love all those threads where everybody has a issue with something, we have a few smart guys that comes with some patches and solutions that are not permanent and … and in the end … nothing gets fixed :slight_smile:

For example this issue has literary more then one year.
Correction: years not one, more.
links:

NOTE:
Look on this forum is full of threads like this one.

Question: Can I find anywhere a custom integration that works well on webos, or I am stuck with “OFFICIAL” one?