LG WebOS - Stopped Working

Brought home brand new OLED C2 to replace OLED C8. Yes burn-in is a real thing.

I went to add the NEW LG and initially it was found in the designer (windows). While setting up the TV, ran the firmware update. because i needed to delete my old TV and forgot, I started over. I tried to add the TV again, and get no response on the TV (like usually it would say a mobile device is trying to connect), within the designer i get “unable to connect to the remote server”.

Read on another blog LG mad a change to block unsecured websockets.

LG WebOS better integration - Apps - Homey Community Forum
“A connection to port 3000 (ws://) was blocked. Connections to port 3001 (wss://) are successful and I was able to register, send requests and subscribe to events.”

Running 03.30.67 software version on the TV (latest version)
Web OS 7.3.0-2403 (mullet-mebbin)

Note that other apps (download for ios to test were able to connect)

Bump.

Update: the TV responds to WOL magic packet. Port scanner found port 3000 blocked, confirmed secure port 3001 open, https://IP:3001 returned “hello world”.

Bill, any thoughts on a patch?

if for some reason Bill can’t/won’t make a patch available, it would be pretty easy to create a port forwarder if you have an intermediate system at your disposal. Something running a light-weight linux distro would be optimal, like an RPI or NAS, but any always-on system could be made to work. You would point THR to it, then it would forward the unfiltered packets to TCP 3001 on the TV.

This is going to require a patch. THR is using a fixed value of 3000.

No luck trying to port forward in my router or UniFi access points.

Will revert back to
PowerOn: Wake on Lan plug-in (working)
PowerOff: Global Cache (waiting on Amazon delivery)

Anyone able to interface webOS with Global Cache? Netflix?

Not sure how you set up your router / APs (I also use Ubiquiti products) but If the source and destination are on the same subnet, I think the traffic would go directly to the host vs through the firewall.

what you might try as a test is setting up a python script on a PC (or Mac, whichever you use) on the same segment to listen on port 3000 and then just forward to 3001 on your TV.

Here’s an example: GitHub - supernifty/port-forwarder: Simple Python scripts to listen, log and forward network traffic (I’ve not tried it myself; YMMV)

@LJR, thanks. Downloaded, installed python 3.11, script didn’t run (threw errors on ‘thread’ call). Turns out it is a Python 2 script. Installed python 2.7, got to run…no luck. While running the forwarder, I launched new instance of THR, new project, add device, “unable to connect to remote server”. Guess just need to wait until Bill is able to fix.

Well if you’re not against getting a little more creative with a solution that will give you A LOT of versatility, I just checked and Node Red has an integration module for LG TVs: node-red-contrib-lgtv (node) - Node-RED

I have been successfully using Node Red for years to overcome all sort of limitations/obstacles with THR and it has helped also to offload polling and state management from the THR client (with help from MQTT which THR supports very nicely).

If you are open to giving it a shot, reach out to me and let me know what features you would want support for. I can then help by writing a basic custom plugin that would talk to Node Red as the middle-man, or how to leverage MQTT in Node Red and THR.

I’m attaching a sample of how I integrated Node Red with my Bluesound Node.

Node Red - Bluesound.txt (7.1 KB)

@LJR, Ok, installed Node-Red, got up and running on my laptop. downloaded node-red package, tried to import the json file, no luck. throws a flag on import. “Input not a JSON Array”. I was able to import your Bluesound file.

What i’m looking for:
Power On (currently handling with a WOL plugin in THR)
Power Off (discrete)
Input Select:
HDMI2
Netflix
disney+
Paramount+
Hulu
etc.

Hopefully this gets you on track (this is not tested and my ability to troubleshoot will be limited, but perhaps others have a LG TV and could help on the plugin/Node Red development side.

  1. change extrnsion from .txt to .zip
  2. extract files
  3. Import .json flow
    a) conflgure your TVOS device
  4. use *.plugin in THR
    a) be sure to supply correct IP of the system where Node Red is installed

LGTV_PoC.txt (1.6 KB)

got it. imports for both work. could you send me a simple. hrp file with a button for power on and one for power off. i should be able to take from there.

1 Like

I have a brand new LG G3. Everything work,s fine, with the existing official plugin, except for Power on. I solved it, with codeset 1 from Global cachè tower, and then use IR for ON. I then think it will be possible to get a label, from the plug in. It will show when the TV is ON.

I have downloaded your POC and added the plugin. I updated the IP address both in the plugin and in the NodeRedTVOS. What TvosNodeRed.? Command should I use? MediaCommand? I tried TvosNodeRed.switch with value = On and it did not work.

Anything else should I do?

How did you get his plug in working? I changed the IP address and set up a mediaCommand. Could not get it to work.

I was unable to get the plug in working. I ended up going the global cache WF2SL route.

Solution link:

Global Cache WF2SL

The only downside is that it operates at the serial command level, and not the webOS level. So no direct commands for say Netflix, or AmazonPrime.

For me the official LG smart TV plug in, by Bill, is now working totally. Both discrete ON and OFf, The trick was to turn on “ let mobile device be used as remote”. Actually I can also go directly to the apps. Netflix, Live TV and the other in the “List” command. I have a LG G3 2023.

Have you done any firmware updates? Which firmware are you running? Can you do a port scan?

If you type the tv IP into browser with port 3000, what does it return?

Http://:3000

I am not a programmer but I typed

192.168.50.151:3000 and got the response “Hi world” so I assume the port is open. When I did the same with :3001 it failed.

The firmware are 03.11.30