UNPKG

node-red-contrib-minelert-universal-io

Version:

Node-RED nodes for Universal IO Gateway and I/O Modules

72 lines (62 loc) 2.11 kB
<script type="text/javascript"> RED.nodes.registerType('analog-in', { category: 'Smartlink UIO', color: '#87c2f1', defaults: { name: { value: '' }, gateway: { value:"", type: 'gateway', required: true }, moduleId: { value: '', required: true } }, inputs: 0, outputs: 1, icon: "font-awesome/fa-signal", paletteLabel: "MOD-AI-4", label: function () { return this.name || 'MOD-AI-4'; } }); </script> <script type="text/x-red" data-template-name="analog-in"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" /> </div> <div class="form-row"> <label for="node-input-gateway"><i class="fa fa-random"></i> Gateway</label> <input type="text" id="node-input-gateway" /> </div> <div class="form-row"> <label for="node-input-moduleId"><i class="fa fa-cube"></i> Module ID</label> <input type="text" id="node-input-moduleId" /> </div> </script> <script type="text/x-red" data-help-name="analog-in"> <p> This node receives analog input readings from the SmartLink Universal IO analog input card. </p> <p> You must configure the following: </p> <ul> <li><strong>Gateway Node:</strong> Reference to the gateway connected to the bus.</li> <li><strong>Device Address:</strong> Address of the I/O module.</li> </ul> <p> The node emits a message with the analog value and channel info. <code> { value: 15.4, channel: 0, unit: "mA", } </code> </p> <ul> <li><strong>value:</strong> received analog value</li> <li><strong>channel:</strong> analog intput channel index (0 to 3)</li> <li><strong>unit:</strong> received analog value unit of measure, typically in milliamps</li> </ul> <p> This node assumes the hardware module is properly wired and supports analog input. </p> </script>