node-red-contrib-hikvision-ultimate
Advanced tools
Comparing version 0.0.9 to 0.0.11
@@ -5,4 +5,8 @@ # node-red-contrib-hikvision-ultimate | ||
<p> | ||
<b>Version 0.0.11 BETA</b> November 2020<br/> | ||
- Added an option to the ANPR node, to filter repeating plates in a timeframe.<br/> | ||
</p> | ||
<p> | ||
<b>Version 0.0.9 BETA</b> November 2020<br/> | ||
- Replaced the node urllib with node-fetch. | ||
- Replaced the node urllib with node-fetch.<br/> | ||
- Alert node now filters heartbeath without sending unuseful payloads. | ||
@@ -9,0 +13,0 @@ </p> |
@@ -226,3 +226,3 @@ | ||
node.nodeClients.forEach(oClient => { | ||
oClient.sendPayload({ topic: oClient.topic || "", payload: oPlate, connected: true }); | ||
oClient.sendPayload({ topic: oClient.topic || "", plate: oPlate, payload: oPlate.plateNumber, connected: true }); | ||
}) | ||
@@ -229,0 +229,0 @@ }) |
@@ -8,2 +8,6 @@ | ||
node.server = RED.nodes.getNode(config.server) | ||
node.avoidsameplatetime = config.avoidsameplatetime || 20; // Doesn't send the same plate in this timeframe, in seconds. | ||
node.currentPlate = ""; // Stores the current plate (for the avoidsameplatetime function) | ||
node.timerAvoidSamePlate; // Timer for avoiding repeating plate | ||
node.bAvoidSamePlate = false; | ||
@@ -18,8 +22,24 @@ node.setNodeStatus = ({ fill, shape, text }) => { | ||
if (_msg.payload === null) { node.send(_msg); return; }; // If null, then it's disconnected. Avoid processing the event | ||
if (node.currentPlate === _msg.payload) { | ||
if (node.bAvoidSamePlate) { | ||
try { node.setNodeStatus({ fill: "grey", shape: "ring", text: "Temporary block same plate " + _msg.payload }); } catch (error) { }; | ||
return; | ||
} | ||
} | ||
// Timer for avoiding same plate | ||
// ########################## | ||
try { clearTimeout(node.timerAvoidSamePlate); } catch (error) { }; | ||
node.bAvoidSamePlate = true; | ||
node.timerAvoidSamePlate = setTimeout(() => { | ||
node.bAvoidSamePlate = false; | ||
}, node.avoidsameplatetime * 1000); | ||
// ########################## | ||
node.currentPlate = _msg.payload; | ||
node.send(_msg); | ||
try { | ||
node.setNodeStatus({ fill: "green", shape: "dot", text: "Plate " + _msg.payload.Plates.Plate[0].plateNumber }); | ||
} catch (error) { | ||
} | ||
node.setNodeStatus({ fill: "green", shape: "dot", text: "Plate " + _msg.payload }); | ||
} catch (error) { } | ||
} | ||
@@ -34,3 +54,3 @@ | ||
this.on('input', function (msg) { | ||
node.sendPayload(msg); | ||
}); | ||
@@ -37,0 +57,0 @@ |
{ | ||
"name": "node-red-contrib-hikvision-ultimate", | ||
"version": "0.0.9", | ||
"version": "0.0.11", | ||
"description": "A native set of node for Hikvision Cameras, Alarms, Radars etc.", | ||
@@ -5,0 +5,0 @@ "author": "Supergiovane (https://github.com/Supergiovane)", |
@@ -12,3 +12,2 @@ # node-red-contrib-hikvision-ultimate | ||
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/RawAlarm.png' width="80%"> | ||
@@ -19,17 +18,52 @@ | ||
Works with cameras, NVR and also with specialized devices, like Radar (for example DS-PR1-60 and 120).<br/> | ||
Digest authehtication is the default, so it should work with all gears!<br/> | ||
All nodes are capable of auto reconnect if the connection is lost and are able to actively monitor the connection.<br/> | ||
There are currently **only two node**, one that traps the alarms, in RAW mode, and outputs a JSON and the other that outputs the ANPR License Plate numbers.<br/> | ||
***THIS NODESET IS IN BETA. E' ancora brutto, ma funziona.*** | ||
## RAW Alarm Node | ||
***THIS NODESET IS IN BETA. E' ancora brutto, ma funziona.***<br/> | ||
I'll add helps, docs and samples in this README page. Please have some patience...<br/> | ||
Sample of the config node. <br/> | ||
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/RawAlarmConfig.png' width="50%"> | ||
## CHANGELOG | ||
* See <a href="https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate/blob/master/CHANGELOG.md">here the changelog</a> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
Sample JSON Output.<br/> | ||
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/Debug.png' width="80%"> | ||
## - RAW Alarm Node | ||
The RAW alarm node connects to NVR, Camera, Alarm system, Radars etc. and outputs the alarm received. <br/> | ||
## CHANGELOG | ||
* See <a href="https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate/blob/master/CHANGELOG.md">here the changelog</a> | ||
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/RawAlarm.png' width="50%"> | ||
<br/> | ||
<br/> | ||
<br/> | ||
<br/> | ||
## - ANPR (License Plate) Node | ||
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/ANPR.png' width="50%"> | ||
<br/> | ||
**Output message** | ||
The node outputs this msg.</br> | ||
The payload is the license plate number, plus there is another property "plate" where you can find other useful informations.</br> | ||
```javascript | ||
msg = { | ||
"topic":"", | ||
"payload":"AB123CD", // This is the license plate | ||
"connected":true, // true if the connection is OK, otherwise false if the connection is lost. | ||
"plate":{ | ||
"captureTime":"20201130T114200+0100", | ||
"plateNumber":"AB123CD", | ||
"picName":"202011301142008600", // This is the picture's name of the license plate. | ||
"country":"ITA", | ||
"laneNo":"1", | ||
"direction":"forward", | ||
"matchingResult":"otherlist" | ||
} | ||
} | ||
``` | ||
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg | ||
@@ -36,0 +70,0 @@ [license-url]: https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/LICENSE |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
503
73
303754