1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00

bump wake on lan package

This commit is contained in:
Dave Conway-Jones 2018-09-13 12:00:53 -04:00
parent 8d77028b4a
commit a5f29e3445
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
2 changed files with 11 additions and 3 deletions

View File

@ -17,9 +17,13 @@ module.exports = function(RED) {
if (chk.test(mac)) { if (chk.test(mac)) {
try { try {
wol.wake(mac, {address: host}, function(error) { wol.wake(mac, {address: host}, function(error) {
if (error) { node.warn(error); } if (error) {
node.warn(error);
node.status({fill:"red",shape:"ring",text:" "});
}
else if (RED.settings.verbose) { else if (RED.settings.verbose) {
node.log("sent WOL magic packet"); node.log("sent WOL magic packet");
node.status({fill:"green",shape:"dot",text:" "});
} }
}); });
} }
@ -31,6 +35,10 @@ module.exports = function(RED) {
} }
else { node.warn("WOL: no mac address specified"); } else { node.warn("WOL: no mac address specified"); }
}); });
this.on("close", function () {
node.status({});
})
} }
RED.nodes.registerType("wake on lan",WOLnode); RED.nodes.registerType("wake on lan",WOLnode);
} }

View File

@ -1,9 +1,9 @@
{ {
"name" : "node-red-node-wol", "name" : "node-red-node-wol",
"version" : "0.0.8", "version" : "0.0.9",
"description" : "A Node-RED node to send Wake-On-LAN (WOL) magic packets", "description" : "A Node-RED node to send Wake-On-LAN (WOL) magic packets",
"dependencies" : { "dependencies" : {
"wake_on_lan" : "0.0.4" "wake_on_lan" : "1.0.0"
}, },
"repository" : { "repository" : {
"type":"git", "type":"git",