LG WebOS better integration

There is also an official LG ThinQ app which, according to its app store page, also supports TV’s. But those appear to be only the newer models that support remote control via ThinQ

I recently got a new LG G6 which does not show any code if I try to connect it with Homey. With my iPhone it did immediately. I’m slowly getting very desperate since nothing worked as of now and I really want to get some automations going without relying on the power draw of the socket

Hi @John_Kevin! I’ve installed your app. Seems to work so far. One thing I noticed is the name of the output source. I have an LG G4 and I’ve renamed HDMI2 to SHIELD. This is not reflected in the app. Using the “original” WebOS Plus app, it’s displayed correctly.

Hello, I have a problem. I was able to add my TV and I can see all the functions, but I keep getting the message “Please authorize on TV.” However, I can’t authorize it on the TV itself. How should I proceed?

@wepa
If you have sent me a crash report, unfortunately it arrives anonymously, but I hope I have sent you some instructions to follow. Basically these were to install the Test version above (if you have not already done so) and tell me if the issue persists. Good luck.

@Niclas, the name is dynamically allocated by the LG TV depending on what CEC is telling it. I have just left mine as is, but if you are worried, can you not just rename the source?

Well, that is the problem. I have renamed the source on my LG, but it’s not reflected in the app. This is not a big deal for me, so no worries. It’s just something I noticed to be a difference between the WebOS Plus app and your app.

Thanks for wanting to help. I actually figured out on my own what I needed to do to get rid of the message, though. Thanks anyway.

Thank you to everyone who has tested Local webOS TV Controller 1.0.44 and submitted diagnostic reports.

The reports currently indicate three separate issues:

  1. Crashes in version 1.0.43

Some LG televisions returned incomplete application, channel, launch-point or input lists. Version 1.0.43 attempted to process these missing lists and could crash with a Cannot read properties of undefined (reading 'map') error.

Version 1.0.44 validates these responses before processing them. The latest diagnostics show that this protection is working: the previous crash has not occurred in the 1.0.44 reports received so far.

  1. Missing authorization prompt on webOS 26

Two different LG televisions running webOS 26 have been found by Homey, but the expected authorization prompt did not appear on the television. The app consequently did not receive and store a completed pairing key.

This may be caused by a change in the registration sequence required by newer webOS versions. Other home-automation projects have also reported integration problems following upgrades to webOS 26. I am investigating a newer registration procedure which obtains television system information before requesting authorization.

  1. Television not found during discovery

One webOS 26 television was initially discovered by version 1.0.43 but later produced “No devices found” with 1.0.44. The discovery code itself was not changed between those versions.

Possible causes include a changed IP address, simultaneous Ethernet and Wi-Fi connections, local multicast/SSDP discovery, or changed webOS 26 behaviour. I am therefore also considering a manual-IP pairing option so that failure of automatic discovery does not prevent installation.

Daniel’s separate problem—loss of control after a television has remained in standby for a long period—also remains under investigation. Version 1.0.44 improved compatibility with the original connection behaviour, but it has not conclusively fixed that problem on his televisions.

The current Test version remains available here:

Install Local webOS TV Controller 1.0.44 Test

Please remember that this is an unreviewed Test version. Do not uninstall the existing app or delete an existing television device before installing it; the Test version should update the existing installation in place.

If you experience a problem, please submit a diagnostic report before restarting or deleting anything and include:

  • complete LG model number;
  • exact webOS and TV firmware versions;
  • Ethernet or Wi-Fi connection;
  • whether both interfaces are enabled;
  • whether the TV is discovered;
  • whether the authorization prompt appears;
  • what happened immediately before the failure.

Thank you to everyone helping with the testing. The reports are providing useful evidence, and I intend to prepare another carefully tested candidate addressing modern webOS registration, discovery fallback and long-standby connection recovery.

@Rakas, I am assuming you have tried the test version and the problem is the same?
My problem is I only have my own LGTV so building an app which works on newer or older models is difficult for me. I have to rely on people like you sending me comprehensive fault reports with pictures and debug logs to stand any chance of fixing them. Also, as I have made clear elsewhere in this forum, I am not a programmer and have no programming skills. I needed this app purely because the official LGThinQ app was only basically capable of turning my TV off/on and I wanted channel change, input change etc etc so had to get Max’s old code accepted by Homey, and that is where we are now. I will honestly try my best to keep on developing this app but it is costing me £80 per month in ChatGPT charges and that is unsustainable for me, so if anyone wants to take this over, then I am very willing to hand over the baton :slight_smile:

@Wepa,

I maintain the new Local webOS TV Controller version of this app. Several users with newer LG televisions, particularly webOS 26, are now reporting exactly the same “Please authorise on the TV” warning without an authorization prompt appearing on the television.

You mentioned that you found the solution yourself. Would you mind explaining exactly what you changed or did to remove the message? It would also help to know your complete TV model and webOS version.

Your solution may help several other users and could help me determine whether the app needs a software change or clearer installation instructions.

Many thanks,
John

@Niclas,

Thank you, Apologies!! you are correct, and I have now traced the difference.

Max’s original app used an LG list which includes the television’s user-facing source name, such as SHIELD. During development of Local webOS TV Controller, that was changed to a broader application list because some newer TVs omitted system applications such as Live TV from the original list. Unfortunately, the broader list reports the technical name HDMI2 rather than your renamed label.

I therefore should not have suggested that you rename it again; you had already done the correct thing on the television. I’m sorry for misunderstanding your report.

I will record this as a minor regression. The intended correction will retain the newer application handling while preferring the TV’s custom HDMI label when available.

Thank you for spotting and reporting it.

John

I have not altered the source yet. This should be included in a later candidate after the higher-priority webOS 26 pairing and reconnect work is designed safely.

18:36

@John_Kevin

Yes, that was exactly the problem I had with the new webOS26 version, too. I tried out several apps, but I ended up sticking with the one by MaxvandeLaar from GitHub—the one you have to install using npm and the Homey CLI. That app had the same bug, but I was able to modify the code itself, so after a lot of back-and-forth, I finally managed to fix it. I could perhaps make my version available so you can see what’s different, though unfortunately, I can’t recall exactly what I changed. :sweat_smile:

The test build had solved it. I need to check again because I tried a few solutions. I’m not sure if it was this app but one app did connect locally but the on / off button just relied on it being pressed without checking the state of the TV. Is it still the same or can we track the state of the television without relying on the homey button being pressed?