Merge branch 'master' into dev

This commit is contained in:
Nick O'Leary
2022-01-12 17:59:26 +00:00
38 changed files with 545 additions and 230 deletions

View File

@@ -690,9 +690,9 @@
this.topic = "";
var result = getProps(items, true);
this.props = result.props;
if(result.payloadType) { this.payloadType = result.payloadType; };
if(result.payload) { this.payload = result.payload; };
if(result.topic) { this.topic = result.topic; };
if(result.hasOwnProperty('payloadType')) { this.payloadType = result.payloadType; };
if(result.hasOwnProperty('payload')) { this.payload = result.payload; };
if(result.hasOwnProperty('topic')) { this.topic = result.topic; };
},
button: {
enabled: function() {

View File

@@ -512,6 +512,7 @@
return function(e) {
e.preventDefault();
var value = editor.getValue();
var extraLibs = that.libs || [];
RED.editor.editJavaScript({
value: value,
width: "Infinity",
@@ -523,7 +524,8 @@
setTimeout(function() {
editor.focus();
},300);
}
},
extraLibs: extraLibs
})
}
}

View File

@@ -234,8 +234,7 @@ module.exports = function(RED) {
},
env: {
get: function(envVar) {
var flow = node._flow;
return flow.getSetting(envVar);
return RED.util.getSetting(node, envVar);
}
},
setTimeout: function () {

View File

@@ -58,7 +58,7 @@ module.exports = function(RED) {
else {
var n = parseFloat(value);
if (!isNaN(n)) {
if ((typeof node.previous[t] === 'undefined') && (this.func === "narrowband")) {
if ((typeof node.previous[t] === 'undefined') && (this.func === "narrowband" || this.func === "narrowbandEq")) {
if (node.start === '') { node.previous[t] = n; }
else { node.previous[t] = node.start; }
}

View File

@@ -302,6 +302,8 @@ in your Node-RED user directory (${RED.settings.userDir}).
// var cred = ""
if (this.credentials.user || this.credentials.password) {
// cred = `${this.credentials.user}:${this.credentials.password}`;
if (this.credentials.user === undefined) { this.credentials.user = ""}
if (this.credentials.password === undefined) { this.credentials.password = ""}
opts.headers.Authorization = "Basic " + Buffer.from(`${this.credentials.user}:${this.credentials.password}`).toString("base64");
}
// build own basic auth header

View File

@@ -0,0 +1,156 @@
[
{
"id": "62ea32aa.d73aac",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "Example: Link Call Node",
"info": "Link call node can call link in node then get result from link out node.",
"x": 230,
"y": 180,
"wires": []
},
{
"id": "c588bc36.87fec",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↓ call link in node",
"info": "",
"x": 440,
"y": 220,
"wires": []
},
{
"id": "cd31efb4d2c6967e",
"type": "link call",
"z": "6312c0588348b2d4",
"name": "",
"links": [
"dbc46892c8d14c37"
],
"timeout": "30",
"x": 420,
"y": 260,
"wires": [
[
"c3db64d1d2260340"
]
]
},
{
"id": "dbc46892c8d14c37",
"type": "link in",
"z": "6312c0588348b2d4",
"name": "",
"links": [],
"x": 315,
"y": 340,
"wires": [
[
"e10575d73f2e5352"
]
]
},
{
"id": "6b61792143b3b0a3",
"type": "inject",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 240,
"y": 260,
"wires": [
[
"cd31efb4d2c6967e"
]
]
},
{
"id": "e10575d73f2e5352",
"type": "change",
"z": "6312c0588348b2d4",
"name": "",
"rules": [
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "Hello, World!",
"tot": "str"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 450,
"y": 340,
"wires": [
[
"cf8438e7137bc0f0"
]
]
},
{
"id": "cf8438e7137bc0f0",
"type": "link out",
"z": "6312c0588348b2d4",
"name": "",
"mode": "return",
"links": [],
"x": 595,
"y": 340,
"wires": []
},
{
"id": "c3db64d1d2260340",
"type": "debug",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 600,
"y": 260,
"wires": []
},
{
"id": "6d077dfa0987febb",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↑called from link call node",
"info": "",
"x": 410,
"y": 380,
"wires": []
},
{
"id": "53b9a0adfd8c4217",
"type": "comment",
"z": "6312c0588348b2d4",
"name": "↑return to link call node",
"info": "",
"x": 680,
"y": 380,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "84222b92.d65d18",
"type": "inject",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "Hello, World!",
"payloadType": "str",
"x": 230,
"y": 220,
"x": 190,
"y": 180,
"wires": [
[
"b4b9f603.739598"
@@ -31,25 +31,25 @@
{
"id": "7b014430.dfd94c",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "Write string to a file, then read from the file",
"info": "File-in node can read string from a file.",
"x": 260,
"y": 140,
"info": "Read file node can read string from a file.",
"x": 220,
"y": 100,
"wires": []
},
{
"id": "b4b9f603.739598",
"type": "file",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 420,
"y": 220,
"x": 380,
"y": 180,
"wires": [
[
"6dc01cac.5c4bf4"
@@ -59,7 +59,7 @@
{
"id": "2587adb9.7e60f2",
"type": "debug",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 220,
"x": 770,
"y": 180,
"wires": []
},
{
"id": "6dc01cac.5c4bf4",
"type": "file in",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 620,
"y": 220,
"x": 580,
"y": 180,
"wires": [
[
"2587adb9.7e60f2"
@@ -93,21 +93,21 @@
{
"id": "f4b4309a.3b78a",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↑read result from file",
"info": "",
"x": 630,
"y": 260,
"x": 590,
"y": 220,
"wires": []
},
{
"id": "672d3693.3cabd8",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 440,
"y": 180,
"x": 400,
"y": 140,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "8997398f.c5d628",
"type": "inject",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "😀",
"payloadType": "str",
"x": 210,
"y": 480,
"x": 170,
"y": 260,
"wires": [
[
"56e32d23.050f44"
@@ -31,25 +31,25 @@
{
"id": "4e598e65.1799d",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "Read data in specified encoding",
"info": "File-in node can specify encoding of data read from a file.",
"x": 230,
"y": 400,
"info": "Read file node can specify encoding of data read from a file.",
"x": 190,
"y": 180,
"wires": []
},
{
"id": "56e32d23.050f44",
"type": "file",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 380,
"y": 480,
"x": 340,
"y": 260,
"wires": [
[
"38fa0579.f2cd8a"
@@ -59,7 +59,7 @@
{
"id": "d28c8994.99c0a8",
"type": "debug",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,23 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 480,
"x": 730,
"y": 260,
"wires": []
},
{
"id": "38fa0579.f2cd8a",
"type": "file in",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "base64",
"x": 580,
"y": 480,
"allProps": false,
"x": 540,
"y": 260,
"wires": [
[
"d28c8994.99c0a8"
@@ -93,21 +94,21 @@
{
"id": "fa22ca20.ae4528",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↑read data from file as base64 string",
"info": "",
"x": 640,
"y": 520,
"x": 600,
"y": 300,
"wires": []
},
{
"id": "148e25ad.98891a",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 400,
"y": 440,
"x": 360,
"y": 220,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "6a0b1d03.d4cee4",
"type": "inject",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 740,
"x": 160,
"y": 220,
"wires": [
[
"d4b00cb7.a5a23"
@@ -31,25 +31,25 @@
{
"id": "f17ea1d1.8ecc3",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "Read data breaking lines into individual messages",
"info": "File-in node can break read text into messages with individual lines",
"x": 290,
"y": 660,
"info": "Read file node can break read text into messages with individual lines",
"x": 230,
"y": 140,
"wires": []
},
{
"id": "99ae7806.1d6428",
"type": "file",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 540,
"y": 740,
"x": 480,
"y": 220,
"wires": [
[
"70d7892f.d27db8"
@@ -59,7 +59,7 @@
{
"id": "7ed8282c.92b338",
"type": "debug",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 800,
"x": 750,
"y": 280,
"wires": []
},
{
"id": "70d7892f.d27db8",
"type": "file in",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"format": "lines",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 620,
"y": 800,
"x": 560,
"y": 280,
"wires": [
[
"7ed8282c.92b338"
@@ -93,27 +93,27 @@
{
"id": "c1b7e05.1d94b2",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↑read data from file breaking lines into messages",
"info": "",
"x": 720,
"y": 840,
"x": 660,
"y": 320,
"wires": []
},
{
"id": "a5f647b2.cf27a8",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 560,
"y": 700,
"x": 500,
"y": 180,
"wires": []
},
{
"id": "d4b00cb7.a5a23",
"type": "template",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "data",
"field": "payload",
"fieldType": "msg",
@@ -121,8 +121,8 @@
"syntax": "plain",
"template": "one\ntwo\nthree!",
"output": "str",
"x": 370,
"y": 740,
"x": 310,
"y": 220,
"wires": [
[
"99ae7806.1d6428"

View File

@@ -2,7 +2,7 @@
{
"id": "bdd57acc.2edc48",
"type": "inject",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 1040,
"x": 180,
"y": 220,
"wires": [
[
"7a069b01.0c2324"
@@ -31,25 +31,25 @@
{
"id": "1fd12220.33953e",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "Creating a message stream from lines of data",
"info": "File-in node can break read text into messages with individual lines. The messages creates a stream of messages.",
"x": 270,
"y": 960,
"info": "Read file node can break read text into messages with individual lines. The messages creates a stream of messages.",
"x": 230,
"y": 140,
"wires": []
},
{
"id": "ab6eb213.2a08d",
"type": "file",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 540,
"y": 1040,
"x": 500,
"y": 220,
"wires": [
[
"b7ed49b0.649fb8"
@@ -59,7 +59,7 @@
{
"id": "c48d8ae0.9ff3a8",
"type": "debug",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 1140,
"x": 770,
"y": 320,
"wires": []
},
{
"id": "b7ed49b0.649fb8",
"type": "file in",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"format": "lines",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 280,
"y": 1140,
"x": 240,
"y": 320,
"wires": [
[
"83073ebe.fcce4"
@@ -93,27 +93,27 @@
{
"id": "3c33e69f.6a04ba",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↑read data from file breaking lines into messages",
"info": "",
"x": 380,
"y": 1180,
"x": 340,
"y": 360,
"wires": []
},
{
"id": "3598bf7d.5712a",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 560,
"y": 1000,
"x": 520,
"y": 180,
"wires": []
},
{
"id": "7a069b01.0c2324",
"type": "template",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "data",
"field": "payload",
"fieldType": "msg",
@@ -121,8 +121,8 @@
"syntax": "plain",
"template": "Apple\nBanana\nGrape\nOrange",
"output": "str",
"x": 370,
"y": 1040,
"x": 330,
"y": 220,
"wires": [
[
"ab6eb213.2a08d"
@@ -132,7 +132,7 @@
{
"id": "8d4ed1d0.821fe",
"type": "join",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "",
"mode": "auto",
"build": "string",
@@ -145,8 +145,8 @@
"timeout": "",
"count": "",
"reduceRight": false,
"x": 630,
"y": 1140,
"x": 590,
"y": 320,
"wires": [
[
"c48d8ae0.9ff3a8"
@@ -156,7 +156,7 @@
{
"id": "83073ebe.fcce4",
"type": "switch",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "< D",
"property": "payload",
"propertyType": "msg",
@@ -170,8 +170,8 @@
"checkall": "true",
"repair": true,
"outputs": 1,
"x": 470,
"y": 1140,
"x": 430,
"y": 320,
"wires": [
[
"8d4ed1d0.821fe"
@@ -181,21 +181,21 @@
{
"id": "2088e195.f7aebe",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↓filter data before \"D\"",
"info": "",
"x": 520,
"y": 1100,
"x": 480,
"y": 280,
"wires": []
},
{
"id": "b848cdc7.61e06",
"type": "comment",
"z": "194a3e4f.a92772",
"z": "6312c0588348b2d4",
"name": "↑join to single string",
"info": "",
"x": 670,
"y": 1180,
"x": 630,
"y": 360,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "84222b92.d65d18",
"type": "inject",
"z": "4b63452d.672afc",
"z": "5132b95f037524f9",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "Hello, World!",
"payloadType": "str",
"x": 230,
"y": 200,
"x": 150,
"y": 220,
"wires": [
[
"b4b9f603.739598"
@@ -31,25 +31,25 @@
{
"id": "7b014430.dfd94c",
"type": "comment",
"z": "4b63452d.672afc",
"z": "5132b95f037524f9",
"name": "Write string to a file, then read from the file",
"info": "File node can write string to a file.",
"x": 260,
"y": 120,
"info": "Write file node can write string from a file.",
"x": 180,
"y": 140,
"wires": []
},
{
"id": "b4b9f603.739598",
"type": "file",
"z": "4b63452d.672afc",
"z": "5132b95f037524f9",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 420,
"y": 200,
"x": 340,
"y": 220,
"wires": [
[
"6dc01cac.5c4bf4"
@@ -59,7 +59,7 @@
{
"id": "2587adb9.7e60f2",
"type": "debug",
"z": "4b63452d.672afc",
"z": "5132b95f037524f9",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 810,
"y": 200,
"x": 730,
"y": 220,
"wires": []
},
{
"id": "6dc01cac.5c4bf4",
"type": "file in",
"z": "4b63452d.672afc",
"z": "5132b95f037524f9",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 620,
"y": 200,
"x": 540,
"y": 220,
"wires": [
[
"2587adb9.7e60f2"
@@ -93,21 +93,21 @@
{
"id": "f4b4309a.3b78a",
"type": "comment",
"z": "4b63452d.672afc",
"z": "5132b95f037524f9",
"name": "↑read result from file",
"info": "",
"x": 630,
"y": 240,
"x": 550,
"y": 260,
"wires": []
},
{
"id": "672d3693.3cabd8",
"type": "comment",
"z": "4b63452d.672afc",
"z": "5132b95f037524f9",
"name": "↓write to /tmp/hello.txt",
"info": "",
"x": 440,
"y": 160,
"x": 360,
"y": 180,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "704479e1.399388",
"type": "inject",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
@@ -25,8 +25,8 @@
"topic": "",
"payload": "Hello, World!",
"payloadType": "str",
"x": 230,
"y": 400,
"x": 190,
"y": 260,
"wires": [
[
"402f3b7e.988014"
@@ -36,25 +36,25 @@
{
"id": "8e876a75.e9beb8",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "Write string to a file specied by filename property, the read from the file",
"info": "File node can target file using `filename` property.",
"x": 350,
"y": 320,
"info": "Write file node can target file using `filename` property.",
"x": 310,
"y": 180,
"wires": []
},
{
"id": "402f3b7e.988014",
"type": "file",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"filename": "",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "none",
"x": 390,
"y": 400,
"x": 350,
"y": 260,
"wires": [
[
"26e077d6.bbcd98"
@@ -64,7 +64,7 @@
{
"id": "97b6b6b2.a54b38",
"type": "debug",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
@@ -73,22 +73,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 770,
"y": 400,
"x": 730,
"y": 260,
"wires": []
},
{
"id": "26e077d6.bbcd98",
"type": "file in",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 580,
"y": 400,
"x": 540,
"y": 260,
"wires": [
[
"97b6b6b2.a54b38"
@@ -98,21 +98,21 @@
{
"id": "85062297.da79",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "↑read result from file",
"info": "",
"x": 590,
"y": 440,
"x": 550,
"y": 300,
"wires": []
},
{
"id": "7316c4fc.b1dcdc",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "↓write to file specified by filename property",
"info": "",
"x": 500,
"y": 360,
"x": 460,
"y": 220,
"wires": []
}
]

View File

@@ -2,7 +2,7 @@
{
"id": "4ac00fb0.d5f52",
"type": "inject",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"props": [
{
@@ -20,8 +20,8 @@
"topic": "",
"payload": "",
"payloadType": "date",
"x": 220,
"y": 600,
"x": 180,
"y": 220,
"wires": [
[
"542cc2f4.92857c"
@@ -31,25 +31,25 @@
{
"id": "671f8295.0e6f6c",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "Delete a file",
"info": "File node can delete a file.",
"x": 170,
"y": 540,
"info": "Write file node can delete a file.",
"x": 130,
"y": 160,
"wires": []
},
{
"id": "542cc2f4.92857c",
"type": "file",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "delete",
"encoding": "none",
"x": 420,
"y": 600,
"x": 380,
"y": 220,
"wires": [
[
"a24da523.5babe8"
@@ -59,7 +59,7 @@
{
"id": "a24da523.5babe8",
"type": "debug",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,18 +68,18 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 630,
"y": 600,
"x": 590,
"y": 220,
"wires": []
},
{
"id": "51157051.2f62",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "↓delete a file",
"info": "",
"x": 390,
"y": 560,
"x": 350,
"y": 180,
"wires": []
}
]

View File

@@ -2,8 +2,8 @@
{
"id": "e4ef1f5e.7cd82",
"type": "inject",
"z": "4b63452d.672afc",
"name": "",
"z": "6312c0588348b2d4",
"name": "Base64 encoded string",
"props": [
{
"p": "payload"
@@ -20,8 +20,8 @@
"topic": "",
"payload": "8J+YgA==",
"payloadType": "str",
"x": 220,
"y": 820,
"x": 200,
"y": 220,
"wires": [
[
"72b37cc8.177054"
@@ -31,25 +31,25 @@
{
"id": "f5997af4.5a9298",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "Specify encoding of written data",
"info": "File node can specify encoding of data.",
"x": 230,
"y": 740,
"info": "Write file node can specify encoding of data.",
"x": 170,
"y": 140,
"wires": []
},
{
"id": "72b37cc8.177054",
"type": "file",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"appendNewline": true,
"createDir": false,
"overwriteFile": "true",
"encoding": "base64",
"x": 400,
"y": 820,
"x": 420,
"y": 220,
"wires": [
[
"2da33ec.f45cac2"
@@ -59,7 +59,7 @@
{
"id": "2e814354.278c8c",
"type": "debug",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"active": true,
"tosidebar": true,
@@ -68,22 +68,22 @@
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 790,
"y": 820,
"x": 810,
"y": 220,
"wires": []
},
{
"id": "2da33ec.f45cac2",
"type": "file in",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "",
"filename": "/tmp/hello.txt",
"format": "utf8",
"chunk": false,
"sendError": false,
"encoding": "none",
"x": 600,
"y": 820,
"x": 620,
"y": 220,
"wires": [
[
"2e814354.278c8c"
@@ -93,21 +93,21 @@
{
"id": "ec754c99.84bfd",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "↓write string with base64 encoding",
"info": "",
"x": 460,
"y": 780,
"x": 480,
"y": 180,
"wires": []
},
{
"id": "3e6704ff.4ce25c",
"type": "comment",
"z": "4b63452d.672afc",
"z": "6312c0588348b2d4",
"name": "↑read result from file",
"info": "",
"x": 610,
"y": 860,
"x": 630,
"y": 260,
"wires": []
}
]

View File

@@ -21,7 +21,7 @@
<dt>msg <span class="property-type">object</span></dt>
<dd>A msg object containing information to populate the template.</dd>
<dt class="optional">template <span class="property-type">string</span></dt>
<dd>A template to be populated from msg.payload. If not configured in the edit panel,
<dd>A template to be populated from <code>msg.payload</code>. If not configured in the edit panel,
this can be set as a property of msg.</dd>
</dl>
<h3>Outputs</h3>

View File

@@ -60,5 +60,5 @@
for the next topic.
</p>
<p><b>Note</b>: In rate limit mode the maximum queue depth can be set by a property in your
<i>settings.js</i> file. For example <code>nodeMessageBufferMaxLength: 1000,</code>
<i>settings.js</i> file. For example <code>nodeMessageBufferMaxLength: 1000,</code></p>
</script>

View File

@@ -25,7 +25,7 @@
<h3>Details</h3>
<p>In RBE mode this node will block until the <code>msg.payload</code>,
(or selected property) value is different to the previous one.
If required it can ignore the intial value, so as not to send anything at start.</p>
If required it can ignore the initial value, so as not to send anything at start.</p>
<p>The <a href="https://en.wikipedia.org/wiki/Deadband" target="_blank">Deadband</a> modes will block the incoming value
<i>unless</i> its change is greater or greater-equal than &plusmn; the band gap away from a previous value.</p>
<p>The Narrowband modes will block the incoming value,
@@ -37,5 +37,5 @@
ignoring any values out of range, or the previous input value, which resets the set point, thus allowing
gradual drift (deadband), or a step change (narrowband).</p>
<p><b>Note:</b> This works on a per <code>msg.topic</code> basis, though this can be changed to another property if desired.
This means that a single rbe node can handle multiple different topics at the same time.</p>
This means that a single filter node can handle multiple different topics at the same time.</p>
</script>

View File

@@ -52,7 +52,7 @@
<dt class="optional">topic <span class="property-type">string|object|array</span></dt>
<dd>For the <code>"subscribe"</code> and <code>"unsubscribe"</code> actions, this property
provides the topic. It can be set as either:<ul>
<li>a String continaing the topic filter</li>
<li>a String containing the topic filter</li>
<li>an Object containing <code>topic</code> and <code>qos</code> properties</li>
<li>an array of either strings or objects to handle multiple topics in one</li>
</ul>

View File

@@ -52,7 +52,7 @@
<dd>In case any redirects occurred while processing the request, this property is the final redirected url.
Otherwise, the url of the original request.</dd>
<dt>responseCookies <span class="property-type">object</span></dt>
<dd>If the response includes cookies, this propery is an object of name/value pairs for each cookie.</dd>
<dd>If the response includes cookies, this property is an object of name/value pairs for each cookie.</dd>
<dt>redirectList <span class="property-type">array</span></dt>
<dd>If the request was redirected one or more times, the accumulated information will be added to this property. `location` is the next redirect destination. `cookies` is the cookies returned from the redirect source.</dd>
</dl>

View File

@@ -60,7 +60,7 @@
</p>
<p>When operating in this mode, the node will not set the <code>msg.parts.count</code>
property as it does not know how many messages to expect in the stream. This
means it cannot be used with the <b>join</b> node in its automatic mode</p>
means it cannot be used with the <b>join</b> node in its automatic mode.</p>
</script>
<script type="text/html" data-help-name="join">

View File

@@ -46,4 +46,6 @@
<code>{{global[store].名前}}</code>
</p>
<p><b>: </b>デフォルトでは、<i>mustache</i>形式は置換対象のHTML要素をエスケープしますこれを抑止するには<code>{{{三重}}}</code>使</p>
<p>もしコンテンツの中で<code>{{ }}</code>使<code>[[ ]]</code></p>
<pre>{{=[[ ]]=}}</pre>
</script>

View File

@@ -25,11 +25,14 @@
<dt class="optional">reset</dt>
<dd>受信メッセージでこのプロパティを任意の値に設定するとノードが保持する全ての未送信メッセージをクリアします</dd>
<dt class="optional">flush</dt>
<dd>受信メッセージでこのプロパティを任意の値に設定するとノードが保持る全ての未送信メッセージを直ちに送信します</dd>
<dd>本プロパティに数値が設定されたメッセージを受信すると直ちに指定された数のメッセージを送信しますもし他の型(例えば真偽型)が設定されている場合はノードが保持している全ての未送信メッセージを直ちに送信します</dd>
<dt class="optional">toFront</dt>
<dd>流量制御モードにおいて本プロパティに真偽型<code>true</code><code>msg.flush=1</code></dd>
</dl>
<h3>詳細</h3>
<p>メッセージを遅延させるように設定する場合遅延時間は固定値範囲内の乱数値メッセージ毎の動的な指定値のいずれかを指定できます</p>
<p>メッセージを遅延させるように設定する場合遅延時間は固定値範囲内の乱数値メッセージ毎の動的な指定値のいずれかを指定できます各メッセージは到着時刻に基づいて他のメッセージとは独立して遅延されます</p>
<p>流量制御する場合メッセージは指定した時間間隔内に分散して送信しますキューに残っているメッセージ数はノードのステータスに表示されます受け取った中間メッセージを破棄することも可能です</p>
<p>流量値を上書きできるように設定されている場合新しい流量値はすぐに適用されますこの流量値は再度変更されるまで本ノードがリセットされるまでまたはフローが再実行されるまで有効です</p>
<p>流量制御は全てのメッセージに適用することも<code>msg.topic</code></p>
<p><b></b>: 流量制御モードでは、キューの大きさの最大値を<i>settings.js</i>ファイルのプロパティに設定できます例えば次の様な設定です<code>nodeMessageBufferMaxLength: 1000,</code></p>
</script>

View File

@@ -27,5 +27,5 @@
<p>不感帯モードでは%による指定もサポートしています入力と前の値の差分がX%より大きな場合に出力を行います</p>
<p>狭帯域(narrowband)モードでは前の値に対する差分が一定値より大きな場合に入力ペイロードをブロックしますこのモードは故障したセンサから発生する外れ値を無視する時などに有用です</p>
<p>不感帯モードと狭帯域モードでは以前の有効出力値もしくは以前の入力値との比較ができます有効出力値を用いると範囲外の値を無視することが入力値を用いると設定点がリセットされるため漸次的変化(不感帯モード)もしくは段階的変化(狭帯域モード)が可能です</p>
<p><b>:</b> <code>msg.topic</code>rbe</p>
<p><b>:</b> <code>msg.topic</code>filter</p>
</script>

View File

@@ -26,11 +26,46 @@
<dd>0: 最大1度到着, 1: 一度以上到着, 2: 1度のみ到着</dd>
<dt>retain <span class="property-type">真偽値</span></dt>
<dd>真の場合メッセージを保持メッセージが古い値の場合があります</dd>
<dt class="optional">responseTopic <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: MQTT</dd>
<dt class="optional">correlationData <span class="property-type">バッファ</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">contentType <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">userProperties <span class="property-type">オブジェクト</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">messageExpiryInterval <span class="property-type">数値</span></dt>
<dd><b>MQTTv5</b>: </dd>
</dl>
<h3>詳細</h3>
<p>購読トピックにはMQTTのワイルドカード(+: 1レベル, #: 複数レベル)を含めることができます</p>
<p>このノードの利用のためにはMQTTブローカへの接続設定が必要ですこの設定は鉛筆アイコンをクリックすることで行えます</p>
<p>MQTT(inおよびout)ノードはブローカへの接続設定を必要に応じて共有できます</p>
<h4>動的購読</h4>
本ノードはMQTTの接続と購読を動的に制御するよう設定できます有効にすると本ノードの入力にメッセージを渡すことで制御できます
<h3>入力</h3>
<p>これらは動的購読が設定されている場合のみ適用されます</p>
<dl class="message-properties">
<dt>action <span class="property-type">文字列</span></dt>
<dd>本ノードが行う動作の名前利用可能な動作は<code>"connect"</code><code>"disconnect"</code><code>"subscribe"</code><code>"unsubscribe"</code></dd>
<dt class="optional">topic <span class="property-type">文字列|オブジェクト|配列</span></dt>
<dd><code>"subscribe"</code><code>"unsubscribe"</code>:<ul>
<li>トピックフィルターを含む文字列</li>
<li><code>topic</code><code>qos</code></li>
<li>複数のトピックを扱う文字列やオブジェクトの配列</li>
</ul>
</dd>
<dt class="optional">broker <span class="property-type">broker</span> </dt>
<dd><code>"connect"</code>: <ul>
<li><code>broker</code></li>
<li><code>port</code></li>
<li><code>url</code> - URLbrokerport</li>
<li><code>username</code></li>
<li><code>password</code></li>
</ul>
<p>本プロパティが設定され既にブローカが接続されている場合<code>force</code></p>
</dd>
</dl>
</script>
<script type="text/html" data-help-name="mqtt out">
@@ -39,15 +74,24 @@
<dl class="message-properties">
<dt>payload <span class="property-type">文字列 | バッファ</span></dt>
<dd>発行するペイロードプロパティが設定されていない場合にはメッセージは送信されません空のメッセージを送信するにはプロパティに空文字列を設定します</dd>
<dt class="optional">topic <span class="property-type">文字列</span></dt>
<dd>発行対象のMQTTトピック</dd>
<dt class="optional">qos <span class="property-type">数値</span></dt>
<dd>0: 最大一度到着, 1: 一度以上到着, 2: 一度のみ到着デフォルトは0です</dd>
<dt class="optional">retain <span class="property-type">真偽値</span></dt>
<dd>真の場合メッセージをブローカに保持しますデフォルトは偽です</dd>
<dt class="optional">responseTopic <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: MQTT</dd>
<dt class="optional">correlationData <span class="property-type">バッファ</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">contentType <span class="property-type">文字列</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">userProperties <span class="property-type">オブジェクト</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">messageExpiryInterval <span class="property-type">数値</span></dt>
<dd><b>MQTTv5</b>: </dd>
<dt class="optional">topicAlias <span class="property-type">数値</span></dt>
<dd><b>MQTTv5</b>: 使MQTT</dd>
</dl>
<h3>詳細</h3>
<p><code>msg.payload</code>JSON</p>
@@ -55,6 +99,24 @@
<p>同様にQoSとretainもードの設定もしくはノードの設定が空の場合にはそれぞれ<code>msg.qos</code><code>msg.retain</code>retain</p>
<p>このノードの利用のためにはMQTTブローカへの接続設定が必要ですこの設定は鉛筆アイコンをクリックすることで行えます</p>
<p>MQTT(inおよびout)ノードはブローカへの接続設定を必要に応じて共有できます</p>
<h4>動的制御</h4>
本ノードによって接続を動的に制御できます本ノードが以下の制御メッセージのいずれかを受け取った際はペイロードと同じ様にパブリッシュされることはありません
<h3>入力</h3>
<dl class="message-properties">
<dt>action <span class="property-type">文字列</span></dt>
<dd>本ノードが行う動作の名前利用可能な動作は<code>"connect"</code><code>"disconnect"</code><code>"subscribe"</code><code>"unsubscribe"</code></dd>
<dt class="optional">broker <span class="property-type">broker</span> </dt>
<dd><code>"connect"</code>: <ul>
<li><code>broker</code></li>
<li><code>port</code></li>
<li><code>url</code> - URLbrokerport</li>
<li><code>username</code></li>
<li><code>password</code></li>
</ul>
<p>本プロパティが設定され既にブローカが接続されている場合<code>force</code></p>
</dd>
</dl>
</script>
<script type="text/html" data-help-name="mqtt-broker">
@@ -70,5 +132,4 @@
<h4>WebSocket</h4>
<p>WebSocketによる接続を行うように設定できますWebSocketを利用するにはサーバフィールドに接続先のURIを完全な形式で記述します以下に例を示します</p>
<pre>ws://example.com:4000/mqtt</pre>
</script>

View File

@@ -36,7 +36,7 @@
<h3>詳細</h3>
<p>列名にカラム名のリストを指定することができますCSVからオブジェクトに変換を行う際カラム名をプロパティ名として使用します列名の代わりにCSVデータの1行目にカラム名を含めることもできます</p>
<p>CSVへの変換を行う際にはオブジェクトから取り出すべきプロパティとその順序を列名を参照して決めます</p>
<p>列名がない場合本ノードは<code>msg.columns</code>使</p>
<p>列名がない場合本ノードは<code>msg.columns</code>使</p>
<p>入力が配列の場合には列名はカラム名を表す行の出力指定がされた場合だけ用います</p>
<p>数値を変換するオプションがチェックされている場合文字列型の数値が数値として返されますつまり1,"1.5",2の真ん中の値が数値になります</p>
<p>空の文字を含むオプションがチェックされている場合空の文字列が結果に返されますつまり"1","",3の真ん中の値が空の文字列になります</p>

View File

@@ -52,7 +52,6 @@
<p>このモードで処理する際にはメッセージ数を予め知ることができないため<code>msg.parts.count</code><b>join</b></p>
</script>
<script type="text/html" data-help-name="join">
<p>メッセージ列を結合して一つのメッセージにします</p>
<p>メッセージの結合には次の3つのモードが利用できます</p>
@@ -80,6 +79,10 @@
</dd>
<dt class="optional">complete</dt>
<dd>設定されている場合本ノードはペイロードを追加し保持しているメッセージを送信しますペイロードを追加したくない場合はmsgから削除してください</dd>
<dt class="optional">reset</dt>
<dd>設定されている場合本ノードは部分的に完成したメッセージを送信せず削除します</dd>
<dt class="optional">restartTimeout</dt>
<dd>設定されている場合本ノードにタイムアウトが設定されそのタイムアウトを用いて処理が再開されます</dd>
</dl>
<h3>詳細</h3>
@@ -96,7 +99,7 @@
</ul>
<p>出力メッセージのその他のプロパティはメッセージを送信する直前のメッセージをコピーします</p>
<p><i>合計値</i></p>
<p><i></i></p>
<p><i></i><code>msg.restartTimeout</code></p>
<p><code>msg.complete</code></p>
<p><code>msg.reset</code></p>