LG WebOS TV Update on HA 0.104.0 not working

Hello! i see others have more lg tvs. please, who knows the correct configuration, describe it. Unfortunately, it doesn’t work out for me. Thank you!

I also have problems with my LG WebOS notifications. I see this error in my log (Hassio v. 0.104.1):

Big issue is that - now when LS WebOS is no media device anymore I cannot check weather it is turn on or not. Now I cannot turn-off my lights when my TV is turned off…

The conf file seems to be fixed by the last update, notify still knackered.

Don’t know if it’s a coincidence but all my Fire Sticks have disappeared as well :see_no_evil:

Well I think it is all working now - notifications and states:

What I did was:

  • Remove all WebOStv in configuration.yaml and groups.yaml
    image
    in notification.yaml
    image
  • Added new lines in configuration.yaml
    image
  • Changed condition state from “Playing” to “on” in automations:
    image

ok notify fixed with help of @MrBorg

will open a seperate item for my fire tv issues

Try this. You should pair only once.

webostv:
  - host: 192.168.1.222
    name: LGTV1
            .
            .
            .
  - host: 192.168.1.223
    name: LGTV2
            .
            .
            .

I’ve changed config as it is described to:

webostv:
  host: 192.168.1.xxx
  name: "main_tv"
  turn_on_action:
    service: script.tv_turn_on

On previous version 0.103 everything worked like a charm via media_player, platform: webostv.
I have WebOS 2.0 LG TV and was able to control it via HA.
After update to 0.104.2 it shows errors:

Error during setup of component webostv
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 170, in _async_setup_component
    hass, processed_config
  File "/usr/src/homeassistant/homeassistant/components/webostv/__init__.py", line 93, in async_setup
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/components/webostv/__init__.py", line 109, in async_setup_tv
    await async_setup_tv_finalize(hass, config, conf, client)
  File "/usr/src/homeassistant/homeassistant/components/webostv/__init__.py", line 141, in async_setup_tv_finalize
    await async_connect(client)
  File "/usr/src/homeassistant/homeassistant/components/webostv/__init__.py", line 118, in async_connect
    await client.connect()
  File "/usr/local/lib/python3.7/site-packages/aiopylgtv/webos_client.py", line 126, in connect
    return await self.connect_result
  File "/usr/local/lib/python3.7/site-packages/aiopylgtv/webos_client.py", line 156, in connect_handler
    close_timeout=self.timeout_connect),
  File "/usr/local/lib/python3.7/site-packages/websockets/client.py", line 385, in __init__
    factory, host, port, **kwds)
TypeError: create_connection() got an unexpected keyword argument 'ping_interval'
Connection lost. Reconnecting…

Restarts of HA and any other changes to config has no affect.
I do not use it in any automation.

The same happened for me. Works now, just requested to repair.

Did someone got sources to show in Homekit?

Hello!
Yes - this is what works for me:

webostv:
  - host: 192.168.x.xxx
    name: TV
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: "xx:xx:xx:xx:xx:xx"
    customize:
      sources:
        - livetv
        - youtube
        - hdmi1
        - 'Amazon Prime Video'
        - 'Sky X'

That’s what I have, but the sources in Homekit are still missing.

Hello Delicon,

I had the same problem.

My code before (not working):

webostv:
  - host: 192.168.x.xxx
    name: TV living room
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: "xx:xx:xx:xx:xx:xx"
    customize:
      sources:
         - livetv
         - youtube
         - makotv
         - netflix

The name tag cannot have spaces anymore, this code worked for me:

webostv:
  - host: 192.168.x.xxx
    name: TV_living_room
    turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: "xx:xx:xx:xx:xx:xx"
    customize:
      sources:
         - livetv
         - youtube
         - makotv
         - netflix

Hopes this helps

I’ve tried that, but the sources are still missing in HomeKit.

Here is my config.
Everything works fine. The sources are listed in HA and can be changed.
But in HomeKit sources are empty.

media_player:

webostv:
  host: !secret lgtv_ip
  name: Living Room TV
  turn_on_action:
      service: wake_on_lan.send_magic_packet
      data:
        mac: !secret lgtv_mac
  customize:
    sources:
      - YouTube
      - PS4
      - Plex
      - Netflix

notify:

Hi!

I have a problem while pairing: “ERROR (MainThread) [homeassistant.components.webostv] Unable to connect to host 10.0.0.8”.
Has only worked since the update from 0.103.0 to 0.105.0. Use Home Assistant in a docker on the pi.
Did anyone have a tip for me?
And sorry for the bad english. Use Google Translate as a help.
Greetings from Austria

Hi.
I am trying to hook up my LG 70UF770 (dated Dec2016) with some luck after a few iterations.
First, it does not indicate no place explicitly that it only works with WiFi connection.
I use wired Ethernet so till I found this I got error on webostv.
Once I have enabled both, and defined the TV using the WiFi IP and MAC, I finally got a configuration request.
Pressing the start button derived an error:
“create_connection() got an unexpected keyword argument ‘ping_interval’”
BTW, I am using latest version 0.104.3

I think that the WiFi issue must be updated in the HA site.
Anyway anyone has any idea what to do with this error?

It is definitely supposed to work on wired ethernet as well.

Well it doesn’t. I set my TV to both WiFi and wired and now I get the pairing link but this one gets an error as appear in a different but related topic. I do not have it of hand now.

The “create_connection” error is a known issue and is being worked on here https://github.com/home-assistant/home-assistant/issues/31213

Can you provide more information/logs on what exactly is not working over a wired connection?

I’ve got basically the same configuration as everyone else has been posting, with version 05.10.40 of the TV software itself, and 0.106.0 of home assistant.

But I can’t get the pairing to work at all. I get the notification on startup, and when I click that, I get the pairing dialog. I click the “start pairing request” button and it does cause the popup on the TV, which I then agree to but… nothing happens. The pairing dialog just resets and I can click it again, with no effect at all. I don’t even get log entries.

It does write a webostv.conf file in my Home Assistant config directory, and in order to re-try pairing, I have to remove that and restart Home Assistant.

This seems to be quite different than what everyone else is getting though, so I wonder why?

Why don’t you all just download the original media_player WebOS integration and put it in custom_components and use it as before. I see WebOS TVs integration is constantly changing and almost each new HA release has breaking changes for this TVs. It was pretty big problem for me that I have to reconfigure my 3 TVs each 2 or 4 weeks … This saved my live … I’m not using the recent version of HA from a long time, but I can build a custom WebOS TV platform (for the recent HA versions), that would not break you TV config on each HA update …