node-red-contrib-hik-media-buffer 1.1.124 → 1.1.126
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 +6 -2
- package/package.json +1 -1
package/hik-media-buffer.js
CHANGED
|
@@ -125,8 +125,8 @@ module.exports = function(RED) {
|
|
|
125
125
|
if (nowTime - lastTriggerTime[channelID] < 5000) return;
|
|
126
126
|
lastTriggerTime[channelID] = nowTime;
|
|
127
127
|
|
|
128
|
-
node.status({fill:"yellow", shape:"dot", text:`Attesa scrittura NVR (
|
|
129
|
-
await new Promise(resolve => setTimeout(resolve,
|
|
128
|
+
node.status({fill:"yellow", shape:"dot", text:`Attesa scrittura NVR (50s)...`});
|
|
129
|
+
await new Promise(resolve => setTimeout(resolve, 50000));
|
|
130
130
|
|
|
131
131
|
const nvrAuth = new AxiosDigestAuth({ username: node.user, password: node.pass });
|
|
132
132
|
const referenceTime = new Date();
|
|
@@ -142,6 +142,8 @@ module.exports = function(RED) {
|
|
|
142
142
|
const startSearchStr = toHikSearchDate(inizioFinestra);
|
|
143
143
|
const endSearchStr = toHikSearchDate(fineFinestra);
|
|
144
144
|
|
|
145
|
+
node.warn(`[DEBUG HIK] Avvio ricerca video. Canale: ${channelID}. Cerco da: ${startVideoSearch} a: ${endVideoSearch}`);
|
|
146
|
+
|
|
145
147
|
let output = {
|
|
146
148
|
tipo_messaggio: "evento",
|
|
147
149
|
nome_cliente: node.name,
|
|
@@ -221,6 +223,8 @@ module.exports = function(RED) {
|
|
|
221
223
|
});
|
|
222
224
|
|
|
223
225
|
const xmlString = resVideoSearch.data.toString();
|
|
226
|
+
node.warn(`[DEBUG HIK] Risposta XML dell'NVR:\n${xmlString}`);
|
|
227
|
+
|
|
224
228
|
const uriMatch = xmlString.match(/<playbackURI>([\s\S]*?)<\/playbackURI>/i);
|
|
225
229
|
|
|
226
230
|
if (uriMatch && uriMatch[1]) {
|