Can't communicate with my TV?

I changed my router to a Synology router. I had an integration for the LG Smart TV. I THOUGHT I could turn it off from HA, and I can. But I can’t turn it back on from HA. I thought I used to be able to do that (although currently, I only have an automation that test if it is off). Last night the automation for the TV thought the TV was off when it was on.

It looks like I CAN communicate with the TV if it is already on so I don’t think changing the router screwed something up.

Can anybody verify that HA can turn the TV ON?

It requires wake on lan feature to turn on tv, check webos integration page, there was a specific section on this

I thought wake on Lan required ethernet connection. I’m using wifi. In any case, don’t remember seeing a wake on Lan feature in my oled7ba lg tv.

… time passes …
OH, you maybe mean the “wake_on_lan” integration? I’ll try adding that, but I could have sworn this used to work without putting that in the configuration.

Does anybody know if it used to work? Did some update change that that I didn’t notice in the changes?

Some TVs also have an ECO mode like a Vizio. This has to be set correctly or only IR remote or button press on TV can turn it on.

Try using the LG Connect App on your phone to turn on your switched off TV. If the app cannot do it your TV probably turns off the LAN interface after a while.
It could be you can turn on your TV within x minutes of being switched off. After that the LAN interface is disabled / powered off.

Something else I found: https://www.reddit.com/r/homeassistant/comments/q6z3tk/fix_for_wol_wakeonlan_or_power_on_for_lg_webos_6/

I don’t use my phone to control any TV device. I use a Logitech Harmony Elite (which I like a lot and makes me MAD because Logitech dumped the line).

So I don’t have LG Connect App. And it isn’t in the Google Play Store. But I found the LG Thinq (which I think LG might be dumping also). And I was able to connect to the TV with it. And at some point I was asked if I wanted to be able to have apps turn on the TV and I said yes. And the LG Thinq app can turn on the tv.

Also, the QuickStart + and Mobile TV On options are turned on already. FWIW.

So now the phone can turn it on or off. But HA can still only turn it off, and control the device if it is already on from something else.

When I turn it off with HA, the phone immediately shows the tv as off, but it takes maybe 30 seconds for the HA UI to show that the TV is off and then the power icon is removed from the HA UI.

TV OS is 06.05.03.

… time passes …

Whether Quick Start + is on or not doesn’t make a difference to HA. Now I’ll add the config params for wol and see if that does anything.

… time passes …

I added the wake_on_lan tag in configuration.yaml AND the switch interface shown in the reddit link. The Button interface configured for “lg wake on lan” entity worked. It was quite SLOW. Again the phone app showed the state very quickly and the Button UI lagged quite a bit. I’ll do a little more testing to see what how long that lag is.

1 Like

I use LG WebOS SmartTV integration along with LoveLace WebOS remote
With a WOL service call the tv can be turned on:

wake_on_lan.send_magic_packet
        data:
          mac: aa:bb:cc:dd:ee:ff

And if you specify the mac in the in the lovelace setup, you can turn it on with the lovelace remote too:

type: custom:lg-remote-control
entity: media_player.living_room_tv
mac: aa:bb:cc:dd:ee:fog

And fyi, i use wired (as i stream 4k quite a lot), so i don’t have a clue if it’ll work on wifi :thinking:

The suggestion for the LG app is that you have a baseline - can the TV indeed be turned on/off externally.

I feel with you - also using a Logitech Harmony Elite with an LG CX.

Just a thought:
if you are using a Logitech Harmony and the LG TV is configured in the Harmony you can try to turn on the TV using an infrared command. The Harmony should on have a power toggle or power on command.

You can integrate the Logitech Harmony in Home Assistant using Logitech Harmony Hub - Home Assistant
Then you can issue the infrared command from Home Assistant.

As you were typing that, I was trying the equivalent config yaml. But I wasn’t aware of the WebOS remote. That is nice. I presume you got it from HACS, right?

As I also stream a lot of 4k, I wonder if you actually tried the speeds. For me, with the LG OLED657BA, the ethernet card was pretty dang slow. The Wifi gave me much better throughput. You might want to try it for yours if you haven’t already. I read that LG put cheap ethernet cards in the box figuring everyone would most likely use the wifi.

Do you see any sluggishness with the turning on and off with that control you are using?

I put this in my config yaml:

wake_on_lan:

switch:
  - platform: wake_on_lan
    name: LG Wake On Lan
    mac: xx:xx:xx:xx
    host: 192.168.1.x # to check the state of the device (on/off)

and linked a Button card to the “LG Wake On Lan” like the reddit article guy did.

