SmartThings control of LG webOS 3.0 TVs?

I have this working if anyone is curious, I added an up/down volume function too, it does require a man-in-middle server of some sort. Once you start the server you can go to http://ip:5555/

/volume/10
/on
/off
etc

app.use(’/input’, require(’./apis/change-input’));
app.use(’/volume’, require(’./apis/change-volume’));
app.use(’/getvolume’, require(’./apis/get-volume’));
app.use(’/alert’, require(’./apis/alert’));
app.use(’/off’, require(’./apis/turn-off’));
app.use(’/on’, require(’./apis/turn-on’));

1 Like

There are a few options for different solutions within this thread. Which one did you get to work with these commands?

Hi Guys,
I sniffed some packets and seems to me HTTP Get is used for TV status and such but then instead of the logical HTTP Post - WebSockets are used for push commands.

Did anyone confirm that?

For anyone that is interested in integrating a LG Smart TV 2012 + model.

@lkjsaendlkje did you ever work out how to open a URL in full screen mode instead of in the tabbed browser?

Nope. :frowning:

I just want the ability to see if my TV is on (so my lights don’t turn themselves off). Any simple solution?

Can’t you just monitor using a socket and webcore to set a virtual switch?

If tv drawing more than 10 watts turn in virtual switch? Or something similar.

Paul

We do exactly that…

Though depending on TV you might want to monitor the actual standby wattage… on a 2015 65" EF running through a smartthings original equipment power socket I’ve got 64W = on… It takes some tweaking… Or your lights may go off when a very dark scene comes on screen… Not that that ever happened to us :)…

I have a global variable “living room presence” that is switched on or off depending on the state of Motion Sensor or TV power usage or Sonos State.

This then triggers living room light behaviour (linked into to an outdoor Lux sensor)

I’ve also found its worth having a virtual master switch to keep the lights off, in case anyone ever sleeps on the sofa!

Oh and the added benefit the power socket makes it a damn sight easier to power cycle the TV when WebOs crashes

The outlet is a great idea. But I got it to work with HostPinger. It basically pings my TV every 30 seconds and it the TV is on -> it turns on the virtual switch. If its off, it turn the virtual switch off.

Does anyone know if any of these are still up and working for webOS 4.0? I tried using the HTTP server and lgtv2 by running on my synology. But they dont seem to work. Also, I dont see the LG Connect Apps feature in my TV Menu

I’m actually working on an LG Netcast/UDAP2.0 Device Handler right now… which would be for 2012/2013 year LG TVs. Once I am done with that, I’ll be moving on to the newer versions of LG TVs (the TV I’ll be doing the Device Handler for is a UJ6200 series TV) that seem to be the ones that run on the true webOS platform. The newer LG TVs do not work with the UDAP2.0 protocol, but I’ll know for sure how this all works in the next few weeks as I research and build it all out. Based on what I’ve seen, good control is possible, though there are limitations. More to come soon…

4 Likes

Awesome! Thank you for your work on this Josh! I’ll keep an eye out to see what you find out when you get to the newer LG TVs!

FYI, just posted this:

1 Like

Well, I have some bad news… the SmartThings framework doesn’t support the usage of WebSockets… which is the only way to control the current generation of LG TVs that I have found. I’ve researched it extensively and there does not appear to be another way to control the newer generation of LG TVs. There is also no way to have this work with SmartThings without additional hardware. Unfortunately, that makes this a lot more complicated.

Having said that, I am currently working on node.js implementations for each of the following TV protocols:
Sony Bravia TVs
LG Smart TV UDAP 2.0 (Netcast)
LG Web OS TVs
Vizio TVs (not sure on specific protocol yet - but I have a 2018/2019 model TV that I will be working on)

There are some node.js implementations that already exist, but they aren’t quite what I am looking for. I’ll write independent implementations for each TV, then I’ll write an HTTP server on top of it and finally a new Device Handler that can be used for each of those TV types. The Device Handler will be written generically, so it should be easy to add support for additional TV protocols by adding them underneath the HTTP server.

I am planning on testing this on a Raspberry Pi 4, but it would all theoretically be able to be ran on any system that can run node.js. I’ll make this as easy to implement as possible - but there will be some hardware costs with buying a Raspberry Pi. I’ve already tested out a proof of concept and it looks promising. This would ultimately allow us to control just about any variation of TVs out there that support some type of external control. I’ll keep the group posted - but this is probably a several month effort to get done.

2 Likes

Any luck with the new smartthings developer tools and webos 3.0?

You can control a LG TV easily in one of two ways.

  1. Buy a Galaxy Home Mini off of eBay and use the IR function.
  2. Use LG Connector smartapp/DTH

Where is this lg connector app

Thanks!! Does it work with the new app?