node-red-contrib-hik-media-buffer 1.1.128 → 1.1.129

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.
@@ -150,10 +150,13 @@ module.exports = function(RED) {
150
150
  const inizioFinestra = new Date(referenceTime.getTime() - (2 * 60 * 1000));
151
151
  const fineFinestra = new Date(referenceTime.getTime() + (2 * 60 * 1000));
152
152
 
153
- const startSearchStr = toHikSearchDate(inizioFinestra);
154
- const endSearchStr = toHikSearchDate(fineFinestra);
153
+ const startVideoSearch = toHikSearchDate(inizioFinestra);
154
+ const endVideoSearch = toHikSearchDate(fineFinestra);
155
155
 
156
- node.warn(`[DEBUG HIK] Avvio ricerca video. Canale: ${channelID}. Cerco da: ${startSearchStr} a: ${endSearchStr}`);
156
+ const startFotoSearch = inizioFinestra.toISOString().split('.')[0] + "Z";
157
+ const endFotoSearch = fineFinestra.toISOString().split('.')[0] + "Z";
158
+
159
+ node.warn(`[DEBUG HIK] Avvio ricerca video. Canale: ${channelID}. Cerco da: ${startVideoSearch} a: ${endVideoSearch}`);
157
160
 
158
161
  let output = {
159
162
  tipo_messaggio: "evento",
@@ -177,7 +180,7 @@ module.exports = function(RED) {
177
180
  "searchID": "C5AFEE35-B1E0-4C01-83F8-47FD77892E4A",
178
181
  "searchResultPosition": 0,
179
182
  "maxResults": 1,
180
- "timeSpanList": [{ "startTime": startSearchStr, "endTime": endSearchStr }],
183
+ "timeSpanList": [{ "startTime": startFotoSearch, "endTime": endFotoSearch }],
181
184
  "type": "all",
182
185
  "channels": [parseInt(channelID)],
183
186
  "eventType": "behavior",
@@ -216,8 +219,8 @@ module.exports = function(RED) {
216
219
  <trackList><trackID>${videoTrackID}</trackID></trackList>
217
220
  <timeSpanList>
218
221
  <timeSpan>
219
- <startTime>${startSearchStr}</startTime>
220
- <endTime>${endSearchStr}</endTime>
222
+ <startTime>${startVideoSearch}</startTime>
223
+ <endTime>${endVideoSearch}</endTime>
221
224
  </timeSpan>
222
225
  </timeSpanList>
223
226
  <maxResults>1</maxResults>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-hik-media-buffer",
3
- "version": "1.1.128",
3
+ "version": "1.1.129",
4
4
  "description": "Ottiene buffer video e immagine da camere Hikvision via ISAPI",
5
5
  "keywords": [
6
6
  "node-red",