I wanted to share my experience with setting up Wake on LAN (WoL) through OPNsense using the os-wol plugin in Home Assistant. While there are plenty of guides out there, I found myself piecing together information from various sources to get it working seamlessly across different subnets. Here’s how I did it:
First, I ensured I had the necessary permissions set up in Home Assistant. I created a user account with specific API key permissions for “Services: Wake On LAN”. This was crucial for authentication when sending WoL commands through the REST API.
Next, I configured the REST command in my Home Assistant setup. I used a YAML configuration to define the endpoint, headers, and payload. The payload included the MAC address and interface name of the target device. I also made sure to handle SSL verification, which is important for security, especially if you’re using self-signed certificates.
One thing that tripped me up initially was figuring out the correct interface name. OPNsense uses internal names like “opt3” instead of the more user-friendly labels I had assigned. Once I got that sorted, everything started working smoothly.
I’d love to hear if anyone has found a way to make Home Assistant prompt for the interface name and MAC address directly in the UI mode, as that would make the process even more user-friendly for others.
This setup has been a lifesaver for managing devices on my guest VLAN without having to jump through subnet traversal hoops. It’s a simple yet effective solution that integrates well with my existing Home Assistant ecosystem. I hope this helps someone else who’s tackling a similar project!