LGWebOS Binding (for LG WebOS TVs)

Hello!
I managed to connect to my TV!

Thanks for the help!

Thanks for this great job and for the time spent on it!
Unfortunately I did not have the opportunity to fully test, the next weekend will continue. I noticed that the volume is displayed as a tenth (0.12), is it something I messed up or should it be? I mostly use smartshare (com.webos.app.smartshare - SmartShare), in this mode do not work: forward, rewind, should they work in this mode?
Can I switch to video immediately by selecting this mode?
Can I get the name of the track and artist?

I managed to open a browser, but how to transfer the required URL to it?
Thank you!

I think that you don’t need one new binding, simply add one new service to the osgi. Example:

<implementation class="org.openhab.action.openwebif.internal.OpenWebIfActionService" />

	<service>
		<provide interface="org.openhab.core.scriptengine.action.ActionService" />
		<provide interface="org.osgi.service.cm.ManagedService" />
	</service>

	<property name="service.pid" type="String" value="org.openhab.openwebif" />

Check the implementation class here:

You can inject your service using osgi, into the action service and then simply call your methods to perform the actions.
If you need help, ask me and I will try to help you! :slight_smile:

Cheers!

Maybe a little bit off-topic, but did anyone get WOL (Wake on LAN) to work? I installed the WOL binding, everything is configured correctly (broadcast IP, MAC address), a sniffer on my PC is getting the WOL signal, but the TV is not getting turned on. I’m using LG 55EC930V / WebOS 1.4.0. Turning off via Connect SDK works fine…

Hello!
I also have WebOS 1.4
My TV does not support WOL. When the TV is turned off, there is no power on the network interfaces. To check, connect the TV to the router by cable, via LAN. Turn off the TV and see if the LED on the LAN LIGHT of the TV lights up. If not, you can not turn it on.
So here is the information from the author of this binding:

I understand English very badly, but he says:
In the settings menu of your TV you need to enable the option to allow Apps to remotely turn on the television.
I have no such settings :frowning:
I hope that I’m wrong and you can turn on any TV, if someone knows something about this, please let me know.

I have the same problem (no WOL option).
My workaround is to turn on the TV via HDMI-CEC. I have a Chromecast, after streaming something to the Chromecast the TV is activated. Even if you don’t want to show something on ChromeCast, you could:

  • Start a Chromecast stream - TV turns on;
  • Switch to the relevant channel;
  • Stop the Chromecast stream (TV remains on);

On my LG 60UF7709 this can be enabled in the general settings.

Unfortunately, I don’t have this option. Probably this means that my TV does not support it :frowning: Chromecast is a nice idea, but I intentionally turned CEC power synchronization off, otherwise my TV’s power status would be bound to my AVR which I want to control independently…

Hello Sebastian!
Thank you for showing how it looks, it is better to see once than to hear a hundred times :slight_smile: Indeed, I do not have such a setting, you are very lucky !!!
//***
Have I offended you by anything?
Or my English (Google translator) is so bad that you can not understand what I’m asking for help (Connect SDK Binding (for LG WebOS TVs))?
Thank you!

Hey Sergey,

I am not offended at all. The truth is, I don’t know all the answer to your questions.

With the latest version you can sent the url as a string to the browser channel. It will open the browser application with the given url. I noticed it will open a new tab every time you send it.

I am not familiar with smart share. I only expose those connect sdk features in the binding. if those player controls don’t work it may have to do with the smart share app on the TV.

Regarding Track and Artist, that is currently not possible with this binding. Not sure if this is accessible through the TV’s API.

Re volume, It is a Percent Type, I guess that is why it will display like this if rendered as a text.

Thank you so much, I don’t know why I hadn’t seen this before.
Is it possible that you can update the version for OpenHAB 1.8 as well, it seems the addon starts acting up after a couple of hours.

java.io.IOException: Can't assign requested address
	at java.net.PlainDatagramSocketImpl.send(Native Method)
	at java.net.DatagramSocket.send(DatagramSocket.java:693)
	at com.connectsdk.discovery.provider.ssdp.SSDPClient.send(SSDPClient.java:90)
	at com.connectsdk.discovery.provider.SSDPDiscoveryProvider$4.run(SSDPDiscoveryProvider.java:209)
	at java.util.TimerThread.mainLoop(Timer.java:555)
	at java.util.TimerThread.run(Timer.java:505)```

My 75UH885V has this setting and I enabled it. But it does not work. If I switch the TV by TV-remote on/off the switch on my sitemap shows the status well. I cannot switch the TV on by this binding. It only works via the Wake-On-Lan binding. What am I doing wrong?!

Hm, I had it running for over a year, and did not experience this kind of issue. I’ll see if I find time. At the moment I am working on enhancements in OH2 version.

works as desired. turning the system on is not supported by connect sdk

Ah ok … then I got it wrong. Thanks a lot for the fast reply!!!

I had some hiccups with another binding, it might have had something to do with that, I’ll look at it later tonight.
Thanks again.

Are you working on actions in the binding? :grin: Cheers!

yes, already got it working, now i am trying to find the best way to design the api. sth. like showToast(ip, icon, msg) - ideas welcome. also I think in this case I should remove the toast channel.
but need to focus on a couple non-openhab topics this week :wink:

PDU in my openhab server broke. it needs a couple of fresh capacitors

wooohh… what is your setup for openhab server?

Hello Sebastian, thanks for your work. I red everything about your binding but I’m still not able to get it Online. I’m on OH2 and Binding do not detect the TV. I force the IP address in the PaperUI - configuration - binding - Connect SDK binding but the thing remain Offline. All channel are linked. I got always this in the log:

21:09:32.739 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘connectsdk:WebOSTV:4f9ce2f4’ changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
21:09:32.742 [INFO ] [me.event.ThingStatusInfoChangedEvent] - ‘connectsdk:WebOSTV:4f9ce2f4’ changed from INITIALIZING to OFFLINE

Everything seems to be set correctly on the TV, I tried out LG TV plus on my IOS device and it is working. Is there something else I could try?