Wake on LAN Binding not working

Hello,

I tried to use the Wake on LAN Binding in order to Power On my Synology.I want to specify that from other device that is in the same private network is possible to use WOL and wake up the Synology device.

the Item file that I’m using looks like:
Switch WOL_Synology “Synology NAS” { wol=“192.168.1.255#00:11:32:4B:4A:71”}

  • 192.168.1.255 - broadcast address of my private network
  • 00:11:32:4B:4A:71 the MAC address of my Synology

Please let me know if is something to do/check

Thank you,

Please try lower case hex-numbers instead. I’m not sure if this solves the problem though, but give it a try…

Wow, I totally misread the binding page so deleted my own comment. If you haven’t solved yours maybe append ', nh=“ip of NAS” '. Have you verified WoL works outside of OpenHAB?

Be aware that there are two different bindings, wake on lan and network health, the latter would be {nh=“computer.ip.or.fqdn”}, the former {wol=“ip and#mac-address”} in configuration.

I have the exact same problem.

Having a basic docker container and a perl “wake-on-lan” script does work.

Having an openhab docker container with the openhab wake-on-lan binding does not work. I really don’t see why. Moreover my openhab docker container is even running with the “–net=host” parameter.

I’ve tryed upper- or lower-case, in openhab configuration, and “:” or “-”, nothing works.
All my IPs are 192.168.8.x, so i tryed : 192.168.8.255, or 192.168.255.255, and even 255.255.255.255 (the default used by the wake-on-lan perl script), nothing works.

Then i added the wake-on-lan perl script inside the docker container running openhab, and it works like a charm. So i’m pretty sure that i have a trouble not with the dockerisation of openhab but with this java binding (but i don’t see where).

Any ideas ?
Moreover i don’t see any logs about the wake-on-lan commands (just the the fact that i clicked on my “wake” switch in the sitemap), is that normal ?

In your first post, you were talking about a different subnet, so fist thing to make clear is your correct IP addressing.

If the machine you want to wake up is in subnet 192.168.1.0, then your binding config should look like

{ wol="192.168.1.255#00:11:32:4B:4A:71" }

If your subnet is 192.168.8.0 then it should look like

{ wol="192.168.8.255#00:11:32:4B:4A:71" }

Are you sure that you have your WOL binding jar copied to the addons folder ? Please start openHAB in debug mode to see what happens.

Don’t know what first post you’re talking about, it’s my first post here (and i’m not the original poster) (and yes i have everything under 192.168.8.x).

I’ll try the debug mode, indeed.

Upps, sorry, I mixed it with a post from a different user, therefore, the MAC Address in my sample is not correct.

Here is a working example from my installation :

Switch QJ101 "QJ101 Ubuntu" <server> (gServer) { nh="192.168.0.xx", exec="OFF:ssh root@192.168.0.xx poweroff", wol="192.168.0.255#XX:XX:XX:XX:XX:XX" }

I’m not sure if it’s required or not but make sure you have the wakeonlan package installed in your OH instance. Honestly don’t know if the binding is sending the WoL magic packet or calling ‘wakeonlan’ to do it.

wol=“192.168.10.255#ab:cd:ef:12:34:56” works on my LAN although my research indicated a possible kexec bug so my shutdowns end up in reboots and the network health binding isn’t refreshing in a timely manner even though it is supposedly 60 seconds. That’s another topic though :wink:

I believe the WOL binding only supports waking over LAN (not Wifi). My RPI3 is connected via WiFi and I was unable to make it work.

I then tried etherwake and realised that by default it uses eth0. If you change it to interface “wlan0”, it works like a charm:

sudo etherwake -i wlan0 00:11:22:33:44:55

You can then call etherwake via exec in a rule. No WOL binding required.

1 Like

No need to discuss anything from my side. Just read the second bullet in the linked paragraph:
https://community.openhab.org/guidelines#keep-tidy

Well, you posted the exact same thing within few minutes in 5+ topics. Let me help you to find the one sentence I was trying to point you to with the link from above:

Don’t cross-post the same thing in multiple topics.