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

load of tiny listing fixes, undef, unused, etc

This commit is contained in:
Dave Conway-Jones 2016-04-09 18:00:14 +01:00
parent 37ba29484a
commit 48bcd3c7df
22 changed files with 532 additions and 535 deletions

View File

@ -7,10 +7,10 @@
"disallowMultipleSpaces": {"allowEOLComments": true}, "disallowMultipleSpaces": {"allowEOLComments": true},
"disallowKeywordsOnNewLine": [], "disallowKeywordsOnNewLine": [],
"requireSpaceBeforeBlockStatements": 1, "requireSpaceBeforeBlockStatements": 1,
"requireSpaceBeforeObjectValues": false, //"requireSpaceBeforeObjectValues": false,
//"requireSemicolons": true, //"requireSemicolons": true,
//"validateParameterSeparator": ", ", //"validateParameterSeparator": ", ",
//"validateQuoteMarks": false,
"requireSpaceAfterKeywords": ["do","for","if","else","switch","case","try","while"], "requireSpaceAfterKeywords": ["do","for","if","else","switch","case","try","while"],
"maximumLineLength": 255, "maximumLineLength": 255
"validateQuoteMarks": false
} }

View File

@ -1,4 +1,8 @@
{ {
"predef": [ "RED" ],
"node": true,
"browser": true,
"jquery": true,
"asi": true, // allow missing semicolons "asi": true, // allow missing semicolons
"curly": true, // require braces "curly": true, // require braces
"eqnull": true, // ignore ==null "eqnull": true, // ignore ==null
@ -9,5 +13,6 @@
//"unused": true, // Check for unused functions and variables //"unused": true, // Check for unused functions and variables
"loopfunc": true, // allow functions to be defined in loops "loopfunc": true, // allow functions to be defined in loops
//"expr": true, // allow ternery operator syntax... //"expr": true, // allow ternery operator syntax...
"sub": true // don't warn that foo['bar'] should be written as foo.bar "sub": true, // don't warn that foo['bar'] should be written as foo.bar
"undef": true // warn about undefined variables
} }

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-pilcd", "name" : "node-red-node-pilcd",
"version" : "0.0.4", "version" : "0.0.5",
"description" : "A Node-RED node for Raspberry Pi to write to HD44780 style LCD panels.", "description" : "A Node-RED node for Raspberry Pi to write to HD44780 style LCD panels.",
"dependencies" : { "dependencies" : {
}, },

View File

