Wake on Lan with the Network Binding

Hello,
I wanted to switch from the old Wake on Lan binding to the network binding to wake my PC’s remotely.
I’m not completely stupid but these rules in openHAB get me down. I read the documentation from the network binding and wanted to create a rule to wake up the PC, but I fail miserably again.

rule "Home Server wecken"

    when
        Item HomeServer_Online changed 
    then

    val actions = getActions("network", "network:pingdevice:Home Server")
if (actions === null) {
    logInfo("actions", "Actions not found, check thing ID")
    return
} 
else {
    actions.sendWakeOnLanPacket()
}

end

This is exactly what the documentation usually says and of course it doesn’t work. What values must be in there so that OH sends the WOL packet?
I can use OH well, but the rules is a book with seven seals.
I’m starting to feel really stupid to always have to ask.

Can someone help me please?

What doesn’t work? What do the logs say? Did you also read the bit about your thing definition requiring the MAC address of your device that you’re trying to wake?

Change your thing to the correct syntax
eg

Thing network:pingdevice:Home_Server [ hostname="192.168.0.42", macAddress="6f:70:65:6e:48:41" ]
rule "Home Server wecken"

    when
        Item HomeServer_Online changed 
    then

    val actions = getActions("network", "network:pingdevice:Home_Server")
if (actions === null) {
    logInfo("actions", "Actions not found, check thing ID")
    return
} 
else {
    actions.sendWakeOnLanPacket()
}

end

Hello,
thanks for the example, that’s how I found my mistake.
Home Server is not the name of the ping device.

With the correct name, it works directly.

Thanks a lot

FYI! The finished rule should be written like this:

rule "Home Server wecken"

    when
        Item HomeServer_WOL changed from OFF to ON
    then
        val actions = getActions("network", "network:pingdevice:192_168_0_10")
    if (actions === null) {
        logInfo("actions", "Actions not found, check thing ID")
    return
} 
else {
    actions.sendWakeOnLanPacket()
}

end

It is important to define the change correctly, otherwise the computer will always restart as soon as the switch changes.