WOL - Binding Problem with Samsung Smart TV

I would like to start my TV by WOL. In the settings everything is prepared, I can control my TV if it is ON. But if the TV is OFF, I can’t wake it up.

I have the following settings:

Switch SamsungTVwol   "TV on"    { wol="192.168.XXX.255#XX:XX:XX:XX:XX:XX" }

I get the following issue message:

2019-12-31 13:06:06.156 [INFO ] [nhab.binding.wol.internal.WolBinding] - Wake-on-LAN packet sent [broadcastIp=, macaddress=XXXXXXXXXXXX]
2019-12-31 13:06:52.101 [WARN ] [.samsungtv.internal.WakeOnLanUtility] - Cannot get MAC addres of host 192.168.XXX.XXX: arping: libnet_init(LIBNET_LINK, yahmbr0): libnet_open_link(): UID/EUID 0 or capability CAP_NET_RAW required
==> /var/log/openhab2/events.log <==
2019-12-31 13:06:52.113 [hingStatusInfoChangedEvent] - 'samsungtv:tv:25da5924_b155_44a0_b2e8_dc3217f54ec1' changed from OFFLINE to ONLINE
2019-12-31 13:06:52.120 [vent.ItemStateChangedEvent] - SamsungTV_Power changed from OFF to ON
==> /var/log/openhab2/openhab.log <==
2019-12-31 13:06:52.155 [INFO ] [rnal.service.RemoteControllerService] - Using SecureWebSocket interface

As you can see, the TV is changing to Online, but it is not turning on. Did I do sth. wrong? What is CAP_NET_RAW?

Thank you

You didn’t do anything wrong. You don’t have the permission to use arp as the user openhab.
CAP_NET_RAW is the constant for a raw socket. As a regular user you don’t have the permission to do that.
But that isn’t really the problem. The problem relies in the Java binary. As @David_Graeff suggests here you have to give the binary full network rights.

thank you for the fast reply.

I did enter

setcap 'cap_net_raw,cap_net_admin=+eip cap_net_bind_service=+ep' $(/usr/bin/java)

as written in the docs here. Is this really the Java Binary network permission? I this is the wrong place, where can I find the correct position to adjust the rights? I was wondering, because nothing regarding binary was stated there.

The issue message does not appear any longer - thank you therefore :-). But there is often a but… :smiley: the TV is still black, and nothing else is happening.

only one log line:

2019-12-31 14:12:56.324 [INFO ] [nhab.binding.wol.internal.WolBinding] - Wake-on-LAN packet sent [broadcastIp=192.168.XXX.255, macaddress=XXXXXXXXXXXX]

Any further suggestions or hints?

With issueing this line in the service file you allowed java to use ports below 1024 (I think, correct me if I am wrong).
Yes you used the right one. You are welcome :slight_smile:

Well the log line tells us that the packet has been successfully sent. Try to observe the traffic between your instance and the TV (Man-in-the-mittle) to find out if there is a communication error.
Also you should ensure that your TV supports WoL. Otherwise this will never work :wink:


after a second reboot this morning, the WOL is working proper. Sometime I need to push the button twice, but this I will figure out myself…thank you very much for your help!! :slight_smile:

1 Like

you are welcome