About the slow ethernet card: would this trick work on your LG TV? See How to Turbo-Boost Your TV's Internet Connection Speed (Works on LG & Sony TVs) - YouTube

Yes, I am working with the Harmony to toggle the power during my testing here while trying to figure out what exactly HA is capable of. Is it true that when you turn off the TV from HA, you also can not turn it on again that way? It seems odd. Did the integration ALWAYS not have a way to turn it on?

I’ll probably go to the TV and turn the Quick Start + back on so the TV starts up faster. I use the Harmony to control everything in the entertainment system currently. Eventually, I might have to take some tablet and get it to use HA to control the stuff if the Harmony and hub break. (not looking forward to that).

The only thing I was currently using the HA with the TV for was an automation. I have the lights in the great room going off just after 11:00pm. But if I’m watching television, I don’t want that to happen :slight_smile: So I added a test in the automation. But last night, the lights went off on me. I’m going to have to test again to make sure how the automation is working. I assume it failed last night because of something with the new Synology RT6600ax router I just installed. So I’m double checking what works and doesn’t work in HA with the new router and the LG tv was the start of that effort. Perhaps the integration NEVER had a turn on ability for LG tv and I just didn’t notice because I was only doing a test for on or off in the automation.

I think I watched that same video or a different one back when I was trying to solve buffering interruptions. I think I tried a wireless USB device, but had instability problems with it.

I finally ended up just using my Xbox One X as my main source of video. I have YouTube TV, YouTube, Netflix, and that keeps me busy watching. The Live TV on the TV’s app would not allow zooming. But the Xbox signal to the TV can be scaled by the TV. The reason I wanted to use the zoom feature of the TV is that I had burn in on the OLE screen and had to have it replace. The local News channel had its bright orange or bright purple logo in the bottom right corner and it left an image on the screen. So now when I watch the news, I zoom in so the logo is off the screen. Hopefully I won’t have that problem again.

And the Xbox wifi give me 250+mbps so more than enough even for 4k video. And my ISP only provides 300mbps download anyway. (unless you pay even more ransom money).

Are you using the Philips Hue emulation on the HA? I WAS using it and hooked it up to the buttons on the Harmony remote. So I could turn the lights on or off from the remote through the Philips Hue emulation which then passed commands to an Insteon hub which operated the lights. But after I put the new router in, that has stopped working. I don’t know why. The MyHarmony app no longer finds the emulation. And if I try to go to xx.xx.xx.xx:8300/description.xml, the browser says it can’t find the page?

Have you done this? Do you have any idea what I might be missing in the router or HA or Synology NAS (which runs HA in a docker container). When I first set it up, it went very smoothly, but now not so much.

right you are.

And no speed issues here either, wifi is way more slow.

Also here tv is linked to lights.
I also get a notification when someone ring the doorbell (which goes silent after 20:00 so the kids don’t wake up :wink:)

Ethernet on my TV gets less than half its wifi throughput.

Getting back to my original problem. I have an automation that did not detect the on/off state of my LG TV.

Just now, I determined for sure that if the QuickStart + is ON, then an automation can detect if the TV is on or off. BUT if the QuickStart + is OFF, then the automation doesn’t seem to be able to be detected.

So my test case was I just made an automation that when a switch is toggled, the action is toggled depending if the TV is off.

So I’ll see tonight if the actual automation works as well as this test. It didn’t last time, but hopefully now that I have re-initialized the LG WebOS TV integration, it will work.

Erm…what if you detect power state with a ping sensor?

I used that before it was available in the integration :wink:

binary_sensor:
  - platform: ping
    host: !secret ip_address_lg_tv
    name: livingroom_tv_ping
    count: 2
    scan_interval: 5

For whatever reason, my little button tester seemed to work as long as the TV was QuickStart + ON. I will test it tonight to see if it turns out the lights on me while I’m watching TV or not. Actually, I think I change the automation trigger time to now and see if it works.

But I think it is working now although I can’t say why it stopped working.

… time passes …

I just looked at my “floor plan” dashboard that has the TV entity on it. It is a triangle with an exclamation point icon. ??? When I put my cursor over it, it says the entity is not available.

I guess I’ll track this down first. Could be related to the other TV problem.

… time passes …

I think I see the problem. The entity name changed. Either I renamed it for readability, or redoing the integration gave it a new name. That is probably why the automation for the lights failed. It couldn’t find the entity anymore. Will see if I can fix things by using the right entity name. If I changed it, I’m surprised HA didn’t warn me that it would break automations.