UNPKG

@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.

111 lines (101 loc) 3.85 kB
<script type="text/javascript"> RED.nodes.registerType('cm4-pro-serial', { category: 'parallax', color: '#C0C0C0', defaults: { name: { value: "" }, hardware: { value: "CM4-Pro" }, // Default set for example mode: { value: "RS485-1" }, // Default set for example baudrate: { value: "9600" }, // Default set for example databits: { value: "8" }, // Default set for example parity: { value: "N" }, // Default set for example stopbits: { value: "1" } // Default set for example }, inputs: 1, outputs: 1, icon: "font-awesome/fa-arrows-v", label: function() { return this.name || "cm4-pro-serial"; }, labelStyle: function() { return this.name ? "node_label_italic" : ""; } }); </script> <script type="text/html" data-template-name="cm4-pro-serial"> <!-- 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> <!-- Drop Down for Mode Selection --> <div class="form-row"> <label for="node-input-hardware"><i class="icon-tag"></i> Hardware Type</label> <select id="node-input-hardware"> <option value="CM4-Pro">CM4-Pro</option> </select> </div> <!-- Drop Down for Mode Selection --> <div class="form-row"> <label for="node-input-mode"><i class="icon-tag"></i> Mode</label> <select id="node-input-mode"> <option value="RS485-1">RS485-1</option> <option value="RS485-2">RS485-2</option> <option value="RS232-1">RS232-1</option> </select> </div> <!-- Drop Down for Baud Rate Selection --> <div class="form-row"> <label for="node-input-baudrate"><i class="icon-tag"></i> Baud Rate</label> <select id="node-input-baudrate"> <option value="300">300 bps</option> <option value="600">600 bps</option> <option value="1200">1200 bps</option> <option value="2400">2400 bps</option> <option value="4800">4800 bps</option> <option value="9600" selected>9600 bps</option> <option value="19200">19200 bps</option> <option value="38400">38400 bps</option> <option value="57600">57600 bps</option> <option value="115200">115200 bps</option> <option value="230400">230400 bps</option> <option value="460800">460800 bps</option> <option value="921600">921600 bps</option> </select> </div> <!-- Drop Down for Data Bits Selection --> <div class="form-row"> <label for="node-input-databits"><i class="icon-tag"></i> Data Bits</label> <select id="node-input-databits"> <option value="5">5 bits</option> <option value="6">6 bits</option> <option value="7">7 bits</option> <option value="8" selected>8 bits</option> </select> </div> <!-- Drop Down for Parity Selection --> <div class="form-row"> <label for="node-input-parity"><i class="icon-tag"></i> Parity</label> <select id="node-input-parity"> <option value="N">None</option> <option value="O">Odd</option> <option value="E">Even</option> </select> </div> <!-- Drop Down for Stop Bits Selection --> <div class="form-row"> <label for="node-input-stopbits"><i class="icon-tag"></i> Stop Bits</label> <select id="node-input-stopbits"> <option value="1">1 bit</option> <option value="2">2 bits</option> </select> </div> <div> <small> <p>Expects: JSON Object, i.e.: {"Value":"hello world"} </p> </small> </div> </script> <script type="text/html" data-help-name="cm4-pro-serial"> <p>Expects: JSON Object, i.e.: {"Value":"hello world"} </p> </script>