Connect SDK Binding (for LG WebOS TVs)

webos
connectsdk
Tags: #<Tag:0x00007f01463e55f0> #<Tag:0x00007f01463e54b0>

(Håvard Berland) #386

I managed to get my TV discovered. The solution was to set

primaryAddress="192.168.1.20"

manually in /var/lib/openhab2/config/org/eclipse/smarthome/network.config
thus a pure IPv4 address, not a subnet mask as suggested and selectable in PaperUI. This means there is a bug somewhere, but not necessarily in the lgwebos binding.


(Sebastian Prehn) #387

In paper UI it shows me my servers IP / Subnet Mask. Does it offer you sth else?


(Håvard Berland) #388

PaperUI offers me “” (empty string), “10.8.0.1/32” (related to my VPN setup), and “192.168.1.20/24”. None of them allow discovery of the LGTV, and the two non-empty stops the SqueezeBox-binding from functioning. Squeezebox-binding is ok with the manually entered “192.168.1.20”


(Tejo) #389

Hi Sebastian, I finally able to detect my TV again since my last update on version 2.1.0 SNAPSHOT.
However, it ask for a new thing, that defines a new ID. Is there any way to make it use my old ID? I already create items and sitemaps and it is not fun to redo all of them


(Sebastian Prehn) #390

Yes it is correct. as the latest version uses the tv unique id and not the ip address

the only way to avoid to redo the assignment would be to hack the json files
you could shut down openhab and grep and replace the whole old id with the new one.


(David Dix) #391

As I get a TV on event, my rules switch to ‘TV mode’, which turns the lights back on. My flatmate then presses the ‘off’ button on the wall, which triggers the same ‘shutdown’ mode as when turning off the TV, only it also sends an ‘OFF’ signal to the TV, which for some reason turns the TV back ON if it’s in maintenance mode (it doesn’t do anything after that). This in turn turns all the lights back on. Then, about 4 minutes later when the TV finishes it’s maintenance cycle, I get a ‘TV off’ event once more, and everything shuts down as it’s supposed to.
What I’m going to do for now is add a timer and ignore the ‘OFF’ event for a little while after receiving it.

I’m new to openHAB and have been experiencing this same issue for the past week as I try to make a set of rules to keep all my home cinema kit in sync.
Would you mind sharing the rules code for how you fixed this issue as it’s been driving me mad the last 3 nights.


(Matt Shepherd) #392

Hey, I’m not sure if this problem has been resolved in this thread but Openhab won’t connect to my TV once it has been turned off? The TV still shows offline when it’s turned back on?..

Any help will be grateful.


(Unparagoned) #393

Thanks for your hard work on this kick ass binding. In the future when you have the chance please could you add back in the config option to select the network adaptor that the TV is connected vias it’s i.p. Just like it was before where you select the ip address of the openhab device that the TV is connected to. While the primary address in paperUI works, the TV is not on the primary network like the rest of my devices it’s on a seperate network due to VPN issues. You can use the paperUI primary address as the default but I it would be useful if we had the option to override the default though the config options as before. It’s only matter of time until other bindings on the main network start using the primary ip as well, resulting in some conflicts, (I think my dash binding might be playing up already).

I’m guessing this might be a quite niche feature, so I’m fine if I need to edit a config file, etc. Or if it’s not something on your radar I’ve been wanting to dip my toes into a closer look at bindings. Would it be possible if I tried adding back the option myself? From what I can tell it seems like changing the code is going to be the easy part with the hard part setting up the environment and keeping to all the rules around editing a openhab binding.


(Sebastian Prehn) #394

I agree. Multiple users have found that it would be advantageous to bring this feature back.
Could you do me a favor and raise an issue in the project. I’ll work on bringing this feature back, meanwhile.


(fandy) #395

Hi Sebastian,

First of all great great work on the binding, i managed to install everything, and everything basically works (like turn off, mute, turn volume up/down) after the TV has been manually switched on.
However i cant get my TV to be turned on from the OH2, any tips? it shows the tv is offline when its switched off.


(Sebastian Prehn) #396

Hi @fandy

the API does not support powering on the TV, cause the API is not online, when turned off. Some TVs support wake on lan. See the documentation and search this thread for wake on lan - it has been discussed.


(Sebastian Prehn) #397

This feature is now merged into the main project and should be available soon in the snapshot builds.


(fandy) #398

Hi

thanks for your reply, im trying the wake on lan, it doesnt seems to work. Im just wondering what ip address i need will need to be set at the items, i believe thats not the TV IP address is it? and is that TV mac address?

Switch LG_TV0_WOL {wol=“192.168.2.255#3c:cd:93:c2:20:e0” }


(Sebastian Prehn) #399

First check the menu entry under general settings to allow mobile devices to start the TV. This had to be enabled. But not every LG WebOS TV seems to have it.

The 255 in the end is the broadcast IP of the network. Change the first three octets to match your network. The second component is your TVs mac address, correct.


(fandy) #400

i checked my tv to allow mobile device to start the TV, and i change the broadcast IP network to match my network and put the TV mac address but it doesnt seem to work. Anyway i can troubleshoot?


(fandy) #401

i just realised WOL binding needs to be installed. Now its all good thanks


(Matt Shepherd) #402

Hi I have an issue with the binding going off line? It’s giving the error:
Failed to create folder structure to device store /var/lib/openhab2/lgwebos

Any help would be appreciated.


(Sebastian Prehn) #403

please check permissions on your folders


(Petr Leitermann) #404

Hi,

first of all, thanks for your great work! I was using Connect SDK Binding on my raspbian for quite some time without any issue.

However, one day all was lost and I had to clean install to upgrade my openhabian, and now am not sure, which is the correct version. Came across two available add-ons.

One here - https://github.com/sprehn/openhab2-addons/releases/ which I believe is the same as the one here https://docs.openhab.org/addons/bindings/lgwebos/readme.html (at least the version seems to be the same)

Second one is Connect SDK binding available here, yet quite out of date with last release in January '16 https://github.com/sprehn/openhab/releases/

Main issue for me is I want to use the “LG_TV0_Input” item, which I can’t find in the 2.2.0 package.

Sorry for possible incompetence in finding the answer myself :slight_smile:

Petr


(Sebastian Prehn) #405

Hi Petr,

the GitHub releases in your first link are the beta releases for OpenHab 2. If you are on OH2 you should use the lgwebos binding that comes with the official release - your second link.

The third link is for legacy OH1.

If you want to switch between inputs, check out the appLauncher channel.

I suggest, bind a string item against it, and observe the values, while you switch inputs on the TV. you can then send the value to the channel to switch. LG WebOS treats hdmi as applications, just like the tv guide etc.