Is anyone able to turn on their LG TV that is connected via WFI from HA? There isn’t even a power button on my Lovelace card. I looked at this and found
webostv:
host: 192.168.0.10
name: Living Room TV
turn_on_action:
service: persistent_notification.create
data:
message: "Turn on action"
Seemed strange to use that service but I added it to my config and it gave me a power button.Pressing the power button gave me a notification as expected. In Services I found the webostv.button and chose my TV entity but in the list of known possible values (LEFT, RIGHT, DOWN, UP, HOME, BACK, ENTER, DASH, INFO, ASTERISK, CC, EXIT, MUTE, RED, GREEN, BLUE, VOLUMEUP, VOLUMEDOWN, CHANNELUP, CHANNELDOWN, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, LEFT), there is no power button. Tried using the POWER command but it didn’t do anything. I don’t have the option of using Ethernet on this TV so was hoping I could find a way to make this work. FWIW I can turn off the TV from the Lovelace card.
I will give this a go. I thought wake_on_lan only worked if connected via an Ethernet cable. In fact right above the config you posted it says:
Common for webOS 3.0 and higher would be to use WakeOnLan feature. To use this feature your TV should be connected to your network via Ethernet rather than Wireless.
Just tried the app and the TV needs to be on before the app can connect to it which makes it useless for what I need it for. Once the TV is on and the app is connected everything else works great.
When I was last looking at this I fiddled with the config for a while and failed to get it working. I then tried the LG app, which just shows ‘TV Disconnect’ when the TV is off, so assumed at that stage that my TV did not support WOL and gave up. However, on a whim I tried again this morning and it works. I’m not sure what’s changed in the meantime, and this is despite the LG app still showing ‘Disconnect’.
I’m running HA Core 0.110.3 in Docker, connected via a macvlan network.
Mine only works with the broadcast address added. I found it from a post in here. I assumed it was the IP of the TV but it wasn’t.
I also have a Samsung and could not get it working reliably. I ended up adding an ir eye running off an nodemcu and using a power plug to detect it’s power state. Just an option if it won’t work off WiFi.
Just added new LG to my setup couple days ago.
Everything working as expected.
In configuration.yaml file “wake_on_lan:” must be included before you include LG configuration.
“broadcast_address:” must be used in order to “wake on lan” to work.
Broadcast address is not TV IP Address, a broadcast address is an IP address that is used to target all systems on a specific subnet network instead of single hosts. In other words broadcast address allows information to be sent to all machines on a given subnet rather than to a specific machine.
I saw that post and ran ip addr in the terminal of Home Assistant but it doesn’t have a wlan0 which doesn’t surprise me because I’m not running HA on a pi but rather through VirtualBox on Windows 10. Do you know how to access the broadcast address in this arrangement?. I asked the poster (FreelancerJ) this question too but haven’t heard back yet. I tried ipconfig and netstat via the cmd. For grins I tried 192.168.1.255 as my host is the same as his but it didn’t work.
Make sure in configuration.yaml file “wake_on_lan:” included before you include LG configuration.
Like:
wake_on_lan: !include include/wake_on_lan.yaml
webostv: !include include/webostv.yaml
Did you turn ON “Mobile TV On” on TV setting.
My TV hard wired not WIFI connected. “Mobile TV On” on TV setting.
Also “LG Connect Apps” must be ON, on TV setting