I have connected my LG TV to HA over wifi. The power on and off works but when TV is off for like 20 mins power on function stops working. Is it different with HDMI-CEC connection?
Yes hdmi works fine.
I have experienced something interesting today with my LG TV. Normally I could not turn the TV on after like 20 mins. However, today when I try to turn the TV on with my phone which is not connected to the local network, it worked. It is pretty weird and maybe it could lead a solution to the problems. I hope it helps.
Hi all
I have TV with webos, I add this to my HA but i can not run turn ON TV by wake On LAN.
I have this confit as show on HA webpage but not working…
media_player:
- platform: webostv
host: 192.xxx.xxx.xxx
name: TV Salon
timeout: 5
filename: webostv.conf
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
mac: xx-xx-xx-xx-xx-xx
message: "Turn ON action"
But tv not turn on. I create swicth to wake on lan TV and it works and then use it tu turn on TV.
switch:
- platform: wake_on_lan
mac_address: “xx-xx-xx-xx-xx-xx”
name: ‘LG TV Salon’
and then use it to TV
media_player:
- platform: webostv
host: 192.xxx.xxx.xxx
name: TV Salon
timeout: 5
filename: webostv.conf
turn_on_action:
service: switch.turn_on
entity_id: switch.lg_tv_salon
message: “Turn ON action”
But how repaire it in first configuration to send packet magic to wake on lan TV ?
My resolved is only alternativly…
And with webos not working NEXT and PREVIUS… when click next and previus TV try run USB hard Disk.
Is any chance to fix this problem… ?
I have the same issue. Did you have solve it? Thanks.
I have a WebOS tv that I don’t use Wake On Lan from the HA, but it turns on using other apps for WOL. So I’m pretty sure that it works as:
(switch)
- platform: wake_on_lan
name: “Your_WebOSTV”
mac_address: “11-EA-E3-17-09-BF”
I use this for turning on my PC.
And you have to enable it on the tv settings.
As far I know, it might not be possible to to it if you are using wireless connection.
It is possible with a wireless connection
You are right but the correct format is:
switch:
- platform: wake_on_lan
name: Your_WebOSTV
mac_address: 11-EA-E3-17-09-BF
note the
- shown
is actually a -
got it working based on sibbl’s code. add to switch (may need to create) and the media_player areas
switch:
- platform: wake_on_lan
name: LG
mac_address: 72-1D-C1-3F-DD-AA
turn_off:
service: media_player.turn_off
entity_id: media_player.living_room_tv
media_player:
- platform: webostv
host: 192.168.1.16
name: Living Room TV
timeout: 5
filename: webostv.conf
service: media_player.turn_on
entity_id: media_player.living_room_tv
turn_on_action:
service: switch.turn_on
entity_id: switch.lg
Next question is how to get a script that turns it off? I presume this is basic but any throught welcome. I am looking for a script so I can control it via google home
Here’s my switch yaml:
- platform: template
switches:
family_room_lgtv:
friendly_name: 'Family Room TV'
value_template: "{{ is_state('media_player.family_room_tv', 'playing') }}"
turn_on:
service: media_player.turn_on
data:
entity_id: media_player.family_room_tv
turn_off:
service: media_player.turn_off
data:
entity_id: media_player.family_room_tv
for this config
media_player:
- platform: webostv
host: !secret lgtv_ip
name: Family Room TV
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
mac: !secret lgtv_mac
customize:
sources:
- Amazon Prime Video
PS To paste code either use the </> in the toolbar above where you type, or use four ` marks to delimit.
For me it’s not necessary to have a turn_off
switch as well.
The TV will show up as a media device and understands “turn TV off” and “turn TV on” out of the box for me. I hid the switch completely, so it’s not accessible through the UI or Google Assistant. The media_player component does all of the magic - it just needs the switch to be there.
Thanks so much, was driving me nuts.
The LG documentation should be updated!
Thanks! This worked for me (it stops working after the TV is left switched off for a while though).
Noting that “mac_address” has been updated now to “mac” on the “wake_on_lan” integration.
Just leaving an FYI here. But I have an LG 2018 WebOS TV and found that I was having this issue. Would setup the tv in the conf and poof, everything would work including wake on lan (power on). The next day all of the sudden I was unable to power it on, but the LG WebOS TV Remote worked just fine other than that.
What I had found is that my TV had switched wifi from the standard Wifi to the 5G connection. After switching the TV back to the standard WIFI (non-5g), the WOL function was restored. Looking at the issue, I’d say it’s safe to assume that the WOL packets will not work for my tv’s model on 5G wifi connections. Not sure why this is the case but it is.
A smidgen zombie threading, but your TV might have a separate MAC address for connecting to 5ghz. Usually client devices like phones, computers, TVs have the same MAC address whether connected to 2.4 ghz or 5ghz, but doesn’t seem to be a rule. My 2019 LG TV is a single digit different when connected via 5ghz, as does my (rather dated) desktop computer. But everything else I have shows the same MAC either way.
Wake on LAN is based on MAC address, so this might be what tripped up your instance?
I have a 2018(?) WebOS LG TV and always struggled with WoL for a while (which I finally managed without by switching my Nvidia shield On thanks the sterling work of @frenck).
My understanding was that to provide ultra low energy consumption my LG TV network card wasn’t powered when the TV was in standby and therefore WoL or media_player.turn_on
wouldn’t work regardless of the ethernet, 2.4GHz or 5GHz connection (the light was on but no-one was home). Interestingly the HDMI-CEC integration managed to turn the TV on though but I’m guessing that was on a different card in the TV.
I give way to anyone who knows more on the subject though. Wouldn’t it be lovely if hardware manufacturers had a “Home Assistant Compliant” sticker…
I just wanted to share my experience because i also struggled a long time getting this to work with WOL. Also note that the TV and Home Assistant must be on the same subnet, otherwise you need to route broadcast traffic or setup a kind of port forwarding. I am using a LG 43UN71006LB with Wi-Fi connectivity and it seems that is crucial to send multiple WOL packets within a short time to wake the TV up.
In my opinion the following TV settings are relevant:
- Turn on via Wi-Fi: On
- Quick Start+: Off
Here is a script i am using:
alias: Schlafzimmer TV einschalten
sequence:
- repeat:
count: '100'
sequence:
- service: wake_on_lan.send_magic_packet
data:
mac: 'xx:xx:xx:xx:xx:xx'
broadcast_address: XXX.XXX.X.255
- wait_template: '{{ is_state(''media_player.schlafzimmer_tv'', ''on'') }}'
timeout: '00:02:00'
mode: single
Here is the configuration i am using:
webostv:
- host: XXX.XXX.X.XXX
name: Schlafzimmer TV
turn_on_action:
service: script.schlafzimmer_tv_einschalten
Maybe that will help someone.
Regards
Richard
If it can help someone, I had several issues to get my LG TV on, can’t get the WoL working.
So I instead used the HDMI CEC with Roku plugged in my AVR.
turn_on_action:
service: remote.send_command
target:
entity_id: remote.roku
data:
command:
- left