LGWebOS Binding (for LG WebOS TVs)

Thank you. @HaKuNa

@sprehn do you know of a way to tell that the TV is in its ā€œscreensaverā€ mode? The idea is to automatically turn off the TV once the screensaver has been showing for a period of time. AFAIK the TV itself doesnā€™t have such a feature.

The application stays the same (e.g. Youtube) when the screensaver is on.

I have had issues sometimes with the WoL since probably at least 6-8 months back in time.

Changing input etc works, volume up/down works so the binding is authenticated.

But for some reason it almost never works to power on the TV. Power on works without issues. Anyone noticed something similar or know why this could be? Model is 65C9.

Edit: OpenHAB 3 by the way.

1 Like

Hi, if i send command ā€œ1ā€ to ā€œrcButtonā€ channel, my tv show toast message ā€œplease use magic tv remote to controlā€.
I need working samle, may be someone has one?

Number  devTvRoomChannelToSet

rule "devTvRoomChannelToSet CHANGED"
when
	Item devTvRoomChannelToSet changed
then
   var String ch = devTvRoomChannelToSet.state.toString
    var int cnt = 0
    ch.toCharArray.forEach[
        Thread::sleep(200)
        val String chStr = (ch.toCharArray.get(cnt)).toString        
        devTvRoomButton.sendCommand(chStr)
        cnt += 1
    ]
end

I see that commands to ā€œrcButtonā€ channel works only when Magic Remote is active, when Magic Remote in sleep mode, i see message about ā€œuse magic remoteā€.

Hi I have some troubles with the Binding.
I get the Text message size exceeds error.

I have installed OH3.

Can someone help me with my issue?

2021-03-26 19:31:22.082 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'lgwebos:WebOSTV:a9161f51eb' changed from ONLINE: Connected to OFFLINE (COMMUNICATION_ERROR): Connection Failed: Text message size [3415920] exceeds maximum size [3145728]

2021-03-26 19:31:22.086 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'lgwebos:WebOSTV:a9161f51eb' changed from OFFLINE (COMMUNICATION_ERROR): Connection Failed: Text message size [3415920] exceeds maximum size [3145728] to OFFLINE: TV is off

2021-03-26 19:31:22.148 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'lgwebos:WebOSTV:a9161f51eb' changed from OFFLINE: TV is off to ONLINE: Registering - You may need to confirm pairing on TV.

2021-03-26 19:31:22.208 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing 'lgwebos:WebOSTV:a9161f51eb' changed from ONLINE: Registering - You may need to confirm pairing on TV. to ONLINE: Connected

Cheers Joko

Hi Joko

this means the payload returned by your tv is too large for the binding. it is a bug. will have to look into this.

kind regards
Sebastian

Please feel free to add details to this issue:

Fix has been merged

Hi!

I am trying to set up Toasts on my OpenHAB 2.5.13 instance.

My rule looks like that:

rule "Notifier: Light"
when
	Item Notifier_Light received command
then
	logInfo("Notifier", "Light: " + receivedCommand)
	val LGTVWZ = getActions("lgwebos", "lgwebos:WebOSTV:abcd1234")
	
	LGTVWZ.showToast("http://192.168.***.***:7080/icon/light?format=png", receivedCommand)
end

Log output:

21:22:16.806 [INFO ] [ipse.smarthome.model.script.Notifier] - Light: Kino-Modus aktiviert
21:22:16.807 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Notifier: Light': An error occurred during the script execution: Could not invoke method: org.openhab.binding.lgwebos.action.LGWebOSActions.showToast(org.eclipse.smarthome.core.thing.binding.ThingActions,java.lang.String,java.lang.String) on instance: null

Any idea why LGTVWZ is ā€œnullā€ in this case? I double-checked the thing ID. I even tried to setup the thing using a file based defintion - without success.
The Thing is working (all items work and sending a string command to the Toast channel also works)

Thanks in advance!

Hi

maybe the error is misleadingā€¦
can you try without icon url? some users have reported that icons in toasts do not work in newer lg models

Sebastian

how can i use a rule to open a simple website

if this happens open this url

