node-red-contrib-boolean-logic-ultimate
Version:
A set of Node-RED enhanced boolean logic node, flow interruption node, blinker node, invert node, filter node, with persisten values after reboot and more.
87 lines (77 loc) • 2.65 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('ImpulseUltimate', {
category: 'boolean logic ultimate',
color: '#ff8080',
defaults: {
name: { value: "" },
commandText: { value: "// Open garage door\nsend:true\nwait:1000\nsend:false" },
},
inputs: 1,
outputs: 1,
outputLabels: function (i) {
},
icon: "feed.svg",
label:
function () {
var label = "ImpulseUltimate"
if (this.name !== undefined && this.name.length > 0) {
label = this.name;
}
return label;
},
paletteLabel: function () {
return "Impulse";
},
oneditprepare: function () {
var node = this;
node.editor = RED.editor.createEditor({
id: 'node-input-editorcommandText',
mode: 'ace/mode/text',
value: node.commandText
});
},
oneditsave: function () {
var node = this;
node.commandText = node.editor.getValue();
node.editor.destroy();
delete node.editor;
},
oneditcancel: function () {
var node = this;
node.editor.destroy();
delete node.editor;
},
});
</script>
<script type="text/x-red" data-template-name="ImpulseUltimate">
<div class="form-row">
<b>Impulse Ultimate</b>    <span style="color:red"><i class="fa fa-question-circle"></i> <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate"><u>Help online</u></a></span>
<br/>
<br/>
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<div class="form-row" >
<label style="width:300px;" for="node-input-commandText"><i class="fa fa-tasks"></i> Commands (one command per row)</label>
<div style="height: 250px; min-height:150px;" class="node-text-editor" id="node-input-editorcommandText"></div>
</div>
<div class="form-tips" style="margin-top:11px">
Avaiable commands are: send, wait (in milliseconds), restart (restarts the sequence), //, etc... For example<br/>
// Open garage
send:true<br/>
wait:200<br/>
send:false<br/>
For a complete list of avaiable commands, see the gitHub Homepage.
</div>
</script>
<script type="text/x-red" data-help-name="ImpulseUltimate">
<p>
SEE THE README FOR HELP CONFIGURING THE NODE
</p>
<p>
<a href="https://github.com/Supergiovane/node-red-contrib-boolean-logic-ultimate" target="_blank">Click here to learn how to configure the node.</a>
</p>
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
</script>