GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - dr3st/WOL-proxy: Proxy that sends Wake On LAN magic packets to local network after receiving specific MQTT message

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

72 Commits
72 Commits

Folders and files

NameName
Last commit message
Last commit date
root/etc/s6-overlay/s6-rc.d
root/etc/s6-overlay/s6-rc.d
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
WOL-proxy.py
WOL-proxy.py
 
 
docker-compose-example.yaml
docker-compose-example.yaml
 
 
hass-config-example.yaml
hass-config-example.yaml
 
 

Repository files navigation

WOL-proxy

WOL-proxy is a dockerized Wake-On-LAN tool that received commands to send Wake-On-LAN magic packets over MQTT. This allows a computer to be woken on a network where a WOL packet would not normally reach (remote site, etc.)

The script can be run using docker (takes care of all dependencies) or standalone. It is design to run on Raspberry Pi or equivalent.

Usage

  1. Have a MQTT broker you can connect to. I use Mosquitto.

  2. Run the container or script using instructions below.

  3. Publish to the mqtt topic, WOL-proxy/command, with the MAC address of the computer you wish to wake. The following formats are acceptable: ab-cd-ef-01-23-45, ab:cd:ef:01:23:45, ab.cd.ef.01.23.45, abcdef012345. An example Home Assistant config is provided.

    By default, WOL-proxy accepts messages on the WOL-proxy/command mqtt topic. The WOL-proxy prefix can be changed by setting the MQTT_TOPIC_PREFIX environment variable. WOL-proxy will then listen for messages on [MQTT_TOPIC_PREFIX]/command. Note that adding a trailing / to MQTT_TOPIC_PREFIX will create an empty level.

    Value of MQTT_TOPIC_PREFIX mqtt command topic
    WOL-proxy WOL-proxy/command
    switches/remoteLAN switches/remoteLAN/command
    switches/remoteLAN/ switches/remoteLAN//command

Status Messages

WOL-proxy will report its status on the [MQTT_TOPIC_PREFIX]/status topic via retained messages. WOL-Proxy reports Online once it connects to the broker. Upon disconnect, the broker will report Offline.

Running via Docker

Pull the image. If using raspberry pi or similar use arm in place of [tag]. The latest tag will pull the amd64 image:

docker pull seanauff/wol-proxy:[tag]

Start the container with all default environment variables:

docker run -d --net=host --name=WOL-proxy seanauff/wol-proxy:[tag]

Start the container with modified environment variables:

docker run -d --net=host --name=WOL-proxy -e MQTT_BROKER_HOST=[host] -e WOL_BROADCAST_ADDR=[broadcast] seanauff/wol-proxy:[tag]

Note: Container needs to run with host networking in order to send the broadcast packets correctly!

Environment Variables

Variable Default Value Notes
MQTT_BROKER_HOST 127.0.0.1 IP or hostname of MQTT broker
MQTT_BROKER_PORT 1883 Port of MQTT broker
MQTT_CLIENT_ID WOL-proxy Change this if the default is already in use by another client
MQTT_USERNAME Username for connecting to MQTT broker when using auth. TLS not currently supported
MQTT_PASSWORD Password for connecting to MQTT broker when using auth. TLS not currently supported
MQTT_TOPIC_PREFIX WOL-proxy The first level(s) of the topic for the proxy to subscribe ([prefix]/command) and provide status ([prefix]/status)
MQTT_QOS 1 QOS level to use to subscribe to command topic
WOL_BROADCAST_ADDR 255.255.255.255 Change to the local broadcast IP for best results

Build the image yourself

Clone the repository and build the image:

git clone https://github.com/seanauff/WOL-proxy.git
docker build -t seanauff/wol-proxy WOL-proxy

Other Install Methods

Dependencies

This project uses the following libraries:

  • paho-mqtt
  • wakeonlan

Install them with:

pip install paho-mqtt wakeonlan

About

Proxy that sends Wake On LAN magic packets to local network after receiving specific MQTT message

Resources

Readme
License
Activity

Stars

1 star

Watchers

0 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.