@ -43,7 +43,6 @@ module.exports = function(RED) {
var node = this; var node = this;
function inputlistener(msg) { function inputlistener(msg) {
var out = msg.payload.toString();
if (RED.settings.verbose) { node.log("inp: " + msg.payload); } if (RED.settings.verbose) { node.log("inp: " + msg.payload); }
if (node.child !== null) { node.child.stdin.write(msg.payload + "\n"); } if (node.child !== null) { node.child.stdin.write(msg.payload + "\n"); }
else { node.warn("Command not running"); } else { node.warn("Command not running"); }
@ -90,7 +89,6 @@ module.exports = function(RED) {
} }
node.on("close", function(done) { node.on("close", function(done) {
delete pinsInUse[node.pin];
if (node.child != null) { if (node.child != null) {
node.child.stdin.write("c:lose" + node.pin); node.child.stdin.write("c:lose" + node.pin);
node.child.kill('SIGKILL'); node.child.kill('SIGKILL');

View File

@ -27,8 +27,7 @@ module.exports = function(RED) {
var devices = HID.devices(0x16c0,0x05df); var devices = HID.devices(0x16c0,0x05df);
for (var i=0; i< devices.length; i++) { for (var i=0; i< devices.length; i++) {
if (devices[i].product == 'DigiUSB') { if (devices[i].product == 'DigiUSB') {
path = devices[i].path; node.log("found: " + devices[i].path);
node.log("found: " + path);
try { try {
device = new HID.HID(devices[i].path); device = new HID.HID(devices[i].path);
break; break;

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-digirgb", "name" : "node-red-node-digirgb",
"version" : "0.0.5", "version" : "0.0.6",
"description" : "A Node-RED node to control a Digispark RGB LED", "description" : "A Node-RED node to control a Digispark RGB LED",
"dependencies" : { "dependencies" : {
"node-hid" : "0.4.*" "node-hid" : "0.4.*"

View File

@ -15,159 +15,160 @@
**/ **/
var colours = { var colours = {
'aqua':'#00FFFF', 'aqua':'#00FFFF',
'aliceblue':'#F0F8FF', 'aliceblue':'#F0F8FF',
'antiquewhite':'#FAEBD7', 'antiquewhite':'#FAEBD7',
'black':'#000000', 'black':'#000000',
'off':'#000000', 'off':'#000000',
'blue':'#0000FF', 'blue':'#0000FF',
'cyan':'#00FFFF', 'cyan':'#00FFFF',
'darkblue':'#00008B', 'darkblue':'#00008B',
'darkcyan':'#008B8B', 'darkcyan':'#008B8B',
'darkgreen':'#006400', 'darkgreen':'#006400',
'darkturquoise':'#00CED1', 'darkturquoise':'#00CED1',
'deepskyblue':'#00BFFF', 'deepskyblue':'#00BFFF',
'green':'#008000', 'green':'#008000',
'lime':'#00FF00', 'lime':'#00FF00',
'mediumblue':'#0000CD', 'mediumblue':'#0000CD',
'mediumspringgreen':'#00FA9A', 'mediumspringgreen':'#00FA9A',
'navy':'#000080', 'navy':'#000080',
'springgreen':'#00FF7F', 'springgreen':'#00FF7F',
'teal':'#008080', 'teal':'#008080',
'midnightblue':'#191970', 'midnightblue':'#191970',
'dodgerblue':'#1E90FF', 'dodgerblue':'#1E90FF',
'lightseagreen':'#20B2AA', 'lightseagreen':'#20B2AA',
'forestgreen':'#228B22', 'forestgreen':'#228B22',
'seagreen':'#2E8B57', 'seagreen':'#2E8B57',
'darkslategray':'#2F4F4F', 'darkslategray':'#2F4F4F',
'darkslategrey':'#2F4F4F', 'darkslategrey':'#2F4F4F',
'limegreen':'#32CD32', 'limegreen':'#32CD32',
'mediumseagreen':'#3CB371', 'mediumseagreen':'#3CB371',
'turquoise':'#40E0D0', 'turquoise':'#40E0D0',
'royalblue':'#4169E1', 'royalblue':'#4169E1',
'steelblue':'#4682B4', 'steelblue':'#4682B4',
'darkslateblue':'#483D8B', 'darkslateblue':'#483D8B',
'mediumturquoise':'#48D1CC', 'mediumturquoise':'#48D1CC',
'indigo':'#4B0082', 'indigo':'#4B0082',
'darkolivegreen':'#556B2F', 'darkolivegreen':'#556B2F',
'cadetblue':'#5F9EA0', 'cadetblue':'#5F9EA0',
'cornflowerblue':'#6495ED', 'cornflowerblue':'#6495ED',
'mediumaquamarine':'#66CDAA', 'mediumaquamarine':'#66CDAA',
'dimgray':'#696969', 'dimgray':'#696969',
'dimgrey':'#696969', 'dimgrey':'#696969',
'slateblue':'#6A5ACD', 'slateblue':'#6A5ACD',
'olivedrab':'#6B8E23', 'olivedrab':'#6B8E23',
'slategray':'#708090', 'slategray':'#708090',
'slategrey':'#708090', 'slategrey':'#708090',
'lightslategray':'#778899', 'lightslategray':'#778899',
'lightslategrey':'#778899', 'lightslategrey':'#778899',
'mediumslateblue':'#7B68EE', 'mediumslateblue':'#7B68EE',
'lawngreen':'#7CFC00', 'lawngreen':'#7CFC00',
'aquamarine':'#7FFFD4', 'aquamarine':'#7FFFD4',
'chartreuse':'#7FFF00', 'chartreuse':'#7FFF00',
'gray':'#808080', 'gray':'#808080',
'grey':'#808080', 'grey':'#808080',
'maroon':'#800000', 'maroon':'#800000',
'olive':'#808000', 'olive':'#808000',
'purple':'#800080', 'purple':'#800080',
'lightskyblue':'#87CEFA', 'lightskyblue':'#87CEFA',
'skyblue':'#87CEEB', 'skyblue':'#87CEEB',
'blueviolet':'#8A2BE2', 'blueviolet':'#8A2BE2',
'darkmagenta':'#8B008B', 'darkmagenta':'#8B008B',
'darkred':'#8B0000', 'darkred':'#8B0000',
'saddlebrown':'#8B4513', 'saddlebrown':'#8B4513',
'darkseagreen':'#8FBC8F', 'darkseagreen':'#8FBC8F',
'lightgreen':'#90EE90', 'lightgreen':'#90EE90',
'mediumpurple':'#9370DB', 'mediumpurple':'#9370DB',
'darkviolet':'#9400D3', 'darkviolet':'#9400D3',
'palegreen':'#98FB98', 'palegreen':'#98FB98',
'darkorchid':'#9932CC', 'darkorchid':'#9932CC',
'yellowgreen':'#9ACD32', 'yellowgreen':'#9ACD32',
'sienna':'#A0522D', 'sienna':'#A0522D',
'brown':'#A52A2A', 'brown':'#A52A2A',
'darkgray':'#A9A9A9', 'darkgray':'#A9A9A9',
'darkgrey':'#A9A9A9', 'darkgrey':'#A9A9A9',
'greenyellow':'#ADFF2F', 'greenyellow':'#ADFF2F',
'lightblue':'#ADD8E6', 'lightblue':'#ADD8E6',
'paleturquoise':'#AFEEEE', 'paleturquoise':'#AFEEEE',
'lightsteelblue':'#B0C4DE', 'lightsteelblue':'#B0C4DE',
'powderblue':'#B0E0E6', 'powderblue':'#B0E0E6',
'firebrick':'#B22222', 'firebrick':'#B22222',
'darkgoldenrod':'#B8860B', 'darkgoldenrod':'#B8860B',
'mediumorchid':'#BA55D3', 'mediumorchid':'#BA55D3',
'rosybrown':'#BC8F8F', 'rosybrown':'#BC8F8F',
'darkkhaki':'#BDB76B', 'darkkhaki':'#BDB76B',
'silver':'#C0C0C0', 'silver':'#C0C0C0',
'mediumvioletred':'#C71585', 'mediumvioletred':'#C71585',
'indianred':'#CD5C5C', 'indianred':'#CD5C5C',
'peru':'#CD853F', 'peru':'#CD853F',
'chocolate':'#D2691E', 'chocolate':'#D2691E',
'tan':'#D2B48C', 'tan':'#D2B48C',
'lightgray':'#D3D3D3', 'lightgray':'#D3D3D3',
'lightgrey':'#D3D3D3', 'lightgrey':'#D3D3D3',
'thistle':'#D8BFD8', 'thistle':'#D8BFD8',
'goldenrod':'#DAA520', 'goldenrod':'#DAA520',
'orchid':'#DA70D6', 'orchid':'#DA70D6',
'palevioletred':'#DB7093', 'palevioletred':'#DB7093',
'crimson':'#DC143C', 'crimson':'#DC143C',
'gainsboro':'#DCDCDC', 'gainsboro':'#DCDCDC',
'plum':'#DDA0DD', 'plum':'#DDA0DD',
'burlywood':'#DEB887', 'burlywood':'#DEB887',
'lightcyan':'#E0FFFF', 'lightcyan':'#E0FFFF',
'lavender':'#E6E6FA', 'lavender':'#E6E6FA',
'darksalmon':'#E9967A', 'darksalmon':'#E9967A',
'palegoldenrod':'#EEE8AA', 'palegoldenrod':'#EEE8AA',
'violet':'#EE82EE', 'violet':'#EE82EE',
'azure':'#F0FFFF', 'azure':'#F0FFFF',
'honeydew':'#F0FFF0', 'honeydew':'#F0FFF0',
'khaki':'#F0E68C', 'khaki':'#F0E68C',
'lightcoral':'#F08080', 'lightcoral':'#F08080',
'sandybrown':'#F4A460', 'sandybrown':'#F4A460',
'beige':'#F5F5DC', 'beige':'#F5F5DC',
'mintcream':'#F5FFFA', 'mintcream':'#F5FFFA',
'wheat':'#F5DEB3', 'wheat':'#F5DEB3',
'whitesmoke':'#F5F5F5', 'whitesmoke':'#F5F5F5',
'ghostwhite':'#F8F8FF', 'ghostwhite':'#F8F8FF',
'lightgoldenrodyellow':'#FAFAD2', 'lightgoldenrodyellow':'#FAFAD2',
'linen':'#FAF0E6', 'linen':'#FAF0E6',
'salmon':'#FA8072', 'salmon':'#FA8072',
'oldlace':'#FDF5E6', 'oldlace':'#FDF5E6',
'warmwhite':'#FDF5E6', 'warmwhite':'#FDF5E6',
'bisque':'#FFE4C4', 'bisque':'#FFE4C4',
'blanchedalmond':'#FFEBCD', 'blanchedalmond':'#FFEBCD',
'coral':'#FF7F50', 'coral':'#FF7F50',
'cornsilk':'#FFF8DC', 'cornsilk':'#FFF8DC',
'darkorange':'#FF8C00', 'darkorange':'#FF8C00',
'deeppink':'#FF1493', 'deeppink':'#FF1493',
'floralwhite':'#FFFAF0', 'floralwhite':'#FFFAF0',
'fuchsia':'#FF00FF', 'fuchsia':'#FF00FF',
'gold':'#FFD700', 'gold':'#FFD700',
'hotpink':'#FF69B4', 'hotpink':'#FF69B4',
'ivory':'#FFFFF0', 'ivory':'#FFFFF0',
'lavenderblush':'#FFF0F5', 'lavenderblush':'#FFF0F5',
'lemonchiffon':'#FFFACD', 'lemonchiffon':'#FFFACD',
'lightpink':'#FFB6C1', 'lightpink':'#FFB6C1',
'lightsalmon':'#FFA07A', 'lightsalmon':'#FFA07A',
'lightyellow':'#FFFFE0', 'lightyellow':'#FFFFE0',
'magenta':'#FF00FF', 'magenta':'#FF00FF',
'mistyrose':'#FFE4E1', 'mistyrose':'#FFE4E1',
'moccasin':'#FFE4B5', 'moccasin':'#FFE4B5',
'navajowhite':'#FFDEAD', 'navajowhite':'#FFDEAD',
'orange':'#FFA500', 'orange':'#FFA500',
'orangered':'#FF4500', 'orangered':'#FF4500',
'papayawhip':'#FFEFD5', 'papayawhip':'#FFEFD5',
'peachpuff':'#FFDAB9', 'peachpuff':'#FFDAB9',
'pink':'#FFC0CB', 'pink':'#FFC0CB',
'red':'#FF0000', 'red':'#FF0000',
'seashell':'#FFF5EE', 'seashell':'#FFF5EE',
'snow':'#FFFAFA', 'snow':'#FFFAFA',
'tomato':'#FF6347', 'tomato':'#FF6347',
'white':'#FFFFFF', 'white':'#FFFFFF',
'yellow':'#FFFF00', 'yellow':'#FFFF00',
'amber':'#FFD200' 'amber':'#FFD200'
}; };
var p1 = /^\#[A-Fa-f0-9]{6}$/ var p1 = /^\#[A-Fa-f0-9]{6}$/;
var r, g, b;
module.exports.getRGB = function(col,rgb) { module.exports.getRGB = function(col,rgb) {
col = col.toString().toLowerCase(); col = col.toString().toLowerCase();

View File

@ -51,7 +51,7 @@ module.exports = function(RED) {
if (this.wipe < 0) { this.wipe = 0; } if (this.wipe < 0) { this.wipe = 0; }
var node = this; var node = this;
var needle = "255,255,255"; var needle = "255,255,255";
var p1 = /^\#[A-Fa-f0-9]{6}$/ //var p1 = /^\#[A-Fa-f0-9]{6}$/
var p2 = /^[0-9]+,[0-9]+,[0-9]+$/ var p2 = /^[0-9]+,[0-9]+,[0-9]+$/
var p3 = /^[0-9]+,[0-9]+,[0-9]+,[0-9]+$/ var p3 = /^[0-9]+,[0-9]+,[0-9]+,[0-9]+$/
var p4 = /^[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+$/ var p4 = /^[0-9]+,[0-9]+,[0-9]+,[0-9]+,[0-9]+$/
@ -125,7 +125,7 @@ module.exports = function(RED) {
if (RED.settings.verbose) { node.log("err: "+data+" :"); } if (RED.settings.verbose) { node.log("err: "+data+" :"); }
}); });
node.child.on('close', function (code) { node.child.on('close', function () {
node.child = null; node.child = null;
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); } if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); }
if (node.done) { if (node.done) {

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-pi-neopixel", "name" : "node-red-node-pi-neopixel",
"version" : "0.0.11", "version" : "0.0.12",
"description" : "A Node-RED node to output to a neopixel (ws2812) string of LEDS from a Raspberry Pi.", "description" : "A Node-RED node to output to a neopixel (ws2812) string of LEDS from a Raspberry Pi.",
"dependencies" : { "dependencies" : {
}, },

View File

@ -18,56 +18,56 @@
* limitations under the License. * limitations under the License.
**/ **/
//might need to modify accordingly module.exports = function(RED) {
var RED = require(process.env.NODE_RED_HOME+"/red/red"); "use strict";
//import noble //import noble
var noble = require('noble'); var noble = require('noble');
// The main node definition - most things happen in here // The main node definition - most things happen in here
function BleScan(n) { function BleScan(n) {
// Create a RED node // Create a RED node
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
var msg = {};
var ble_name;
var node = this;
//get name and uuid from user
this.ble_name = n.ble_name;
this.ble_uuid = n.ble_uuid;
this.on("input", function(msg) {
noble.startScanning();
});
noble.on('scanStart', function(msg) {
msg = {};
msg.topic = node.topic;
msg.payload = "Scanning initiated..." //debugging
//console.log('scanning initiated...');
node.send(msg);
});
noble.on('discover', function(peripheral) {
var msg = {}; var msg = {};
msg.topic = node.topic; var ble_name;
msg.payload = "not found"; var node = this;
//check for the device name and the UUID (first one from the UUID list) //get name and uuid from user
if (peripheral.advertisement.localName==node.ble_name && peripheral.advertisement.serviceUuids[0]==node.ble_uuid) { this.ble_name = n.ble_name;
msg.payload=peripheral.advertisement.localName; this.ble_uuid = n.ble_uuid;
noble.stopScanning();
}
node.send(msg);
});
this.on("close", function() { this.on("input", function(msg) {
try { noble.stopScanning(); } noble.startScanning();
catch (err) { console.log(err); } });
});
noble.on('scanStart', function(msg) {
msg = {};
msg.topic = node.topic;
msg.payload = "Scanning initiated..." //debugging
//console.log('scanning initiated...');
node.send(msg);
});
noble.on('discover', function(peripheral) {
var msg = {};
msg.topic = node.topic;
msg.payload = "not found";
//check for the device name and the UUID (first one from the UUID list)
if (peripheral.advertisement.localName==node.ble_name && peripheral.advertisement.serviceUuids[0]==node.ble_uuid) {
msg.payload=peripheral.advertisement.localName;
noble.stopScanning();
}
node.send(msg);
});
this.on("close", function() {
try { noble.stopScanning(); }
catch (err) { console.log(err); }
});
}
// Register the node by name. This must be called before overriding any of the
// Node functions.
RED.nodes.registerType("scanBLE", BleScan);
} }
// Register the node by name. This must be called before overriding any of the
// Node functions.
RED.nodes.registerType("scanBLE", BleScan);

View File

@ -15,159 +15,160 @@
**/ **/
var colours = { var colours = {
'aqua':'#00FFFF', 'aqua':'#00FFFF',
'aliceblue':'#F0F8FF', 'aliceblue':'#F0F8FF',
'antiquewhite':'#FAEBD7', 'antiquewhite':'#FAEBD7',
'black':'#000000', 'black':'#000000',
'off':'#000000', 'off':'#000000',
'blue':'#0000FF', 'blue':'#0000FF',
'cyan':'#00FFFF', 'cyan':'#00FFFF',
'darkblue':'#00008B', 'darkblue':'#00008B',
'darkcyan':'#008B8B', 'darkcyan':'#008B8B',
'darkgreen':'#006400', 'darkgreen':'#006400',
'darkturquoise':'#00CED1', 'darkturquoise':'#00CED1',
'deepskyblue':'#00BFFF', 'deepskyblue':'#00BFFF',
'green':'#008000', 'green':'#008000',
'lime':'#00FF00', 'lime':'#00FF00',
'mediumblue':'#0000CD', 'mediumblue':'#0000CD',
'mediumspringgreen':'#00FA9A', 'mediumspringgreen':'#00FA9A',
'navy':'#000080', 'navy':'#000080',
'springgreen':'#00FF7F', 'springgreen':'#00FF7F',
'teal':'#008080', 'teal':'#008080',
'midnightblue':'#191970', 'midnightblue':'#191970',
'dodgerblue':'#1E90FF', 'dodgerblue':'#1E90FF',
'lightseagreen':'#20B2AA', 'lightseagreen':'#20B2AA',
'forestgreen':'#228B22', 'forestgreen':'#228B22',
'seagreen':'#2E8B57', 'seagreen':'#2E8B57',
'darkslategray':'#2F4F4F', 'darkslategray':'#2F4F4F',
'darkslategrey':'#2F4F4F', 'darkslategrey':'#2F4F4F',
'limegreen':'#32CD32', 'limegreen':'#32CD32',
'mediumseagreen':'#3CB371', 'mediumseagreen':'#3CB371',
'turquoise':'#40E0D0', 'turquoise':'#40E0D0',
'royalblue':'#4169E1', 'royalblue':'#4169E1',
'steelblue':'#4682B4', 'steelblue':'#4682B4',
'darkslateblue':'#483D8B', 'darkslateblue':'#483D8B',
'mediumturquoise':'#48D1CC', 'mediumturquoise':'#48D1CC',
'indigo':'#4B0082', 'indigo':'#4B0082',
'darkolivegreen':'#556B2F', 'darkolivegreen':'#556B2F',
'cadetblue':'#5F9EA0', 'cadetblue':'#5F9EA0',
'cornflowerblue':'#6495ED', 'cornflowerblue':'#6495ED',
'mediumaquamarine':'#66CDAA', 'mediumaquamarine':'#66CDAA',
'dimgray':'#696969', 'dimgray':'#696969',
'dimgrey':'#696969', 'dimgrey':'#696969',
'slateblue':'#6A5ACD', 'slateblue':'#6A5ACD',
'olivedrab':'#6B8E23', 'olivedrab':'#6B8E23',
'slategray':'#708090', 'slategray':'#708090',
'slategrey':'#708090', 'slategrey':'#708090',
'lightslategray':'#778899', 'lightslategray':'#778899',
'lightslategrey':'#778899', 'lightslategrey':'#778899',
'mediumslateblue':'#7B68EE', 'mediumslateblue':'#7B68EE',
'lawngreen':'#7CFC00', 'lawngreen':'#7CFC00',
'aquamarine':'#7FFFD4', 'aquamarine':'#7FFFD4',
'chartreuse':'#7FFF00', 'chartreuse':'#7FFF00',
'gray':'#808080', 'gray':'#808080',
'grey':'#808080', 'grey':'#808080',
'maroon':'#800000', 'maroon':'#800000',
'olive':'#808000', 'olive':'#808000',
'purple':'#800080', 'purple':'#800080',
'lightskyblue':'#87CEFA', 'lightskyblue':'#87CEFA',
'skyblue':'#87CEEB', 'skyblue':'#87CEEB',
'blueviolet':'#8A2BE2', 'blueviolet':'#8A2BE2',
'darkmagenta':'#8B008B', 'darkmagenta':'#8B008B',
'darkred':'#8B0000', 'darkred':'#8B0000',
'saddlebrown':'#8B4513', 'saddlebrown':'#8B4513',
'darkseagreen':'#8FBC8F', 'darkseagreen':'#8FBC8F',
'lightgreen':'#90EE90', 'lightgreen':'#90EE90',
'mediumpurple':'#9370DB', 'mediumpurple':'#9370DB',
'darkviolet':'#9400D3', 'darkviolet':'#9400D3',
'palegreen':'#98FB98', 'palegreen':'#98FB98',
'darkorchid':'#9932CC', 'darkorchid':'#9932CC',
'yellowgreen':'#9ACD32', 'yellowgreen':'#9ACD32',
'sienna':'#A0522D', 'sienna':'#A0522D',
'brown':'#A52A2A', 'brown':'#A52A2A',
'darkgray':'#A9A9A9', 'darkgray':'#A9A9A9',
'darkgrey':'#A9A9A9', 'darkgrey':'#A9A9A9',
'greenyellow':'#ADFF2F', 'greenyellow':'#ADFF2F',
'lightblue':'#ADD8E6', 'lightblue':'#ADD8E6',
'paleturquoise':'#AFEEEE', 'paleturquoise':'#AFEEEE',
'lightsteelblue':'#B0C4DE', 'lightsteelblue':'#B0C4DE',
'powderblue':'#B0E0E6', 'powderblue':'#B0E0E6',
'firebrick':'#B22222', 'firebrick':'#B22222',
'darkgoldenrod':'#B8860B', 'darkgoldenrod':'#B8860B',
'mediumorchid':'#BA55D3', 'mediumorchid':'#BA55D3',
'rosybrown':'#BC8F8F', 'rosybrown':'#BC8F8F',
'darkkhaki':'#BDB76B', 'darkkhaki':'#BDB76B',
'silver':'#C0C0C0', 'silver':'#C0C0C0',
'mediumvioletred':'#C71585', 'mediumvioletred':'#C71585',
'indianred':'#CD5C5C', 'indianred':'#CD5C5C',
'peru':'#CD853F', 'peru':'#CD853F',
'chocolate':'#D2691E', 'chocolate':'#D2691E',
'tan':'#D2B48C', 'tan':'#D2B48C',
'lightgray':'#D3D3D3', 'lightgray':'#D3D3D3',
'lightgrey':'#D3D3D3', 'lightgrey':'#D3D3D3',
'thistle':'#D8BFD8', 'thistle':'#D8BFD8',
'goldenrod':'#DAA520', 'goldenrod':'#DAA520',
'orchid':'#DA70D6', 'orchid':'#DA70D6',
'palevioletred':'#DB7093', 'palevioletred':'#DB7093',
'crimson':'#DC143C', 'crimson':'#DC143C',
'gainsboro':'#DCDCDC', 'gainsboro':'#DCDCDC',
'plum':'#DDA0DD', 'plum':'#DDA0DD',
'burlywood':'#DEB887', 'burlywood':'#DEB887',
'lightcyan':'#E0FFFF', 'lightcyan':'#E0FFFF',
'lavender':'#E6E6FA', 'lavender':'#E6E6FA',
'darksalmon':'#E9967A', 'darksalmon':'#E9967A',
'palegoldenrod':'#EEE8AA', 'palegoldenrod':'#EEE8AA',
'violet':'#EE82EE', 'violet':'#EE82EE',
'azure':'#F0FFFF', 'azure':'#F0FFFF',
'honeydew':'#F0FFF0', 'honeydew':'#F0FFF0',
'khaki':'#F0E68C', 'khaki':'#F0E68C',
'lightcoral':'#F08080', 'lightcoral':'#F08080',
'sandybrown':'#F4A460', 'sandybrown':'#F4A460',
'beige':'#F5F5DC', 'beige':'#F5F5DC',
'mintcream':'#F5FFFA', 'mintcream':'#F5FFFA',
'wheat':'#F5DEB3', 'wheat':'#F5DEB3',
'whitesmoke':'#F5F5F5', 'whitesmoke':'#F5F5F5',
'ghostwhite':'#F8F8FF', 'ghostwhite':'#F8F8FF',
'lightgoldenrodyellow':'#FAFAD2', 'lightgoldenrodyellow':'#FAFAD2',
'linen':'#FAF0E6', 'linen':'#FAF0E6',
'salmon':'#FA8072', 'salmon':'#FA8072',
'oldlace':'#FDF5E6', 'oldlace':'#FDF5E6',
'warmwhite':'#FDF5E6', 'warmwhite':'#FDF5E6',
'bisque':'#FFE4C4', 'bisque':'#FFE4C4',
'blanchedalmond':'#FFEBCD', 'blanchedalmond':'#FFEBCD',
'coral':'#FF7F50', 'coral':'#FF7F50',
'cornsilk':'#FFF8DC', 'cornsilk':'#FFF8DC',
'darkorange':'#FF8C00', 'darkorange':'#FF8C00',
'deeppink':'#FF1493', 'deeppink':'#FF1493',
'floralwhite':'#FFFAF0', 'floralwhite':'#FFFAF0',
'fuchsia':'#FF00FF', 'fuchsia':'#FF00FF',
'gold':'#FFD700', 'gold':'#FFD700',
'hotpink':'#FF69B4', 'hotpink':'#FF69B4',
'ivory':'#FFFFF0', 'ivory':'#FFFFF0',
'lavenderblush':'#FFF0F5', 'lavenderblush':'#FFF0F5',
'lemonchiffon':'#FFFACD', 'lemonchiffon':'#FFFACD',
'lightpink':'#FFB6C1', 'lightpink':'#FFB6C1',
'lightsalmon':'#FFA07A', 'lightsalmon':'#FFA07A',
'lightyellow':'#FFFFE0', 'lightyellow':'#FFFFE0',
'magenta':'#FF00FF', 'magenta':'#FF00FF',
'mistyrose':'#FFE4E1', 'mistyrose':'#FFE4E1',
'moccasin':'#FFE4B5', 'moccasin':'#FFE4B5',
'navajowhite':'#FFDEAD', 'navajowhite':'#FFDEAD',
'orange':'#FFA500', 'orange':'#FFA500',
'orangered':'#FF4500', 'orangered':'#FF4500',
'papayawhip':'#FFEFD5', 'papayawhip':'#FFEFD5',
'peachpuff':'#FFDAB9', 'peachpuff':'#FFDAB9',
'pink':'#FFC0CB', 'pink':'#FFC0CB',
'red':'#FF0000', 'red':'#FF0000',
'seashell':'#FFF5EE', 'seashell':'#FFF5EE',
'snow':'#FFFAFA', 'snow':'#FFFAFA',
'tomato':'#FF6347', 'tomato':'#FF6347',
'white':'#FFFFFF', 'white':'#FFFFFF',
'yellow':'#FFFF00', 'yellow':'#FFFF00',
'amber':'#FFD200' 'amber':'#FFD200'
}; };
var hexColour = /^#([0-9A-F][0-9A-F][0-9A-F]){1,2}$/i; var hexColour = /^#([0-9A-F][0-9A-F][0-9A-F]){1,2}$/i;
var r, g, b;
module.exports.getRGB = function(col,rgb) { module.exports.getRGB = function(col,rgb) {
if (!col) { if (!col) {

View File

@ -15,159 +15,160 @@
**/ **/
var colours = { var colours = {
'aqua':'#00FFFF', 'aqua':'#00FFFF',
'aliceblue':'#F0F8FF', 'aliceblue':'#F0F8FF',
'antiquewhite':'#FAEBD7', 'antiquewhite':'#FAEBD7',
'black':'#000000', 'black':'#000000',
'off':'#000000', 'off':'#000000',
'blue':'#0000FF', 'blue':'#0000FF',
'cyan':'#00FFFF', 'cyan':'#00FFFF',
'darkblue':'#00008B', 'darkblue':'#00008B',
'darkcyan':'#008B8B', 'darkcyan':'#008B8B',
'darkgreen':'#006400', 'darkgreen':'#006400',
'darkturquoise':'#00CED1', 'darkturquoise':'#00CED1',
'deepskyblue':'#00BFFF', 'deepskyblue':'#00BFFF',
'green':'#008000', 'green':'#008000',
'lime':'#00FF00', 'lime':'#00FF00',
'mediumblue':'#0000CD', 'mediumblue':'#0000CD',
'mediumspringgreen':'#00FA9A', 'mediumspringgreen':'#00FA9A',
'navy':'#000080', 'navy':'#000080',
'springgreen':'#00FF7F', 'springgreen':'#00FF7F',
'teal':'#008080', 'teal':'#008080',
'midnightblue':'#191970', 'midnightblue':'#191970',
'dodgerblue':'#1E90FF', 'dodgerblue':'#1E90FF',
'lightseagreen':'#20B2AA', 'lightseagreen':'#20B2AA',
'forestgreen':'#228B22', 'forestgreen':'#228B22',
'seagreen':'#2E8B57', 'seagreen':'#2E8B57',
'darkslategray':'#2F4F4F', 'darkslategray':'#2F4F4F',
'darkslategrey':'#2F4F4F', 'darkslategrey':'#2F4F4F',
'limegreen':'#32CD32', 'limegreen':'#32CD32',
'mediumseagreen':'#3CB371', 'mediumseagreen':'#3CB371',
'turquoise':'#40E0D0', 'turquoise':'#40E0D0',
'royalblue':'#4169E1', 'royalblue':'#4169E1',
'steelblue':'#4682B4', 'steelblue':'#4682B4',
'darkslateblue':'#483D8B', 'darkslateblue':'#483D8B',
'mediumturquoise':'#48D1CC', 'mediumturquoise':'#48D1CC',
'indigo':'#4B0082', 'indigo':'#4B0082',
'darkolivegreen':'#556B2F', 'darkolivegreen':'#556B2F',
'cadetblue':'#5F9EA0', 'cadetblue':'#5F9EA0',
'cornflowerblue':'#6495ED', 'cornflowerblue':'#6495ED',
'mediumaquamarine':'#66CDAA', 'mediumaquamarine':'#66CDAA',
'dimgray':'#696969', 'dimgray':'#696969',
'dimgrey':'#696969', 'dimgrey':'#696969',
'slateblue':'#6A5ACD', 'slateblue':'#6A5ACD',
'olivedrab':'#6B8E23', 'olivedrab':'#6B8E23',
'slategray':'#708090', 'slategray':'#708090',
'slategrey':'#708090', 'slategrey':'#708090',
'lightslategray':'#778899', 'lightslategray':'#778899',
'lightslategrey':'#778899', 'lightslategrey':'#778899',
'mediumslateblue':'#7B68EE', 'mediumslateblue':'#7B68EE',
'lawngreen':'#7CFC00', 'lawngreen':'#7CFC00',
'aquamarine':'#7FFFD4', 'aquamarine':'#7FFFD4',
'chartreuse':'#7FFF00', 'chartreuse':'#7FFF00',
'gray':'#808080', 'gray':'#808080',
'grey':'#808080', 'grey':'#808080',
'maroon':'#800000', 'maroon':'#800000',
'olive':'#808000', 'olive':'#808000',
'purple':'#800080', 'purple':'#800080',
'lightskyblue':'#87CEFA', 'lightskyblue':'#87CEFA',
'skyblue':'#87CEEB', 'skyblue':'#87CEEB',
'blueviolet':'#8A2BE2', 'blueviolet':'#8A2BE2',
'darkmagenta':'#8B008B', 'darkmagenta':'#8B008B',
'darkred':'#8B0000', 'darkred':'#8B0000',
'saddlebrown':'#8B4513', 'saddlebrown':'#8B4513',
'darkseagreen':'#8FBC8F', 'darkseagreen':'#8FBC8F',
'lightgreen':'#90EE90', 'lightgreen':'#90EE90',
'mediumpurple':'#9370DB', 'mediumpurple':'#9370DB',
'darkviolet':'#9400D3', 'darkviolet':'#9400D3',
'palegreen':'#98FB98', 'palegreen':'#98FB98',
'darkorchid':'#9932CC', 'darkorchid':'#9932CC',
'yellowgreen':'#9ACD32', 'yellowgreen':'#9ACD32',
'sienna':'#A0522D', 'sienna':'#A0522D',
'brown':'#A52A2A', 'brown':'#A52A2A',
'darkgray':'#A9A9A9', 'darkgray':'#A9A9A9',
'darkgrey':'#A9A9A9', 'darkgrey':'#A9A9A9',
'greenyellow':'#ADFF2F', 'greenyellow':'#ADFF2F',
'lightblue':'#ADD8E6', 'lightblue':'#ADD8E6',
'paleturquoise':'#AFEEEE', 'paleturquoise':'#AFEEEE',
'lightsteelblue':'#B0C4DE', 'lightsteelblue':'#B0C4DE',
'powderblue':'#B0E0E6', 'powderblue':'#B0E0E6',
'firebrick':'#B22222', 'firebrick':'#B22222',
'darkgoldenrod':'#B8860B', 'darkgoldenrod':'#B8860B',
'mediumorchid':'#BA55D3', 'mediumorchid':'#BA55D3',
'rosybrown':'#BC8F8F', 'rosybrown':'#BC8F8F',
'darkkhaki':'#BDB76B', 'darkkhaki':'#BDB76B',
'silver':'#C0C0C0', 'silver':'#C0C0C0',
'mediumvioletred':'#C71585', 'mediumvioletred':'#C71585',
'indianred':'#CD5C5C', 'indianred':'#CD5C5C',
'peru':'#CD853F', 'peru':'#CD853F',
'chocolate':'#D2691E', 'chocolate':'#D2691E',
'tan':'#D2B48C', 'tan':'#D2B48C',
'lightgray':'#D3D3D3', 'lightgray':'#D3D3D3',
'lightgrey':'#D3D3D3', 'lightgrey':'#D3D3D3',
'thistle':'#D8BFD8', 'thistle':'#D8BFD8',
'goldenrod':'#DAA520', 'goldenrod':'#DAA520',
'orchid':'#DA70D6', 'orchid':'#DA70D6',
'palevioletred':'#DB7093', 'palevioletred':'#DB7093',
'crimson':'#DC143C', 'crimson':'#DC143C',
'gainsboro':'#DCDCDC', 'gainsboro':'#DCDCDC',
'plum':'#DDA0DD', 'plum':'#DDA0DD',
'burlywood':'#DEB887', 'burlywood':'#DEB887',
'lightcyan':'#E0FFFF', 'lightcyan':'#E0FFFF',
'lavender':'#E6E6FA', 'lavender':'#E6E6FA',
'darksalmon':'#E9967A', 'darksalmon':'#E9967A',
'palegoldenrod':'#EEE8AA', 'palegoldenrod':'#EEE8AA',
'violet':'#EE82EE', 'violet':'#EE82EE',
'azure':'#F0FFFF', 'azure':'#F0FFFF',
'honeydew':'#F0FFF0', 'honeydew':'#F0FFF0',
'khaki':'#F0E68C', 'khaki':'#F0E68C',
'lightcoral':'#F08080', 'lightcoral':'#F08080',
'sandybrown':'#F4A460', 'sandybrown':'#F4A460',
'beige':'#F5F5DC', 'beige':'#F5F5DC',
'mintcream':'#F5FFFA', 'mintcream':'#F5FFFA',
'wheat':'#F5DEB3', 'wheat':'#F5DEB3',
'whitesmoke':'#F5F5F5', 'whitesmoke':'#F5F5F5',
'ghostwhite':'#F8F8FF', 'ghostwhite':'#F8F8FF',
'lightgoldenrodyellow':'#FAFAD2', 'lightgoldenrodyellow':'#FAFAD2',
'linen':'#FAF0E6', 'linen':'#FAF0E6',
'salmon':'#FA8072', 'salmon':'#FA8072',
'oldlace':'#FDF5E6', 'oldlace':'#FDF5E6',
'warmwhite':'#FDF5E6', 'warmwhite':'#FDF5E6',
'bisque':'#FFE4C4', 'bisque':'#FFE4C4',
'blanchedalmond':'#FFEBCD', 'blanchedalmond':'#FFEBCD',
'coral':'#FF7F50', 'coral':'#FF7F50',
'cornsilk':'#FFF8DC', 'cornsilk':'#FFF8DC',
'darkorange':'#FF8C00', 'darkorange':'#FF8C00',
'deeppink':'#FF1493', 'deeppink':'#FF1493',
'floralwhite':'#FFFAF0', 'floralwhite':'#FFFAF0',
'fuchsia':'#FF00FF', 'fuchsia':'#FF00FF',
'gold':'#FFD700', 'gold':'#FFD700',
'hotpink':'#FF69B4', 'hotpink':'#FF69B4',
'ivory':'#FFFFF0', 'ivory':'#FFFFF0',
'lavenderblush':'#FFF0F5', 'lavenderblush':'#FFF0F5',
'lemonchiffon':'#FFFACD', 'lemonchiffon':'#FFFACD',
'lightpink':'#FFB6C1', 'lightpink':'#FFB6C1',
'lightsalmon':'#FFA07A', 'lightsalmon':'#FFA07A',
'lightyellow':'#FFFFE0', 'lightyellow':'#FFFFE0',
'magenta':'#FF00FF', 'magenta':'#FF00FF',
'mistyrose':'#FFE4E1', 'mistyrose':'#FFE4E1',
'moccasin':'#FFE4B5', 'moccasin':'#FFE4B5',
'navajowhite':'#FFDEAD', 'navajowhite':'#FFDEAD',
'orange':'#FFA500', 'orange':'#FFA500',
'orangered':'#FF4500', 'orangered':'#FF4500',
'papayawhip':'#FFEFD5', 'papayawhip':'#FFEFD5',
'peachpuff':'#FFDAB9', 'peachpuff':'#FFDAB9',
'pink':'#FFC0CB', 'pink':'#FFC0CB',
'red':'#FF0000', 'red':'#FF0000',
'seashell':'#FFF5EE', 'seashell':'#FFF5EE',
'snow':'#FFFAFA', 'snow':'#FFFAFA',
'tomato':'#FF6347', 'tomato':'#FF6347',
'white':'#FFFFFF', 'white':'#FFFFFF',
'yellow':'#FFFF00', 'yellow':'#FFFF00',
'amber':'#FFD200' 'amber':'#FFD200'
}; };
var hexColour = /^#([0-9A-F][0-9A-F][0-9A-F]){1,2}$/i; var hexColour = /^#([0-9A-F][0-9A-F][0-9A-F]){1,2}$/i;
var r, g, b;
module.exports.getRGB = function(col,rgb) { module.exports.getRGB = function(col,rgb) {
if (!col) { if (!col) {

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-pi-unicorn-hat", "name" : "node-red-node-pi-unicorn-hat",
"version" : "0.0.12", "version" : "0.0.13",
"description" : "A Node-RED node to output to a Raspberry Pi Unicorn HAT from Pimorini.", "description" : "A Node-RED node to output to a Raspberry Pi Unicorn HAT from Pimorini.",
"dependencies" : { "dependencies" : {
"pngjs": "2.2.*" "pngjs": "2.2.*"

View File

@ -93,7 +93,7 @@ module.exports = function(RED) {
function inputlistener(msg) { function inputlistener(msg) {
if (typeof msg.payload === "string") { if (typeof msg.payload === "string") {
var a,b,c,d,e,i,j,x,y; var a,b,i,j,x,y;
msg.payload = msg.payload.replace('"',''); msg.payload = msg.payload.replace('"','');
var s = msg.payload.toUpperCase().split(","); var s = msg.payload.toUpperCase().split(",");
var doDraw = true; var doDraw = true;
@ -235,7 +235,7 @@ module.exports = function(RED) {
if (RED.settings.verbose) { node.log("err: "+data+" :"); } if (RED.settings.verbose) { node.log("err: "+data+" :"); }
}); });
node.child.on('close', function (code) { node.child.on('close', function () {
node.child = null; node.child = null;
if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); } if (RED.settings.verbose) { node.log(RED._("rpi-gpio.status.closed")); }
if (node.done) { if (node.done) {
@ -253,7 +253,7 @@ module.exports = function(RED) {
node.on("close", function(done) { node.on("close", function(done) {
node.status({fill:"grey",shape:"ring",text:"closed"}); node.status({fill:"grey",shape:"ring",text:"closed"});
if (node.tout) { clearTimeout(tout); } if (node.tout) { clearTimeout(node.tout); }
if (node.child != null) { if (node.child != null) {
node.done = done; node.done = done;
node.child.kill('SIGKILL'); node.child.kill('SIGKILL');

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-snmp", "name" : "node-red-node-snmp",
"version" : "0.0.5", "version" : "0.0.6",
"description" : "A Node-RED node that looks for SNMP oids.", "description" : "A Node-RED node that looks for SNMP oids.",
"dependencies" : { "dependencies" : {
"net-snmp" : "1.1.13" "net-snmp" : "1.1.13"

View File

@ -65,6 +65,7 @@ module.exports = function(RED) {
this.oids = n.oids.replace(/\s/g,""); this.oids = n.oids.replace(/\s/g,"");
this.session = snmp.createSession (this.host, this.community, {version: this.version}); this.session = snmp.createSession (this.host, this.community, {version: this.version});
var node = this; var node = this;
var msg;
var maxRepetitions = 20; var maxRepetitions = 20;
function sortInt (a, b) { function sortInt (a, b) {
@ -101,7 +102,8 @@ module.exports = function(RED) {
node.send(msg); node.send(msg);
} }
} }
this.on("input",function(msg) { this.on("input",function(m) {
msg = m;
var oids = node.oids || msg.oid; var oids = node.oids || msg.oid;
if (oids) { if (oids) {
msg.oid = oids; msg.oid = oids;

View File

@ -23,8 +23,8 @@ module.exports = function(RED) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
this.title = n.title; this.title = n.title;
var node = this; var node = this;
this.on("input",function(msg) { node.on("input",function(msg) {
var titl = this.title || msg.topic; var titl = node.title || msg.topic;
if (typeof(msg.payload) == 'object') { if (typeof(msg.payload) == 'object') {
msg.payload = JSON.stringify(msg.payload); msg.payload = JSON.stringify(msg.payload);
} }

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-notify", "name" : "node-red-node-notify",
"version" : "0.0.3", "version" : "0.0.4",
"description" : "A Node-RED node to send local popup Notify alerts", "description" : "A Node-RED node to send local popup Notify alerts",
"dependencies" : { "dependencies" : {
"growl" : "1.8.1" "growl" : "1.8.1"

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-pusher", "name" : "node-red-node-pusher",
"version" : "0.0.4", "version" : "0.0.5",
"description" : "A Node-RED node to send and receive messages using Pusher.com", "description" : "A Node-RED node to send and receive messages using Pusher.com",
"dependencies" : { "dependencies" : {
"pusher": "1.0.5", "pusher": "1.0.5",

View File

@ -39,7 +39,7 @@ module.exports = function(RED) {
//create a subscription to the channel and event defined by user //create a subscription to the channel and event defined by user
var socket = new PusherClient(''+this.appkey); var socket = new PusherClient(''+this.appkey);
var my_channel = socket.subscribe(''+this.channel); node.channel = socket.subscribe(''+this.channel);
socket.bind(''+this.eventname, socket.bind(''+this.eventname,
function(data) { function(data) {
var msg = {topic:this.eventname}; var msg = {topic:this.eventname};
@ -60,7 +60,6 @@ module.exports = function(RED) {
RED.nodes.createNode(this,n); RED.nodes.createNode(this,n);
var node = this; var node = this;
var credentials = this.credentials; var credentials = this.credentials;
if ((credentials) && (credentials.hasOwnProperty("pusherappid"))) { this.appid = credentials.pusherappid; } if ((credentials) && (credentials.hasOwnProperty("pusherappid"))) { this.appid = credentials.pusherappid; }
@ -80,25 +79,16 @@ module.exports = function(RED) {
secret: this.appsecret secret: this.appsecret
}); });
this.on("input", function(msg) { node.on("input", function(msg) {
pusher.trigger(this.channel, this.eventname, { pusher.trigger(this.channel, this.eventname, {
"payload": msg.payload "payload": msg.payload
}); });
}); });
this.on("close", function() { node.on("close", function() {
}); });
} }
//debugging on the output:
var displayResult = function(result) {
node.log(result);
};
var displayError = function(err) {
node.log("Error: "+err);
};
RED.nodes.registerType("pusher in",PusherNode,{ RED.nodes.registerType("pusher in",PusherNode,{
credentials: { credentials: {
pusherappkey_sub: "text" pusherappkey_sub: "text"

View File

@ -1,6 +1,6 @@
{ {
"name" : "node-red-node-timeswitch", "name" : "node-red-node-timeswitch",
"version" : "0.0.4", "version" : "0.0.5",
"description" : "A Node-RED node to provide a simple timeswitch to schedule daily on/off events.", "description" : "A Node-RED node to provide a simple timeswitch to schedule daily on/off events.",
"dependencies" : { "dependencies" : {
"suncalc": "1.6.0" "suncalc": "1.6.0"

View File

@ -370,7 +370,7 @@
url: "timeswitch/"+this.id, url: "timeswitch/"+this.id,
type:"POST", type:"POST",
success: function(resp) { success: function(resp) {
RED.notify("Successfully injected: "+label,"success"); RED.notify("Successfully injected: ","success");
}, },
error: function(jqXHR,textStatus,errorThrown) { error: function(jqXHR,textStatus,errorThrown) {
if (jqXHR.status === 404) { if (jqXHR.status === 404) {