hass-wol/README.md
2024-07-09 23:13:54 +02:00

67 lines
No EOL
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# hass-wol
> Wake-on-LAN (WoL) companion container for Home Assistant.
It connects to your [MQTT broker](https://www.home-assistant.io/integrations/mqtt/) and registers a simple _Wake-on-LAN_ button for every specified host.
Note that [Home Assistant also has native support for Wake-on-LAN](https://www.home-assistant.io/integrations/wake_on_lan/).
This project is useful for when you dont want your Home Assistant container to use host networking or when the device to be woken up is in an entirely different network.
## Usage
This tool is intended to be used as a companion to the Home Assistant container.
Your `docker-compose.yml` may look like this:
```yaml
version: "3.9"
services:
homeassistant:
image: "homeassistant/home-assistant"
# ...
hass-wol:
image: "git.moritzruth.de/moritzruth/hass-wol:1.0.0"
restart: unless-stopped
network_mode: host # this is required because WoL uses UDP broadcast packets
volumes:
- "./hass-wol.toml:/config.toml:ro"
- "./data:/data" # persistent data
```
And your `hass-wol.toml` like this:
```toml
broadcast_address = "255.255.255.255" # dont change this if you dont need to
[mqtt]
host = "MQTT_BROKER_IP_ADDRESS"
port = 1883
client_id = "hass-wol"
credentials = { user = "USER", password = "PASSWORD" }
[[host]]
display_name = "my_pc"
mac_address = "04:1B:BF:2D:C7:70"
[[host]]
display_name = "my_server"
mac_address = "20:5D:48:98:94:C0"
# These options are optional.
# hass_identifiers = [] # see https://www.home-assistant.io/integrations/button.mqtt/#identifiers
# packet_count = 6
# ms_between_packets = 500
```
## License
This project is available under the permissive [Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0).
## Related projects
- [Hassliebe](https://git.moritzruth.de/moritzruth/Hassliebe) — Integrates any Linux machine into your Home Assistant ecosystem.