Answer the question
In order to leave comments, you need to log in
How to use this script from GitHub?
I need to send magic packets (Wake On Lan) to turn on LG TV with Web OS. With Raspberry Pi. I found a Python 3 script: https://github.com/bentasker/Wake-On-Lan-Python , but I don’t understand how to run it through the terminal.
wol.py [hostname]
What to prescribe instead of hostname?
Answer the question
In order to leave comments, you need to log in
Create .wol_config.ini Filename starts with a dot
Set broadcast address if different.
broadcast=192.168.1.255
Add the mac address of the device. The name in square brackets will be the hostname
of [myPC]
mac=00:2a:a0:cf:83:15
# Save this file as .wol_config.ini in the same directory as wol.py
[General]
broadcast=192.168.1.255
[myPC]
mac=00:2a:a0:cf:83:15
[myLaptop]
mac=00:13:0d:e4:60:61
wol.py myLaptop
cezh open source - look what's in the source.
https://github.com/bentasker/Wake-On-Lan-Python/bl...
# Check mac address format
found = re.fullmatch('^([A-F0-9]{2}(([: ][A-F0-9]{2}){5}|([-][A-F0-9]{2}){5})|([\s][A-F0-9]{2 }){5})|([a-f0-9]{2}(([:][a-f0-9]{2}){5}|([-][a-f0-9]{ 2}){5}|([\s][a-f0-9]{2}){5}))$', macaddress)
#We must found 1 match , or the MAC is invalid
script requires mac address network connection piece of iron, which must be woken up.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question