node-red-contrib-hik-media-buffer 1.1.24 → 1.1.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hik-media-buffer.js +4 -4
- package/package.json +1 -1
package/hik-media-buffer.js
CHANGED
|
@@ -48,7 +48,7 @@ module.exports = function(RED) {
|
|
|
48
48
|
const res = await camAuth.request({
|
|
49
49
|
method: 'GET',
|
|
50
50
|
url: `${node.protocol}://${cam.ip}:${node.port}/ISAPI/System/Video/inputs/channels/${cam.channel}/overlays/channelNameOverlay`,
|
|
51
|
-
timeout:
|
|
51
|
+
timeout: 5000,
|
|
52
52
|
httpsAgent: node.protocol === "https" ? httpsAgent : undefined
|
|
53
53
|
});
|
|
54
54
|
|
|
@@ -75,7 +75,7 @@ module.exports = function(RED) {
|
|
|
75
75
|
await camAuth.request({
|
|
76
76
|
method: 'GET',
|
|
77
77
|
url: `${node.protocol}://${cam.ip}:${node.port}/ISAPI/System/deviceInfo`,
|
|
78
|
-
timeout:
|
|
78
|
+
timeout: 5000,
|
|
79
79
|
httpsAgent: node.protocol === "https" ? httpsAgent : undefined
|
|
80
80
|
});
|
|
81
81
|
if (statoCamera[cam.ip] === false) {
|
|
@@ -106,7 +106,7 @@ module.exports = function(RED) {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
const heartbeatInterval = setInterval(checkCameras,
|
|
109
|
+
const heartbeatInterval = setInterval(checkCameras, 15000);
|
|
110
110
|
|
|
111
111
|
// --- DOWNLOAD, SALVATAGGIO, CONVERSIONE E RIMOZIONE DOPO 2 MINUTI ---
|
|
112
112
|
async function downloadMedia(evento, channelID) {
|
|
@@ -231,7 +231,7 @@ module.exports = function(RED) {
|
|
|
231
231
|
if (isClosing) return;
|
|
232
232
|
const nvrAuth = new AxiosDigestAuth({ username: node.user, password: node.pass });
|
|
233
233
|
const url = `${node.protocol}://${node.host}:${node.port}/ISAPI/Event/notification/alertStream`;
|
|
234
|
-
nvrAuth.request({ method: 'GET', url: url, responseType: 'stream',
|
|
234
|
+
nvrAuth.request({ method: 'GET', url: url, responseType: 'stream', httpsAgent: node.protocol === "https" ? httpsAgent : undefined })
|
|
235
235
|
.then(response => {
|
|
236
236
|
streamRequest = response;
|
|
237
237
|
if (!nvrOnline) { node.send({ payload: { tipo_messaggio: "status", stato_telecamera: "online", ip: node.host, msg: "NVR Online", nome_cliente: node.name } }); nvrOnline = true; }
|