UNPKG

@halsystems/red-bacnet

Version:
106 lines (91 loc) 5.03 kB
<script type="text/javascript"> RED.nodes.registerType('read point', { category: 'redbacnet', color: '#b5e6ff', defaults: { name: { value: "" }, client: { type: "bacnet client", required: true }, readMethod: { value: 1, required: true, validate: RED.validators.number() }, maxConcurrentDeviceRead: { value: 1, required: true, validate: RED.validators.number() }, maxConcurrentSinglePointRead: { value: 10, required: true, validate: RED.validators.number() }, concurrentTaskDelay: { value: 0, required: true, validate: RED.validators.number() }, }, inputs: 1, outputs: 1, icon: "hal-systems.png", label: function () { return this.name || "read point"; } }); </script> <script type="text/html" data-template-name="read point"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> <div class="form-row"> <label for="node-input-client"><i class="fa fa-tag"></i> Client</label> <input type="text" id="node-input-client"> </div> <div class="form-row"> <label for="node-input-readMethod"><i class="fa fa-list"></i> Read Method</label> <select id="node-input-readMethod"> <option value="0">Read Single Only</option> <option value="1">Comprehensive Read</option> </select> </div> <div class="form-row"> <label for="node-input-maxConcurrentDeviceRead"><i class="fa fa-tag"></i> Max Concurrent Device Read</label> <input type="number" id="node-input-maxConcurrentDeviceRead" placeholder="1" , min="1" , max="1000"> </div> <div class="form-row"> <label for="node-input-maxConcurrentSinglePointRead"><i class="fa fa-tag"></i> Max Concurrent Single Point Read</label> <input type="number" id="node-input-maxConcurrentSinglePointRead" placeholder="10" , min="1" , max="1000"> </div> <div class="form-row"> <label for="node-input-concurrentTaskDelay"><i class="fa fa-tag"></i> Concurrent Task Delay (ms)</label> <input type="number" id="node-input-concurrentTaskDelay" placeholder="0" , min="0" , max="10000"> </div> </script> <script type="text/html" data-help-name="read point"> <p>Read BACnet points</p> <h3>Config</h3> <dl class="message-properties"> <dt>client<span class="property-type">string</span></dt> <dd> BACnet Client</dd> <dt>readMethod<span class="property-type">number</span></dt> <dd> <b>Read Single Only</b>: use <code>readProperty</code></dd> <dd> <b>Comprehensive Read</b>: try <code>readPropertyMultiple</code>, reduce query size if failed, and fallback to <code>readProperty</code> if query size reduced to 1</dd> <dt>maxConcurrentDeviceRead<span class="property-type">number</span></dt> <dd> Devices count to discover simultaneously.</dd> <dd> <b> USE WITH CAUTION!</b> Reduce to low value on a slow network</dd> </dd> <dt>maxConcurrentSinglePointRead<span class="property-type">number</span></dt> <dd> Number of points to read simultaneously when using <code>readProperty</code> mode</dd> <dd> <b>USE WITH CAUTION!</b> Reduce to low value if field BACnet device is underpowered</dd> </dd> <dt>concurrentTaskDelay<span class="property-type">number</span></dt> <dd> Delay in milliseconds between reading points from different devices</dd> <dd> <b>USE WITH CAUTION!</b> Increase value on slow or congested networks</dd> </dl> </dl> <h3>Inputs</h3> <dl class="message-properties"> <dt>msg.devices <span class="property-type">array</span></dt> <dd> A list of devices generated from discover device node (modify values if required)</dd> <dt>msg.points <span class="property-type">array</span></dt> <dd> A list of points generated from discover point node (modify values if required)</dd> <dt class="optional">msg.id <span class="property-type">string | number</span></dt> <dd> Job ID. Default to <code>readPoints</code> if not provided.</dd> <dt class="optional">msg.priority <span class="property-type">number</span></dt> <dd> Job priority in queue. Default to <code>2</code> if not provided.</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt>msg.payload <span class="property-type">object</span></dt> <dd>Read points</dd> </dl> <h3>Details</h3> <p>If node is triggered while existing job is running, new job will be coalesced if <code>msg.id</code> are identical, else new job will be put in queue until current job is completed.</p> </script>