http://user:pass@192.168.86.60/cgi-bin/snapshot.cgi?loginuse=user&loginpas=pass

ule ā€œTv Stream kameraā€

when

Item kameratv received update ON

then

LG_TV0_Application.sendCommand(ā€œwww.sol.noā€)

Brain do not work today :slight_smile:

Hello, Iā€™m totally newbie user and starting to love openHAB.

Today Iā€™ve tried to add my LG webos OLED to the bindings, and sadly no success. Keep getting errors shown below.

TV and openHAB in same network, TV accept LG Apps connection, tried with firewall off.
OpenHab v. 4.3.2 running on Win SRV 2019 - just for now.

On binging page I got
Status:

UNINITIALIZED

HANDLER_INITIALIZING_ERROR

Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@7a71f46a[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@3b4cfe51[Wrapped task = org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler$$Lambda$1371/0x0000000100f79c40@3f736de0]] rejected from org.openhab.core.internal.common.WrappedScheduledExecutorService@7a8358b2[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]

Iā€™ve tried log:set debug org.openhab.binding.lgwebos but log seems to be clear
log:tail org.openhab.binding.lgwebos
14:02:08.963 [DEBUG] [webos.internal.handler.LGWebOSHandler] - Disposing handler for thing lgwebos:WebOSTV:XXX
14:02:08.964 [DEBUG] [ebos.internal.handler.LGWebOSTVSocket] - setState new DISCONNECTED - current DISCONNECTED
14:02:19.921 [DEBUG] [webos.internal.handler.LGWebOSHandler] - Initializing handler for thing lgwebos:WebOSTV:XXX

Only error Iā€™ve managed to catch as fresh user is from log:tail org.openhab.core.thing

14:06:19.645 [ERROR] [.core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing ā€˜lgwebos:WebOSTV:0e45eafa-9149-905d-56db-221ba8e4af21ā€™: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@7a71f46a[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@3b4cfe51[Wrapped task = org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler$$Lambda$1371/0x0000000100f79c40@3f736de0]] rejected from org.openhab.core.internal.common.WrappedScheduledExecutorService@7a8358b2[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@7a71f46a[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@3b4cfe51[Wrapped task = org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler$$Lambda$1371/0x0000000100f79c40@3f736de0]] rejected from org.openhab.core.internal.common.WrappedScheduledExecutorService@7a8358b2[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2055) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:825) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:340) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor.scheduleWithFixedDelay(ScheduledThreadPoolExecutor.java:680) ~[?:?]
at org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler.startReconnectJob(LGWebOSHandler.java:171) ~[?:?]
at org.openhab.binding.lgwebos.internal.handler.LGWebOSHandler.initialize(LGWebOSHandler.java:148) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]

Please help :slight_smile:

hi all, I have some trouble to configure my lg G9 to work with alexa.
I can use all items with the gui and they work nice but with alexa I only can poweron and poweroff.
On the alexa app I only see the on/off button.
Following how I configured the whole group:

Group TVSala ā€œTVā€ Endpoint.tv
Switch TVSala ā€œpowerā€ PowerController.powerState
Dimmer TVSala_Volume ā€œvolumeā€ (TVSala) Speaker.volume
Switch TVSala_mute ā€œmuteā€ (TVSala) Speaker.muted
Player TVSala_mediaPlayer ā€œmedia controlā€ (TVSala) PlaybackController.playback

Thanks for your time.

Hi all
First of all, great binding :slight_smile:
Iā€™m using this binding successfully for quite a while now.

Recently I replaced my LG WebOS TV with a new one (LG OLED65C27LA) which runs on WebOS 22.

As far as I know, most is still working, exept of the ā€œApplicationā€ Channel.
The possible ā€œApp-Optionsā€ (App-List) are not listed and there is also no item-ā€œdisplayStateā€ anymore. Only ā€œStateā€ returns a value, which is a little bit cryptic.

Any other users experience this behaviour?

Anyone experiencing strange behaviour with binding after WebOS 03.30.16 update ?

The TV looks always offline with message ā€œTV is Offā€ and nothing seems to work apart from WoL function.

Any idea ?

