Merge branch 'dev' into add-trigger-second-output

This commit is contained in:
Nick O'Leary
2020-05-04 12:45:01 +01:00
committed by GitHub
388 changed files with 14213 additions and 2574 deletions

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="inject">
<script type="text/html" data-template-name="inject">
<div class="form-row">
<label for="node-input-payload"><i class="fa fa-envelope"></i> <span data-i18n="common.label.payload"></span></label>
<input type="text" id="node-input-payload" style="width:70%">

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="debug">
<script type="text/html" data-template-name="debug">
<div class="form-row">
<label for="node-input-typed-complete"><i class="fa fa-list"></i> <span data-i18n="debug.output"></span></label>
<input id="node-input-typed-complete" type="text" style="width: 70%">

View File

@@ -1,4 +1,4 @@
<script type="text/x-red" data-template-name="complete">
<script type="text/html" data-template-name="complete">
<div class="form-row node-input-target-row">
<button id="node-input-complete-target-select" class="red-ui-button" data-i18n="common.label.selectNodes"></button>
</div>

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="catch">
<script type="text/html" data-template-name="catch">
<div class="form-row">
<label style="width: auto" for="node-input-scope" data-i18n="catch.label.source"></label>
<select id="node-input-scope-select">

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="status">
<script type="text/html" data-template-name="status">
<div class="form-row">
<label style="width: auto" for="node-input-scope" data-i18n="status.label.source"></label>
<select id="node-input-scope-select">

View File

@@ -1,12 +1,12 @@
<script type="text/x-red" data-template-name="link in">
<script type="text/html" data-template-name="link in">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
</div>
<div class="form-row node-input-link-row"></div>
</script>
<script type="text/x-red" data-template-name="link out">
<script type="text/html" data-template-name="link out">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="comment">
<script type="text/html" data-template-name="comment">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="unknown">
<script type="text/html" data-template-name="unknown">
<div class="form-tips"><span data-i18n="[html]unknown.tip"></span></div>
</script>

View File

@@ -457,7 +457,7 @@ RED.debug = (function() {
var metaRow = $('<div class="red-ui-debug-msg-meta"></div>').appendTo(msg);
$('<span class="red-ui-debug-msg-date">'+ getTimestamp()+'</span>').appendTo(metaRow);
if (sourceNode) {
$('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text('node: '+sanitize(o.name||sourceNode.name||sourceNode.id))
$('<a>',{href:"#",class:"red-ui-debug-msg-name"}).text('node: '+(o.name||sourceNode.name||sourceNode.id))
.appendTo(metaRow)
.on("click", function(evt) {
evt.preventDefault();

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="function">
<script type="text/html" data-template-name="function">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<div style="display: inline-block; width: calc(100% - 105px)"><input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"></div>

View File

@@ -1,5 +1,10 @@
<script type="text/html" data-template-name="change">
<style>
ol#node-input-rule-container .red-ui-typedInput-container {
flex:1;
}
</style>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
@@ -76,11 +81,6 @@
var replace = this._("change.action.replace");
var regex = this._("change.label.regex");
function resizeRule(rule) {
var newWidth = rule.width();
rule.find('.red-ui-typedInput').typedInput("width",newWidth-130);
}
$('#node-input-rule-container').css('min-height','150px').css('min-width','450px').editableList({
addItem: function(container,i,opt) {
var rule = opt;
@@ -106,10 +106,11 @@
overflow: 'hidden',
whiteSpace: 'nowrap'
});
var row1 = $('<div/>').appendTo(container);
var row2 = $('<div/>',{style:"margin-top:8px;"}).appendTo(container);
var row3 = $('<div/>',{style:"margin-top:8px;"}).appendTo(container);
var row4 = $('<div/>',{style:"margin-top:8px;"}).appendTo(container);
let fragment = document.createDocumentFragment();
var row1 = $('<div/>',{style:"display:flex;"}).appendTo(fragment);
var row2 = $('<div/>',{style:"display:flex;margin-top:8px;"}).appendTo(fragment);
var row3 = $('<div/>',{style:"margin-top:8px;"}).appendTo(fragment);
var row4 = $('<div/>',{style:"display:flex;margin-top:8px;"}).appendTo(fragment);
var selectField = $('<select/>',{class:"node-input-rule-type",style:"width:110px; margin-right:10px;"}).appendTo(row1);
var selectOptions = [{v:"set",l:set},{v:"change",l:change},{v:"delete",l:del},{v:"move",l:move}];
@@ -124,41 +125,82 @@
$('<div/>',{style:"display:inline-block;text-align:right; width:120px; padding-right:10px; box-sizing:border-box;"})
.text(to)
.appendTo(row2);
var propertyValue = $('<input/>',{class:"node-input-rule-property-value",type:"text"})
function createPropertyValue() {
return $('<input/>',{class:"node-input-rule-property-value",type:"text"})
.appendTo(row2)
.typedInput({default:'str',types:['msg','flow','global','str','num','bool','json','bin','date','jsonata','env']});
}
var row3_1 = $('<div/>').appendTo(row3);
var row3_1 = $('<div/>', {style:"display:flex;"}).appendTo(row3);
$('<div/>',{style:"display:inline-block;text-align:right; width:120px; padding-right:10px; box-sizing:border-box;"})
.text(search)
.appendTo(row3_1);
var fromValue = $('<input/>',{class:"node-input-rule-property-search-value",type:"text"})
function createFromValue() {
return $('<input/>',{class:"node-input-rule-property-search-value",type:"text"})
.appendTo(row3_1)
.typedInput({default:'str',types:['msg','flow','global','str','re','num','bool','env']});
}
var row3_2 = $('<div/>',{style:"margin-top:8px;"}).appendTo(row3);
var row3_2 = $('<div/>',{style:"display:flex;margin-top:8px;"}).appendTo(row3);
$('<div/>',{style:"display:inline-block;text-align:right; width:120px; padding-right:10px; box-sizing:border-box;"})
.text(replace)
.appendTo(row3_2);
var toValue = $('<input/>',{class:"node-input-rule-property-replace-value",type:"text"})
function createToValue() {
return $('<input/>',{class:"node-input-rule-property-replace-value",type:"text"})
.appendTo(row3_2)
.typedInput({default:'str',types:['msg','flow','global','str','num','bool','json','bin','env']});
}
$('<div/>',{style:"display:inline-block;text-align:right; width:120px; padding-right:10px; box-sizing:border-box;"})
.text(to)
.appendTo(row4);
var moveValue = $('<input/>',{class:"node-input-rule-property-move-value",type:"text"})
function createMoveValue() {
return $('<input/>',{class:"node-input-rule-property-move-value",type:"text"})
.appendTo(row4)
.typedInput({default:'msg',types:['msg','flow','global']});
}
let propertyValue = null;
let fromValue = null;
let toValue = null;
let moveValue = null;
selectField.on("change", function() {
var width = $("#node-input-rule-container").width();
var type = $(this).val();
if (propertyValue) {
propertyValue.typedInput('hide');
}
if (fromValue) {
fromValue.typedInput('hide');
}
if (toValue) {
toValue.typedInput('hide');
}
if (moveValue) {
moveValue.typedInput('hide');
}
if (type == "set") {
if(!propertyValue) {
propertyValue = createPropertyValue();
}
propertyValue.typedInput('show');
row2.show();
row3.hide();
row4.hide();
} else if (type == "change") {
if(!fromValue) {
fromValue = createFromValue();
}
fromValue.typedInput('show');
if(!toValue) {
toValue = createToValue();
}
toValue.typedInput('show');
row2.hide();
row3.show();
row4.hide();
@@ -167,30 +209,48 @@
row3.hide();
row4.hide();
} else if (type == "move") {
if(!moveValue) {
moveValue = createMoveValue();
}
moveValue.typedInput('show');
row2.hide();
row3.hide();
row4.show();
}
resizeRule(container);
});
selectField.val(rule.t);
propertyName.typedInput('value',rule.p);
propertyName.typedInput('type',rule.pt);
propertyValue.typedInput('value',rule.to);
propertyValue.typedInput('type',rule.tot);
moveValue.typedInput('value',rule.to);
moveValue.typedInput('type',rule.tot);
fromValue.typedInput('value',rule.from);
fromValue.typedInput('type',rule.fromt);
toValue.typedInput('value',rule.to);
toValue.typedInput('type',rule.tot);
if (rule.t == "set") {
if(!propertyValue) {
propertyValue = createPropertyValue();
}
propertyValue.typedInput('value',rule.to);
propertyValue.typedInput('type',rule.tot);
}
if (rule.t == "move") {
if(!moveValue) {
moveValue = createMoveValue();
}
moveValue.typedInput('value',rule.to);
moveValue.typedInput('type',rule.tot);
}
if (rule.t == "change") {
if(!fromValue) {
fromValue = createFromValue();
}
fromValue.typedInput('value',rule.from);
fromValue.typedInput('type',rule.fromt);
if (!toValue) {
toValue = createToValue();
}
toValue.typedInput('value',rule.to);
toValue.typedInput('type',rule.tot);
}
selectField.change();
var newWidth = $("#node-input-rule-container").width();
resizeRule(container);
container[0].appendChild(fragment);
},
resizeItem: resizeRule,
removable: true,
sortable: true
});

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="range">
<script type="text/html" data-template-name="range">
<div class="form-row">
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label>
<input type="text" id="node-input-property" style="width:calc(70% - 1px)"/>

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="template">
<script type="text/html" data-template-name="template">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<div style="display: inline-block; width: calc(100% - 105px)"><input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name"></div>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="delay">
<script type="text/html" data-template-name="delay">
<div class="form-row">
<label for="node-input-delay-action"><i class="fa fa-tasks"></i> <span data-i18n="delay.action"></span></label>
<select id="node-input-delay-action" style="width:270px !important">

View File

@@ -18,7 +18,7 @@
<div class="form-row">
<label data-i18n="trigger.send" for="node-input-op1"></label>
<input type="hidden" id="node-input-op1type">
<input style="width: 70%" type="text" id="node-input-op1" placeholder="1">
<input style="width:70%" type="text" id="node-input-op1" placeholder="1">
</div>
<div class="form-row">
<label data-i18n="trigger.then"></label>
@@ -40,12 +40,12 @@
</div>
<div class="form-row node-type-wait">
<label></label>
<input type="checkbox" id="node-input-extend" style="margin-left: 0px; vertical-align: top; width: auto !important;"> <label style="width:auto !important;" for="node-input-extend" data-i18n="trigger.extend"></label>
<input type="checkbox" id="node-input-extend" style="margin-left:0px; vertical-align:top; width:auto !important;"> <label style="width:auto !important;" for="node-input-extend" data-i18n="trigger.extend"></label>
</div>
<div class="form-row node-type-wait">
<label data-i18n="trigger.then-send"></label>
<input type="hidden" id="node-input-op2type">
<input style="width: 70%" type="text" id="node-input-op2" placeholder="0">
<input style="width:70%" type="text" id="node-input-op2" placeholder="0">
</div>
<div class="form-row">
<label></label>
@@ -140,9 +140,11 @@
$(".node-type-duration").hide();
}
else if ($(this).val() == "loop") {
if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); }
$(".node-type-wait").hide();
$(".node-type-duration").show();
} else {
if ($("#node-input-duration").val() == 0) { $("#node-input-duration").val(250); }
$(".node-type-wait").show();
$(".node-type-duration").show();
}

