Home Assistant, VPN and WOL

I have a bit of a weird one I am hoping someone has a workaround for. My instance of HA is running in a python virtual environment on a windows 10 box that is essentially my media server. As such, it is also always connected to my VPN of choice. My issue is that my WOL switches are incorrectly getting statuses back for whether various PCs in my home are on or not. Basically, it appears that when HA pings the address (, for example) it receives a ‘host unreachable’ or equivalent rather than a timeout and is reporting said PC as online. Is there a way to configure my WOL switches ‘host’ value in HA so as to make sure the correct adapter is used or whatever is required? Or maybe it isn’t as simple as that?

Thanks in advance.

What is WOL ?

Wake On Lan

Are you using this to wake them up?

The Switch with platform of wake_on_lan, actually. I should also note two things:

  1. Using hostname rather than IP obviously has same results.
  2. If I disconnect the server from my VPN everything works as expected.

Perhaps your machine is set to route that network range up your VPN connection.

I think you are correct. I am far from the most network savvy individual so if anyone knows how to re-route certain destination addresses selectively in Windows I would be all ears. In the meantime, TO GOOGLE!

netstat -rn shows the network routing table. The route with all zeroes is the default route, used when nothing else applies.
The Interface column shows where it goes for that network.

ipconfig should help you determine your vpn address.

And there it, thanks. I just had to add a static route for my local subnet and it looks like I’m back in business.

1 Like