Wake on LAN for HA Host

Is it possible to configure WoL for the HA host itself? Google returns some very confused results.

I’m running HA OS on a Dell Wyse 5070, the 5070 is configured for and capable of WoL, I have another couple of these boxes running Ubuntu and Windows and they WoL with no problems.

This is an issue when there is a power cut, my UPS shuts HA down but then can’t restart it on power restore. I could cut the power to the HA host and restart the box on the AC Power on Restore setting in the UEFI but that risks corruption of HA. I use HA to WoL other devices using the WoL Addon and automations but obviously can’t if HA itself is down.

I’ve tried using nmcli to turn on magic packets

nmcli c modify "Supervisor enp1s0" 802-3-ethernet.wake-on-lan magic

but that results in

Error: Failed to modify connection 'Supervisor enp1s0': connection.autoconnect-ports: unknown property

Everything I see from HA devs says I should be using Network in the cli to configure network related settings but it doesn’t look like there is an option to turn on magic packets using this method.

Any ideas?

Hi StarMonkey1,

I believe the current Beta that will be released in about 14 hours is changing WOL, so I would hold off and try this after you update to 2024.8.x.
I don’t use it, but heard there are changes to it this month.

If I’m wrong, or that doesn’t get release someone should be able to help you after that settles.

Waking a machine with a WoL packet is no t something the OS handle. That jib falls to the BIOS and the netcard firmware.
Once the WoL packet has turned the power on on the machine, then it is just a normal boot up, but some BIOS setups can distinguish between how the power was turned on and then have different boot profiles for these.
If the BIOS have this feature then it should be listed under boot options.

This isn’t the case. The NIC also needs configuration from within the OS as well as the UEFi to enable WoL in the various sleep states the OS supports. Once it is configured within the OS then the magic packet can wake the machine when in certain sleep states.

Thanks! Any idea where this is documented and I’ll see whether the changes can help?

Update: Think I’ve found what you mean and its an update to the Wake on Lan integration which focuses on waking other network devices, there is still no option for the host itself. I’m running 2024.8.0.

Read the hardware requirements section.

Some vendors have added functionality that can do such things as you mention, but this requires that both the magic packet and the motherboard support this.
The added functionality is added in the payload of the magic packet, which is not a part of the original magic packet and therefore if a magic packet with a payload arrive at a motherboard without the functionality, then it is just treated as a normal magic packet.

Yup, second line in the hardware requirements section

In order to get Wake-on-LAN to work, enabling this feature on the network interface card or on-board silicon is sometimes required. Details of how to do this depend upon the operating system and the device driver.

I have three machines all exactly the same, they all have the same UEFI configuration. Two of the machines with Windows and Ubuntu on work great with WoL once I’ve configured the NIC driver within the OS. WoL doesn’t work on Home Assistant OS because I can’t configure the NIC driver. That’s what I’m asking to do in this thread.

You misread it.
The first line in the same section state that it is not depending on the operation system to work
The line you refer to is how to enable the function, not how it function once it is enabled.
The use of the term “operation system” is here referring to the UEFI partition on newer computers, which do not have a BIOS as such anymore.

I realise the line I’m quoting refers on how to enable the WoL function as that is exactly what I’m trying to do in Home Assistant OS. You need to enable the function on the NIC normally via the driver in the OS. Once this is done then the WoL function doesn’t rely on the OS.

Windows: How to enable 'Wake on LAN' on Windows 11 | Windows Central

Ubuntu: WakeOnLan - Community Help Wiki

Linux with Network Manager: nmcli c modify “Supervisor enp1s0” 802-3-ethernet.wake-on-lan magic

The “BIOS” you see on modern computers is an UEFI interface.
Some Operation systems (here referring to Linux/Windows/MacOs) have the option to access the UEFI settings through the device driver or through an UEFI editor, but it is up to the operation systems and/or the device driver developers if and how they want to implement these things.
On stripped down/embedded systems the features are often removed from the operation systems and the configuration is left to the UEFI tools available on the motherboard (what we might call BIOS today)

I don’t know how to make this any clearer but the NIC requires configuring to support WoL as well as the UEFI, when you change a setting in the NIC driver in the OS (Windows or Linux) you are absolutely NOT changing settings in the UEFI.

You have to configure the NIC through the Operating System. You can’t appear to do this on Home Assistant OS.

I set my network drivers WoL to disabled in Windows and in BIOS…
Then I can pull out my SSD and insert a blank SSD, configure my BIOS to WoL enabled and get my machine to start up. At least until it throws an error with no OS found.

Hello StarMonkey1, did you find a solution.
I’m facing the same issue, I’ve enabled the WoL in the Bios and in the Router but I’m not able to enable it in the OS. I’ve tried to install ethtool but it seems to be stuck.
I agree with you the WoL integration is to manage other equipments not the HA itself.

This will help: Getting Wake on Lan to work · Issue #2754 · home-assistant/operating-system · GitHub