[Network] Added param to differentiate between mac and IP WOL Request (#11387)

* Added possiblity to send WOL Requests to configured Hostname, also removed unnecessary unit from Timeout Annotation in WakeOnLanPacketSenderTest
* Introduced parameter to decide whether to send WOL via IP or MAC
* Added two Methods for user clarity, marked old method as deprecated, adjusted README
* Updated internal methods to use explicit calls as well, added deprecated method call to README

Signed-off-by: Jonathan Saxen <jonathan@saxen.info>
This commit is contained in:
Jonathan S
2021-10-31 09:16:00 +01:00
committed by GitHub
parent 3bd2939b6c
commit 1d07dbe1f5
5 changed files with 107 additions and 54 deletions

View File

@@ -250,6 +250,11 @@ if (actions === null) {
logInfo("actions", "Actions not found, check thing ID")
return
} else {
actions.sendWakeOnLanPacket()
// Send via MAC address
actions.sendWakeOnLanPacketViaMac()
actions.sendWakeOnLanPacket() // deprecated
// Send via IP address
actions.sendWakeOnLanPacketViaIp()
}
```