node-red-contrib-hik-media-buffer 1.1.111 → 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.
- package/hik-snapshot.js +4 -0
- package/package.json +1 -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,
|