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.4 to 1.0.5

img/picture.png

4

CHANGELOG.md

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

<p>
<b>Version 1.0.5</b> December 2020<br/>
- NEW: Picture node. This node get a picture from camera, ready to be shown in the dashboard UI. The image can be rotated and resized.<br/>
</p>
<p>
<b>Version 1.0.4</b> December 2020<br/>

@@ -7,0 +11,0 @@ - Getting rid of old debug logs. Thanks @oliveres for advice.<br/>

16

nodes/Hikvision-config.js

@@ -1,4 +0,2 @@

const { resolve } = require('path');
module.exports = (RED) => {

@@ -237,10 +235,16 @@

var body = "";
body = await response.text();
_callerNode.sendPayload({ topic: _callerNode.topic || "", payload: true });
// Based on URL, will return the appropriate encoded body
if (_URL.toLowerCase().includes("/ptzctrl/")) {
_callerNode.sendPayload({ topic: _callerNode.topic || "", payload: true });
}else if (_URL.toLowerCase().includes("/streaming/")) {
body = await response.buffer(); // "data:image/png;base64," +
//_callerNode.sendPayload({ topic: _callerNode.topic || "", payload: body.toString("base64")});
_callerNode.sendPayload({ topic: _callerNode.topic || "", payload: body});
}
}
} catch (err) {
console.log("ORRORE " + err.message);
//console.log("ORRORE " + err.message);
// Main Error
_callerNode.setNodeStatus({ fill: "grey", shape: "ring", text: "Error: " + err.message });
_callerNode.setNodeStatus({ fill: "grey", shape: "ring", text: "Horror: " + err.message });
_callerNode.sendPayload({ topic: _callerNode.topic || "", errorDescription: err.message, payload: true });

@@ -247,0 +251,0 @@ // Abort request

@@ -28,3 +28,2 @@ module.exports = function (RED) {

} catch (error) { }
}

@@ -34,3 +33,2 @@ }

node.setNodeStatus({ fill: "green", shape: "dot", text: "PTZ Pteset recalled." });
return; // Find first occurrence, exit.
}

@@ -37,0 +35,0 @@

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

@@ -11,3 +11,4 @@ "author": "Supergiovane (https://github.com/Supergiovane)",

"abort-controller": ">=3.0.0",
"util": ">=0.12.3"
"util": ">=0.12.3",
"sharp": "0.26.3"
},

@@ -25,3 +26,3 @@ "keywords": [

"node": ">=10.0.0"
},
},
"license": "MIT",

@@ -40,7 +41,6 @@ "repository": {

"hikvisionUltimateANPR": "nodes/hikvisionUltimateANPR.js",
"hikvisionUltimatePTZ": "nodes/hikvisionUltimatePTZ.js"
"hikvisionUltimatePTZ": "nodes/hikvisionUltimatePTZ.js",
"hikvisionUltimatePicture": "nodes/hikvisionUltimatePicture.js"
}
}
}
}

@@ -21,3 +21,2 @@ # node-red-contrib-hikvision-ultimate

## CHANGELOG

@@ -46,3 +45,3 @@ * See <a href="https://github.com/Supergiovane/node-red-contrib-hikvision-ultimate/blob/master/CHANGELOG.md">here the changelog</a>

**Output message**
**Flow Messages**

@@ -83,3 +82,3 @@ The node outputs a payload on **PIN 1**, true if alarm starts, false when alarm ended. Some alarm type doesn't support the alarm end event, so the node sends only a true payload when alarm occurs.</br>

**Output message**
**Flow Messages**

@@ -125,7 +124,6 @@ The payload contains the license plate number and the property "plate" contains other useful informations.</br>

**Output message**
**Flow Messages**
The node outputs ***true*** on PIN 1 if the command is executed, otherwise an error on PIN 2.</br>
**Input**

@@ -159,2 +157,52 @@ ```javascript

## PICTURE NODE
This node gets a picture from camera, ready to be shown in the dashboard UI.<br/>
The image can be rotated and resized as well.<br/>
Pass **true** as payload to obtain the image.<br/>
You can, for example, link the ***Alarm node*** to the ***Picture node*** to get an image whenever an alarm occurs.<br/>
<img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/picture.png' width="80%">
The ***Template*** node in this example, contains this code:
```javascript
<img src="{{payload}}"/>
```
The ***Dashboard*** node in this example, contains this code:
```javascript
<div ng-bind-html="msg.payload"></div>
```
**Flow Messages**
The node outputs the image in base64 string format, ready for the UI Dashboard, on PIN 1, otherwise an error on PIN 2.</br>
**Input**
```javascript
msg.payload = true; // To get the image
```
**Output PIN 1**
```javascript
msg.payload = {
{
"payload": image in base64 format, // Ready for the Dashboard UI
"_msgid": "b07e50f6.86a72"
}
```
**Output PIN 2 (connection error)**
```javascript
msg = {
"topic": "",
"errorDescription": "", // This will contain the error rescription, in case of errors.
"payload": false, // Or TRUE if error
"_msgid": "dd5b3622.884a78"
}
```
<br/>
<br/>
---
## RADAR ALARM NODE

@@ -165,3 +213,3 @@ This node works with Hikvision Radars.<br/>

**Output message**
**Flow Messages**

@@ -232,3 +280,3 @@ The node outputs a message whenever an alarm starts or ends. It uses CID codes to identify the alarm type.</br>

**Output message**
**Flow Messages**

@@ -235,0 +283,0 @@ The node outputs a payload on **PIN 1** that can vary, depending on the alarm type sent by the connected device.</br>

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