node-red-contrib-hik-media-buffer 1.1.110 → 1.1.112

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.
Files changed (2) hide show
  1. package/hik-snapshot.js +4 -0
  2. package/package.json +2 -1
package/hik-snapshot.js CHANGED
@@ -8,6 +8,9 @@ module.exports = function(RED) {
8
8
  RED.nodes.createNode(this, config);
9
9
  const node = this;
10
10
 
11
+ // Recuperiamo il nome del nodo dalla configurazione (se vuoto usa l'host)
12
+ node.nodeName = config.name || `NVR_${config.host}`;
13
+
11
14
  node.protocol = config.protocol || "http";
12
15
  node.host = config.host;
13
16
  node.port = config.port || "80";
@@ -42,6 +45,7 @@ module.exports = function(RED) {
42
45
  const recordXml = `<?xml version="1.0" encoding="utf-8"?><trackDailyParam><year>${year}</year><monthOfYear>${month}</monthOfYear><dayOfMonth>${day}</dayOfMonth></trackDailyParam>`;
43
46
 
44
47
  let resCanale = {
48
+ name: node.nodeName, // <--- INIEZIONE RIGIDA DEL NOME DEL CONDOMINIO
45
49
  channel: i,
46
50
  photo: null,
47
51
  snapOk: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-hik-media-buffer",
3
- "version": "1.1.110",
3
+ "version": "1.1.112",
4
4
  "description": "Ottiene buffer video e immagine da camere Hikvision via ISAPI",
5
5
  "keywords": [
6
6
  "node-red",
@@ -22,6 +22,7 @@
22
22
  "dependencies": {
23
23
  "@mhoc/axios-digest-auth": "^0.8.0",
24
24
  "axios": "^1.6.0",
25
+ "node-red-contrib-hik-media-buffer": "^1.1.109",
25
26
  "xml2js": "^0.6.2"
26
27
  }
27
28
  }