LGWebOS Binding (for LG WebOS TVs)

Tags: #<Tag:0x00007faf825909c8> #<Tag:0x00007faf82590900>

Hi Sebastian,

thanks for the quick response! That helps.

Best Budo

Hi @JimT,

that’s cool thanks a lot!

Best Budo

@memphiz : I proposed a fix for your problem.

1 Like

My PRs are now merged and the changes will be available in 2.5.5.
@memphiz : selecting the channel through the UI will now switch to the right channel even if you have several channels with the same number. As command for this channel, you can still use the channel number but you can also use the channel id which is of course the solution when you have several channels with the same number. To know what are the channel ids, there is now a console command to display them.

Great! Works perfect!

Thanks a lot,

You have this error while using NEXT/PREVOIUS?

[INFO ] [.lgwebos.internal.MediaControlPlayer] - Only accept PlayPauseType, RewindFastforwardType, RefreshType. Type was class org.eclipse.smarthome.core.library.types.NextPreviousType.

To get your Player item work correctly use this simple workaround:

rule "Set working Player FASTFORWARD Command"
	TV_Player received command NEXT 

rule "Set working Player PREVIOUS Command"
	TV_Player received command PREVIOUS 

The fix for the code seems to be simple, too:


import org.eclipse.smarthome.core.library.types.RewindFastforwardType;


import org.eclipse.smarthome.core.library.types.NextPreviousType;

 else if (NextPreviousType.NEXT== command) {
} else if (NextPreviousType.PREVIOUS== command) {

in MediaControlPlayer.java :wink:


Edit: latest version works fine.
@sprehn I had a play with pywebostv to see how it dealt with the volume when using an AVR device. To my surprise it works perfectly. It tells you the cause of the event, volumeUp/Down. The actual volume level seems to be fairly accurate. It works perfectly, it would be great if you could add support for it.

{u'scenario': u'mastervolume_ext_speaker_arc', u'muted': False, u'changed': [u'volume'], u'volume': 26, u'active': False, u'action': u'changed', u'cause': u'volumeUp'}

Can somebody help me?

It depends on what version of the binding you are running.
Until version 2.5.4 or 2.5.5, you can get the key by opening the configuration page of your thing in Paper UI.
In 2.5.5 or 2.5.6, this will be masked in Paper UI (for security purpose) but you have now a console command to show you the value of the key.
Sorry, I don’t remember if my change is already in 2.5.5 or not.
So first check in Paper UI and if masked use the console command.

Were you able to figure this out?

No, if I restart the openHAB service, the tv ask again: Do I want to connect? Like the first time.

I took the code and added a debug line to print the key and then after getting the key, went back to the current version.

Thanks, it is not enough pain to do that, but I will some day when I will have enough time.

Sorry, I missed your message. I have 2.5.5 but no accesskey in console.

openhab> lgwebos
Usage: smarthome:lgwebos <thingUID> applications - list applications
Usage: smarthome:lgwebos <thingUID> channels - list channels
openhab> smarthome:lgwebos lgwebos:WebOSTV:LGTV accesskey
Usage: smarthome:lgwebos <thingUID> applications - list applications
Usage: smarthome:lgwebos <thingUID> channels - list channels

So just pair with your TV and check in Paper Ui the value of the key. Copy and paste this value in your config file. That’s all.

Nothing is there. The device id line is empty.

Enable the debug logs and show us your logs when pairing your TV.

Is your thing ONLINE after pairing?

Yes, it is online. I set debug logging, restart service and connect to tv again. Can you tell me a string what I can find in the debug log? It is huge.

Once paired and your OH has completed its startup, your command should spit out the accesskey. I went the route of recompiling the binding code and telling it to print the accesskey because I couldn’t get the command right. I tried your command in the console with my and it worked. If you can’t get it to work, I’d suggest you remove the binding, reload it, accept the discovered TV, accept the pairing on your TV, and then try the command again.