The network binging provides a Wake-On-LAN action, but I suspect I’m not calling it correctly.
My intent is to send a WoL packet when an item state changes to ON. I can’t find a single forum example of WoL via the network binding to compare (I understand that this was previously provided in a more popular, dedicated 1.x WoL binding).
It would seem like I am either not calling the binding’s actions correctly, or that binding is not providing the action. Can anyone show me the error of my ways or another example of using this action?
My rule:
val actions = getActions("network","network:servicedevice:46a49637")
rule wake
when
Item PC changed from OFF to ON
then
actions.sendWakeOnLanPacket()
end
The rule is triggering, but I am getting the error:
[ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'wake': 'sendWakeOnLanPacket' is not a member of 'org.eclipse.smarthome.core.thing.binding.ThingActions'; line 11, column 2, length 29
The Thing (“Corsair”) that should be receiving the wake-on-lan packet is configured via PaperUI, but I’ve added the macAddress parameter via the REST API (changed from actual mac in the json excerpt below).
“label”: “Corsair”,
“configuration”: {
“hostname”: “192.168.0.181”,
“macAddress”: “aa:bb:cc:dd:ee:ff”,
“port”: 445,
“refreshInterval”: 60000,
“retry”: 1,
“timeout”: 4000
},
…
“UID”: “network:servicedevice:46a49637”,
“thingTypeUID”: “network:servicedevice”,
- Platform information:
- Hardware: Raspberry Pi4
- OS: openhabian (Raspian Linux 10)
- Java Runtime Environment: 1.8.0_265
- openHAB version: 2.5.8(release)