[PORT] LG Smart TV Discovery 2012+

This is a port of Smarththings LG TV App and Driver. I have only tested it on my one TV.

App
0.1.1

  • Ported LG Smart Tv from Smarththings

Driver
0.1.1

  • Ported LG Smart Tv from Smarththings

Issues

  • Unable to turn tv on (tried Wake on Lan unsuccessfully)
  • Settings not carrying over from App to Driver

Cheers
Mike

https://github.com/ekimmagrann/hubitat/tree/master/lgtv

3 Likes

Of course it doesn't support power on. I am trying to use a wake on lan work around but not having much luck thus far. You should first install the driver then the App. Open the app and begin discovery. You will also need to add the app settings (ip and code) to the driver settings.

Cheers
Mike

Not sure if this is the issue but Wake on Lan doesn't work over WiFi.

Good point I will check but I am pretty certain its ethernet. I'm thinking my LG TV does not support it. If so I think there could be work around since my alexa remote turns it on when I hit home button.

The FireTV remote is using CEC throught the HDMI cable to turn on the TV. The FireTV is always on which means it is accessible even over WiFi.

Watching this as we have LG TVs...

Do you think this would fix the wake on lan issue:

At this point I think your model either supports it or it doesn't. When I get a chance I can enable it in the code and someone can see if it works. Unfortunately, I won't be able to test is so it might take a bit of back and forth.

By the way I tried the instructions in the link you provided last night but I don't think my Tv has those settings.

Thanks for taking a driver port off my list :slight_smile:

I noticed that even the LG-official Smartify app doesn't seem to be able to turn on the TV---even when it was hard-wired, for me.

Finally was able to turn "Wake on LAN" on for my LG TV, using these instructions:

I was confused by the fact that "Mobile TV On" sounds like that feature is on, but you have to go into that setting and select "Turn on via Wi-Fi".

I don't know this for a fact, but that likely keeps more of your TV alive when it is powered off and would consume more power.

Still to this point I can't use Wake on Lan!

I will be posting an update to the app later on. It just fixes the settings to carry over from App to Driver.

Does anyone want to work on the Wake on Lan with me? Since I can't test myself and am not a programmer, I would send you a couple clips of code to try and see if it can work.

Cheers
Mike

@zarthan Hey this is still of interest to me! I just haven't been able to figure out how to go about it.

Mike

1 Like

@ekimmagrann Do I assume you are talking about CEC or something else. I have no idea whether you could come up with a way to remotely trigger the Fire TV to send a CEC "on" command. I used a Raspberry Pi connected to the TV in the kitchen to watch for when the TV was on. There is a downlight directly over the TV and if we were watching the TV it was annoying. My script checked whether the TV was on through CEC and if it was on, send a command to my HomeAssistant install to turn that downlight off. When the TV was turned off, the same script would see the TV off and turn the downlight back on.

Yeah I was referencing the CEC through Fire TV but I think I may just put a smart plug back there assuming the TV would come on with power.

A smart plug may not be an ideal way to control the TV. Modern TVs are meant to have constant power so that remotes work to turn them on and off. Only anecdotal but I have been in smart home forums where the constant power off and on through smart plugs blew out TV power transformers and main boards.

1 Like

Wow stupid me didn't even think about the fact that I would want remote control foremost, lol!

Thanks!

Have a look at a Broadlink IR device. You can control many remote controlled devices. I don't know if anyone has an app?

Does this support Picture in Picture?

I found a command for picture in picture but it appears my tv and perhaps webos tv's do not support it. If you or anyone wants I can add it and you can give it a try.

Cheers
Mike

I was unable to get this to work on my TV which is a 2018 model.

According to the logs in Hubitat, it never responds to the SSDP broadcast. I even went in and modified the code a bit to manually add my TV as if it had faked a response, but nope. My TV just doesn't appear to respond at all.

I was able to get the LG Remote application to pair to my TV just fine without any issues.

Do you know if this will work on 2018 models? Anything else I could try?

I know the pylgtv python package works on my TV (Home Assistant uses this), but this driver appears to use a different method to communicate to the TV.