LGWebOS Binding (for LG WebOS TVs)

if you set the IP it should immediatly say
[DEBUG] [ternal.discovery.ConnectSDKDiscovery] - localIP parameter explicitly set to: 192.168.0.6

are you using the latest version of the binding?

I wasn’t apparently, thanks!

I can use it now using the paper UI, but I am a little bit new to openhab2 and wonders how to config everything manually. I can’t find any thing-config anywhere in your posts or documentation, is that not needed? Only items?

Set up a couple of items. You can do this in the items file or in paper ui (these will be stored in the paper ui database). I am personally using the traditional items file.
then go to paper ui configuration page for things and bind the TV’s channels to items.

Tried that, works fine! :slight_smile: Btw, it seems the TV doesn’t power on if I let it be for a while, I guess it goes to some kind of sleep mode. Do I need to combine WOL with the power command somehow or how have you solved this?

yes, you have to combine it with the WOL binding.

Switch LG_TV0_Power "TV Power" <television> (Entertainment)
Switch LG_TV0_WOL	{ wol="192.168.2.255#3c:cd:93:c2:20:e0" }
rule "Power on TV via Wake on LAN"
when 
Item LG_TV0_Power received command ON
then
	sendCommand( LG_TV0_WOL, ON) 
end

You also have to enable WOL on your TV. See the screenshot I posted earlier. We already found out in this forum that not all LG TVs support this though.

Hi again, have experimented with your suggested solution, but it seems very unstable at least with my system. Sometimes the TV starts, sometimes it doesn’t. Sometimes my gui (habpanel) thinks the the TV is on while it’s off and vice versa. I even tried to have separate buttons for power on and WOL while testing, but I can’t see any logic to when it works and when it doesn’t. Seem like the binding just finds the TV sometimes and then sometimes it’s gone again. Can I enable debug for your binding somehow? All I see right now is these kind of prints:

14:57:05.838 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'connectsdk:WebOSTV:192_168_0_5' changed from ONLINE: Device Ready to OFFLINE
14:58:51.705 [INFO ] [me.event.ThingStatusInfoChangedEvent] - 'connectsdk:WebOSTV:192_168_0_5' changed from OFFLINE to ONLINE: Device Ready

Also I might add that I use wifi for my TV, not sure if WOL is less stable on that, but I don’t think it should be.

Hi @all,

can you tell me, how to launch an app e.g. amazon video?
Do I have to assign the app name string to the openhab app string variable via rule? Or how does this work?

Best
Malte

Please see my post on 26-Feb:

Thank you very much! I must have missed this while browsing the thread

Sorry :slight_smile:

no worries. this thread can not replace a proper documentation. it is a TODO

Hi sprehn,

first of all thanks for the good work done for this binding. Highly appreciated.
I use OH2 at the moment I have some remarks regarding to your documentation.
under OH2, when defining items one should use the new format instead of the one used in OH1 for linking items to channels:
for OH1:

String LG_TV0_Toast		{ connectsdk="lgwebostv.fritz.box:ToastControl:toast" }

for OH2:

String LG_TV0_Toast		{ channel="connectsdk:WebOSTV:192_168_178_21:toast"}

the command

LG_TV0_Toast.sendCommand("Welcome to Openhab")

works fine in rules, but it displays the OH logo icon. I did not find any way to use method showToast.

Help appreciated.

There is really a need to create a OH2 documentation. You were looking at the 1.8 version. Does somebody have experience how to prepare the docu for OH2 plugins.
I also think it is time to think about merging this plugin into the official project. I will remove a couple of channels that are available via rule actions now.
@Alexus1211 how to use the action with custom icons is documented in this thread a couple of posts up.

Thanks,

it works now. I just needed to include import org.openhab.binding.connectsdk in order to make it work, otherwise showToast was causing an error in the logs.

Cheers

Hi,
I also have a problem with my LG TV. With me runs OH2 on a Windows machine. I installed the most recent version “Connectsdk Binding 2.1.0 snapshot 201703262307”. The connection also works so far up on the appLauncher.
In the log I always get the following error message:
2017-05-04 21:41:46.162 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command ‘netflix’ for item ‘LG_TV0_App’ to handler for channel ‘connectsdk:WebOSTV:192_186_2_116:appLauncher’, because no thing with the UID ‘connectsdk:WebOSTV:192_186_2_116’ could be found.
2017-05-04 21:41:49.709 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command ‘com.webos.app.tvguide’ for item ‘LG_TV0_App’ to handler for channel ‘connectsdk:WebOSTV:192_186_2_116:appLauncher’, because no thing with the UID ‘connectsdk:WebOSTV:192_186_2_116’ could be found.
2017-05-04 21:41:55.100 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate command ‘com.webos.app.hdmi1’ for item ‘LG_TV0_App’ to handler for channel ‘connectsdk:WebOSTV:192_186_2_116:appLauncher’, because no thing with the UID ‘connectsdk:WebOSTV:192_186_2_116’ could be found.

Can you help me there
Thank you

Hi
seems like the channel is not properly bound to your item. Don’t think this is an issue with the binding.
Cheers
Sebastian

Hi Sebastian,

I’ve just set up the Connect SDK Binding. The installation was a smooth process. Thanks!

The purpose of most channels are pretty obvious. However, I don’t get the purpose of some of the channels. Especially channels that are strings. What kind of values are expected?
connectsdk:WebOSTV:192_168_3_20:program
connectsdk:WebOSTV:192_168_3_20:externalInput
connectsdk:WebOSTV:192_168_3_20:appLauncher
connectsdk:WebOSTV:192_168_3_20:netflixLauncher
connectsdk:WebOSTV:192_168_3_20:huluLauncher
connectsdk:WebOSTV:192_168_3_20:youtubeLauncher
connectsdk:WebOSTV:192_168_3_20:browserLauncher

Thanks!

Hi,
externalInput can be used to switch to hdmi sources or other external input. However this can also be achieved with the more versatile application (appLauncher) channel.

program is not working for me on my LG. It is supposed to provide additional details. It is read-only anyhow.

I have removed netflix hulu youtube and browser launcher channels again (still have to release this). this is availabe via actions in rules. The reason why these are of type string - you can pass a value to the TV. e.g. a URL to the browser. a netflix movie id to the netflix channel. I could not get youtube to work and don’t have hulu to test.

Kind Regards
Sebastian

Sorry guys. I had been on a business trip the last two weeks and have some catching up to do.
I am testing a release candidate now in my own setup. Will share it here after a while.

The next steps would be to create some docu and submit the plugin to the main project.

Hi Sebastian,
Thank you for your input!

I guess “program” wouldn’t work for me either. We are watching TV via an external decoder (input via HDMI). I’m assuming “Program” would only show a value when the TV cable is directly inserted in the Television.

I guess externalInput requires inputs like “HDMI1”, “Component”, “AV2”,
). Would applauncher work the same way?

Kind regards,
Dries