core: LG webOS TV stops working and need reload
This issue is relevant only if LG webOS TV integration was fully setup before 2025.2.0 and it was working most of the time, but from time to time it will stop working, any other problems, such as pairing, broken functionality, something that stopped working should be reported by creating a new issue.
The problem
I am opening this issue to collect new logs. At core 2025.2.0 LG webOS TV underlying library aiowebostv had major changes and cleanups, mainly switching to better websocket library.
It does not mean that the issues will be fixed for everyone, as I have never succeeded to create a communication problem with the TV, although during the refactoring I clean up places that looks suspicious to create a problem. There are still places that needs better error handling and they will be fixed when logs that shows a problem will be added to this issue.
With this I am merging https://github.com/home-assistant/core/issues/102821 and https://github.com/home-assistant/core/issues/74888 to one issue.
What to do if you have a problem:
- If possible make sure your TV is connected by wired connection and not connected to Wi-Fi (Wi-Fi can still be enabled as it needed for connecting via a mobile phone to the TV)
- While not mandatory, static IP can help reducing issues if the device IP changes.
- Download the diagnostics from the device card in Home Assistant and attach it in a comment, Make sure the TV is ON at least 20 seconds before gathering the diagnostics.
- Please enable Debug for LG webOS TV integration, try to reproduce the problem, if you need to reload the integration to fix the issue, reload it, afterwards disable debug and attach the log.
- Write down the time the connection issue occurred and when the TV was on, it is hard to know if from the logs as OFF is the same in the log as a TV that is disconnected due to a problem.
Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.
Thanks!
What version of Home Assistant Core has the issue?
core-2025.2.0
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
webostv
Link to integration documentation on our website
https://www.home-assistant.io/integrations/webostv/
Diagnostics information
No response
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
No response
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 3
- Comments: 37 (11 by maintainers)
Hello, I have had this problem for a while now and did not find a solution. Last night I gave it another try, and I would like to share the (preliminary results)
The only thing I did different from previous tries over the past month, was disable/reset Apple Homekit configuration on the TV.
Home Dashboard > Airplay > Airplay and HomeKit settings
I removed (perhaps prior to resetting Apple HomKit) the WebOS TV integration from Home Assistant. It was for sure added to HA again after Apple HomeKit was reset on the TV. The integration generated the default device name with to include
OLED55C9PLA, I did not see that before, it was alwaysmedia_player.lg_webos_tv. Full entity id:media_player.lg_webos_tv_oled55c9plaHA now also discovers a HomeKit Device (LG webOS TV B027 (Television)), which I ignored. I did not set up Apple HomeKit on the TV at all, neither in HA or in the Apple Home app
For one day it seems to work without issues.
Further info TV conneted to both WIFI and ETHERNET HA connects to the ETHERNET IP address HA 2025.3.0 HAOS 14.1
I had the Stale state situation happen as well with one of my LG TVs which Iāve been wresting the connection issues with. Two others have been working pretty much fine.
Re-adding the TV took a try or two. Both times triggered the pairing notification. The TV was having network connectivity issues just prior which required a TV power cycle, so I am hoping that is just a fluke.
With that said, Iām keeping an eye on whether the new code changes are helping or not. If not, Iāll gather the logs being requested.
EDIT: My problem TV set had the issue happen again. What appears to be happening is the WebSocket connection to the TV is dropping after it has successfully fetched data from the Television, and attempts to re-connect to the TV are being met with a āConnection Refusedā response from the TV. I am going to try factory resetting it (for the second time) to see if I get different behavior. Will share the logs soon. The TV responds on Port 3001 for WebSocket connections.
EDIT2: Mightāve actually found my problem! Found a strange MAC appearing on my switch for the same IP address for the TV. Looks like my problem is actually an IP Address Conflict, not an integration problem. Either way, the other two TVs are working great, so I will assume the code changes are good.
EDIT3: Just wanted to confirm, things seem to be 100% stable for me now. I have noticed the other two sets which werenāt subjected to the IP conflict are working reliably as well.
It is possible that the TV blacklist HA IP if HomeKit that arrives from the same IP of HA is using a wrong token. I can cause my TV to block a specific IP (it is released after a while or when the TV is off) if I try too many requests with a wrong token. I assume it is a security function of the TV to prevent exploits
See my first post, I donāt recommend connecting the TV to two interfaces and in general recommend of ethernet over Wi-Fi, but specifically having two connections is known to cause errors since the TV sometime switch the active connection between ethernet and Wi-Fi.
No problem so far, works flawlessly.
Thanks again for your support!
Here is the Log, I switched the TV 65 on and off 2 times with the new webos integration of 2025.3
home-assistant_webostv_2025-02-27T19-19-16.462Z.log
@marce14-git thanks for the log, I think I fixed this problem in core 2025.3.0b0 (which was released today).
Please test the following: https://github.com/thecode/home-assistant-custom-components/tree/webostv-core2025.3
I would appreciate a log file for this one regardless if you have problems or not, after installing, just enable debug, wait for the TV to be show as ON, reload the integration, disable debug and attach the log. This version should not stay stuck (āUpdating webostv media_player took longer than the scheduled update interval 0:00:10ā) but it may still happen once if messages get lost, however it does have Live TV support so would be interesting to know how it works for you.
Bellow is the same version you are using now (no live tv) with the latest updated that are in the first one (core 2025.3), if the first one still makes problems switch to this one and report back. https://github.com/thecode/home-assistant-custom-components/tree/webostv-no-livetv
thank you very much, works like a charm! I“ll come back if I notice anything.
@marce14-git No, you donāt have to remove Live TV, you can even use Home Assistant to switch to Live TV, the only thing that will not work is switching channels or showing the channel state in Home Assistant. Home Assistant will just not be aware that the TV has channels.
Please install from the link bellow as a custom integration: https://github.com/thecode/home-assistant-custom-components/tree/webostv-no-livetv
This is the same integration as shipped in Home Assistant core 2025.2.5.
Downloaded the linked branch, add it under
custom_componentsand restart HA, you donāt need to remove the existing devices or do anything, it will pick this up as a custom integration and you should see this in the integration page:To get back to core one, you simply remove the folder and restart HA.
Thanks
First of all thank you very much for this integration and your time!
No, I donāt use live TV, I just need to get the state of the TV in order to trigger the power for my soundbar, and sometimes turn the tv off via Homeassistant or change the volume
Iād love to try your solution
PS: I have live tv channels (donāt know how many) but donāt use them, I just connected the coax cable and did a search for channels and left it at that Does this mean if I remove the live tv channels/unplug the coax, it should work 100% of the time ?
So I had to do it as my TV was already in stale situation with HA š. Removing it and turning TV on make it discoverable through the HA UI. Automations seems to workā¦for now. Weāll see in the future. :] The one thing that confuses me is the WoL for turning TV on. Docs says that the trigger should like this:
But I have it set differently for some reason. Probably that was some old approach? Regardless, when trying the ānew wayā VS Studio says that itās a syntax error.
Yeah, I know that. š Maybe I wasnāt clear enough, I wanted to know if I should re-add integration after the update. Like making a fresh start to be safe.