UNPKG

node-red-contrib-uhppoted

Version:

A set of nodes for the UHPPOTE Wiegand Access Controller

108 lines (100 loc) 4.39 kB
<script type="text/html" data-template-name="uhppoted-set-listener"> <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-topic"><i class="fa fa-tag"></i>Topic</label> <input type="text" id="node-input-topic" placeholder="Message topic" /> </div> <div class="form-row"> <label for="node-input-config"><i class="fa fa-tag"></i>Configuration</label> <input id="node-input-config" /> </div> </script> <script type="text/html" data-help-name="uhppoted-set-listener"> <p>Sets IPv4 'listen' address and port to which events should be sent.</p> <h3>Inputs</h3> <dl class="message-properties"> <dt>payload<span class="property-type">object</span></dt> <dd>JSON object with the controller ID, listener address:port and auto-send interval for 'set-listener'</dd> <dt class="optional">topic<span class="property-type">string</span></dt> <dd>identifying message topic for output</dd> </dl> <h3>Outputs</h3> <dl class="message-properties"> <dt>payload<span class="property-type">object</span></dt> <dd>JSON object with the updated controller listener IP address:port and auto-send interval</dd> <dt>topic<span class="property-type">string</span></dt> <dd>message topic copied from input</dd> </dl> <h3>Details</h3> <p>The input <code>msg.payload</code> is a JSON object identifying the destination controller, the event listener host IPv4 address and port and the auto-send interval.</p> <p>The controller is identified by specifying either the (legacy) 'deviceId' or the composite 'controller' object which supports both UDP and TCP connections. Defaults to broadcast UDP if the address or protocol are not valid.</p> <p>The auto-send interval is the interval (0-255, in seconds) at which the controller sends the current controller status and most recent event. Events are always sent on occurrence and a zero interval disables auto-send.</p> <dl class="message-properties"> <dt>deviceId<span class="property-type">uint32</span></dt> <dd>controller serial number</dd> <dt>controller.id<span class="property-type">uint32</span></dt> <dd>controller serial number</dd> <dt>controller.address<span class="property-type">string</span></dt> <dd>controller IPv4 address</dd> <dt>controller.protocol<span class="property-type">string</span></dt> <dd>controller connection protocol ('udp' or 'tcp')</dd> <dt>address<span class="property-type">string</span></dt> <dd>listener IPv4 address</dd> <dt>port<span class="property-type">uint16</span></dt> <dd>listener UDP port</dd> <dt>interval<span class="property-type">uint8</span></dt> <dd>auto-send interval</dd> </dl> <h4>Example:</h4> <pre> { "deviceId": 405419896, "address": "192.168.1.100", "port": 60001, "interval": 30 }</pre> <pre> { "controller": { "controller": 405419896, "address": "192.168.1.100", "protocol": "tcp" }, "address": "192.168.1.100", "port": 60001, "interval": 30 }</pre> <p>The output <code>msg.payload</code> is a JSON object that echoes the request IPv4 listener address:port and auto-send interval:</p> <dl class="message-properties"> <dt>id<span class="property-type">uint32</span></dt> <dd>controller serial number</dd> <dt>address<span class="property-type">string</span></dt> <dd>listener IPv4 address</d> <dt>port<span class="property-type">uint16</span></dt> <dd>listener port</d> <dt>interval<span class="property-type">uint8</span></dt> <dd>auto-send interval</dd> </dl> <h4>Example:</h4> <pre> { "deviceId": 405419896, "address": "192.168.1.100", "port": 60001 "interval": 30 }</pre> <h3>References</h3> <ul> <li><a href="https://github.com/uhppoted">uhppoted</a>: GitHub umbrella project</li> <li><a href="https://github.com/uhppoted/uhppoted-lib-node-red">uhppoted-lib-node-red</a>: GitHub project</li> </ul> </script>