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:
parent
8d77028b4a
commit
a5f29e3445
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user