Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-hikvision-ultimate

Package Overview
Dependencies
Maintainers
1
Versions
119
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-hikvision-ultimate - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # node-red-contrib-hikvision-ultimate

<p>
<b>Version 1.0.4</b> December 2020<br/>
- Getting rid of old debug logs. Thanks @oliveres for advice.<br/>
</p>
<p>
<b>Version 1.0.3</b> December 2020<br/>

@@ -7,0 +11,0 @@ - NEW: Added help links to the config windows.<br/>

15

nodes/ANPR-config.js

@@ -12,3 +12,4 @@

var node = this
node.host = config.host;
node.debug = config.host.indexOf("banana") > -1;
node.host = config.host.replace("banana", "");
node.port = config.port;

@@ -111,3 +112,3 @@ node.protocol = config.protocol || "http";

// Invalid body
RED.log.info("ANPR-config: DecodingBody: Invalid Json " + sRet);
if (node.debug) RED.log.info("ANPR-config: DecodingBody: Invalid Json " + sRet);
// console.log("BANANA ANPR-config: DecodingBody: Invalid Json " + sRet);

@@ -145,3 +146,3 @@ throw new Error("Error Invalid Json: " + sRet);

// Error in parsing XML
RED.log.info("ANPR-config: Error: oPlates.Plates is null");
if (node.debug) RED.log.info("ANPR-config: Error: oPlates.Plates is null");
throw new Error("Error: oPlates.Plates is null");

@@ -151,3 +152,3 @@ }

} catch (error) {
RED.log.warn("ANPR-config: ERRORE CATCHATO getPlates:" + (error.message || ""));
if (node.debug) RED.log.warn("ANPR-config: ERRORE CATCHATO getPlates:" + (error.message || ""));
// console.log("BANANA ANPR-config: ERRORE CATCHATO initPlateReader: " + error);

@@ -205,3 +206,3 @@ throw new Error("Error getPlates: " + (error.message || ""));

node.lastPicName = oPlates.Plates.Plate.picName;
console.log("BANANA SINGOLA PLATE IGNORATA: it's " + node.lastPicName);
//console.log("BANANA SINGOLA PLATE IGNORATA: it's " + node.lastPicName);
node.setAllClientsStatus({ fill: "grey", shape: "ring", text: "Found 1 ignored plates. It's " + node.lastPicName });

@@ -297,7 +298,7 @@ }

// Remove the client node from the clients array
//RED.log.info( "BEFORE Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
//if (node.debug) RED.log.info( "BEFORE Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
try {
node.nodeClients = node.nodeClients.filter(x => x.id !== _Node.id)
} catch (error) { }
//RED.log.info("AFTER Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
//if (node.debug) RED.log.info("AFTER Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);

@@ -304,0 +305,0 @@ // If no clien nodes, disconnect from bus.

@@ -94,5 +94,5 @@ const { resolve } = require('path');

result += chunk.toString();
if (node.debug) RED.log.error("BANANA CHUNK: ######################\n" + chunk.toString() + "\n###################### FINE BANANA CHUNK");
if (node.debug) RED.log.error("BANANA RESULT: \n" + result + "\n###################### FINE BANANA RESULT");
// if (node.debug) RED.log.error("HEADESR " + JSON.stringify(stream))
if (node.debug) RED.log.error("BANANA CHUNK: ######################\n" + chunk.toString() + "\n###################### FINE BANANA CHUNK");
if (node.debug) RED.log.error("BANANA RESULT: \n" + result + "\n###################### FINE BANANA RESULT");
// if (node.debug) RED.log.error("HEADESR " + JSON.stringify(stream))
// Gotta --boundary, process the message

