node-red-contrib-hikvision-ultimate
Advanced tools
Comparing version 1.1.14 to 1.1.15
@@ -7,2 +7,6 @@ <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.15</b> April 2024<br/> | ||
- Doorbel node: fixed a crash if you send msg.hangUp = true, when the doorbell cannot be reached.<br/> | ||
</p> | ||
<p> | ||
<b>Version 1.1.14</b> January 2024<br/> | ||
@@ -9,0 +13,0 @@ - Fixed sintax errors in some dropdown list. Thanks to @pmattia90<br/> |
@@ -136,17 +136,23 @@ | ||
//const jHangUp = JSON.stringify(JSON.parse(`{"CallSignal": { "cmdType": "hangUp" } }`)); | ||
const jHangUp = JSON.parse(JSON.stringify(JSON.parse(`{"CallSignal": {"cmdType": "hangUp"}}`))) | ||
node.server.request(node, "PUT", "/ISAPI/VideoIntercom/callSignal?format=json", jHangUp).then(success => { | ||
node.setNodeStatus({ fill: "green", shape: "ring", text: "Hang Up" }); | ||
}).catch(error => { | ||
//node.setNodeStatus({ fill: "red", shape: "ring", text: "Error hangUp " + error.message }); | ||
RED.log.error("hikvisionUltimateDoorbell: Error hangUp " + error.message); | ||
}); | ||
setTimeout(() => { | ||
const jReject = JSON.parse(JSON.stringify(JSON.parse(`{"CallSignal": {"cmdType": "reject"}}`))) | ||
node.server.request(node, "PUT", "/ISAPI/VideoIntercom/callSignal?format=json", jReject).then(success => { | ||
node.setNodeStatus({ fill: "green", shape: "ring", text: "reject" }); | ||
try { | ||
const jHangUp = JSON.parse(JSON.stringify(JSON.parse(`{"CallSignal": {"cmdType": "hangUp"}}`))) | ||
node.server.request(node, "PUT", "/ISAPI/VideoIntercom/callSignal?format=json", jHangUp).then(success => { | ||
node.setNodeStatus({ fill: "green", shape: "ring", text: "Hang Up" }); | ||
}).catch(error => { | ||
//node.setNodeStatus({ fill: "red", shape: "ring", text: "Error hangUp " + error.message }); | ||
RED.log.error("hikvisionUltimateDoorbell: Error reject " + error.message); | ||
RED.log.error("hikvisionUltimateDoorbell: Error hangUp " + error.message); | ||
}); | ||
} catch (error) { | ||
} | ||
setTimeout(() => { | ||
try { | ||
const jReject = JSON.parse(JSON.stringify(JSON.parse(`{"CallSignal": {"cmdType": "reject"}}`))) | ||
node.server.request(node, "PUT", "/ISAPI/VideoIntercom/callSignal?format=json", jReject).then(success => { | ||
node.setNodeStatus({ fill: "green", shape: "ring", text: "reject" }); | ||
}).catch(error => { | ||
RED.log.error("hikvisionUltimateDoorbell: Error reject " + error.message); | ||
}); | ||
} catch (error) { | ||
} | ||
}, 1000); | ||
@@ -153,0 +159,0 @@ }, 1000); |
{ | ||
"name": "node-red-contrib-hikvision-ultimate", | ||
"version": "1.1.14", | ||
"version": "1.1.15", | ||
"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)", |
4888954
4883