node-red-contrib-hikvision-ultimate
Version:
A native set of nodes for Hikvision (and compatible) Cameras, Alarms, Radars, NVR, Doorbells, etc.
83 lines (70 loc) • 2.19 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('hikvisionUltimateAlarmRaw', {
category: 'Hikvision Ultimate',
color: '#C0C0C0',
defaults: {
name: { value: "" },
topic: { value: "" },
server: { type: "Hikvision-config", required: true }
},
inputs: 0,
outputs: 3,
outputLabels: function (i) {
var ret = "";
switch (i) {
case 0:
return "Payload";
break;
case 1:
return "Error";
break;
case 2:
return "Image";
break;
default:
break;
}
},
icon: "node-raw-icon.svg",
label:
function () {
var label = "RAW Camera Event"
if (this.name !== undefined && this.name.length > 0) {
label = this.name;
}
return label;
},
paletteLabel: function () {
return "RAW Camera Event";
},
oneditprepare: function () {
},
oneditsave: function () {
}
});
</script>
<script type="text/x-red" data-template-name="hikvisionUltimateAlarmRaw">
<div class="form-row">
<b>RAW Alarm 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>
</script>
<script type="text/x-red" data-help-name="hikvisionUltimateAlarmRaw">
<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 data 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>