@@ -104,5 +104,5 @@ if (result.indexOf("--boundary") > -1) {

aResults.forEach(sRet => {
if (node.debug) RED.log.error("SPLITTATO RESULT: ######################\n" + sRet + "\n###################### FINE SPLITTATO RESULT");
if (node.debug) RED.log.error("SPLITTATO RESULT: ######################\n" + sRet + "\n###################### FINE SPLITTATO RESULT");
if (sRet.trim() !== "") {
if (node.debug) RED.log.error("BANANA PROCESSING" + sRet);
if (node.debug) RED.log.error("BANANA PROCESSING" + sRet);
try {

@@ -118,3 +118,3 @@ //sRet = sRet.replace(/--boundary/g, '');

} else {
if (node.debug) RED.log.error("BANANA SBANANATO XML -> JSON " + JSON.stringify(result));
if (node.debug) RED.log.error("BANANA SBANANATO XML -> JSON " + JSON.stringify(result));
if (result !== null && result !== undefined && result.hasOwnProperty("EventNotificationAlert")) {

@@ -130,7 +130,7 @@ node.nodeClients.forEach(oClient => {

if (i > -1) {
if (node.debug) RED.log.error("BANANA SBANANATO JSON " + sRet);
if (node.debug) RED.log.error("BANANA SBANANATO JSON " + sRet);
sRet = sRet.substring(i);
try {
sRet = JSON.parse(sRet);
// if (node.debug) RED.log.error("BANANA JSONATO: " + sRet);
// if (node.debug) RED.log.error("BANANA JSONATO: " + sRet);
if (sRet !== null && sRet !== undefined) {

@@ -146,3 +146,3 @@ node.nodeClients.forEach(oClient => {

// Invalid body
RED.log.info("Hikvision-config: DecodingBody Info only: Invalid Json " + sRet);
if (node.debug) RED.log.info("Hikvision-config: DecodingBody Info only: Invalid Json " + sRet);
}

@@ -156,3 +156,3 @@ }

// if (node.debug) RED.log.error("BANANA startAlarmStream decodifica body: " + error);
RED.log.warn("Hikvision-config: DecodingBody error: " + (error.message || " unknown error"));
if (node.debug) RED.log.warn("Hikvision-config: DecodingBody error: " + (error.message || " unknown error"));
throw (error);

@@ -165,3 +165,3 @@ }

} catch (error) {
RED.log.info("Hikvision-config: readStream error: " + (error.message || " unknown error"));
if (node.debug) RED.log.info("Hikvision-config: readStream error: " + (error.message || " unknown error"));
node.errorDescription = "readStream error " + (error.message || " unknown error");

@@ -181,3 +181,3 @@ throw (error);

node.setAllClientsStatus({ fill: "red", shape: "ring", text: response.statusText || " unknown response code" });
// if (node.debug) RED.log.error("BANANA Error response " + response.statusText);
// if (node.debug) RED.log.error("BANANA Error response " + response.statusText);
node.errorDescription = "StatusResponse problem " + (response.statusText || " unknown status response code");

@@ -203,3 +203,3 @@ throw new Error("StatusResponse " + (response.statusText || " unknown response code"));

node.errorDescription = "Fetch error " + (error.message || " unknown error");
RED.log.error("Hikvision-config: FETCH ERROR: " + (error.message || " unknown error"));
if (node.debug) RED.log.error("Hikvision-config: FETCH ERROR: " + (error.message || " unknown error"));
};

@@ -289,7 +289,7 @@

// Remove the client node from the clients array
//RED.log.info( "BEFORE Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
//if (node.debug) RED.log.info( "BEFORE Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
try {
node.nodeClients = node.nodeClients.filter(x => x.id !== _Node.id)
} catch (error) { }
//RED.log.info("AFTER Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);
//if (node.debug) RED.log.info("AFTER Node " + _Node.id + " has been unsubscribed from receiving KNX messages. " + node.nodeClients.length);

@@ -296,0 +296,0 @@ // If no clien nodes, disconnect from bus.

{
"name": "node-red-contrib-hikvision-ultimate",
"version": "1.0.3",
"version": "1.0.4",
"description": "A native set of node for Hikvision Cameras, Alarms, Radars etc.",

@@ -5,0 +5,0 @@ "author": "Supergiovane (https://github.com/Supergiovane)",

@@ -11,5 +11,5 @@ # node-red-contrib-hikvision-ultimate

[![Donate via PayPal](https://img.shields.io/badge/Donate-PayPal-blue.svg?style=flat-square)](https://www.paypal.me/techtoday)
[![Facebook][facebook-image]][facebook-url]
## DESCRIPTION

@@ -288,1 +288,3 @@ This is a set of nodes to handle ISAPI Hikvision messages. It works exclusively with ***HIKVISION*** devices.<br/>

[npm-downloads-total-image]: https://img.shields.io/npm/dt/node-red-contrib-hikvision-ultimate.svg
[facebook-image]: https://img.shields.io/badge/Visit%20me-Facebook-blue
[facebook-url]: https://www.facebook.com/supergiovaneDev
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc