node-red-contrib-hikvision-ultimate
Advanced tools
Comparing version 1.1.19 to 1.1.20
@@ -6,8 +6,9 @@ <p align="center"><img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/logo.png' width="40%"></p> | ||
<p> | ||
<b>Version 1.1.19</b> April 2024<br/> | ||
- NEW: Speaker node.<br/> | ||
<b>Version 1.1.20</b> Mai 2024<br/> | ||
- AX Pro node: added msg.disarmAllAreas, msg.clearAlarmArea and msg.clearAllAlarmAreas. See the help tab in node-red for fuhrter infos<br/> | ||
</p> | ||
<p> | ||
<b>Version 1.1.18</b> April 2024<br/> | ||
<b>Version 1.1.19</b> April 2024<br/> | ||
- ANPR: fixed an issue it the plate's list parser in cameras having ISAPI protocol 1.0.<br/> | ||
@@ -14,0 +15,0 @@ </p> |
@@ -523,2 +523,26 @@ const { default: fetch } = require('node-fetch') | ||
} | ||
// Disarm All Areas | ||
node.disarmAllAreas = async function () { | ||
try { | ||
let sURL = '/ISAPI/SecurityCP/control/disarm?format=json' | ||
node.optionsAlarmStream.method = 'PUT' | ||
delete (node.optionsAlarmStream.body) | ||
await node.clientAlarmStream.fetch(node.protocol + "://" + node.host + sURL, node.optionsAlarmStream); | ||
} catch (error) { | ||
node.errorDescription = "control/disarmAllArea " + (error.message || " unknown error"); | ||
if (node.debug) RED.log.error("AXPro-config: control/disarmAllArea: " + (error.message || " unknown error")); | ||
} | ||
} | ||
// Clear Alarm of all areas | ||
node.clearAllAlarmAreas = async function () { | ||
try { | ||
let sURL = '/ISAPI/SecurityCP/control/clearAlarm?format=json' | ||
node.optionsAlarmStream.method = 'PUT' | ||
delete (node.optionsAlarmStream.body) | ||
await node.clientAlarmStream.fetch(node.protocol + "://" + node.host + sURL, node.optionsAlarmStream); | ||
} catch (error) { | ||
node.errorDescription = "control/clearAllAlarmArea" + (error.message || " unknown error"); | ||
if (node.debug) RED.log.error("AXPro-config: control/clearAllAlarmArea: " + (error.message || " unknown error")); | ||
} | ||
} | ||
@@ -525,0 +549,0 @@ |
@@ -79,2 +79,11 @@ const _ = require('lodash') | ||
// Disarm All Area in a batch | ||
if (msg.hasOwnProperty("disarmAllAreas")) { | ||
node.server.disarmArea(msg.disarmAllAreas) | ||
} | ||
// Clear All Alarm Areas | ||
if (msg.hasOwnProperty("clearAllAlarmAreas")) { | ||
node.server.clearAlarmArea(msg.clearAllAlarmAreas) | ||
} | ||
} catch (error) { } | ||
@@ -81,0 +90,0 @@ |
{ | ||
"name": "node-red-contrib-hikvision-ultimate", | ||
"version": "1.1.19", | ||
"version": "1.1.20", | ||
"description": "A native set of nodes for Hikvision (and compatible) Cameras, Alarms, Radars, NVR, Doorbells, etc.", | ||
@@ -5,0 +5,0 @@ "author": "Supergiovane (https://github.com/Supergiovane)", |
<p align="center"><img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-hikvision-ultimate/master/img/logo.png'></p> | ||
A native set of nodes for Hikvision (and compatible) Cameras, Alarms, Radars, NVR, Doorbells etc. | ||
A native set of nodes for Hikvision (and compatible) Camera, Alarm, Radar, NVR, Doorbell, Speaker etc. | ||
@@ -29,4 +29,2 @@ [![NPM version][npm-version-image]][npm-url] | ||
## COLLABORATORS NEEDED | ||
I'm looking for collaborators to develop these nodes. I'm alone. I have other nodes to mantain, and too many help to give to the users. Very little time is remaining for me and my family, so i need someone joining this project and starting active development! Thanks!<br/> | ||
@@ -693,50 +691,3 @@ <br/> | ||
<br/> | ||
<br/> | ||
**Flow Messages** | ||
You can control your AX Pro alarm panel by passing messages to the node.</br> | ||
**Input** | ||
|Property|Parameter| | ||
|--|--| | ||
| msg.armAwayArea | Area number (for example 1) | | ||
| msg.armStayArea | Area number (for example 1) | | ||
| msg.disarmArea | Area number (for example 1) | | ||
Examples:<br/> | ||
```javascript | ||
// To Arm Away Area 1 | ||
msg.armAwayArea = 1 | ||
return msg; | ||
``` | ||
```javascript | ||
// To Arm Stay Area 1 | ||
msg.armStayArea = 1 | ||
return msg; | ||
``` | ||
```javascript | ||
// To Disarm Area 1 | ||
msg.disarmArea = 1 | ||
return msg; | ||
``` | ||
```javascript | ||
// To clear alarm on Area 1 | ||
msg.clearAlarmArea = 1 | ||
return msg; | ||
``` | ||
**Output** | ||
On PIN1, the node will output the msg</br> | ||
On PIN2 it will output connection error messages<br/> | ||
Example PIN 1:<br/> | ||
```json | ||
@@ -743,0 +694,0 @@ // FOR CID EVENTS |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
3412742
5368
91
815