This program sends Wake-on-LAN/Sleep-on-LAN packets to configured devices when it receives MQTT messages.
Make sure you have a recent version of Rust installed.
- Clone this repo
- Copy Settings.toml.example -> Settings.toml
- Configure Settings.toml to match your setup (see below)
cargo run
For each device, you will need to retrieve and note down:
- Device network interface MAC address
- Sleep on LAN endpoint if you wish to use that functionality
MQTT messages use the following JSON format:
{
"id": "<device_id>",
"power": true
}