Closed cbirchinger closed 1 month ago
This fixes it for me. Removing the ip_address argument makes wakeonlan default to 255.255.255.255
--- remote.py.orig 2024-07-08 18:16:59.269962415 +0200
+++ remote.py 2024-07-08 18:17:12.390222230 +0200
@@ -182,7 +182,7 @@
def on(self):
if not (self.__macAddress) and not (self.__ip):
print ("Client must have been powered on and paired before power on works")
- send_magic_packet(self.__macAddress, ip_address=self.__ip)
+ send_magic_packet(self.__macAddress)
def off(self):
self.__send_command("request", "ssap://system/turnOff")
Please make a pr I'll approve it.
Please make a pr I'll approve it.
More recent versions started to send the magic wakeonlan packet to the TV's IP address instead of the broadcast IP
tcpdump comparison:
FAIL:
$ ~/.virtualenv/lgtv/bin/lgtv --name tv on
17:27:33.826836 IP 192.168.1.7.49369 > 192.168.1.21.9: UDP, length 102
WORKING:
~/.virtualenv/lgtv/bin/wakeonlan b4:b2:91:xx:xx:xx
17:28:29.942674 IP 192.168.1.7.54168 > 255.255.255.255.9: UDP, length 102
(So the wakeonlan pulled as dependency is capable of doing the right thing)Wake on LAN only works when the packet is sent to the broadcast address because the IP of the TV is not active while the TV is in standby.
Python 3.12.3 Installed with: pip install git+https://github.com/klattimer/LGWebOSRemote (VirtualEnv) Install date: 2024-07-07 18:02