node-red-contrib-uhppoted
Version:
A set of nodes for the UHPPOTE Wiegand Access Controller
111 lines (104 loc) • 4.61 kB
HTML
<script type="text/html" data-template-name="uhppoted-get-time-profile">
<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-get-time-profile">
<p>Retrieves a time profile from a UHPPOTE access controller.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload<span class="property-type">object</span></dt>
<dd>JSON object with the controller ID and profile ID for 'get-time-profile'</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 requested time profile</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 and the
profile ID for the time profile to be retrieved.</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>
<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>profileId<span class="property-type">uint8</span></dt>
<dd>Time profile ID (2-254)</dd>
</dl>
<h4>Example:</h4>
<pre>
{
"deviceId": 405419896,
"profileId": 29
}</pre>
<pre>
{
"controller": {
"controller": 405419896,
"address": "192.168.1.100",
"protocol": "tcp"
},
"profileId": 29
}</pre>
<p>The output <code>msg.payload</code> is a JSON object containing the corresponding
time profile from the UHPPOTE controller. The profile is null if not defined in
the controller.</p>
<dl class="message-properties">
<dt>deviceId<span class="property-type">uint32</span></dt>
<dd>controller serial number</dd>
<dt>profile.id<span class="property-type">uint8</span></dt>
<dd>Time profile ID (2-254)</dd>
<dt>profile.valid.from<span class="property-type">date</span></dt>
<dd>start date (inclusive) from which profile is enabled</d>
<dt>profile.valid.to<span class="property-type">date</span></dt>
<dd>end date (incusive) after which profile is no longer enabled</d>
<dt>profile.weekdays<span class="property-type">array of string</span></dt>
<dd>List of weekdays on which the profile is active</d>
<dt>profile.segments<span class="property-type">array of segment</span></dt>
<dd>List of up to 3 time segments for which the profile is active</d>
<dt>profile.linkedTo<span class="property-type">uint8</span></dt>
<dd>Linked time profile (if present)</d>
</dl>
<h4>Example:</h4>
<pre>
{
"deviceId": 405419896,
"profile": {
"id": 29,
"from": "2021-01-01",
"to": "2021-12-31",
"weekdays": "Monday,Wednesday,Friday",
"segments": [
{ "start": "08:30", end: "11:45" },
{ "start": "13:15", end: "18:00" },
],
"linkedTo": 3
}
}</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>