node-red-contrib-hik-media-buffer 1.1.26 → 1.1.28
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 +5 -5
- 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: 3000,
|
|
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: 3000,
|
|
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, 10000);
|
|
110
110
|
|
|
111
111
|
// --- DOWNLOAD, SALVATAGGIO, CONVERSIONE E RIMOZIONE DOPO 2 MINUTI ---
|
|
112
112
|
async function downloadMedia(evento, channelID) {
|
|
@@ -248,14 +248,14 @@ module.exports = function(RED) {
|
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
response.data.on('error', () => handleNvrError());
|
|
251
|
-
response.data.on('end', () => !isClosing && setTimeout(startAlertStream,
|
|
251
|
+
response.data.on('end', () => !isClosing && setTimeout(startAlertStream, 5000));
|
|
252
252
|
}).catch(() => handleNvrError());
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
function handleNvrError() {
|
|
256
256
|
if (nvrOnline) { node.send({ payload: { tipo_messaggio: "status", stato_telecamera: "offline", ip: node.host, msg: "NVR Offline", nome_cliente: node.name } }); nvrOnline = false; }
|
|
257
257
|
updateNodeStatus();
|
|
258
|
-
if (!isClosing) setTimeout(startAlertStream,
|
|
258
|
+
if (!isClosing) setTimeout(startAlertStream, 10000);
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
startAlertStream();
|