View File

@@ -78,6 +78,7 @@ module.exports = function(RED) {
var node = this;
node.topics = {};
var npay = {};
var pendingMessages = [];
var activeMessagePromise = null;
var processMessageQueue = function(msg) {
@@ -124,9 +125,10 @@ module.exports = function(RED) {
node.status({});
}
else {
if (node.op2type === "payl") { npay[topic] = RED.util.cloneMessage(msg); }
if (((!node.topics[topic].tout) && (node.topics[topic].tout !== 0)) || (node.loop === true)) {
promise = Promise.resolve();
if (node.op2type === "pay" || node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); }
if (node.op2type === "pay") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); }
else if (node.op2Templated) { node.topics[topic].m2 = mustache.render(node.op2,msg); }
else if (node.op2type !== "nul") {
promise = new Promise((resolve,reject) => {
@@ -188,8 +190,16 @@ module.exports = function(RED) {
});
}
promise.then(() => {
msg2.payload = node.topics[topic].m2;
if (node.op2type === "payl") {
node.send(npay[topic]);
delete npay[topic];
}
else {
msg2.payload = node.topics[topic].m2;
node.send(msg2);
}
delete node.topics[topic];
if (node.second === true) { node.send([null,msg2]); }
else { node.send(msg2); }
node.status({});
@@ -248,9 +258,9 @@ module.exports = function(RED) {
});
}, node.duration);
}
else {
if (node.op2type === "payl") { node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); }
}
// else {
// if (node.op2type === "payl") {node.topics[topic].m2 = RED.util.cloneMessage(msg.payload); }
// }
}
return Promise.resolve();
}

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="exec">
<script type="text/html" data-template-name="exec">
<div class="form-row">
<label for="node-input-command"><i class="fa fa-file"></i> <span data-i18n="exec.label.command"></span></label>
<input type="text" id="node-input-command" data-i18n="[placeholder]exec.label.command">

View File

@@ -145,7 +145,7 @@ module.exports = function(RED) {
if (error.signal) { msg3.payload.signal = error.signal; }
if (error.code === null) { node.status({fill:"red",shape:"dot",text:"killed"}); }
else { node.status({fill:"red",shape:"dot",text:"error:"+error.code}); }
node.log('error:' + error);
if (RED.settings.verbose) { node.log('error:' + error); }
}
else if (node.oldrc === "false") {
msg3 = RED.util.cloneMessage(msg);

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="tls-config">
<script type="text/html" data-template-name="tls-config">
<div class="form-row" class="hide" id="node-config-row-uselocalfiles">
<input type="checkbox" id="node-config-input-uselocalfiles" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-config-input-uselocalfiles" style="width: 70%;"><span data-i18n="tls.label.use-local-files"></label>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="http proxy">
<script type="text/html" data-template-name="http proxy">
<div class="form-row">
<label for="node-config-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-config-input-name">

View File

@@ -11,7 +11,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="mqtt in">
<script type="text/html" data-template-name="mqtt in">
<div class="form-row">
<label for="node-input-broker"><i class="fa fa-globe"></i> <span data-i18n="mqtt.label.broker"></span></label>
<input type="text" id="node-input-broker">
@@ -75,7 +75,7 @@
});
</script>
<script type="text/x-red" data-template-name="mqtt out">
<script type="text/html" data-template-name="mqtt out">
<div class="form-row">
<label for="node-input-broker"><i class="fa fa-globe"></i> <span data-i18n="mqtt.label.broker"></span></label>
<input type="text" id="node-input-broker">

View File

