node-red-contrib-hikvision-ultimate
Version:
A native set of nodes for Hikvision (and compatible) Cameras, Alarms, Radars, NVR, Doorbells, etc.
92 lines (79 loc) • 2.63 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('hikvisionUltimateANPR', {
category: 'Hikvision Ultimate',
color: '#C0C0C0',
defaults: {
name: { value: "" },
topic: { value: "" },
server: { type: "ANPR-config", required: true },
avoidsameplatetime: { value: 20, validate: RED.validators.number() }
},
inputs: 0,
outputs: 2,
outputLabels: function (i) {
var ret = "";
switch (i) {
case 0:
return "Plates";
break;
case 1:
return "Error";
break;
case 2
:
return "";
break;
default:
break;
}
},
icon: "node-anpr-icon.svg",
label:
function () {
var label = "ANPR"
if (this.name !== undefined && this.name.length > 0) {
label = this.name;
}
return label;
},
paletteLabel: function () {
return "License Plate ANPR";
},
oneditprepare: function () {
},
oneditsave: function () {
}
});
</script>
<script type="text/x-red" data-template-name="hikvisionUltimateANPR">
<div class="form-row">
<b>License plate node</b>    <span style="color:red"><i class="fa fa-question-circle"></i> <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate"><u>Help online</u></a></span>
<br/>
<br/>
<label for="node-input-server">Server</label>
<input type="text" id="node-input-server" />
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-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-tasks"></i> Node topic</label>
<input type="text" id="node-input-topic" placeholder="Node's own topic">
</div>
<div class="form-row">
<label for="node-input-avoidsameplatetime"><i class="fa fa-tasks"></i> Block same plate for</label>
<input type="text" id="node-input-avoidsameplatetime" placeholder="">
<div class="form-tips" style="margin-top:11px">
The above is to avoid sending the same plate multiple time consecutively, in seconds.
</div>
</div>
</script>
<script type="text/x-red" data-help-name="hikvisionUltimateANPR">
<p>
<a href="https://www.paypal.me/techtoday" target="_blank"><img src='https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square' width='30%'></a>
</p>
<p>
The node outputs a JSON with payload containing the plate on PIN 1 and a connection ERROR on PIN 2 (true if the node is DISCONNECTED to the server, otherwise false IF IT'S RECONNECTED).
</p>
</script>