LGWebOS Binding (for LG WebOS TVs)

Hi, if you are on Openhab 2.1 and not on Openhab 2.2 then you need to make sure to use the plugin pre-release from 13 Nov: https://github.com/sprehn/openhab2-addons/releases/tag/lgwebos-snapshot-2.2.0-keycontrol-201711132148

Just place it into the addons folder. The binding will load automatically and you should see it in paper ui.
Check your openhab.log file to see if the binding auto detected your network interface.

For this version of the binding and on RPis you often have to set the local ip address of your PI in the binding configuration in paper ui.

On your TV:
Under network settings allow ā€œLG CONNECT APPSā€ to connect.
Under general settings allow mobile applications to turn on the TV, if this option is available. In combination with the wake on LAN binding this will allow you to start the TV via openHAB.

Turn on your TV and you should see a new Thing in your inbox in paper UI.

Hi,

this was supported, but got removed in the latest version. Reason: During code review it was decided to implement this in a second bundle using the new rule engine - which will take some more time.

In the mean time, you could revert back to an older version of the binding, which still has this feature.

Action is called: launchBrowser(String ip, String url)

Thanks!!! It worked, I appreciate you for this.

Thanks I will give it a try.

Hi,

you may have noticed that OH 2.2 has been released.
So, unless you need action support (use snapshot release 13th Nov instead) you can now install the binding via paper ui.

Thank you, to everyone on this thread for all your support testing on various platforms and TVs and providing feedback.

Merry Christmas
Sebastian

Iā€™m having the same issue. As soon as I turn the TV off the binding transitions to Online and then the TV switch turns to ā€œOnā€ even though the TV is off, nothing on the screen.

Hello Sebastian,

thank you for this great binding!

I have always been using the LocalIp config parameter and everything worked flawlessly.
Just recently I have updated my entire setup and moved everything to docker containers. Here the binding does not auto-detect my TV. However if I go back to a version of the binding, where I can still manually put in my localIp, the device is found immediately (after putting the IP in).
Is that an issue with the binding or might that be a problem that is caused by NetworkAddressService if it is used within docker?

Greetings,
Robert

I am using it in a docker container as well. you need to run the container with --net=host. otherwise upnp broadcasts will not work. and you may have to specify your name network interface in paper UI > Configuration > System > Network Settings

1 Like

Oh oops - I didnā€™t have the Network settings configured correctly.
Its working like a charm now.

Thank You!!!

the Power channel is only set to ON when the TV appears on the network.
what I donā€™t understand is, why is it offline and when you turn it off it goes online?
Is it maybe that you just turn it one for a few seconds, and then turn it off again - even then, it should set the channel to off a short while later.

1 Like

Hi,

iā€™m not able to use your binding.

I have installed the Version from PaperUI.
My Hardware:

  • Raspberry P3 connected via LAN to a FritzBox 7490
  • LG WebOS smartTV connected via LAN to the Fritzbox 7490

I enabled the LG Connect Apps, WOL cannot be find :frowning:

After few seconds i get a new Thing in my Inbox. But it looks like an IPV6 address ( lgwebos:WebOSTV:9a550de4-6140-457f-9e47-cf32b9ddd8ef )
If i add it and create a new Item i get an error that the TV is offline. What is going wrong? After every restart, i have a new SmartTV in my Inbox :slight_smile:

Events.log

