LGWebOS Binding (for LG WebOS TVs)

Thank you @martiniman.
This was an issue in the connect sdk library. The next beta version will contain a fix for this.

Hi all,

A new snapshot release for the OH2 version is available here:

I believe it is fair to assume that the connect sdk project will not be updated anymore. The LG released the team that created it. So I decided to fork and refactor the connect sdk android library. Removed all android mock classes and converted it to plain Java. Also, more than 180 high findbugs findings were fixed in that code.

The new plugin includes a new Application channel.

Item for it would look sth like this:
String LG_TV0_Application "Application [%s]"

Selection item=LG_TV0_Application mappings=[
	      	"com.webos.app.livetv"="TV",
            "com.webos.app.tvguide"="TV Guide",
            "netflix" = "Netflix",
            "youtube.leanback.v4" = "Youtube",
            "spotify-beehive" = "Spotify",
            "com.webos.app.hdmi1" = "HDMI 1",
            "com.webos.app.hdmi2" = "HDMI 2",
            "com.webos.app.hdmi3" = "HDMI 3",
            "com.webos.app.hdmi4" = "HDMI 4",
            "com.webos.app.externalinput.av1" = "AV1",
            "com.webos.app.externalinput.av2" = "AV2",
            "com.webos.app.externalinput.component" = "Component",
            "com.webos.app.externalinput.scart" = "Scart"]

If you want to see the full list of Id that your TV supports enable debuging, send sth to this item and monitor the logfile.
log:set DEBUG org.openhab.binding.connectsdk

In order to see the new channel in Paper UI I had to remove the Thing and add it again. The links to items remained.

Looking forward to your feedback.
Sebastian

2 Likes

@sprehn Thanks for excellent binding. Now i see channel numbers and names. I try your example but nothing happen. What channel should i use in this String:
String LG_TV0_Application "Application [%s]" {channel ??}

Have you removed the Thing and let it discover again? Only this way the new channel did show up for me.

No, sorry i try it now.

All works! This is so cool - thank you.

Hello! I’m sorry, but I think it mazahizm, very difficult to use without understanding how to connect. I killed a lot of time, but nothing works. There are instructions in the form:

  1. In a file named imya.konfig add this line
  2. in the file * .items add the following lines
    3 in such Site Map
    Open hub overload.
    Maybe this is obvious, but I’m sure not all.
    Thank you!

@Olymp

Could you specify more clearly what your question is. I am not aware of the mentioned form or an imya.konfig file.

Sebastian

Hello! I apologize for the English. I could not find readme with examples of connection. Could you give a link to the readme, which described step by step, how to connect the Binding. How to do it through the files: cfg, things, items, sitemap?
Thank you!

You only need to copy binding file in /addons folder, no configuration is needed for binding.
Discover thing, then add your TV trough PaperUI.
And then add items:

String	Device_TV_Toast			"Message to TV [%s]"	<television> { channel="connectsdk:WebOSTV:192_168_1_9:toast" } //Сообщение
String	Device_TV_Channel		"Channel number [%s]" 	<television> { channel="connectsdk:WebOSTV:192_168_1_9:channel" }
String	Device_TV_ChannelName		"Channel: [%s]"		<television> { channel="connectsdk:WebOSTV:192_168_1_9:channelName" }
String	Device_TV_App			"App [%s]"		<television> { channel="connectsdk:WebOSTV:192_168_1_9:appLauncher" }
1 Like

@sprehn which versions of webos are supported by this plugin? Do you know if 1.4.0 is supported? Toast work in all versions? Thanks

I forked connect sdk 1.6. here is its feature list: http://www.svlconnectsdk.com/SupportedFeatures/
Only webos component is available through the binding. And if I understand it correctly it also means that toast messages are only supported in webos 14

I have WebOs 1.4 .

I’m having one problem to connect to TV, but I don’t know what is missing.
I will describe my steps hopping you can help me…
I had installed the latest release 2.1
When I started um OH2 I checked in log that I have more than 1 network interface, and I setted using paper ui the IP of my server in the binding configuration.
After one restart I tried to search for things, using paperUi but no success.
The only log I get is:
2017-03-09 22:15:40.320 [DEBUG] [org.openhab.binding.connectsdk ] - BundleEvent STARTING - org.openhab.binding.connectsdk
2017-03-09 22:15:40.473 [INFO ] [ternal.discovery.ConnectSDKDiscovery] - {component.name=binding.connectsdk.discovery, component.id=222}
2017-03-09 22:15:40.497 [ERROR] [ternal.discovery.ConnectSDKDiscovery] - Autodetection of local IP (via getNetworkInterfaces) failed, as multiple interfaces where detected: [/fe80:0:0:0:37d5:b033:d896:e233%enp0s10, /192.168.1.67]
2017-03-09 22:15:40.503 [DEBUG] [org.openhab.binding.connectsdk ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.connectsdk.internal.discovery.ConnectSDKDiscovery}={component.name=binding.connectsdk.discovery, component.id=222, service.id=355, service.bundleid=226, service.scope=bundle} - org.openhab.binding.connectsdk
2017-03-09 22:15:40.755 [DEBUG] [org.openhab.binding.connectsdk ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.pid=binding.connectsdk, localIP=192.168.1.67, component.name=binding.connectsdk, component.id=223, service.id=356, service.bundleid=226, service.scope=bundle} - org.openhab.binding.connectsdk
2017-03-09 22:15:40.760 [DEBUG] [org.openhab.binding.connectsdk ] - BundleEvent STARTED - org.openhab.binding.connectsdk

Can you give me some help?

Thanks,
Regards

@sprehn
It’s possible to configure the IP of the TV manually instead of use the discovery service? Tried with this library and I can send toasts messages to my LG with webos 1.4.0.

Can you guide me for fix the problem?

Regards

Thanks for the help. I’m trying to configure everything through files. As will be the opportunity, I’ll try so! Where there is a TV, I am very rare.

I also have 1.4
I can not connect.

I disabled the IP v6

The same question.

Look at my pervious post

Thank you! As soon as I get there, I’ll definitely try to do it.

Just created a new Release.
The manual configuration of localIP had a bug and the binding never picked this up.
In addition you can now open a URL in the browser and start a movie on Netflix.

Please note, if you configured the local IP in configuration file cons/services/connectsdk.cfg, the key changed from

binding.connectsdk.discovery:localIP=192.168.1.1
to
binding.connectsdk:localIP=192.168.1.1

You would have to update your configuration.