@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.
65 lines (58 loc) • 2.35 kB
HTML
<!--
Copyright (c) 2025 Parallax AV Design Inc.
All rights reserved.
This software is licensed, not sold. You may not copy, modify, merge,
publish, distribute, sublicense, or sell copies of this file or substantial
portions of it except as expressly permitted by the LICENSE file included
with this package. Use is restricted to building manifests for the
Parallax Control Node-RED nodes. See LICENSE for details.
-->
<script type="text/javascript">
RED.nodes.registerType('input-select', {
category: 'parallax',
color: '#C0C0C0',
defaults: {
name: {value: ""},
input: {value: "", required: true, validate: RED.validators.regex(/^(?!0+$)\d+$/), options: [1, 2, 3, 4, 5]}
},
inputs: 1,
outputs: 1,
llmNotes: `
Purpose:
- Selects a specific virtual input on the downstream node.
Inputs:
- Accepts msg.payload
- Required fields: Input (1-based index), Value (int).
Outputs:
- Number of outputs: 1.
Usage Rules:
- This node selects a "Virtual Input" for the downstream node. For example, if you want to select the second virtual input on the relay node, you would set the Input field to 2.
`,
icon: "font-awesome/fa-arrows-v",
label: function() {
return this.name || "input-select";
},
labelStyle: function() {
return this.name ? "node_label_italic" : "";
}
});
</script>
<script type="text/html" data-template-name="input-select">
<!-- name -->
<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>
<!-- input number -->
<div class="form-row">
<label for="node-input-input"><i class="icon-tag"></i> Input</label>
<input type="number" id="node-input-input" placeholder="Enter the 1-based input to select">
</div>
<small id="inputHelpBlock" class="form-text text-muted">
Please enter a number greater than 0. Do not include letters or special characters.<br>
</small>
</script>
<script type="text/html" data-help-name="input-select">
<p>Helper Node: This node selects an input for selection on the next logic node.</p>
<p>[Expected: User-defined Input (1-based index number)]</p>
</script>