Connect SDK Binding (for LG WebOS TVs)

webos
connectsdk
Tags: #<Tag:0x00007f014412d170> #<Tag:0x00007f014412d008>

(Bruce) #426

Yeah my apologies, i started creating all items sitemaps and rules files yesterday so i’m still a big NOOB hehe.

I had the coding a bit wrong and was able to get it to work by switching up my rules a bit. Now i’m able to say to google home Turn On HDMI 1 and it will switch my channel to HDMI 1. kinda awesome!

rule “Switch to HDMI 1”
when
Item TV_HDMI1 received command ON
then
TV_Application.sendCommand(“com.webos.app.hdmi1”)
end


(Filip M) #427

Hi all, hope you could help me out.
I have installed LG webOS Binding earlier this year and it worked fine for a while. Then it suddenly stopped working. I tried to remove the Thing and adding it again but adding gets stucked in the Uninitialized state every time.
I am using OH 2.3.0-SNAPSHOT (#1268) and have binding-lgwebos - 2.3.0.SNAPSHOT installed. I did all un/installing via PaperUI.
Have you had such issue? How should I proceed?


(Sebastian Prehn) #428

when you re-add. Did you use discovery via Paper UI?
From 2.2 to 2.3 you have to set the device ID property for the Thing. But the easiest way is to remove and add the thing, which will take care of this property.


(Filip M) #429

I tried removing and adding the thing again. The newly added thing is sill in the uninitialized state. I checked the openhab log and found this line
2018-05-13 09:46:42.541 [WARN ] [ore.thing.internal.ThingRegistryImpl] - Cannot create thing. No binding found that supports creating a thing of type 'lgwebos:WebOSTV'.


(Sebastian Prehn) #430

did you discover the new thing via paperui inbox? cause I don’t understand how you could discover it and then not have a binding to handle this type


(Filip M) #431

TV is not being discovered automatically via the inbox. I need to add it using the things plus button and selecting LG WebOS Binding. It is worth saying that the TV is on and other apps on the same network are able to control it (e.g. chrome add-on).

Edit: If I add the Item using Inbox/“Search for things” button the result is the same (Thing added uninitialized).


(Sebastian Prehn) #432

So on the one hand sth must be wrong with the binding installation. this binding should handle lgwebos:WebOSTV.
The other is discovery. If this does not work the binding will not see your TV online. You could check your network configuration. The binding uses the network interface configured in openhab settings. you can specifically set the network interface also under binding properties: localIP


(Ihor Bat) #433

Hello.
what’s wrong here? everything works and channels do not switch …

2018-05-28 20:02:58.039 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'LG_TV0_ChannelUp' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-05-28 20:02:58.041 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.Switch

2018-05-28 20:02:58.044 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'LG_TV0_ChannelUp' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-05-28 20:02:58.048 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'LG_TV0_ChannelUp' for widget org.eclipse.smarthome.model.sitemap.Switch

2018-05-28 20:02:58.051 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item 'LG_TV0_ChannelUp' for widget org.eclipse.smarthome.model.sitemap.Switch

==> /var/log/openhab2/events.log <==

2018-05-28 20:03:03.112 [ome.event.ItemCommandEvent] - Item 'LG_TV0_ChannelDummy' received command 1

2018-05-28 20:03:03.133 [vent.ItemStateChangedEvent] - LG_TV0_ChannelDummy changed from 0 to 1

2018-05-28 20:03:03.167 [ome.event.ItemCommandEvent] - Item 'LG_TV0_ChannelNo' received command INCREASE

2018-05-28 20:03:05.012 [ome.event.ItemCommandEvent] - Item 'LG_TV0_ChannelDummy' received command 1

2018-05-28 20:03:05.047 [ome.event.ItemCommandEvent] - Item 'LG_TV0_ChannelNo' received command INCREASE

(Jaime Vaz) #434

The Actions have been removed in code review, but when they will be recovered? it’s a waste of effort doing one functionality to throw it to the trash bin! :frowning:


(Sebastian Prehn) #435

But no traction on this PR currently.


(Nakh Home) #436

Hi

First, thank you for this amazing binding. It works great

Is it possible to launch the browser on a specific url from a rule?


(Sebastian Prehn) #437

I was possible with an older version of the binding but I would not recommend to use it anymore.
It will be available again as an action in the new ruleengine. This is currently under development and
@Kai and @wborn just responded to the PR recently that I mentioned in my previous post.


(Nakh Home) #438

Thanks Sebastien for your answer

Did I well understand?

In 2.4, there will a new binding with more capabilities?


(Sebastian Prehn) #439

Yes. if all goes well


(Nakh Home) #440

Good luck

Rely on me if you need beta user


(jo47011) #441

Hi Sebastian,

I’m stuck on a higher level. When I install the binding via the paper UI no thing gets discovered. The messages are the following, no matter whether the TV is on or not:

2018-07-14 21:15:52.068 [DEBUG] [org.openhab.binding.lgwebos         ] - BundleEvent INSTALLED - org.openhab.binding.lgwebos
2018-07-14 21:15:52.350 [DEBUG] [org.openhab.binding.lgwebos         ] - BundleEvent RESOLVED - org.openhab.binding.lgwebos
2018-07-14 21:15:52.362 [DEBUG] [org.openhab.binding.lgwebos         ] - BundleEvent STARTING - org.openhab.binding.lgwebos
2018-07-14 21:15:52.502 [DEBUG] [.internal.discovery.LGWebOSDiscovery] - Config Parameters: {service.pid=binding.lgwebos, localIP=192.168.2.107, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=257}
2018-07-14 21:15:52.507 [DEBUG] [.internal.discovery.LGWebOSDiscovery] - localIP property was explicitly set to: 192.168.2.107
2018-07-14 21:15:52.518 [DEBUG] [org.openhab.binding.lgwebos         ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery}={service.id=391, service.bundleid=243, service.scope=bundle, localIP=192.168.2.107, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=257} - org.openhab.binding.lgwebos
2018-07-14 21:15:52.554 [DEBUG] [org.openhab.binding.lgwebos         ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=392, service.bundleid=243, service.scope=bundle, localIP=192.168.2.107, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.LGWebOSHandlerFactory, component.id=258} - org.openhab.binding.lgwebos
2018-07-14 21:15:52.565 [DEBUG] [org.openhab.binding.lgwebos         ] - BundleEvent STARTED - org.openhab.binding.lgwebos

I tried almost everything stated in this thread. I’m running openhab 2.3.0-1, your binding 2.3.0. Running on a RPi, firewall disabled. TV (192.168.2.107) is pingable, connected via LAN not WLan. TV Connect Apps is enabled. Name of TV is lgtv (no spaces or alike).

No pairing message appears on the screen and no thing is discovered so I don’t know the device ID and did not succeed on manually creating a thing.

Any hints for me?

Thank you very much in advance
Karl


(Sebastian Prehn) #442

Hi Karl,
don’t set the TV’s IP (192.168.2.107) in the binding config. This needs to be the IP of your openhab instance. If auto-detection of your local openhab IP does not work, and setting it via PaperUI > Configuration > System > Network Setting neither, then set your local IP (which has to be on the same network as the LG) in the binding config.
Kind Regards
Sebastian


(jo47011) #443

message is obsolete, solution below.


(jo47011) #444

Hi Sebastion,

issue is solved. I found the binding config:

var/lib/openhab2/config/binding/lgwebos.config

There the IP was hardcoded, don’t know why. I manuall removed all lgwebos files (including config, jar files, etc.) which remained on the system even after de-installing via paper UIand re-installed everything. Now it works.

Great! Thanks a lot for all your work & support :slight_smile:

Have a nice Sunday
Karl


(Stefano Badoino) #445

Hi Sebastian,

I was happily using your binding with no problem at all when suddenly, some days ago, my TV went OFFLINE and never got back online again. I tried deleting the TV and started a new discovery process, but no thing got discovered. These are the only logs I get:

22:31:05.830 [DEBUG] [org.openhab.binding.lgwebos          ] - BundleEvent STARTING - org.openhab.binding.lgwebos
22:31:05.832 [DEBUG] [org.openhab.binding.lgwebos          ] - BundleEvent STARTED - org.openhab.binding.lgwebos
22:31:05.894 [DEBUG] [s.internal.discovery.LGWebOSDiscovery] - Config Parameters: {service.pid=binding.lgwebos, localIP=192.168.1.100, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=195}
22:31:05.895 [DEBUG] [s.internal.discovery.LGWebOSDiscovery] - localIP property was explicitly set to: 192.168.1.100
22:31:05.909 [DEBUG] [org.openhab.binding.lgwebos          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery}={service.id=316, service.bundleid=223, service.scope=bundle, localIP=192.168.1.100, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=195} - org.openhab.binding.lgwebos
22:31:05.924 [DEBUG] [org.openhab.binding.lgwebos          ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=317, service.bundleid=223, service.scope=bundle, localIP=192.168.1.100, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.LGWebOSHandlerFactory, component.id=196} - org.openhab.binding.lgwebos

Some info:

openHAB Version: 2.3.0
LG WebOS Binding Version: 2.3.0
Firewall enabled/disabled: no difference
Server IP: 192.168.1.100
TV IP: 192.168.2.130, pingable from the server
TV Connect Apps is enabled

I also think that the TV got a firware update, but I’m not 100% sure (I briefly saw a toast message saying something like “the TV software was successfully updated”) and I don’t know if the problem started after or before this update.

Any advice? Thanks!