-
-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Comments
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. |
Problem it is not fixed in latest: ...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 |
Still experiencing this issue in core-2021.3.2. |
I have the same problem in core-2021.3.4:
|
I have the same problem in core-2021.3.4:
|
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? |
In my case it is all wired on GBit ethernet |
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 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. |
My connection it is also on LAN gigabit, no wifi involved here. |
I am also on LAN gigabit as well. |
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.) |
On my system this issue no longer happens with the client library update in core 2021.4. |
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. |
Spoke too soon, the issue persists. I see over 6000 |
@Nephiel do you use notifications from home assistant to the TV? |
I updated for some time to version: p.s. |
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 |
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. |
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. |
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. |
New log, maybe will help.
|
The log of the error I'm getting
And then every 10 seconds
|
On core 9.5 similar behavior: 2021-09-10 08:19:14 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved |
Hello I have my TV connected via ethernet and I am experiencing the same issue as described here. In a nutshell
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 To install
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 |
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. |
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 |
@jfparis - all works well here so far |
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. |
I have this error on latest patch
|
@rapi3 |
I am testing as described above - custom... in virtual box NOT the latest HA
|
Quite an old version. I recently merged with the latest "dev". There is apparently some updates to the API and class definitions |
Unfortunately yes. |
@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 |
Hi @holdestmade Happy new year Can I ask you to test a new version. |
I can test it as well, will report anything unusual. |
I've installed it, I'll let you know how it goes |
Tested and for me it looks OK now - with and without IR remote control no problems. |
That was to good to be true...
errors:
|
Sorry to read |
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
Problem-relevant
configuration.yaml
Traceback/Error logs
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
The text was updated successfully, but these errors were encountered: