UNPKG

node-red-contrib-hikvision-ultimate

Version:

A native set of nodes for Hikvision (and compatible) Cameras, Alarms, Radars, NVR, Doorbells, etc.

102 lines (94 loc) 4.32 kB
<script type="text/javascript"> RED.nodes.registerType('AXPro-config', { category: 'config', defaults: { host: { value: "", required: true }, port: { value: 80, required: true, validate: RED.validators.number() }, name: { value: "Ax Pro" }, authentication: { value: "sha256-salted" }, protocol: { value: "http" }, heartbeattimerdisconnectionlimit: { value: 2 }, debuglevel: { value: "no" }, deviceinfo: { value: {} } }, credentials: { user: { type: "text" }, password: { type: "password" } }, oneditprepare: function () { var node = this; }, oneditsave: function () { }, label: function () { return typeof this.name === undefined ? (this.host + ":" + this.port) : this.name + " " + (this.host + ":" + this.port); } }); </script> <script type="text/html" data-template-name="AXPro-config"> <div class="form-row"> <b>AX Pro config</b>&nbsp&nbsp&nbsp&nbsp<span style="color:red"><i class="fa fa-question-circle"></i>&nbsp<a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate"><u>Help online</u></a></span> <br/> <br/> </div> <div class="form-row"> <label for="node-config-input-name" > <i class="fa fa-tag"></i> Name </label> <input type="text" id="node-config-input-name" placeholder="Click Connect to check the alarm panel connection"> </div> <div class="form-row"> <label for="node-config-input-host"> <i class="fa fa-server"></i> AX Pro IP </label> <input type="text" id="node-config-input-host" placeholder=""> </div> <div class="form-row"> <label for="node-config-input-port"> Port</label> <input type="text" id="node-config-input-port" placeholder=""> </div> <div class="form-row"> <label for="node-config-input-protocol"><i class="fa fa-sign-in"></i> Protocol</label> <select type="text" id="node-config-input-protocol"> <option value="http">Http</option> <option value="https">Https</option> </select> </div> <div class="form-row"> <label for="node-config-input-user"> Hik-Connect Username</label> <input type="text" id="node-config-input-user" placeholder=""> </div> <div class="form-row"> <label for="node-config-input-password"> Hik-Connect Password</label> <input type="password" id="node-config-input-password" placeholder=""> </div> <div class="form-row"> <label for="node-config-input-authentication"><i class="fa fa-sign-in"></i> Auth.</label> <select type="text" id="node-config-input-authentication"> <option value="sha256-salted">sha256-salted</option> </select> </div> <div class="form-row"> <label for="node-config-input-heartbeattimerdisconnectionlimit"><i class="fa fa-exclamation-triangle"></i> Emit error</label> <select type="text" id="node-config-input-heartbeattimerdisconnectionlimit"> <option value=1>after 1 failed reconnection attempt (not recommended)</option> <option value=2>after 2 failed reconnection attempts (Default)</option> <option value=3>after 3 failed reconnection attempts</option> <option value=4>after 4 failed reconnection attempts</option> </select> </div> <div class="form-row"> <label for="node-config-input-debuglevel"><i class="fa fa-exclamation-triangle"></i> Debug level</label> <select type="text" id="node-config-input-debuglevel"> <option value="no">No. No debug text please.</option> <option value="yes">Turn on the debug mode.</option> </select> </div> <div class="form-tips" style="margin-top:11px"> Above option: after connection error, the node try to reconnect for the number of times selected, then emits a connection error on PIN 2. Increase this number for slow LANs, like VPN </div> <br/> <div class="form-row"> <input type="hidden" id="node-config-input-deviceinfo" placeholder=""> </div> </script>