diff --git a/io/wol/39-wol.js b/io/wol/39-wol.js index be475369..b455f282 100644 --- a/io/wol/39-wol.js +++ b/io/wol/39-wol.js @@ -28,9 +28,14 @@ module.exports = function(RED) { var mac = this.mac || msg.mac || null; if (mac != null) { if (chk.test(mac)) { - wol.wake(mac, function(error) { - if (error) { node.warn(error); } - }); + try { + wol.wake(mac, function(error) { + if (error) { node.warn(error); } + else if (RED.settings.verbose) { + node.log("sent WOL magic packet"); + } + }); + } catch(e) { if (RED.settings.verbose) { node.log("WOL: socket error"); } } else { node.warn('WOL: bad mac address "'+mac+'"'); } } diff --git a/io/wol/package.json b/io/wol/package.json index f3a325d1..3dd47cd7 100644 --- a/io/wol/package.json +++ b/io/wol/package.json @@ -3,7 +3,7 @@ "version" : "0.0.2", "description" : "A Node-RED node to send Wake-On-LAN (WOL) magic packets", "dependencies" : { - "wake_on_lan" : "0.0.3" + "wake_on_lan" : "0.0.4" }, "repository" : { "type":"git",