LGWebOS Binding (for LG WebOS TVs)

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?

Hi Martin,

Was your TV discovered, you found it in your inbox, you connected channels, but then this error occurs?
Or did it never appear in your inbox, and you manually configured sth.?

What surprises me is the thing ID. mine looks like this: “connectsdk:WebOSTV:192_168_2_119”. Are you using IPv6?

Kind Regards
Sebastian

A Chenbro ES34169 case that carries a mini itx board and a core i3. Everything repaired and back in service now.

Never succeed to get the TV discovered automatically in the inbox. The log I sent you was after manual configuration. Following the normal thing ID, I do understand my problem is around that. Both IPv6 and IPv4 was active. I removed IPv6 selection and tried again another automatic Thing discovery. Same result. Should I try to start it up from the beginning by de-installing the binding? If so, how to proceed?
Sorry for all those basic questions. I’m still in the learning curve of openhab. I succeed to work with many other binding however but it’s the first time I have to deal with a JAR file to install something.

Thanks

I think the jar file install process is not the issue. Seems like this jar is properly loaded.
If the binding does not automatically discover the TV then it is likely an issue related to the IP address that this binding listens to. It tries to auto detect the primary lan interface. But if more than one is available it has to be configured.

First delete the manually created thing. (or leave and ignore it, but it will not work this way)

Please try this:
ssh into your openhab console and enable logging in debug mode
see http://docs.openhab.org/administration/console.html
and http://docs.openhab.org/administration/logging.html

ssh openhab@localhost -p 8101
<enter your password, typically habopen>
log:set DEBUG org.openhab.binding.connectsdk
log:set DEBUG com.connectsdk

Now go into paper ui and configure the single config parameter that this binding has: Local IP.

It has to be the network interface that is on the same LAN as your tv.

Now check the content of your openhab.log file. If it still does not work, I’d need input from your log file.

Sebastian

Still not working… Does it matter if the TV is connected on WIFI or Ethernet? Mine is currently on WIFI. To answer your question, I only have one TV on my network.
I tried to force the local IP manually (you talked about ‘‘network interface’’. I’m running OH2 on Raspberry PI connected on WIFI, so I used this IP address).
See below the two lines generated on the requested log:

16:48:01.684 [DEBUG] [org.openhab.binding.connectsdk ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.pid=binding.connectsdk, component.name=binding.connectsdk, component.id=207, service.id=340, service.bundleid=216, service.scope=bundle} - org.openhab.binding.connectsdk
16:48:01.730 [DEBUG] [org.openhab.binding.connectsdk ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.pid=binding.connectsdk, localIP=192.168.2.31, component.name=binding.connectsdk, component.id=207, service.id=346, service.bundleid=216, service.scope=bundle} - org.openhab.binding.connectsdk

I finally tried to force ConnectSDK Binding Thing search without result.

I run PaperUI under Windows10. I hookup the PI with Putty. Could I have an issue with IPv6 even if I disable it on my wireless adapter? (see below)

Regards.

A new version available here: Releases.

it contains support to use actions in rules.

So far supported are:

showToast("192.168.2.119", "Hello World!")

First parameter is the deviceId, which is IP address. Second parameter is the actual message to display.
The default openhab logo will be used as toast icon.

val url = "http://localhost:8080/icon/energy?state=UNDEF&format=png"
showToast("192.168.2.119", url , "Hello World!")

Alternatively you can use this method signature to provide a customized icon. This way you can use the iconset as shown in the example. But you can also reference any file on your disk like so:

val url = "file:///Users/sprehn/logo.png"

Syntax has to follow Java URL Standards.
SVG format will not work. png, jpg, gif should all work.
Max file size must not exceed 100KB once converted to PNG (which is what internally happens)

I have not yet removed the toast channel.
Happy testing. Feedback welcome.

Hi,

please use the latest binding. You are experiencing an issue that was already identfied as a bug and solved.

If set manually please look for:
[DEBUG] [ternal.discovery.ConnectSDKDiscovery] - localIP parameter explicitly set to: 192.168.2.106

if not set you should see this
[DEBUG] [ternal.discovery.ConnectSDKDiscovery] - Autodetected (via getLocalHost) local IP: Sebastians-MBP.fritz.box/192.168.2.106

obviously for your IP: 192.168.2.31

Everything set automatically in less than 30sec with this release. For me it’s just magic. Thanks a lot!

Great news! I will test it today! :smiley:

@sprehn I tested yesterday and it worked liked a charm! I must to check what is happening with the background of the images I passed because It was displayed with one ugly border. You tested send one png image without background color?

You will convert the other actions, like launch one application?

One good feature you can probably do is, to get the default TV IP address. For example I only have one TV configured, It shouldn’t be necessary to specify the ip address for each notification I want to send. It’s a nice to have, but I can live with it! :slight_smile:

Congratulations for your developments, and in name of community thanks for your good work! :slight_smile:

I tested with openhab png icons and transparency was no issue. It depends on the source image I guess.

Yes, I think launching apps, opening url in browser etc, should be the next feature.

Ok I will try it :slight_smile: I left you one feedback later :wink:

@sprehn I tried to pass one png from the default iconset from openhab:
val url = “http://localhost:8080/icon/garagedoor?state=10&format=png
showToast(“192.168.1.197”, url , “A porta da Garagem foi aberta.”)

It comes with one black background, instead of transparent. You do you think is the source?

Yes, it also shows with black background on my TV.

but try this one:

http://localhost:8080/icon/energy?state=UNDEF&format=png

This one renders just fine.

I have the same problem with ipv6, do I really have to disable it to get this to work?

Autodetection of local IP (via getNetworkInterfaces) failed, as multiple interfaces where detected: [/fe80:0:0:0:fa9:3d6a:7989:3d42%enp3s0, /192.168.0.6]

I’ve set the IP in paper config to 192.168.0.6, but doesn’t seem to help…