Thanks

Same to me. Unable to bring it online in openhab after 03.30.16 Updateā€¦
Discovery is also not working. Seems LG broke something :frowning:

Firmware 05.30.25 and no problem.

It could be something specific to a model?
What models are concerned?

My Model ist ā€œOLED65C27LA.AVSā€ released in 2022. LG WebOS Version is 7.0.3-16. Maybe its WebOS related and not ā€œfirmwareā€ 03.30.16. But maybe this Versions are not independentā€¦
The release notes of firmware are not very detailed, but a lot of models will get this update.

[03.30.16]

  1. LG Channels expanded its availability to more countries. (Argentina, Chile, Colombia, Peru

  2. A new feature, Learn Remote Control, has been added for people with disabilities

  3. Known kernel vulnerabilities patche

  • CVE-2021-4154, CVE-2022-2588

See the following link, click on the ā€œreferenceā€ drop down for release notes and related models:
LG Software & Firmware | LG Schweiz

Same here.

2023-01-27 21:39:25.376 [DEBUG] [bos.internal.handler.LGWebOSTVSocket] - setState new DISCONNECTED - current DISCONNECTED
2023-01-27 21:39:25.376 [DEBUG] [bos.internal.handler.LGWebOSTVSocket] - Connecting to: ws://192.168.1.x:3000
2023-01-27 21:39:25.378 [DEBUG] [ebos.internal.handler.LGWebOSHandler] - Connection failed - error: HttpConnectionOverHTTP@bdeac39::SocketChannelEndPoint@661cce3f{l=/192.168.1.y:55874,r=/192.168.1.x:3000,ISHUT,fill=-,flush=-,to=0/0}{i
o=0/0,kio=0,kro=1}->HttpConnectionOverHTTP@bdeac39(l:/192.168.1.y:55874 <-> r:/192.168.1.x:3000,closed=false)=>HttpChannelOverHTTP@49efd3be(exchange=HttpExchange@11dd762e{req=WebSocketUpgradeRequest[GET / HTTP/1.1]@6f1caf48[TERMINATED
/null] res=HttpResponse[null 0 null]@6ff1f9a2[PENDING/null]})[send=HttpSenderOverHTTP@5834b5c1(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@22a2d4ef{s=START}],recv=HttpReceiverOverHTTP@284e491c(rsp=IDLE,failure=null)[HttpParser{s
=CLOSED,0 of -1}]]
2023-01-27 21:39:35.377 [DEBUG] [bos.internal.handler.LGWebOSTVSocket] - setState new DISCONNECTED - current DISCONNECTED
2023-01-27 21:39:35.377 [DEBUG] [bos.internal.handler.LGWebOSTVSocket] - Connecting to: ws://192.168.1.x:3000
2023-01-27 21:39:35.379 [DEBUG] [ebos.internal.handler.LGWebOSHandler] - Connection failed - error: HttpConnectionOverHTTP@46d2470f::SocketChannelEndPoint@28809e7a{l=/192.168.1.y:56002,r=/192.168.1.x:3000,ISHUT,fill=-,flush=-,to=0/0}{
io=0/0,kio=0,kro=1}->HttpConnectionOverHTTP@46d2470f(l:/192.168.1.y:56002 <-> r:/192.168.1.x:3000,closed=false)=>HttpChannelOverHTTP@38a874be(exchange=HttpExchange@27c6af09{req=WebSocketUpgradeRequest[GET / HTTP/1.1]@73786ec1[TERMINAT
ED/null] res=HttpResponse[null 0 null]@5fa74d9a[PENDING/null]})[send=HttpSenderOverHTTP@2451cf54(req=QUEUED,snd=COMPLETED,failure=null)[HttpGenerator@367d8230{s=START}],recv=HttpReceiverOverHTTP@643ec58(rsp=IDLE,failure=null)[HttpParser{
s=CLOSED,0 of -1}]]

  • openHBA: 3.4.1
  • TV Model: OLED77C29LD
  • webOS TV-Version: 7.3.0-16 (mullet-mebbin)
  • Softwareversion: 03.30.16

Installed the update yesterday.