Skip to content

flonix8/http-wol-trigger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wake up devices through Wake-On-LAN over simple web frontend or HTTP

This is a simple no-dependency Python script that exposes two HTTP endpoints while running:

Endpoint Desc
GET / Serves a simple HTML button that calls /trigger_wol
GET /trigger_wol Sends the magic packet to wake up a local device (using wakeonlan)

Setup

Run this on a Linux machine if you want to use wakeonlan.

  • Make sure Python and wakeonlan are installed and available on the path
  • Replace YOUR_DEVICES_MAC_ADDR_HERE with the MAC address of remote machine (find out with TARGET_IP=1.2.3.4; ping -c 1 $TARGET_IP > /dev/null && arp -n | grep $TARGET_IP)
  • Run python3 wol_http_server (optionally add --port 1234 to customize server port)
  • Access simple webpage on host:8000

Automatic startup (via Systemd)

  • Run install_user_service.sh
  • Enable service
    systemctl --user enable wol-http-trigger.service
  • Make systemd user services run without session
    loginctl enable-linger

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published