madmicio / LG-WebOS-Remote-Control

Remote Control for LG TV WebOS
393 stars 74 forks source link

Power on and off #84

Open jscherry opened 2 years ago

jscherry commented 2 years ago

Can someone please explain how to get the power on and off to work. TV is connected directly to ethernet and can get power off through the tv entity. I had to set up a switch to get the wake on lan to power the tv on. But the power button on the remote does nothing. Am I doing something wrong? All the other functions of the remote work fine?

maverik80 commented 2 years ago

Can someone please explain how to get the power on and off to work. TV is connected directly to ethernet and can get power off through the tv entity. I had to set up a switch to get the wake on lan to power the tv on. But the power button on the remote does nothing. Am I doing something wrong? All the other functions of the remote work fine?

hello, I also have the same problem, everything was born since they deprecated the yaml configuration and inserted the GUI, there was an update of the card, inserted the mac in the card but now it doesn't even turn it off.

madmicio commented 2 years ago

please try the new version. no switches, no automation, no scripts are required. you only need to add the mac address in the card configuration

jscherry commented 2 years ago

I updated yesterday and added the MAC address under the entity in the card and the power button still does nothing? I have wake on lan working but had to set up a switch to get power on, I can power off through the entity but the entity won’t power on?

jscherry commented 2 years ago

Should I get rid of the power on switch in the yaml? Here’s my yaml:

madmicio commented 2 years ago

image in card config

madmicio commented 2 years ago

image in configuration.yaml if the service was not already present, remember to restart Home Assistant

madmicio commented 2 years ago

image this is not necessary

jscherry commented 2 years ago

Made the changes and removed switch yaml and config yaml. The tv will now turn off with the remote but will not turn on. I have updated with the two new versions released today?

jscherry commented 2 years ago

I have wake_on_lan in config.

baczus commented 2 years ago

In my case, after changes proposed by @madmicio everything works. Thanks :)

Midivir commented 2 years ago

I have an LG TV that has issues with WOL so I started using an IR and RF Universal Remote (Broadlink RM4). I have configured the TV to be turned on with a script but with this change it seems like it only allows WOL. Is there any way to use a script for the power on action from the remote instead?

My webostv.yaml host: x.x.x.x name: "TV" turn_on_action: service: script.tv_power

And the Script tv_power: sequence:

star114 commented 2 years ago

I have same issue like @Midivir ‘s comment. I used harmony remote command to turn on action and now I made a automation for it. Can it be possible to have a mac address as an option for this lovelace?

shlomki commented 2 years ago

I second that. I don't see why a lovelace card needs to contain sensitive information such as MAC addresses. The LG WebOS component allows to use secrets, but doing this in lovelace is bad practice because it doesn't allow the use of secrets. The MAC address definitely should be an optional field, and use the media_player.turn_on service if it wasn't provided.

triumfas commented 2 years ago

I have wake_on_lan: added to configuration.yaml. I'm also using it to wake up my PC. After adding mac to the card I could turn off TV, but turning on didn't work. Played around but couldn't figure out what I'm doing wrong or what part of configuration is missing. Ended up defining WOL switch in configuration.yaml and adding a button next to the remote. Would be nice to have a clear description where and what needs to be done as simply adding mac to the card and removing configuration from configuration.yaml file does not work.

0n3man commented 2 years ago

Just started using this card. Wake_on_lan was not initially working. I figured it had to do with some setting on the TV. Looked around and found All Settings -> General -> Devices -> External Devices -> TV On With Mobile -> Turn on via WiFi,which was off. My TV is hard wired, so I'm not using WiFi. I still needed this feature enabled for wake_on_lan to work.

arthurEspooner commented 1 year ago

Just started using this card. Wake_on_lan was not initially working. I figured it had to do with some setting on the TV. Looked around and found All Settings -> General -> Devices -> External Devices -> TV On With Mobile -> Turn on via WiFi,which was off. My TV is hard wired, so I'm not using WiFi. I still needed this feature enabled for wake_on_lan to work.

i had the same issue, thanks. this should be added to the docs for wake on lan as it does not work without it, at least on some TVs as seen.

also to note, this was in a different location on my tv. on my recent OLED, it's under Connection > Mobile TV On

Chrusciki commented 1 year ago

I have issue with my TV

he MAC address definitely should be an optional field, and use the media_player.turn_on service if it wasn't provided.

I have my TV on wifi and the WOL would not update the TV. following your suggestion i added the button to call the wake on lan service but with the optional IP field filled in and it works! thanks for the tip. now how to integrate that into the lg remote...

so i feel like the WOL has some issues with WIFI connected TVs but it does work when directly sending the magic packet to mac/ip combo

dougmaitelli commented 11 months ago

May I suggest the README file of this repo to be update and include details about the wake_on_lan in the configuration file requirement and other troubleshooting from this thread?

andrewgl504 commented 12 hours ago

For anyone else that finds this thread, here's what I had to add to configuration.yaml to allow the remote to power on. I had the wake on lan setting on the tv already on but needed to add this to make it work:

switch:
  - platform: wake_on_lan
    name: lg
    mac: !secret lg_mac

and then in secrets.yaml (not my mac):

lg_mac: 12:3A:60:84:19:05