Enable WOL on HA OS NUC Server

I am looking for some help in enabling WOL on my HA OS server (Intel NUC), if it is even possible. Note that I am not looking at sending WOL to other systems, I want to turn on my HA server via WOL from another system.

The reason for this is that my HA server is in my wiring closet along with my internet hardware, router and switch (along with a NAS and a few other devices). In event of a power failure, I want to maximize the run time for the network devices, so shut down all the “extra” devices after on battery power for 5 minutes or so. This includes my HA server. I have a RPi running node-RED that handles this and other watchdog tasks, it stays on until almost the end of battery life, since it has a very low power draw.

I can start my NAS, and unbuntu servers via WOL, though I have not found a way to enable it on HA OS. The ethtool utility is not available (I don’t believe I can add packages to HA OS).

Once the power is back on, I would like the HA server to come back to life, even if I am not home. The RPi should either still be running or if the outage is longer than battery capacity, it will start up automatically when the power is back on and it can then start powering on the other systems.

As far as the HA server, running on a NUC, it does not come back on when the power is applied. The NUC itself can be set to turn on after a power failure in BIOS, though it does not power back on if the system was shutdown gracefully, as would happen in this case.

I know that many, if not most users install on RPi, so their systems come back on by default. Though, I need to find another solution. The NUC itself supports WOL fine, I have two others running ubuntu and they work as expected once I configured the wake-on-lan service (ethtool). I just don’t see a way to do this with HA OS.

My other thought is to find a way to halt the HA OS server, without powering off, then cut the power (I can do this with outlet groups on my UPS). I believe the BIOS would restart when the power was reapplied. This is extra complexity to get going and would require the HA server to be on its own outlet group, though I could do it. Currently, I can call a shutdown/power off by calling the hassio.host_shutdown service via a MQTT automation. It looks like there is a “Home Assistant Core Integration: Stop” (homeassistant.stop) that stops the core. Though I don’t see anything else to stop the Supervisor or halt the host OS. I have had no luck calling “ha core” or “has host” commands via remote ssh call (as root with host keys). I believe most of these commands cannot be run remotely do to limitations with containers.

I suppose I could just stop the core and then cut the power, since it is a NUC on SSD, chances are good it would come back up without corruption and this should be a fairly rare event, though we do have occasional power outages where I live.

Here is my configuration:
Home Assistant 2021.12.9
Home Assistant OS 7.1
Running on Intel NUC8i5BEH

Has anyone enabled this or have any thoughts on how to accomplish this?

Thanks in advance, sorry for the long post.

I’m facing the same question, can’t seem to find any sorts of references for using WOL in this regard :frowning:

Did you find a solution on this ?

I had the same problem. On the bios screen I noticed OS lan driver \x2029 must be enabled.

Turns out you need to use ethtool
How to Enable Wake-on-LAN in Ubuntu - Make Tech Easier

Now the problem is how to use ethtool on a HASSOS machine. It worked on another NUC with Ubuntu

1 Like

Thanks for the link. I was able to install ethtool using the Advanced SSH & Web Terminal addon and it seems WOL is enabled on my NUC but I haven’t quite figured out how to send the magic packet to it.

Wake On Lan not working with Dell - Hardware - Home Assistant Community (home-assistant.io)