@@ -153,7 +153,12 @@ module.exports = function(RED) {
this.brokerurl="mqtt://";
}
if (this.broker !== "") {
this.brokerurl = this.brokerurl+this.broker+":";
//Check for an IPv6 address
if (/(?:^|(?<=\s))(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))(?=\s|$)/.test(this.broker)) {
this.brokerurl = this.brokerurl+"["+this.broker+"]:";
} else {
this.brokerurl = this.brokerurl+this.broker+":";
}
// port now defaults to 1883 if unset.
if (!this.port){
this.brokerurl = this.brokerurl+"1883";
@@ -464,6 +469,7 @@ module.exports = function(RED) {
this.broker = n.broker;
this.brokerConn = RED.nodes.getNode(this.broker);
var node = this;
var chk = /[\+#]/;
if (this.brokerConn) {
this.status({fill:"red",shape:"ring",text:"node-red:common.status.disconnected"});
@@ -482,6 +488,7 @@ module.exports = function(RED) {
}
if ( msg.hasOwnProperty("payload")) {
if (msg.hasOwnProperty("topic") && (typeof msg.topic === "string") && (msg.topic !== "")) { // topic must exist
if (chk.test(msg.topic)) { node.warn(RED._("mqtt.errors.invalid-topic")); }
this.brokerConn.publish(msg, done); // send the message
} else {
node.warn(RED._("mqtt.errors.invalid-topic"));

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="http in">
<script type="text/html" data-template-name="http in">
<div class="form-row">
<label for="node-input-method"><i class="fa fa-tasks"></i> <span data-i18n="httpin.label.method"></span></label>
<select type="text" id="node-input-method" style="width:70%;">
@@ -45,7 +45,7 @@
<div id="node-input-tip" class="form-tips"><span data-i18n="httpin.tip.in"></span><code><span id="node-input-path"></span></code>.</div>
</script>
<script type="text/x-red" data-template-name="http response">
<script type="text/html" data-template-name="http response">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="http request">
<script type="text/html" data-template-name="http request">
<div class="form-row">
<label for="node-input-method"><i class="fa fa-tasks"></i> <span data-i18n="httpin.label.method"></span></label>
<select type="text" id="node-input-method" style="width:70%;">
@@ -22,6 +22,7 @@
<option value="POST">POST</option>
<option value="PUT">PUT</option>
<option value="DELETE">DELETE</option>
<option value="HEAD">HEAD</option>
<option value="use" data-i18n="httpin.setby"></option>
</select>
</div>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<!-- WebSocket Input Node -->
<script type="text/x-red" data-template-name="websocket in">
<script type="text/html" data-template-name="websocket in">
<div class="form-row">
<label for="node-input-mode"><i class="fa fa-dot-circle-o"></i> <span data-i18n="websocket.label.type"></span></label>
<select id="node-input-mode">
@@ -163,7 +163,7 @@
if (root === "") {
$("#node-config-ws-tip").hide();
} else {
$("#node-config-ws-path").html(root);
$("#node-config-ws-path").html(RED._("node-red:websocket.tip.path2", { path: root }));
$("#node-config-ws-tip").show();
}
}
@@ -198,7 +198,7 @@
</script>
<!-- WebSocket out Node -->
<script type="text/x-red" data-template-name="websocket out">
<script type="text/html" data-template-name="websocket out">
<div class="form-row">
<label for="node-input-mode"><i class="fa fa-dot-circle-o"></i> <span data-i18n="websocket.label.type"></span></label>
<select id="node-input-mode">
@@ -221,7 +221,7 @@
</script>
<!-- WebSocket Server configuration node -->
<script type="text/x-red" data-template-name="websocket-listener">
<script type="text/html" data-template-name="websocket-listener">
<div class="form-row">
<label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="websocket.label.path"></span></label>
<input id="node-config-input-path" type="text" placeholder="/ws/example">
@@ -235,12 +235,12 @@
</div>
<div class="form-tips">
<span data-i18n="[html]websocket.tip.path1"></span>
<p id="node-config-ws-tip"><span data-i18n="[html]websocket.tip.path2"></span><code><span id="node-config-ws-path"></span></code>.</p>
<p id="node-config-ws-tip"><span id="node-config-ws-path"></span></p>
</div>
</script>
<!-- WebSocket Client configuration node -->
<script type="text/x-red" data-template-name="websocket-client">
<script type="text/html" data-template-name="websocket-client">
<div class="form-row">
<label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="websocket.label.url"></span></label>
<input id="node-config-input-path" type="text" placeholder="ws://example.com/ws">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="tcp in">
<script type="text/html" data-template-name="tcp in">
<div class="form-row">
<label for="node-input-server"><i class="fa fa-dot-circle-o"></i> <span data-i18n="tcpin.label.type"></span></label>
<select id="node-input-server" style="width:120px; margin-right:5px;">
@@ -108,7 +108,7 @@
</script>
<script type="text/x-red" data-template-name="tcp out">
<script type="text/html" data-template-name="tcp out">
<div class="form-row">
<label for="node-input-beserver"><i class="fa fa-dot-circle-o"></i> <span data-i18n="tcpin.label.type"></span></label>
<select id="node-input-beserver" style="width:150px; margin-right:5px;">
@@ -170,15 +170,14 @@
$("#node-input-port-row").hide();
$("#node-input-host-row").hide();
$("#node-input-end-row").hide();
} else if (sockettype == "client"){
$("#node-input-port-row").show();
$("#node-input-host-row").show();
$("#node-input-end-row").show();
} else {
$("#node-input-port-row").show();
$("#node-input-end-row").show();
}
if (sockettype == "client") {
$("#node-input-host-row").show();
} else {
$("#node-input-host-row").hide();
$("#node-input-end-row").show();
}
};
updateOptions();
@@ -188,7 +187,7 @@
</script>
<script type="text/x-red" data-template-name="tcp request">
<script type="text/html" data-template-name="tcp request">
<div class="form-row">
<label for="node-input-server"><i class="fa fa-globe"></i> <span data-i18n="tcpin.label.server"></span></label>
<input type="text" id="node-input-server" placeholder="ip.address" style="width:45%">

View File

@@ -15,7 +15,7 @@
-->
<!-- The Input Node -->
<script type="text/x-red" data-template-name="udp in">
<script type="text/html" data-template-name="udp in">
<div class="form-row">
<label for="node-input-port"><i class="fa fa-sign-in"></i> <span data-i18n="udp.label.listen"></span></label>
<select id="node-input-multicast" style='width:70%'>
@@ -115,7 +115,7 @@
<!-- The Output Node -->
<script type="text/x-red" data-template-name="udp out">
<script type="text/html" data-template-name="udp out">
<div class="form-row">
<label for="node-input-port"><i class="fa fa-envelope"></i> <span data-i18n="udp.label.send"></span></label>
<select id="node-input-multicast" style="width:40%">

View File

@@ -180,6 +180,10 @@ module.exports = function(RED) {
node.tout = setTimeout(function() {
if (udpInputPortsInUse[p]) {
sock = udpInputPortsInUse[p];
if (node.multicast != "false") {
sock.setBroadcast(true);
sock.setMulticastLoopback(false);
}
node.log(RED._("udp.status.re-use",{outport:node.outport,host:node.addr,port:node.port}));
if (node.iface) { node.status({text:n.iface+" : "+node.iface}); }
}

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="csv">
<script type="text/html" data-template-name="csv">
<div class="form-row">
<label for="node-input-temp"><i class="fa fa-list"></i> <span data-i18n="csv.label.columns"></span></label>
<input type="text" id="node-input-temp" data-i18n="[placeholder]csv.placeholder.columns">
@@ -28,11 +28,15 @@
</div>
<div class="form-row" style="padding-left:20px;">
<label><i class="fa fa-sign-in"></i> <span data-i18n="csv.label.input"></span></label>
<span data-i18n="csv.label.skip-s"></span>&nbsp;<input type="text" id="node-input-skip" style="width:30px; height:25px;"/>&nbsp;<span data-i18n="csv.label.skip-e"></span><br/>
<span data-i18n="csv.label.skip-s"></span>&nbsp;<input type="text" id="node-input-skip" style="width:40px; height:25px;"/>&nbsp;<span data-i18n="csv.label.skip-e"></span><br/>
<label>&nbsp;</label>
<input style="width:20px; vertical-align:baseline; margin-right:5px;" type="checkbox" id="node-input-hdrin"><label style="width:auto; margin-top:7px;" for="node-input-hdrin"><span data-i18n="csv.label.firstrow"></span></label><br/>
<label>&nbsp;</label>
<input style="width:20px; vertical-align:baseline; margin-right:5px;" type="checkbox" id="node-input-strings"><label style="width:auto; margin-top:7px;" for="node-input-strings"><span data-i18n="csv.label.usestrings"></span></label><br/>
<label>&nbsp;</label>
<input style="width:20px; vertical-align:baseline; margin-right:5px;" type="checkbox" id="node-input-include_empty_strings"><label style="width:auto; margin-top:7px;" for="node-input-include_empty_strings"><span data-i18n="csv.label.include_empty_strings"></span></label><br/>
<label>&nbsp;</label>
<input style="width:20px; vertical-align:baseline; margin-right:5px;" type="checkbox" id="node-input-include_null_values"><label style="width:auto; margin-top:7px;" for="node-input-include_null_values"><span data-i18n="csv.label.include_null_values"></span></label><br/>
</div>
<div class="form-row" style="padding-left:20px;">
<label><i class="fa fa-sign-out"></i> <span data-i18n="csv.label.output"></span></label>
@@ -45,8 +49,13 @@
<label style="width:100%;"><span data-i18n="csv.label.o2c"></span></label>
</div>
<div class="form-row" style="padding-left:20px;">
<label><i class="fa fa-sign-in"></i> <span data-i18n="csv.label.output"></span></label>
<input style="width:20px; vertical-align:top; margin-right:5px;" type="checkbox" id="node-input-hdrout"><label style="width:auto;" for="node-input-hdrout"><span data-i18n="csv.label.includerow"></span></span>
<label><i class="fa fa-sign-out"></i> <span data-i18n="csv.label.output"></span></label>
<!-- <input style="width:20px; vertical-align:top; margin-right:5px;" type="checkbox" id="node-input-hdrout"><label style="width:auto;" for="node-input-hdrout"><span data-i18n="csv.label.includerow"></span></span> -->
<select style="width:60%" id="node-input-hdrout">
<option value="none" data-i18n="csv.hdrout.none"></option>
<option value="all" data-i18n="csv.hdrout.all"></option>
<option value="once" data-i18n="csv.hdrout.once"></option>
</select>
</div>
<div class="form-row" style="padding-left:20px;">
<label></label>
@@ -69,12 +78,14 @@
sep: {value:',',required:true,validate:RED.validators.regex(/^.{1,2}$/)},
//quo: {value:'"',required:true},
hdrin: {value:""},
hdrout: {value:""},
hdrout: {value:"none"},
multi: {value:"one",required:true},
ret: {value:'\\n'},
temp: {value:""},
skip: {value:"0"},
strings: {value:true}
strings: {value:true},
include_empty_strings: {value:""},
include_null_values: {value:""}
},
inputs:1,
outputs:1,
@@ -86,6 +97,8 @@
return this.name?"node_label_italic":"";
},
oneditprepare: function() {
if (this.hdrout === false) { this.hdrout = "none"; $("#node-input-hdrout").val("none"); }
if (this.hdrout === true) { this.hdrout = "all"; $("#node-input-hdrout").val("all");}
if (this.strings === undefined) { this.strings = true; $("#node-input-strings").prop('checked', true); }
if (this.skip === undefined) { this.skip = 0; $("#node-input-skip").val("0");}
$("#node-input-skip").spinner({ min:0 });

View File

@@ -26,12 +26,16 @@ module.exports = function(RED) {
this.lineend = "\n";
this.multi = n.multi || "one";
this.hdrin = n.hdrin || false;
this.hdrout = n.hdrout || false;
this.hdrout = n.hdrout || "none";
this.goodtmpl = true;
this.skip = parseInt(n.skip || 0);
this.store = [];
this.parsestrings = n.strings;
this.include_empty_strings = n.include_empty_strings || false;
this.include_null_values = n.include_null_values || false;
if (this.parsestrings === undefined) { this.parsestrings = true; }
if (this.hdrout === false) { this.hdrout = "none"; }
if (this.hdrout === true) { this.hdrout = "all"; }
var tmpwarn = true;
var node = this;
@@ -49,14 +53,22 @@ module.exports = function(RED) {
return col;
}
node.template = clean(node.template);
node.hdrSent = false;
this.on("input", function(msg) {
if (msg.hasOwnProperty("reset")) {
node.hdrSent = false;
}
if (msg.hasOwnProperty("payload")) {
if (typeof msg.payload == "object") { // convert object to CSV string
try {
var ou = "";
if (node.hdrout) {
if (node.hdrout !== "none" && node.hdrSent === false) {
if ((node.template.length === 1) && (node.template[0] === '') && (msg.hasOwnProperty("columns"))) {
node.template = clean((msg.columns || "").split(","));
}
ou += node.template.join(node.sep) + node.ret;
if (node.hdrout === "once") { node.hdrSent = true; }
}
if (!Array.isArray(msg.payload)) { msg.payload = [ msg.payload ]; }
for (var s = 0; s < msg.payload.length; s++) {
@@ -75,13 +87,15 @@ module.exports = function(RED) {
ou += msg.payload[s].join(node.sep) + node.ret;
}
else {
if ((node.template.length === 1) && (node.template[0] === '') && (msg.hasOwnProperty("columns"))) {
node.template = clean((msg.columns || "").split(","));
}
if ((node.template.length === 1) && (node.template[0] === '')) {
/* istanbul ignore else */
if (tmpwarn === true) { // just warn about missing template once
node.warn(RED._("csv.errors.obj_csv"));
tmpwarn = false;
}
ou = "";
for (var p in msg.payload[0]) {
/* istanbul ignore else */
if (msg.payload[0].hasOwnProperty(p)) {
@@ -125,6 +139,7 @@ module.exports = function(RED) {
}
}
msg.payload = ou;
msg.columns = node.template.join(',');
if (msg.payload !== '') { node.send(msg); }
}
catch(e) { node.error(e,msg); }
@@ -173,20 +188,29 @@ module.exports = function(RED) {
}
else if ((line[i] === node.sep) && f) { // if it is the end of the line then finish
if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
if ( node.template[j] && (node.template[j] !== "") && (k[j] !== "" ) ) {
if ( (node.parsestrings === true) && reg.test(k[j]) ) { k[j] = parseFloat(k[j]); }
o[node.template[j]] = k[j];
if ( node.template[j] && (node.template[j] !== "") ) {
// if no value between separators ('1,,"3"...') or if the line beings with separator (',1,"2"...') treat value as null
if (line[i-1] === node.sep || line[i-1].includes('\n','\r')) k[j] = null;
if ( (k[j] !== null && node.parsestrings === true) && reg.test(k[j]) ) { k[j] = parseFloat(k[j]); }
if (node.include_null_values && k[j] === null) o[node.template[j]] = k[j];
if (node.include_empty_strings && k[j] === "") o[node.template[j]] = k[j];
if (k[j] !== null && k[j] !== "") o[node.template[j]] = k[j];
}
j += 1;
k[j] = "";
// if separator is last char in processing string line (without end of line), add null value at the end - example: '1,2,3\n3,"3",'
k[j] = line.length - 1 === i ? null : "";
}
else if ((line[i] === "\n") || (line[i] === "\r")) { // handle multiple lines
else if (((line[i] === "\n") || (line[i] === "\r")) && f) { // handle multiple lines
//console.log(j,k,o,k[j]);
if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
if ( node.template[j] && (node.template[j] !== "") && (k[j] !== "") ) {
if ( (node.parsestrings === true) && reg.test(k[j]) ) { k[j] = parseFloat(k[j]); }
else { k[j].replace(/\r$/,''); }
o[node.template[j]] = k[j];
if ( node.template[j] && (node.template[j] !== "") ) {
// if separator before end of line, set null value ie. '1,2,"3"\n1,2,\n1,2,3'
if (line[i-1] === node.sep) k[j] = null;
if ( (k[j] !== null && node.parsestrings === true) && reg.test(k[j]) ) { k[j] = parseFloat(k[j]); }
else { if (k[j] !== null) k[j].replace(/\r$/,''); }
if (node.include_null_values && k[j] === null) o[node.template[j]] = k[j];
if (node.include_empty_strings && k[j] === "") o[node.template[j]] = k[j];
if (k[j] !== null && k[j] !== "") o[node.template[j]] = k[j];
}
if (JSON.stringify(o) !== "{}") { // don't send empty objects
a.push(o); // add to the array
@@ -204,15 +228,19 @@ module.exports = function(RED) {
// Finished so finalize and send anything left
//console.log(j,k,o,k[j]);
if (!node.goodtmpl) { node.template[j] = "col"+(j+1); }
if ( node.template[j] && (node.template[j] !== "") && (k[j] !== "") ) {
if ( (node.parsestrings === true) && reg.test(k[j]) ) { k[j] = parseFloat(k[j]); }
else { k[j].replace(/\r$/,''); }
o[node.template[j]] = k[j];
if ( node.template[j] && (node.template[j] !== "") ) {
if ( (k[j] !== null && node.parsestrings === true) && reg.test(k[j]) ) { k[j] = parseFloat(k[j]); }
else { if (k[j] !== null) k[j].replace(/\r$/,''); }
if (node.include_null_values && k[j] === null) o[node.template[j]] = k[j];
if (node.include_empty_strings && k[j] === "") o[node.template[j]] = k[j];
if (k[j] !== null && k[j] !== "") o[node.template[j]] = k[j];
}
if (JSON.stringify(o) !== "{}") { // don't send empty objects
a.push(o); // add to the array
}
var has_parts = msg.hasOwnProperty("parts");
if (node.multi !== "one") {
msg.payload = a;
if (has_parts) {
@@ -221,12 +249,14 @@ module.exports = function(RED) {
}
if (msg.parts.index + 1 === msg.parts.count) {
msg.payload = node.store;
msg.columns = node.template.filter(val => val).join(',');
delete msg.parts;
node.send(msg);
node.store = [];
}
}
else {
msg.columns = node.template.filter(val => val).join(',');
node.send(msg); // finally send the array
}
}
@@ -234,6 +264,7 @@ module.exports = function(RED) {
var len = a.length;
for (var i = 0; i < len; i++) {
var newMessage = RED.util.cloneMessage(msg);
newMessage.columns = node.template.filter(val => val).join(',');
newMessage.payload = a[i];
if (!has_parts) {
newMessage.parts = {
@@ -259,7 +290,11 @@ module.exports = function(RED) {
}
else { node.warn(RED._("csv.errors.csv_js")); }
}
else { node.send(msg); } // If no payload - just pass it on.
else {
if (!msg.hasOwnProperty("reset")) {
node.send(msg); // If no payload and not reset - just pass it on.
}
}
});
}
RED.nodes.registerType("csv",CSVNode);

View File

@@ -1,7 +1,7 @@
<script type="text/x-red" data-template-name="html">
<script type="text/html" data-template-name="html">
<div class="form-row">
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="node-red:common.label.property"></span></label>
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label>
<input type="text" id="node-input-property" style="width:70%">
</div>
<div class="form-row">

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="json">
<script type="text/html" data-template-name="json">
<div class="form-row">
<label for="node-input-action"><i class="fa fa-dot-circle-o"></i> <span data-i18n="json.label.action"></span></label>
<select style="width:70%" id="node-input-action">

View File

@@ -1,7 +1,7 @@
<script type="text/x-red" data-template-name="xml">
<script type="text/html" data-template-name="xml">
<div class="form-row">
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="node-red:common.label.property"></span></label>
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label>
<input type="text" id="node-input-property" style="width:70%;"/>
</div>
<div class="form-row">

View File

@@ -1,7 +1,7 @@
<script type="text/x-red" data-template-name="yaml">
<script type="text/html" data-template-name="yaml">
<div class="form-row">
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="node-red:common.label.property"></span></label>
<label for="node-input-property"><i class="fa fa-ellipsis-h"></i> <span data-i18n="common.label.property"></span></label>
<input type="text" id="node-input-property" style="width:70%;"/>
</div>
<div class="form-row">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="split">
<script type="text/html" data-template-name="split">
<div class="form-row"><span data-i18n="[html]split.intro"></span></div>
<div class="form-row"><span data-i18n="[html]split.strBuff"></span></div>
<div class="form-row">
@@ -113,7 +113,7 @@
</script>
<script type="text/x-red" data-template-name="join">
<script type="text/html" data-template-name="join">
<div class="form-row">
<label data-i18n="join.mode.mode"></label>
<select id="node-input-mode" style="width:200px;">

View File

@@ -292,7 +292,6 @@ module.exports = function(RED) {
reduceMessageGroup(node,msgs,exp,fixup,count,result,done);
}
});
}
function reduceAndSendGroup(node, group, done) {
var is_right = node.reduce_right;
@@ -331,7 +330,7 @@ module.exports = function(RED) {
var pending_count = node.pending_count;
var gid = msg.parts.id;
var count;
if(!pending.hasOwnProperty(gid)) {
if (!pending.hasOwnProperty(gid)) {
if(parts.hasOwnProperty('count')) {
count = msg.parts.count;
}
@@ -361,7 +360,6 @@ module.exports = function(RED) {
}
return done();
}
if (msgs.length === group.count) {
delete pending[gid];
pending_count -= msgs.length;
@@ -408,7 +406,7 @@ module.exports = function(RED) {
if (this.joinerType === "str") {
this.joiner = this.joiner.replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g,"\t").replace(/\\e/g,"\e").replace(/\\f/g,"\f").replace(/\\0/g,"\0");
} else if (this.joinerType === "bin") {
var joinArray = JSON.parse(n.joiner)
var joinArray = JSON.parse(n.joiner || "[]");
if (Array.isArray(joinArray)) {
this.joiner = Buffer.from(joinArray);
} else {
@@ -429,7 +427,7 @@ module.exports = function(RED) {
var completeSend = function(partId) {
var group = inflight[partId];
clearTimeout(group.timeout);
if (group.timeout) { clearTimeout(group.timeout); }
if ((node.accumulate !== true) || group.msg.hasOwnProperty("complete")) { delete inflight[partId]; }
if (group.type === 'array' && group.arrayLen > 1) {
var newArray = [];
@@ -448,6 +446,9 @@ module.exports = function(RED) {
buffers.push(joinBuffer);
bufferLen += joinBuffer.length;
}
if (!Buffer.isBuffer(group.payload[i])) {
group.payload[i] = Buffer.from(group.payload[i]);
}
buffers.push(group.payload[i]);
bufferLen += group.payload[i].length;
}
@@ -629,7 +630,13 @@ module.exports = function(RED) {
var group = inflight[partId];
if (payloadType === 'buffer') {
if (property !== undefined) {
inflight[partId].bufferLen += property.length;
if (Buffer.isBuffer(property) || (typeof property === "string") || Array.isArray(property)) {
inflight[partId].bufferLen += property.length;
}
else {
node.error(RED._("join.errors.invalid-type",{error:(typeof property)}),msg);
return;
}
}
}
if (payloadType === 'object') {

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="sort">
<script type="text/html" data-template-name="sort">
<div class="form-row">
<label for="node-input-target"><i class="fa fa-dot-circle-o"></i> <span data-i18n="sort.target"></span></label>
@@ -53,8 +53,8 @@
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
</div>
</script>

View File

@@ -60,8 +60,8 @@
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]common.label.name">
</div>
</script>

View File

@@ -1,5 +1,5 @@
<script type="text/x-red" data-template-name="file">
<script type="text/html" data-template-name="file">
<div class="form-row node-input-filename">
<label for="node-input-filename"><i class="fa fa-file"></i> <span data-i18n="file.label.filename"></span></label>
<input id="node-input-filename" type="text">
@@ -34,7 +34,7 @@
<div class="form-tips"><span data-i18n="file.tip"></span></div>
</script>
<script type="text/x-red" data-template-name="file in">
<script type="text/html" data-template-name="file in">
<div class="form-row">
<label for="node-input-filename"><i class="fa fa-file"></i> <span data-i18n="file.label.filename"></span></label>
<input id="node-input-filename" type="text" data-i18n="[placeholder]file.label.filename">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-template-name="watch">
<script type="text/html" data-template-name="watch">
<div class="form-row node-input-filename">
<label for="node-input-files"><i class="fa fa-file"></i> <span data-i18n="watch.label.files"></span></label>
<input id="node-input-files" type="text" tabindex="1" data-i18n="[placeholder]watch.placeholder.files">

View File

@@ -0,0 +1 @@
[{"id":"bf16276d.2f1758","type":"tab","label":"Example: Number-based Group Mode","disabled":false,"info":"*Number-based Group mode* of batch node can be used to create new message sequences from incoming messages. Recently received *N*-messages are grouped to a sequence. Creating message sequences that has overwrap with adjacent message group is possible.\n"},{"id":"f5a82278.78d6c","type":"batch","z":"bf16276d.2f1758","name":"","mode":"count","count":"5","overlap":0,"interval":"5","allowEmptySequence":false,"topics":[],"x":370,"y":232,"wires":[["b1e514ed.44f328"]]},{"id":"43720065.2891d","type":"comment","z":"bf16276d.2f1758","name":"Group 5 consecutive messages","info":"","x":170,"y":60,"wires":[]},{"id":"b1e514ed.44f328","type":"join","z":"bf16276d.2f1758","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":510,"y":232,"wires":[["457e5970.8ceaa8"]]},{"id":"457e5970.8ceaa8","type":"debug","z":"bf16276d.2f1758","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":232,"wires":[]},{"id":"8e3d3ceb.bd0fe","type":"comment","z":"bf16276d.2f1758","name":"↑ create message sequence with 5 messages","info":"","x":490,"y":272,"wires":[]},{"id":"fbe20ae3.cbb6f8","type":"comment","z":"bf16276d.2f1758","name":"↓ join sequence to array","info":"","x":560,"y":192,"wires":[]},{"id":"7ebafe58.2a112","type":"inject","z":"bf16276d.2f1758","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":152,"wires":[["589603c4.1cb5fc"]]},{"id":"589603c4.1cb5fc","type":"function","z":"bf16276d.2f1758","name":"send: 0-49","func":"for(var x = 0; x < 50; x++) {\n node.send({payload: x});\n}","outputs":1,"noerr":0,"x":310,"y":152,"wires":[["f5a82278.78d6c"]]},{"id":"9b59b72c.fcd8f8","type":"comment","z":"bf16276d.2f1758","name":"↓ send sequence: 0-49","info":"","x":340,"y":112,"wires":[]},{"id":"6421756f.6abd5c","type":"batch","z":"bf16276d.2f1758","name":"","mode":"count","count":"5","overlap":"1","interval":"5","allowEmptySequence":false,"topics":[],"x":370,"y":500,"wires":[["199cf232.743e7e"]]},{"id":"657b6a53.2a1fc4","type":"comment","z":"bf16276d.2f1758","name":"Group 5 consecutive messages with overlap of 1 msg","info":"","x":240,"y":328,"wires":[]},{"id":"199cf232.743e7e","type":"join","z":"bf16276d.2f1758","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":510,"y":500,"wires":[["91d29dda.d8a4f"]]},{"id":"91d29dda.d8a4f","type":"debug","z":"bf16276d.2f1758","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":670,"y":500,"wires":[]},{"id":"8bd4d407.aa2af8","type":"comment","z":"bf16276d.2f1758","name":"↑ create message sequence with 5 messages with overlap of 1 msg","info":"","x":560,"y":540,"wires":[]},{"id":"a49ea57d.8d2458","type":"comment","z":"bf16276d.2f1758","name":"↓ join sequence to array","info":"","x":560,"y":460,"wires":[]},{"id":"f689d1b3.90e4b","type":"inject","z":"bf16276d.2f1758","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":420,"wires":[["c021cf24.ad03e"]]},{"id":"c021cf24.ad03e","type":"function","z":"bf16276d.2f1758","name":"send: 0-49","func":"for(var x = 0; x < 50; x++) {\n node.send({payload: x});\n}","outputs":1,"noerr":0,"x":310,"y":420,"wires":[["6421756f.6abd5c"]]},{"id":"8da6e576.901a18","type":"comment","z":"bf16276d.2f1758","name":"↓ send sequence: 0-49","info":"","x":340,"y":380,"wires":[]}]

View File

@@ -0,0 +1 @@
[{"id":"82a01f29.86de","type":"tab","label":"Example: Time-based Group Mode","disabled":false,"info":"*Time-based Group mode* of batch node can be used to create new message sequences from incoming messages received within specified time range. \n"},{"id":"9a7f6539.6e36d8","type":"batch","z":"82a01f29.86de","name":"","mode":"interval","count":10,"overlap":0,"interval":"5","allowEmptySequence":false,"topics":[],"x":350,"y":260,"wires":[["e54a3b57.3677f8"]]},{"id":"71dc607e.98aab","type":"comment","z":"82a01f29.86de","name":"Group messages received within 5s","info":"","x":180,"y":80,"wires":[]},{"id":"e54a3b57.3677f8","type":"join","z":"82a01f29.86de","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":490,"y":260,"wires":[["1e263cac.6641f3"]]},{"id":"1e263cac.6641f3","type":"debug","z":"82a01f29.86de","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":650,"y":260,"wires":[]},{"id":"324c7b93.0db734","type":"comment","z":"82a01f29.86de","name":"↑ create message sequence received within 5s","info":"","x":480,"y":300,"wires":[]},{"id":"fb112bae.fbe428","type":"comment","z":"82a01f29.86de","name":"↓ join sequence to array","info":"","x":540,"y":220,"wires":[]},{"id":"34f8dda5.2864c2","type":"inject","z":"82a01f29.86de","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":140,"y":160,"wires":[["c9e23ee4.ce535"]]},{"id":"c9e23ee4.ce535","type":"function","z":"82a01f29.86de","name":"send: 0-49","func":"for(var x = 0; x < 100; x++) {\n node.send({payload: x});\n}","outputs":1,"noerr":0,"x":310,"y":160,"wires":[["7026e0cc.4e3c3"]]},{"id":"7026e0cc.4e3c3","type":"delay","z":"82a01f29.86de","name":"","pauseType":"rate","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":490,"y":160,"wires":[["9a7f6539.6e36d8"]]},{"id":"40f8c766.6ed198","type":"comment","z":"82a01f29.86de","name":"↓ send sequence: 0-49","info":"","x":340,"y":120,"wires":[]}]

View File

@@ -0,0 +1 @@
[{"id":"845b226d.a4b18","type":"tab","label":"Example: Concatenate Mode","disabled":false,"info":"*Concatenate mode* of batch node can be used to combine input message sequences to create a new message sequence. Order of the sequences can be specified using message topic assigned to each message in a sequence. Message sequence can be specified multiple times.\n"},{"id":"72afe7b0.38b9d8","type":"inject","z":"845b226d.a4b18","name":"","topic":"SEQ","payload":"[1,2,3,4,5]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":100,"wires":[["6dea90dd.c442c"]]},{"id":"6dea90dd.c442c","type":"split","z":"845b226d.a4b18","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":330,"y":100,"wires":[["3ac93a4b.ddbbc6"]]},{"id":"3ac93a4b.ddbbc6","type":"batch","z":"845b226d.a4b18","name":"","mode":"concat","count":10,"overlap":0,"interval":10,"allowEmptySequence":false,"topics":[{"topic":"SEQ"},{"topic":"SEQ"}],"x":470,"y":100,"wires":[["48ec7040.56f5f"]]},{"id":"48ec7040.56f5f","type":"join","z":"845b226d.a4b18","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":610,"y":100,"wires":[["902613c4.769b5"]]},{"id":"902613c4.769b5","type":"debug","z":"845b226d.a4b18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":770,"y":100,"wires":[]},{"id":"a84cf2e1.65adc","type":"comment","z":"845b226d.a4b18","name":"Duplicate","info":"","x":100,"y":60,"wires":[]},{"id":"3256f015.45c36","type":"inject","z":"845b226d.a4b18","name":"","topic":"SEQ","payload":"[1,-6,-8,7,2,-3]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":160,"y":220,"wires":[["c308dcb2.621da"]]},{"id":"c308dcb2.621da","type":"split","z":"845b226d.a4b18","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":330,"y":220,"wires":[["2222098b.7fd036"]]},{"id":"247a5fab.239cc","type":"comment","z":"845b226d.a4b18","name":"Filter & Concat","info":"","x":120,"y":180,"wires":[]},{"id":"2222098b.7fd036","type":"switch","z":"845b226d.a4b18","name":"","property":"payload","propertyType":"msg","rules":[{"t":"gt","v":"0","vt":"num"},{"t":"else"}],"checkall":"true","repair":true,"outputs":2,"x":390,"y":280,"wires":[["56e3a974.2bfde8"],["86a1b43a.ff4cb8"]]},{"id":"cd00a796.e4e478","type":"comment","z":"845b226d.a4b18","name":"↑ Duplicate SEQ","info":"","x":500,"y":140,"wires":[]},{"id":"56e3a974.2bfde8","type":"change","z":"845b226d.a4b18","name":"Topic←POS","rules":[{"t":"set","p":"topic","pt":"msg","to":"POS","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":240,"wires":[["fe90d65d.a6b548"]]},{"id":"86a1b43a.ff4cb8","type":"change","z":"845b226d.a4b18","name":"Topic←NEG","rules":[{"t":"set","p":"topic","pt":"msg","to":"NEG","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":300,"wires":[["fe90d65d.a6b548"]]},{"id":"fe90d65d.a6b548","type":"batch","z":"845b226d.a4b18","name":"","mode":"concat","count":10,"overlap":0,"interval":10,"allowEmptySequence":false,"topics":[{"topic":"NEG"},{"topic":"POS"}],"x":710,"y":280,"wires":[["5b089f16.62b96"]]},{"id":"2f46c0af.bff71","type":"debug","z":"845b226d.a4b18","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":930,"y":220,"wires":[]},{"id":"5b089f16.62b96","type":"join","z":"845b226d.a4b18","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":"false","timeout":"","count":"","reduceRight":false,"x":770,"y":220,"wires":[["2f46c0af.bff71"]]},{"id":"e069eb28.6eb358","type":"comment","z":"845b226d.a4b18","name":"↑ Order sequence: negative→positive","info":"","x":810,"y":320,"wires":[]},{"id":"aeae162b.efd118","type":"comment","z":"845b226d.a4b18","name":"Filter pos/neg and make separate sequence↑ (but not a simple sort) ","info":"","x":320,"y":340,"wires":[]}]

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="inject">
<script type="text/html" data-help-name="inject">
<p> Injiziert eine Nachricht manuell oder in regelmäßigen Intervallen in einen Nachrichtenflow.
Bei den Nutzdaten kann es sich um eine Vielzahl von Typen handeln, einschließlich Zeichenfolgen, JavaScript-Objekte oder die aktuelle Zeit. </p>
<h3> Ausgaben </h3>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="debug">
<script type="text/html" data-help-name="debug">
<p> Zeigt die ausgewählten Nachrichteneigenschaften auf der Registerkarte "Debug" und
optional im Laufzeitprotokoll an. Standardmäßig wird <code>msg.payload</code> angezeigt. </p>
<h3> Details </h3>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="catch">
<script type="text/html" data-help-name="catch">
<p> Fängt Fehler von Nodes auf derselben Registerkarte ab. </p>
<h3> Ausgaben </h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="status">
<script type="text/html" data-help-name="status">
<p> Berichtet Statusnachrichten von anderen Node auf derselben Registerkarte. </p>
<h3> Ausgaben </h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="link in">
<script type="text/html" data-help-name="link in">
<p> Erstellt virtuelle Verbindungen zwischen Flows. </p>
<h3> Details </h3>
<p> Der Node kann mit jedem beliebigen <code>Link-out</code> Node auf einer beliebigen Registerkarte verbunden werden.
@@ -25,7 +25,7 @@
<p> <b> Hinweis: </b> Links können nicht in einem Subflow erstellt oder aus einem Subflow heraus erstellt werden. </p>
</script>
<script type="text/x-red" data-help-name="link out">
<script type="text/html" data-help-name="link out">
<p> Erstellt virtuelle Verbindungen zwischen Flows. </p>
<h3> Details </h3>
<p> Der Node kann mit jedem beliebigen <code>Link-out</code> Node auf einer beliebigen Registerkarte verbunden werden.

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="comment">
<script type="text/html" data-help-name="comment">
<p>Ein Node, der zur Kommentierung der Flows verwendet werden kann.</p>
<h3>Details</h3>
<p>Das Textfeld des Node akzeptiert die Markdown Syntax. Der eingegebene Text wird dann in diesem Informations Panel angezeigt.

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="unknown">
<script type="text/html" data-help-name="unknown">
<p>Dieser Node ist von einem Typ, der in der aktuellen Node-RED Installation unbekannt ist.</p>
<h3>Details</h3>
<p><i>Wenn der Flow im aktuellen Zustand eingesetzt wird, bleibt die Konfiguration erhalten

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="function">
<script type="text/html" data-help-name="function">
<p> Ein JavaScript-Funktionsblock, der für die Nachrichten ausgeführt werden soll, die vom Node empfangen werden. </p>
<p> Die Nachrichten werden als JavaScript-Objekt mit dem Namen <code>msg</code> übergeben. </p>
<p> Er erwartet eine Eigenschaft <code> msg.payload </code> , die den Hauptteil der Nachricht enthält. </p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="switch">
<script type="text/html" data-help-name="switch">
<p>Weiterleitung von Nachrichten basierend auf den Werten ihrer Eigenschaften oder der Position der Sequenz.</p>
<h3>Details</h3>
<p>Wenn eine Nachricht ankommt, wertet der Node jede der definierten Regeln aus

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="change">
<script type="text/html" data-help-name="change">
<p>Setzen, Ändern, Löschen oder Verschieben von Eigenschaften einer Nachricht, eines Flow-Kontextes oder eines globalen Kontextes.</p>
<p>Der Node kann mehrere Regeln angeben, die in der Reihenfolge ihrer Definition angewendet werden.</p>
<h3>Details</h3>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="range">
<script type="text/html" data-help-name="range">
<p>Ordnet einen numerischen Wert einem anderen Bereich zu..</p>
<h3>Eingaben</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="template">
<script type="text/html" data-help-name="template">
<p> Legt eine Eigenschaft fest, die auf der bereitgestellten Vorlage basiert. </p>
<h3> Eingaben </h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="delay">
<script type="text/html" data-help-name="delay">
<p> Verzögert jede Nachricht, die den Node durchläuft oder begrenzt die Geschwindigkeit, mit der sie übergeben werden können. </p>
<h3> Eingaben </h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="trigger">
<script type="text/html" data-help-name="trigger">
<p> Wenn der Trigger ausgelöst wird, kann eine Nachricht gesendet werden und dann optional eine weitere Nachricht ,
sofern der Trigger nicht verlängert oder zurückgesetzt wird. </p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="exec">
<script type="text/html" data-help-name="exec">
<p> Führt einen Systembefehl aus und gibt seine Ausgabe zurück. </p>
<p> Der Node kann so konfiguriert werden, dass er entweder wartet, bis der Befehl abgeschlossen ist,
oder die Ausgabe so sendet wie der Befehl sie generiert. </p>

View File

@@ -397,7 +397,7 @@
"message" : "gesamte Nachricht",
"tip" : {
"path1" : "Standardmäßig enthält <code> Nutzdaten </code> die Daten, die über einen Websocket gesendet oder von einem Websocket empfangen werden. Der Listener kann so konfiguriert werden, dass er das gesamte Nachrichtenobjekt als eine JSON-formatierte Zeichenfolge sendet oder empfängt.",
"path2" : "Dieser Pfad ist relativ zu ",
"path2" : "Dieser Pfad ist relativ zu <code>__path__</code>.",
"url1" : "URL sollte ws: &#47; & #47; oder wss: &#47; & #47; Schema verwenden und auf einen vorhandenen Websocket-Listener verweisen.",
"url2" : "Standardmäßig enthält <code> Nutzdaten </code> die Daten, die über einen Websocket gesendet oder von einem Websocket empfangen werden. Der Client kann so konfiguriert werden, dass er das gesamte Nachrichtenobjekt als eine JSON-formatierte Zeichenfolge sendet oder empfängt."
},

View File

@@ -14,6 +14,6 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="tls-config">
<script type="text/html" data-help-name="tls-config">
<p>Konfigurationsoptionen für TLS Verbindungen.</p>
</script>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="http proxy">
<script type="text/html" data-help-name="http proxy">
<p>Konfigurationsoptionen für den HTTP Proxy.</p>
<h3>Details</h3>

View File

@@ -11,7 +11,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="mqtt in">
<script type="text/html" data-help-name="mqtt in">
<p> Stellt eine Verbindung zu einem MQTT-Broker her und subskribiert Nachrichten zu dem angegebenen Topic. </p>
<h3> Ausgaben </h3>
<dl class="message-properties">
@@ -31,7 +31,7 @@
<p> Mehrere MQTT-Nodes (in oder out) können bei Bedarf dieselbe Brokerverbindung nutzen. </p>
</script>
<script type="text/x-red" data-help-name="mqtt out">
<script type="text/html" data-help-name="mqtt out">
<p>Stellt eine Verbindung zu einem MQTT-Broker her und publiziert Nachrichten.</p>
<h3>Eingaben</h3>
<dl class="message-properties">
@@ -61,7 +61,7 @@
<p>Mehrere MQTT-Nodes (in oder out) können bei Bedarf dieselbe Brokerverbindung nutzen.</p>
</script>
<script type="text/x-red" data-help-name="mqtt-broker">
<script type="text/html" data-help-name="mqtt-broker">
<p> Konfiguration für eine Verbindung zu einem MQTT-Broker. </p>
<p> Diese Konfiguration erstellt eine Verbindung zu einem Broker, die anschließend von den
Nodes <code>MQTT In</code> und <code>MQTT Out</code> verwendet werden. </p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="http in">
<script type="text/html" data-help-name="http in">
<p>Erstellt einen HTTP Endpunkt zur Erzeugung von Web Services.</p>
<h3>Outputs</h3>
<dl class="message-properties">
@@ -53,7 +53,7 @@
muss einen code>HTTP Response</code> Node enthalten, um die Anforderung abzuschließen. </p>
</script>
<script type="text/x-red" data-help-name="http response">
<script type="text/html" data-help-name="http response">
<p>Sendet Antworten auf Anforderungen, die von einem code>HTTP In</code> Node empfangen wurden. </p>
<h3>Eingaben</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="http request">
<script type="text/html" data-help-name="http request">
<p>Sendet HTTP-Anforderungen und gibt die Antwort zurück.</p>
<h3>Eingaben</h3>

View File

@@ -14,53 +14,29 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="websocket in">
<script type="text/html" data-help-name="websocket in">
<p>WebSocket Eingangs-Node.</p>
<p>Standardmäßig befinden sich die vom WebSocket empfangenen Daten in <code>msg.payload</code>.
Der Socket kann konfiguriert werden, um einen korrekt gebildeten JSON-String zu erwarten,
in diesem Fall wird er das JSON analysieren und das resultierende Objekt als gesamte Nachricht senden.</p>
</script>
<script type="text/x-red" data-help-name="websocket out">
<script type="text/html" data-help-name="websocket out">
<p>WebSocket Ausgabe-Node.</p>
<p>Standardmäßig wird <code>msg.payload</code> über den WebSocket gesendet.
<p>Standardmäßig wird <code>msg.payload</code> über den WebSocket gesendet.
Der Socket kann so konfiguriert werden, dass er das gesamte <code>msg</code> Objekt als JSON-String kodiert und über den WebSocket sendet.</p>
<p>Wenn die an diesem Node ankommende Nachricht an einem WebSocket-Eingangs-Node begann,
wird die Nachricht an den Client zurückgesendet, der den Flow ausgelöst hat.
wird die Nachricht an den Client zurückgesendet, der den Flow ausgelöst hat.
Andernfalls wird die Nachricht an alle verbundenen Clients gesendet..</p>
<p>Wenn eine Nachricht, die an einem WebSocket-Eingangsnoten gestartet wurde, an alle verbunden Clients gesendet werden soll,
<p>Wenn eine Nachricht, die an einem WebSocket-Eingangsnoten gestartet wurde, an alle verbunden Clients gesendet werden soll,
muss die Eigenschaft <code>msg._session</code> innerhalb des Flow gelöscht werden.</p>
</script>
<script type="text/x-red" data-help-name="websocket-listener">
<script type="text/html" data-help-name="websocket-listener">
<p>Dieser Konfigurations-Node erstellt einen WebSocket Server-Endpunkt unter Verwendung des angegebenen Pfades.</p>
</script>
<!-- WebSocket Client configuration node -->
<script type="text/x-red" data-template-name="websocket-client">
<div class="form-row">
<label for="node-config-input-path"><i class="fa fa-bookmark"></i> <span data-i18n="websocket.label.url"></span></label>
<input id="node-config-input-path" type="text" placeholder="ws://example.com/ws">
</div>
<div class="form-row node-config-row-tls hide">
<label for="node-config-input-tls" data-i18n="httpin.tls-config"></label>
<input type="text" id="node-config-input-tls">
</div>
<div class="form-row">
<label for="node-config-input-wholemsg" data-i18n="websocket.sendrec"></label>
<select type="text" id="node-config-input-wholemsg" style="width: 70%;">
<option value="false" data-i18n="websocket.payload"></option>
<option value="true" data-i18n="websocket.message"></option>
</select>
</div>
<div class="form-tips">
<p><span data-i18n="[html]websocket.tip.url1"></span></p>
<span data-i18n="[html]websocket.tip.url2"></span>
</div>
</script>
<script type="text/x-red" data-help-name="websocket-client">
<script type="text/html" data-help-name="websocket-client">
<p>Dieser Konfigurations-Node verbindet einen WebSocket-Client mit der angegebenen URL.</p>
</script>

View File

@@ -14,13 +14,13 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="tcp in">
<script type="text/html" data-help-name="tcp in">
<p>Bietet eine Auswahl an TCP-Eingängen. Kann sich entweder mit einem entfernten TCP-Port verbinden oder eingehende Verbindungen akzeptieren.</p>
<p><b>Note: </b>Auf einigen Systemen benötigen Sie möglicherweise Root- oder Administratorzugriff, um
Ports unter 1024 und/oder Broadcast nutzen zu können.</p>
</script>
<script type="text/x-red" data-help-name="tcp out">
<script type="text/html" data-help-name="tcp out">
<p>Bietet eine Auswahl an TCP-Ausgängen. Kann sich entweder mit einem entfernten TCP-Port verbinden,
eingehende Verbindungen akzeptieren oder auf Nachrichten antworten, die von einem TCP-In-Node empfangen werden.</p>
<p>Nur der Inhalt von <code>msg.payload</code> wird gesendet.</p>
@@ -32,7 +32,7 @@
Ports unter 1024 und/oder Broadcast nutzen zu können.</p>
</script>
<script type="text/x-red" data-help-name="tcp request">
<script type="text/html" data-help-name="tcp request">
<p>Ein einfacher TCP-Anforderungs-Node - sendet die <code>msg.payload</code> an einen Server-TCP-Port und erwartet eine Antwort.</p>
<p>Verbindet sich, sendet die "Anforderung" und liest die "Antwort". Der Node wartet entweder auf eine vorgegebene Anzahl von
Zeichen in einen festen Buffer, auf ein bestimmtes Zeichen oder einen festen Timeout ab der ersten Antwort,

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="udp in">
<script type="text/html" data-help-name="udp in">
<p>Ein UDP-Eingangs-Node, der eine <code>msg.payload</code> erzeugt, die einen
Buffer, Strings oder base64-kodierter String enthält. Multicast wird unterstützt.</p>
<p>Über die Eigenschaften <code>msg.ip</code> und <code>msg.port</code> kann auf die Werte der
@@ -23,7 +23,7 @@
Ports unter 1024 und/oder Broadcast nutzen zu können.</p>
</script>
<script type="text/x-red" data-help-name="udp out">
<script type="text/html" data-help-name="udp out">
<p>Dieser Node sendet <code>msg.payload</code> an den angegebenen UDP-Host und Port. Multicast wird unterstützt.</p>
<p>Sie können <code>msg.ip</code> und <code>msg.port</code> verwenden, um die Zielwerte festzulegen,
aber die statisch im Node konfigurierten Werte haben Vorrang.</p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="csv">
<script type="text/html" data-help-name="csv">
<p>Konvertiert zwischen einem CSV-formatierten String und ihrer JavaScript-Objektdarstellung in beide Richtungen.</p>
<h3>Eingaben</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="html">
<script type="text/html" data-help-name="html">
<p>Extrahiert unter Verwendung eines CSS-Selektors Elemente aus einem HTML-Dokument, das sich in <code>msg.payload</code> befindet.</p>
<h3>Eingaben</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="json">
<script type="text/html" data-help-name="json">
<p>Konvertiert zwischen einem JSON-String und seiner JavaScript-Objektdarstellung in beide Richtungen.</p>
<h3>Eingaben</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="xml">
<script type="text/html" data-help-name="xml">
<p>Konvertiert zwischen einem XML-String und seiner JavaScript-Objektdarstellung - in beiden Richtungen.</p>
<h3>Eingaben</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="yaml">
<script type="text/html" data-help-name="yaml">
<p>Konvertiert zwischen einer YAML-formatierten String und ihrer JavaScript-Objektdarstellung in beide Richtungen.</p>
<h3>Eingaben</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="split">
<script type="text/html" data-help-name="split">
<p>Teilt eine Nachricht in eine Folge von Nachrichten auf.</p>
<h3>Eingaben</h3>
@@ -62,7 +62,7 @@
Das bedeutet, dass er nicht mit dem <b>join</b> Node im Automatikmodus verwendet werden kann.</p>
</script>
<script type="text/x-red" data-help-name="join">
<script type="text/html" data-help-name="join">
<p>Verbindet Sequenzen von Nachrichten zu einer einzigen Nachricht.</p>
<p>Es sind drei Modi verfügbar:</p>
<dl>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="sort">
<script type="text/html" data-help-name="sort">
<p>Eine Funktion, die die Nachrichteneigenschaft oder eine Folge von Nachrichten sortiert.</p>
<p>Wenn der Node konfiguriert ist, um die Nachrichteneigenschaft zu sortieren,
sortiert er Array-Daten, auf die von der angegebenen Nachrichteneigenschaft verwiesen wird.</p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="batch">
<script type="text/html" data-help-name="batch">
<p>Erstellt Sequenzen von Nachrichten nach verschiedenen Regeln.</p>
<h3>Details</h3>
<p>Es gibt drei Modi für die Erstellung von Nachrichtensequenzen:</p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="file">
<script type="text/html" data-help-name="file">
<p>Schreibt <code>msg.payload</code> in eine Datei, wobei entweder der vorhandene Inhalt hinzugefügt oder ersetzt wird.
Alternativ kann die Datei auch gelöscht werden.</p>
<h3>Eingaben</h3>
@@ -34,7 +34,7 @@
<p>Alternativ kann dieser Node konfiguriert werden, um die Datei zu löschen.</p>
</script>
<script type="text/x-red" data-help-name="file in">
<script type="text/html" data-help-name="file in">
<p>Reads the contents of a file as either a string or binary buffer.</p>
<h3>Inputs</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="watch">
<script type="text/html" data-help-name="watch">
<p>Überwacht ein Verzeichnis oder eine Datei auf Änderungen.</p>
<p>Es kann eine kommagetrennte Liste von Verzeichnissen und/oder Dateien eingeben werden.
Es müssen Anführungszeichen "...." um alle Einträge gesetzt werden, die Leerzeichen enthalten.</p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="inject">
<script type="text/html" data-help-name="inject">
<p>Injects a message into a flow either manually or at regular intervals. The message
payload can be a variety of types, including strings, JavaScript objects or the current time.</p>
<h3>Outputs</h3>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="debug">
<script type="text/html" data-help-name="debug">
<p>Displays selected message properties in the debug sidebar tab and optionally the runtime log. By default it displays <code>msg.payload</code>, but can be configured to display any property, the full message or the result of a JSONata expression.</p>
<h3>Details</h3>
<p>The debug sidebar provides a structured view of the messages it is sent, making it easier to understand their structure.</p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="complete">
<script type="text/html" data-help-name="complete">
<p>Trigger a flow when another node completes its handling of a message.</p>
<h3>Details</h3>
<p>If a node tells the runtime when it has finished handling a message,

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="catch">
<script type="text/html" data-help-name="catch">
<p>Catch errors thrown by nodes on the same tab.</p>
<h3>Outputs</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="status">
<script type="text/html" data-help-name="status">
<p>Report status messages from other nodes on the same tab.</p>
<h3>Outputs</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="link in">
<script type="text/html" data-help-name="link in">
<p>Create virtual wires between flows.</p>
<h3>Details</h3>
<p>The node can be connected to any <code>link out</code> node that exists on any tab.
@@ -25,7 +25,7 @@
<p><b>Note: </b>Links cannot be created going into, or out of, a subflow.</p>
</script>
<script type="text/x-red" data-help-name="link out">
<script type="text/html" data-help-name="link out">
<p>Create virtual wires between flows.</p>
<h3>Details</h3>
<p>The node can be connected to any <code>link in</code> node that exists on any tab.

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="comment">
<script type="text/html" data-help-name="comment">
<p>A node you can use to add comments to your flows.</p>
<h3>Details</h3>
<p>The edit panel will accept Markdown syntax. The text will be rendered into

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="unknown">
<script type="text/html" data-help-name="unknown">
<p>This node is a type unknown to your installation of Node-RED.</p>
<h3>Details</h3>
<p><i>If you deploy with the node in this state, its configuration will be preserved, but

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="function">
<script type="text/html" data-help-name="function">
<p>A JavaScript function block to run against the messages being received by the node.</p>
<p>The messages are passed in as a JavaScript object called <code>msg</code>.</p>
<p>By convention it will have a <code>msg.payload</code> property containing

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="switch">
<script type="text/html" data-help-name="switch">
<p>Route messages based on their property values or sequence position.</p>
<h3>Details</h3>
<p>When a message arrives, the node will evaluate each of the defined rules

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="change">
<script type="text/html" data-help-name="change">
<p>Set, change, delete or move properties of a message, flow context or global context.</p>
<p>The node can specify multiple rules that will be applied in the order they are defined.</p>
<h3>Details</h3>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="range">
<script type="text/html" data-help-name="range">
<p>Maps a numeric value to a different range.</p>
<h3>Inputs</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="template">
<script type="text/html" data-help-name="template">
<p>Sets a property based on the provided template.</p>
<h3>Inputs</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="delay">
<script type="text/html" data-help-name="delay">
<p>Delays each message passing through the node or limits the rate at which they can pass.</p>
<h3>Inputs</h3>
<dl class="message-properties">

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="exec">
<script type="text/html" data-help-name="exec">
<p>Runs a system command and returns its output.</p>
<p>The node can be configured to either wait until the command completes, or to
send its output as the command generates it.</p>

View File

@@ -456,7 +456,7 @@
"message": "entire message",
"tip": {
"path1": "By default, <code>payload</code> will contain the data to be sent over, or received from a websocket. The listener can be configured to send or receive the entire message object as a JSON formatted string.",
"path2": "This path will be relative to ",
"path2": "This path will be relative to <code>__path__</code>.",
"url1": "URL should use ws:&#47;&#47; or wss:&#47;&#47; scheme and point to an existing websocket listener.",
"url2": "By default, <code>payload</code> will contain the data to be sent over, or received from a websocket. The client can be configured to send or receive the entire message object as a JSON formatted string."
},
@@ -699,7 +699,9 @@
"output": "Output",
"includerow": "include column name row",
"newline": "Newline",
"usestrings": "parse numerical values"
"usestrings": "parse numerical values",
"include_empty_strings": "include empty strings",
"include_null_values": "include null values"
},
"placeholder": {
"columns": "comma-separated column names"
@@ -722,6 +724,11 @@
"mac": "Mac (\\r)",
"windows": "Windows (\\r\\n)"
},
"hdrout": {
"none": "never send column headers",
"all": "always send column headers",
"once": "send headers once, until msg.reset"
},
"errors": {
"csv_js": "This node only handles CSV strings or js objects.",
"obj_csv": "No columns template specified for object -> CSV."
@@ -895,7 +902,8 @@
"fixup": "Fix-up exp"
},
"errors": {
"invalid-expr": "Invalid JSONata expression: __error__"
"invalid-expr": "Invalid JSONata expression: __error__",
"invalid-type": "Cannot join __error__ to buffer"
}
},
"sort" : {

View File

@@ -14,6 +14,6 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="tls-config">
<script type="text/html" data-help-name="tls-config">
<p>Configuration options for TLS connections.</p>
</script>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="http proxy">
<script type="text/html" data-help-name="http proxy">
<p>Configuration options for HTTP proxy.</p>
<h3>Details</h3>

View File

@@ -11,7 +11,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="mqtt in">
<script type="text/html" data-help-name="mqtt in">
<p>Connects to a MQTT broker and subscribes to messages from the specified topic.</p>
<h3>Outputs</h3>
<dl class="message-properties">
@@ -31,7 +31,7 @@
<p>Several MQTT nodes (in or out) can share the same broker connection if required.</p>
</script>
<script type="text/x-red" data-help-name="mqtt out">
<script type="text/html" data-help-name="mqtt out">
<p>Connects to a MQTT broker and publishes messages.</p>
<h3>Inputs</h3>
<dl class="message-properties">
@@ -60,7 +60,7 @@
<p>Several MQTT nodes (in or out) can share the same broker connection if required.</p>
</script>
<script type="text/x-red" data-help-name="mqtt-broker">
<script type="text/html" data-help-name="mqtt-broker">
<p>Configuration for a connection to an MQTT broker.</p>
<p>This configuration will create a single connection to the broker which can
then be reused by <code>MQTT In</code> and <code>MQTT Out</code> nodes.</p>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="http in">
<script type="text/html" data-help-name="http in">
<p>Creates an HTTP end-point for creating web services.</p>
<h3>Outputs</h3>
<dl class="message-properties">
@@ -54,7 +54,7 @@
must include an HTTP Response node to complete the request.</p>
</script>
<script type="text/x-red" data-help-name="http response">
<script type="text/html" data-help-name="http response">
<p>Sends responses back to requests received from an HTTP Input node.</p>
<h3>Inputs</h3>

View File

@@ -14,7 +14,7 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="http request">
<script type="text/html" data-help-name="http request">
<p>Sends HTTP requests and returns the response.</p>
<h3>Inputs</h3>

View File

@@ -14,14 +14,14 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="websocket in">
<script type="text/html" data-help-name="websocket in">
<p>WebSocket input node.</p>
<p>By default, the data received from the WebSocket will be in <code>msg.payload</code>.
The socket can be configured to expect a properly formed JSON string, in which
case it will parse the JSON and send on the resulting object as the entire message.</p>
</script>
<script type="text/x-red" data-help-name="websocket out">
<script type="text/html" data-help-name="websocket out">
<p>WebSocket out node.</p>
<p>By default, <code>msg.payload</code> will be sent over the WebSocket. The socket
can be configured to encode the entire <code>msg</code> object as a JSON string and send that
@@ -34,10 +34,10 @@
should delete the <code>msg._session</code> property within the flow.</p>
</script>
<script type="text/x-red" data-help-name="websocket-listener">
<script type="text/html" data-help-name="websocket-listener">
<p>This configuration node creates a WebSocket Server endpoint using the specified path.</p>
</script>
<script type="text/x-red" data-help-name="websocket-client">
<script type="text/html" data-help-name="websocket-client">
<p>This configuration node connects a WebSocket client to the specified URL.</p>
</script>

View File

@@ -14,14 +14,14 @@
limitations under the License.
-->
<script type="text/x-red" data-help-name="tcp in">
<script type="text/html" data-help-name="tcp in">
<p>Provides a choice of TCP inputs. Can either connect to a remote TCP port,
or accept incoming connections.</p>
<p><b>Note: </b>On some systems you may need root or administrator access
to access ports below 1024.</p>
</script>
<script type="text/x-red" data-help-name="tcp out">
<script type="text/html" data-help-name="tcp out">
<p>Provides a choice of TCP outputs. Can either connect to a remote TCP port,
accept incoming connections, or reply to messages received from a TCP In node.</p>
<p>Only the <code>msg.payload</code> is sent.</p>
@@ -34,12 +34,12 @@
to access ports below 1024.</p>
</script>
<script type="text/x-red" data-help-name="tcp request">
<script type="text/html" data-help-name="tcp request">
<p>A simple TCP request node - sends the <code>msg.payload</code> to a server tcp port and expects a response.</p>
<p>Connects, sends the "request", and reads the "response". It can either count a number of
returned characters into a fixed buffer, match a specified character before returning,
wait a fixed timeout from first reply and then return, sit and wait for data, or send then close the connection
immediately, without waiting for a reply.</p>
<p>The response will be output in <code>msg.payload</code> as a buffer, so you may want to .toString() it.</p>
<p>If you leave tcp host or port blank they must be set by using the <code>msg.host</code> and <code>msg.port</code> properties.</p>
<p>If you leave tcp host or port blank they must be set by using the <code>msg.host</code> and <code>msg.port</code> properties in every message sent to the node.</p>
</script>

Some files were not shown because too many files have changed in this diff Show More