A Wake-on-LAN Python module and GUI to use the Wake-on-LAN protocol to wake up sleeping network devices in your LAN.
wake-on-lan can be used as:
- an importable module
- can be called directly via console
- can be used as a standalone script
- there is also a GUI version
This Wake-on-LAN app is broadcasting Wake-on-LAN frames to wake up sleeping devices. Standard broadcast ip is 255.255.255.255 on Standard port 9. The broadcast ip and port can be changed. You can manage manage and store several mac addresses. Your computers network interfaces can be listed from where you can choose the right one you want to send Wake-on-LAN frames from.
pip install psutil
- The functions
create_magic_packet
,send_magic_packet
, andwake_up
can be imported into other scripts, e.g.:from wol import wake_up wake_up("00:11:22:33:44:55", broadcast_ip="192.168.1.255")
Console Usage:
- Example 1: Simple call with MAC address:
python wol.py 00:11:22:33:44:55
- Example 2: With specific broadcast IP and interface IP:
python wol.py 00:11:22:33:44:55 --broadcast_ip 192.168.1.255 --interface_ip 192.168.1.100
The format of the MAC-addresses you can use must be in one of the following format:
- ff.ff.ff.ff.ff.ff
- 00-00-00-00-00-00
- FFFFFFFFFFFF
- ff:ff:ff:ff:ff:ff
- Add one or more destination MAC-addresses of your devices you want to wake up. You can also add names for them and edit or delete them later.
- Select a MAC-address/device from the table.
- (Optional) Select a network interface of your computer. Your sleeping device must be in the same network as your network interface.
- (Optional) Change the broadcast ip address and the port. Standard broadcast ip is 255.255.255.255 on Standard port is 9.
I need more information about my network interface!
Use ipconfig
(Windows) or ifconfig
(Linux) to get more information about your computers network configuration determine your network interface ip-address.
My device does not wake up. Nothing happens!
You may select the IPv4-address of your computers network interface. Your sleeping device must be in the same network as your network interface.
- Scan for network devices.
- See current status (power on or off) of devices.
Usage of "wakeonlan" Python module
WakeOnLAN protocoll on Wikipedia
Tkinter Tutorials on pythontutorial.net