Wake on LAN - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Wake on LAN (/showthread.php?tid=33) |
Wake on LAN - George - 12.07.2015 Please improve where possible. Function : Wakes up a PC from the Logic Machine Goal : Save power by starting PC's only when needed Requirements : 1. PC must support Wake on LAN. You can verify this in the Bios or by sending a WoL-Packet (Magic Packet) from a Windows or Linux tool. 2. WoL must be enabled Actions : 1. Send Magic Packet 2. Wait a number of seconds 3. Check if portnumber on PC is available 4. If not, log error condition To do : 1. return actionable error code Installation : 1. Add the the code underneath to the function library 2. Create a script with the following line : Wol('aa:bb...:ff', '10.1.x.y', '60', '80') Aa:bb...:ff MAC-address 10.1.x.y IP address (to verify the fail/success state) '60' number of seconds before checking if the required port number is running '80' port number to verify Code Code: function wol(mac, ip, timeout, port) |