2018-01-05 10:21:14.260 [hingStatusInfoChangedEvent] - 'lgwebos:WebOSTV:9a550de4-6140-457f-9e47-cf32b9ddd8ef' changed from UNINITIALIZED to INITIALIZING
2018-01-05 10:21:14.267 [hingStatusInfoChangedEvent] - 'lgwebos:WebOSTV:9a550de4-6140-457f-9e47-cf32b9ddd8ef' changed from INITIALIZING to ONLINE: Device Ready
2018-01-05 10:21:14.370 [hingStatusInfoChangedEvent] - 'lgwebos:WebOSTV:9a550de4-6140-457f-9e47-cf32b9ddd8ef' changed from ONLINE: Device Ready to UNKNOWN: Connecting ...
2018-01-05 10:21:14.656 [hingStatusInfoChangedEvent] - 'lgwebos:WebOSTV:9a550de4-6140-457f-9e47-cf32b9ddd8ef' changed from UNKNOWN: Connecting ... to UNKNOWN (CONFIGURATION_PENDING): Pairing Required
2018-01-05 10:22:14.739 [hingStatusInfoChangedEvent] - 'lgwebos:WebOSTV:9a550de4-6140-457f-9e47-cf32b9ddd8ef' changed from UNKNOWN (CONFIGURATION_PENDING): Pairing Required to OFFLINE: TV is off

add an item. and check your tv screen. you have to pair the device.

Thanks for the fast reply. I add the PowerItem, but nothing happen. The DeviceStatus switch to offline - thats it.

I have not been able to get lgwebos in OpenHAB 2.2 to discover my LGTV, which worked fine in Openhab 2.1 with connectsdk.

It is probably an issue with the Network settings as discussed above (I have a virtual VPN interface also no the same server running OpenHAB, so PaperUI gives me two options for this in Network settings). But, setting the Network Setting in PaperUI to 192.168.1.20/24 as it suggests, I still could not get my LGTV discovered - and my SqueezeBox binding stops working :frowning: So I currently keep this network setting blank. I have tried setting the log level for lgwebos to TRACE, but still I could see nothing in the logs.

Any suggestion for how to debug further?

Hi,

Iā€™ve been trying to connect my LG TV using the binding, however my network setup seems to be a challenge: the server running openHAB is in the ā€˜innerā€™ zone (VLAN, IP range 192.168.10.0/24) while the TV is in a ā€˜mediaā€™ zone (separate VLAN, IP range 192.168.20.0/24).
I can successfully pair the LG TV if openHAB sits in the media zone. But Iā€™m having trouble to find a way to support the detection of the TV across zones. Iā€™ve been playing around with the firewall (e.g. forward rule for port 1900/UDP) but not knowing exactly how the detection algorithm works, so far without success.

Does anyone have a similar setup and managed to get this to work?
Is there a way to define the TVā€™s IP address in a configuration?

Thanks in advance,
Bernhard

Hi Bernhard,

@HSVSebastian has done it. Please scroll up a bit in this conversation - mid Oct 2017.

Kind Regards
Sebastian

There is no need to define it in a config file. The thing ID contains a unique ID of the TV. This is used to link the TV again, when it appears on the network, no matter under which IP.

I just upgraded my ā€œoldā€ ConnectSDK binding (Connectsdk Binding 2.1.0 snapshot 201703262307) to the latest LGWebOS binding available via PaperUI. I didnā€™t bother to replace the older version sooner, since it was doing everything I wanted it to do (and very stable). I had to rework some items (volume changed from Number to Dimmer, showtoast action was removed,ā€¦). But so far, I can say everything works fine.

Thanks again, @sprehn for the excellent work!

Hi Sebastian,

thank you for your fast response! Iā€™m afraid I havenā€™t noticed this bit in the thread. Anyway, I gave this a shot as well and since this didnā€™t work for me either I allowed all traffic from 192.168.20.0/24 to 192.168.10.0/24 to see if some of the config is wrong. While I could successfully test the ā€˜innerā€™ zone was reachable with these firewall settings the LG TV would still not react to the binding when searching for things.

My assumption now is that the SSDP multicast ist not forwarded between zones.
Iā€™ll keep looking into this, maybe I can find a solution (Iā€™m running LEDE on my router, so I should have plenty of options available if I manage to find the right one :wink: )

In any case, maybe it would still be an interesting option in the binding config to allow defining an IP address manually to avoid the whole detection processā€¦

Thanks again and best regards,
Bernhard

maybe double check if you allow udp traffic - ssdp runs on udp.

manual configuration will not work - the discovery is also used to determine wether the device is on or offline.