bendavid / aiopylgtv

Library to control webOS based LG Tv devices
MIT License
143 stars 47 forks source link

system/turnOn #59

Open Emmettfl opened 1 year ago

Emmettfl commented 1 year ago

Hello,

I am having problems using the system/turnOn command for my LG TV. TurnOff works fine. I'm running this from services in developer tools:

service: webostv.command data: entity_id: media_player.living_room_tv command: system/turnOn

I need the turnOn function because the CEC functions don't seem to work with my Series X. Thanks!

chros73 commented 1 year ago

It never worked for me either. Instead send a WOL to the TV: https://www.avsforum.com/threads/2022-lg-c2-g2-owners-thread-no-price-talk.3250717/page-120#post-61806089

Emmettfl commented 1 year ago

It never worked for me either. Instead send a WOL to the TV: https://www.avsforum.com/threads/2022-lg-c2-g2-owners-thread-no-price-talk.3250717/page-120#post-61806089

Hi @chros73 , should it be something like this?:

image

it should run in an automation so the TV turns on automatically when the XBox is turned on. (with the MAC address first and the ip address after?)

chros73 commented 1 year ago

That's not the IP after the /d option but the netmask for broadcast the wol packet. Usually tge last number is 255 but it depends on your network config. Try it out in cmd at first.

Emmettfl commented 1 year ago

so just run wol.exe 75:E6:B9:A4:B7:A1 /d 192.168.1.255 in cmd in Windows? If so this is what I get:

C:\Users\emmet>wol.exe 75:E6:B9:A4:B7:A1 /d 192.168.1.255 'wol.exe' is not recognized as an internal or external command, operable program or batch file.

chros73 commented 1 year ago

Obviously you have to get wol.exe and you only have to modify the last part of the netmask.