Send Wake on Lan (WoL) package from Docker Container in Truenas Scale ...

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
Hi,

I am trying to WoL (Wake on Lan) a Windows PC from my Homeassistant (Docker) running on Truenas Scale.

I migrated my Homeassistant Docker from Synology to TrueNAS Scale. Now I have the (truecharts) Homeassistant App running on Scale and copied all the configuration files over - so far everything works fine.

The only exception is that the WOL command (to wake up my local Windows 11 Machine) is not working anymore?

# WOL - Workstation
- platform: wake_on_lan
mac: 04:92:******
name: "Workstation"
turn_off:
service: script.workstation_shutdown

Before in the Synology / Docker combination it was working just fine ... now on the TrueNAS Scale setup not.

Does the TrueNAS / Kubernetes setup restricts anything? Online I read that "It’s required that the binary ping is in your $PATH."
(https://www.home-assistant.io/integrations/wake_on_lan/)
 
Last edited:

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
Some feedback bits I received from the truecharts discord...

WoL requires direct Layer2 network access without routing...
...it could be done using the not supported host-networking section.

... I tried to run (also the non-turecharts) docker container in "priveleged-mode". But that also did not work...
 

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
Anybody successfully sent a WOL package from a docker container running on Scale?

What Network settings did you use ... ?!?
 

Mathew

Dabbler
Joined
Apr 21, 2015
Messages
39
So WOL is broadcast traffic and needs to be on the same physical network layer. Within the backend of the Apps are some different subnets and virtual switches. That is why this will not work as you are using it. Try this config where you can bridge the App to the physical NIC on the TrueNAS system. Replace the Host interface with the interface that your TrueNAS system uses for it's connectivity and then under the static IP, put in an unused static IP that will work for your LAN.

 

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
Bildschirmfoto 2022-04-04 um 17.50.26.png


I did put it in like that ... and started the app via http://192.168.178.69:8123. But the WOL command does not work again in HA. :(
 

Mathew

Dabbler
Joined
Apr 21, 2015
Messages
39
Ugh. HA will likely require the virtual networking as that is one of it's purposes.
 

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
...meaning .. it does not work with HA?
 

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
Just to update ... it is working now. Not sure because of a TrueNAS Scale update and/or because I added additional variables in the call - which are I guess required by the TrueNAS Scale network system (was not necessary on my old Synology setup).

# WOL - Workstation
- platform: wake_on_lan
mac: 04:92:26:D9:0D:F9
broadcast_address: 192.*** (IP of target system)
broadcast_port: 9
name: "Workstation"
turn_off:
service: script.workstation_shutdown
 

pixelwave

Contributor
Joined
Jan 26, 2022
Messages
174
Ok weird behaviour ... it only works to wake up a machine via TrueNAS Scale when it was recently ON. After a longer time has passed the wake up command from TrueNAS does nothing. If I sent the WOL from my Mac ... it works?!?
 
Top