@parallaxcontrol/node-red-control
Version:
A comprehensive package of Node-RED nodes designed to seamlessly integrate with the Parallax Control Engine, offering enhanced control capabilities for AV Automation.
50 lines (47 loc) • 1.85 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('message-array', {
category: 'parallax',
color: '#C0C0C0',
defaults: {
name: {value: ""},
arrayType: {value:"", required: true},
joinID: { value: "", required: true }
},
inputs: 1,
outputs: 1,
icon: "font-awesome/fa-arrows-v",
label: function() {
return this.name || "message-array";
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";
}
});
</script>
<script type="text/html" data-template-name="message-array">
<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>
<!-- JoinID -->
<div class="form-row">
<label for="node-input-joinID"><i class="icon-tag"></i> JoinID</label>
<input type="number" id="node-input-joinID" placeholder="Enter the JoinID">
</div>
<!-- Dropdown -->
<div class="form-row">
<label for="node-input-arrayType"><i class="icon-tag"></i> Select Array Data Type</label>
<select id="node-input-arrayType">
<option value="BOOL_ARRAY">Digital</option>
<option value="FLOAT_ARRAY">Analog</option>
<option value="STRING_ARRAY">Serial</option>
</select>
</div>
<small id="inputHelpBlock" class="form-text text-muted">
Sends an Array of Json data to the UI for processing. i.e. {"a":1,"b":2}
</small>
</script>
<script type="text/html" data-help-name="message-array">
<p>Helper Node: This node sends an array of data of the specified type to the UI for processing.</p>
<p>[Expected: msg.payload of type JSON object ie: {"0":14,"1":92} ]</p>
</script>