UNPKG

node-red-contrib-uhppoted

Version:

A set of nodes for the UHPPOTE Wiegand Access Controller

141 lines (136 loc) 5.5 kB
<script type="text/html" data-template-name="uhppoted-listen"> <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-listen"> <p>Listens for events from UHPPOTE controllers.</p> <h3>Outputs</h3> <dl class="message-properties"> <dt>payload<span class="property-type">object</span></dt> <dd>JSON object containing the received event</dd> <dt>topic<span class="property-type">string</span></dt> <dd>message topic from node configuration</dd> </dl> <h3>Details</h3> <p>The output <code>msg.payload</code> is a JSON object containing a single event from a UHPPOTE controller:</p> <dl class="message-properties"> <dt>deviceId<span class="property-type">uint32</span></dt> <dd>controller serial number</dd> <dt>event.index<span class="property-type">uint32</span></dt> <dd>event record number</d> <dt>event.type.code<span class="property-type">uint8</span></dt> <dd>raw event type</dd> <dt>event.type.event<span class="property-type">string</span></dt> <dd>decoded event type</dd> <dt>event.granted<span class="property-type">boolean</span></dt> <dd>access granted/denied</dd> <dt>event.door<span class="property-type">uint8</span></dt> <dd>event door ID for swipe/door events</dd> <dt>event.direction.code<span class="property-type">uint8</span></dt> <dd>event door direction for swipe/door events</dd> <dt>event.direction.direction<span class="property-type">uint8</span></dt> <dd>decoded event door direction for swipe/door events</dd> <dt>event.card<span class="property-type">uint32</span></dt> <dd>card number for swipe/door events</dd> <dt>event.timestamp<span class="property-type">timestamp</span></dt> <dd>event timestamp, formatted as YYYY-mm-dd HH:mm:ss</dd> <dt>event.reason.code<span class="property-type">uint8</span></dt> <dd>raw event reason</dd> <dt>event.reason.reason<span class="property-type">string</span></dt> <dd>decoded event reason</dd> <dt>doors<span class="property-type">boolean array</span></dt> <dd>array of door states (<code>locked/unlocked</code>) corresponding to controller doors 1 to 4</dd> <dt>buttons<span class="property-type">boolean array</span></dt> <dd>array of buttons states (<code>pressed/released</code>) corresponding to the buttons for controller doors 1 to 4</dd> <dt>system.statuse<span class="property-type">uint8</span></dt> <dd>system status code (0: ok, <>0: error)</dd> <dt>system.date<span class="property-type">date</span></dt> <dd>current system date, formatted as YYYY-mm-dd</dd> <dt>system.time<span class="property-type">time</span></dt> <dd>current system time, formatted as HH-mm-ss</dd> <dt>specialInfo<span class="property-type">uint8</span></dt> <dd>Manufacturer specific information message code</dd> <dt>relays.code<span class="property-type">uint8</span></dt> <dd>Bit array corresonding to the door relay state (0: locked, 1: unlocked)</dd> <dt>relays.locked<span class="property-type">uint8 array</span></dt> <dd>Decoded bit array with the door relay state (<code>locked/unlocked</code>) corresponding to controller doors 1 to 4</dd> <dt>inputs.code<span class="property-type">uint8</span></dt> <dd>Bit array corresonding to the inputs state (bit.0: force locked, bit.1: fire alarm)</dd> <dt>inputs.forceLocked<span class="property-type">boolean</span></dt> <dd>Controller is <code>force locked</code>, decoded from bit.0</dd> <dt>inputs.fireAlarm<span class="property-type">boolean</span></dt> <dd>Fire alarm input is set, decoded from bit.1</dd> </dl> <h4>Example:</h4> <pre> { "deviceId": 405419896, "event": { "index": 70, "type": { "code": 1, "event": "card swipe" }, "granted": false, "door": 3, "direction": { "code": 1, "direction": "in" }, "card": 65538, "timestamp": "2020-08-19 10:03:48", "reason": { "code": 6, "reason": "no access rights" } }, "doors": [ false, false, false, false ], "buttons": [ false, false, false, false ], "system": { "status": 0, "date": "2020-08-19", "time": "10:03:48" }, "specialInfo": 0, "relays": { "code": 0, "locked": { "1": 0, "2": 0, "3": 0, "4": 0 } }, "inputs": { "code": 0, "forceLock": 0, "fireAlarm": 0 } }</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/node-red-contrib-uhppoted">node-red-contrib-uhppoted</a>: GitHub project</li> </ul> </script>