@atelieruldetehnologii/node-red-custome-solutions 0.62.22
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/NOTICE +56 -0
- package/PROPRIETARY-LICENSE.txt +157 -0
- package/README.md +105 -0
- package/TERMS-AND-CONDITIONS.md +311 -0
- package/advantech-read/advantech-read.html +775 -0
- package/advantech-read/advantech-read.js +449 -0
- package/advantech-write/advantech-write.html +413 -0
- package/advantech-write/advantech-write.js +338 -0
- package/bess-control/bess-control.html +569 -0
- package/bess-control/bess-control.js +541 -0
- package/bess-control/lib/allocation.js +149 -0
- package/bess-control/lib/batteries.js +86 -0
- package/bess-control/lib/helpers.js +157 -0
- package/bess-control/lib/messages.js +131 -0
- package/bess-control/lib/runtime.js +156 -0
- package/carlo-gavazzi/carlo-gavazzi.html +4327 -0
- package/carlo-gavazzi/carlo-gavazzi.js +3081 -0
- package/control-export/control-export.html +3644 -0
- package/control-export/control-export.js +2192 -0
- package/control-reactive/control-reactive.html +3136 -0
- package/control-reactive/control-reactive.js +2124 -0
- package/fronius-emulator/README.md +258 -0
- package/fronius-emulator/fronius-emulator.html +170 -0
- package/fronius-emulator/fronius-emulator.js +520 -0
- package/fronius-emulator/lib/binary-codec.js +65 -0
- package/fronius-emulator/lib/fronius-register-map.js +185 -0
- package/fronius-emulator/lib/modbus-parser.js +61 -0
- package/fronius-emulator/lib/modbus-tcp-server.js +224 -0
- package/fronius-emulator/lib/validation.js +206 -0
- package/fronius-emulator/lib/virtual-meter.js +132 -0
- package/fronius-read/fronius-read.html +3944 -0
- package/fronius-read/fronius-read.js +1466 -0
- package/fronius-read/lib/inverter-profiles.js +711 -0
- package/fronius-read/lib/sunspec-core.js +303 -0
- package/fronius-read/lib/sunspec-model-parsers.js +845 -0
- package/fronius-write/fronius-write.html +1789 -0
- package/fronius-write/fronius-write.js +2531 -0
- package/influxdb/influxdb.html +1077 -0
- package/influxdb/influxdb.js +1487 -0
- package/janitza/janitza.html +2562 -0
- package/janitza/janitza.js +1500 -0
- package/janitza/lib/janitza-profiles.js +371 -0
- package/lib/a3-test-server.js +199 -0
- package/lib/adam-6000-profiles.js +173 -0
- package/lib/licensing/constants.js +103 -0
- package/lib/licensing/device-id.js +251 -0
- package/lib/licensing/errors.js +21 -0
- package/lib/licensing/license-client.js +377 -0
- package/lib/licensing/license-state.js +50 -0
- package/lib/licensing/node-guard.js +150 -0
- package/lib/licensing/package-integrity.js +167 -0
- package/lib/licensing/package-integrity.json +513 -0
- package/lib/licensing/public-key.pem +3 -0
- package/lib/licensing/public-key.pem.example +2 -0
- package/lib/licensing/public-keys.js +18 -0
- package/lib/licensing/storage.js +63 -0
- package/lib/licensing/token-verifier.js +84 -0
- package/lib/numbers.js +26 -0
- package/license/atelier-license.html +88 -0
- package/license/atelier-license.js +170 -0
- package/modbus-tcp-discover/modbus-tcp-discover.html +190 -0
- package/modbus-tcp-discover/modbus-tcp-discover.js +706 -0
- package/multi-battery/multi-battery.html +649 -0
- package/multi-battery/multi-battery.js +668 -0
- package/multi-grid/multi-grid.html +745 -0
- package/multi-grid/multi-grid.js +1392 -0
- package/multi-inverter/lib/engine-core.js +237 -0
- package/multi-inverter/multi-inverter.html +2674 -0
- package/multi-inverter/multi-inverter.js +1393 -0
- package/package.json +109 -0
- package/phoenix-contact/lib/eem-ma370-advanced.js +175 -0
- package/phoenix-contact/lib/eem-ma370.js +138 -0
- package/phoenix-contact/lib/integrations.js +149 -0
- package/phoenix-contact/lib/phoenix-contact-profile.js +35030 -0
- package/phoenix-contact/phoenix-contact.html +840 -0
- package/phoenix-contact/phoenix-contact.js +679 -0
- package/pv-generator/pv-generator.html +284 -0
- package/pv-generator/pv-generator.js +387 -0
- package/pylontech-read/pylontech-read.html +763 -0
- package/pylontech-read/pylontech-read.js +518 -0
- package/pylontech-write/pylontech-write.html +405 -0
- package/pylontech-write/pylontech-write.js +546 -0
- package/scada-aggregator/lib/aggregate.js +72 -0
- package/scada-aggregator/lib/groups.js +39 -0
- package/scada-aggregator/scada-aggregator.html +108 -0
- package/scada-aggregator/scada-aggregator.js +117 -0
- package/scada-server/lib/aggregator-map.js +58 -0
- package/scada-server/lib/encoding.js +235 -0
- package/scada-server/lib/modbus-server.js +492 -0
- package/scada-server/lib/object-path.js +18 -0
- package/scada-server/lib/register-map.js +288 -0
- package/scada-server/scada-server.html +1419 -0
- package/scada-server/scada-server.js +704 -0
- package/scripts/check-syntax.js +66 -0
- package/scripts/package-integrity.js +46 -0
- package/scripts/package-release.js +116 -0
- package/scripts/run-tests.js +2178 -0
- package/scripts/tgz-integrity.js +74 -0
- package/sma-read/lib/sunspec-core.js +83 -0
- package/sma-read/lib/sunspec-model-parsers.js +853 -0
- package/sma-read/sma-read.html +659 -0
- package/sma-read/sma-read.js +458 -0
- package/sma-write/sma-write.html +105 -0
- package/sma-write/sma-write.js +270 -0
- package/victron-read/lib/mqtt-state.js +176 -0
- package/victron-read/victron-read.html +1074 -0
- package/victron-read/victron-read.js +1222 -0
|
@@ -0,0 +1,1077 @@
|
|
|
1
|
+
<script type="text/javascript">
|
|
2
|
+
|
|
3
|
+
RED.nodes.registerType("adt-influxdb-server", {
|
|
4
|
+
|
|
5
|
+
category: "config",
|
|
6
|
+
|
|
7
|
+
defaults: {
|
|
8
|
+
|
|
9
|
+
name: { value: "" },
|
|
10
|
+
|
|
11
|
+
url: { value: "http://localhost:8086", required: true },
|
|
12
|
+
|
|
13
|
+
org: { value: "Service", required: true }
|
|
14
|
+
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
credentials: {
|
|
18
|
+
|
|
19
|
+
token: { type: "password" }
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
label: function () {
|
|
24
|
+
|
|
25
|
+
return this.name || this.url || "InfluxDB Server";
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var validateNumberOrBlank = function (value) {
|
|
33
|
+
|
|
34
|
+
return value === "" || value === null || value === undefined || RED.validators.number()(value);
|
|
35
|
+
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
RED.nodes.registerType("adt-influxdb", {
|
|
40
|
+
|
|
41
|
+
category: "Atelierul de Tehnologii",
|
|
42
|
+
|
|
43
|
+
color: "#7dd3fc",
|
|
44
|
+
|
|
45
|
+
defaults: {
|
|
46
|
+
license: { value: "", type: "atelier-license", required: true },
|
|
47
|
+
|
|
48
|
+
name: { value: "" },
|
|
49
|
+
|
|
50
|
+
server: { value: "", type: "adt-influxdb-server" },
|
|
51
|
+
|
|
52
|
+
url: { value: "http://localhost:8086", required: true },
|
|
53
|
+
|
|
54
|
+
org: { value: "Service", required: true },
|
|
55
|
+
|
|
56
|
+
bucket: { value: "", required: true },
|
|
57
|
+
|
|
58
|
+
measurement: { value: "dispozitiv", required: true },
|
|
59
|
+
|
|
60
|
+
precision: { value: "ns" },
|
|
61
|
+
|
|
62
|
+
staticTags: { value: "" },
|
|
63
|
+
|
|
64
|
+
includeTopicTag: { value: true },
|
|
65
|
+
|
|
66
|
+
batchSize: { value: 500, validate: validateNumberOrBlank },
|
|
67
|
+
|
|
68
|
+
flushIntervalMs: { value: 1000, validate: validateNumberOrBlank },
|
|
69
|
+
|
|
70
|
+
maxQueueSize: { value: 50000, validate: validateNumberOrBlank },
|
|
71
|
+
|
|
72
|
+
requestTimeoutMs: { value: 10000, validate: validateNumberOrBlank },
|
|
73
|
+
|
|
74
|
+
retryBaseMs: { value: 1000, validate: validateNumberOrBlank },
|
|
75
|
+
|
|
76
|
+
retryMaxMs: { value: 30000, validate: validateNumberOrBlank },
|
|
77
|
+
|
|
78
|
+
minWriteIntervalMs: { value: 1000, validate: validateNumberOrBlank },
|
|
79
|
+
|
|
80
|
+
heartbeatMs: { value: 60000, validate: validateNumberOrBlank },
|
|
81
|
+
|
|
82
|
+
dropPolicy: { value: "drop_oldest" },
|
|
83
|
+
|
|
84
|
+
errorLogMaxRepeats: { value: 10, validate: validateNumberOrBlank },
|
|
85
|
+
|
|
86
|
+
errorLogWindowMs: { value: 60000, validate: validateNumberOrBlank },
|
|
87
|
+
|
|
88
|
+
errorLogMuteMs: { value: 300000, validate: validateNumberOrBlank },
|
|
89
|
+
|
|
90
|
+
debugMode: { value: false },
|
|
91
|
+
|
|
92
|
+
statusOutput: { value: false }
|
|
93
|
+
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
credentials: {
|
|
97
|
+
|
|
98
|
+
token: { type: "password" }
|
|
99
|
+
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
inputs: 1,
|
|
103
|
+
|
|
104
|
+
outputs: 0,
|
|
105
|
+
|
|
106
|
+
icon: "font-awesome/fa-database",
|
|
107
|
+
|
|
108
|
+
align: "right",
|
|
109
|
+
|
|
110
|
+
label: function () {
|
|
111
|
+
|
|
112
|
+
return this.name || "adt-influxdb";
|
|
113
|
+
|
|
114
|
+
},
|
|
115
|
+
|
|
116
|
+
paletteLabel: "adt-influxdb",
|
|
117
|
+
|
|
118
|
+
oneditprepare: function () {
|
|
119
|
+
|
|
120
|
+
const node = this;
|
|
121
|
+
let advancedUnlocked = false;
|
|
122
|
+
let longPressTimer = null;
|
|
123
|
+
let suppressNextDebugClick = false;
|
|
124
|
+
|
|
125
|
+
function toggleLegacyConnection() {
|
|
126
|
+
|
|
127
|
+
const hasServer = !!String($("#node-input-server").val() || "").trim();
|
|
128
|
+
|
|
129
|
+
$(".influx-legacy-connection").toggle(!hasServer);
|
|
130
|
+
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function toggleAdvanced() {
|
|
134
|
+
|
|
135
|
+
$(".influx-advanced").toggle(advancedUnlocked);
|
|
136
|
+
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function applyRecommendedDefaults() {
|
|
140
|
+
|
|
141
|
+
const defaults = {
|
|
142
|
+
"#node-input-batchSize": "500",
|
|
143
|
+
"#node-input-flushIntervalMs": "1000",
|
|
144
|
+
"#node-input-minWriteIntervalMs": "1000",
|
|
145
|
+
"#node-input-heartbeatMs": "60000"
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
Object.keys(defaults).forEach(function (selector) {
|
|
149
|
+
const current = String($(selector).val() || "").trim();
|
|
150
|
+
if (!current || (selector === "#node-input-batchSize" && current === "1")) {
|
|
151
|
+
$(selector).val(defaults[selector]);
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
if (!String($("#node-input-dropPolicy").val() || "").trim()) {
|
|
156
|
+
$("#node-input-dropPolicy").val("drop_oldest");
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function syncOutputs() {
|
|
162
|
+
|
|
163
|
+
node.outputs = ($("#node-input-debugMode").is(":checked") || $("#node-input-statusOutput").is(":checked")) ? 1 : 0;
|
|
164
|
+
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function clearLongPress() {
|
|
168
|
+
|
|
169
|
+
if (longPressTimer) {
|
|
170
|
+
|
|
171
|
+
clearTimeout(longPressTimer);
|
|
172
|
+
|
|
173
|
+
longPressTimer = null;
|
|
174
|
+
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function startLongPress() {
|
|
180
|
+
|
|
181
|
+
clearLongPress();
|
|
182
|
+
|
|
183
|
+
longPressTimer = setTimeout(function () {
|
|
184
|
+
|
|
185
|
+
advancedUnlocked = true;
|
|
186
|
+
suppressNextDebugClick = true;
|
|
187
|
+
|
|
188
|
+
longPressTimer = null;
|
|
189
|
+
|
|
190
|
+
toggleAdvanced();
|
|
191
|
+
|
|
192
|
+
$("#node-input-debugMode").prop("checked", true);
|
|
193
|
+
|
|
194
|
+
syncOutputs();
|
|
195
|
+
|
|
196
|
+
RED.notify("Setarile avansate InfluxDB sunt afisate.", "success");
|
|
197
|
+
|
|
198
|
+
}, 5000);
|
|
199
|
+
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function setTestStatus(text, ok) {
|
|
203
|
+
|
|
204
|
+
$("#node-influx-test-result")
|
|
205
|
+
.text(text)
|
|
206
|
+
.css("color", ok ? "#1f7a3f" : "#a12626");
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
function testConnection() {
|
|
211
|
+
|
|
212
|
+
setTestStatus("Test in curs...", true);
|
|
213
|
+
|
|
214
|
+
$.ajax({
|
|
215
|
+
url: "adt-influxdb/test",
|
|
216
|
+
method: "POST",
|
|
217
|
+
contentType: "application/json",
|
|
218
|
+
data: JSON.stringify({
|
|
219
|
+
nodeId: node.id,
|
|
220
|
+
server: $("#node-input-server").val(),
|
|
221
|
+
url: $("#node-input-url").val(),
|
|
222
|
+
org: $("#node-input-org").val(),
|
|
223
|
+
bucket: $("#node-input-bucket").val(),
|
|
224
|
+
precision: $("#node-input-precision").val(),
|
|
225
|
+
requestTimeoutMs: $("#node-input-requestTimeoutMs").val()
|
|
226
|
+
})
|
|
227
|
+
}).done(function (res) {
|
|
228
|
+
if (res && res.ok) {
|
|
229
|
+
setTestStatus("Conexiune OK: Logs scris in bucket " + (res.bucket || $("#node-input-bucket").val() || "-") + ".", true);
|
|
230
|
+
} else {
|
|
231
|
+
setTestStatus((res && res.error) ? res.error : "Test connection esuat.", false);
|
|
232
|
+
}
|
|
233
|
+
}).fail(function (xhr) {
|
|
234
|
+
setTestStatus(xhr && xhr.responseText ? xhr.responseText : "Test connection esuat.", false);
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
$("#node-input-server")
|
|
240
|
+
|
|
241
|
+
.off(".adtInflux")
|
|
242
|
+
|
|
243
|
+
.on("change.adtInflux", toggleLegacyConnection);
|
|
244
|
+
|
|
245
|
+
toggleLegacyConnection();
|
|
246
|
+
|
|
247
|
+
applyRecommendedDefaults();
|
|
248
|
+
|
|
249
|
+
$("#node-input-debugMode")
|
|
250
|
+
.off(".adtInfluxDebug")
|
|
251
|
+
.on("mousedown.adtInfluxDebug touchstart.adtInfluxDebug", startLongPress)
|
|
252
|
+
.on("mouseup.adtInfluxDebug mouseleave.adtInfluxDebug touchend.adtInfluxDebug touchcancel.adtInfluxDebug", clearLongPress)
|
|
253
|
+
.on("change.adtInfluxDebug", syncOutputs)
|
|
254
|
+
.on("click.adtInfluxDebug", function (evt) {
|
|
255
|
+
if (suppressNextDebugClick) {
|
|
256
|
+
evt.preventDefault();
|
|
257
|
+
suppressNextDebugClick = false;
|
|
258
|
+
$("#node-input-debugMode").prop("checked", true);
|
|
259
|
+
}
|
|
260
|
+
syncOutputs();
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
$("#node-input-statusOutput")
|
|
264
|
+
.off(".adtInfluxOutputs")
|
|
265
|
+
.on("change.adtInfluxOutputs", syncOutputs);
|
|
266
|
+
|
|
267
|
+
$("#node-influx-test")
|
|
268
|
+
.off(".adtInfluxTest")
|
|
269
|
+
.on("click.adtInfluxTest", function (evt) {
|
|
270
|
+
evt.preventDefault();
|
|
271
|
+
testConnection();
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
syncOutputs();
|
|
275
|
+
toggleAdvanced();
|
|
276
|
+
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
oneditsave: function () {
|
|
280
|
+
|
|
281
|
+
$("#node-input-server").off(".adtInflux");
|
|
282
|
+
$("#node-input-debugMode").off(".adtInfluxDebug");
|
|
283
|
+
$("#node-input-statusOutput").off(".adtInfluxOutputs");
|
|
284
|
+
$("#node-influx-test").off(".adtInfluxTest");
|
|
285
|
+
this.outputs = ($("#node-input-debugMode").is(":checked") || $("#node-input-statusOutput").is(":checked")) ? 1 : 0;
|
|
286
|
+
|
|
287
|
+
},
|
|
288
|
+
|
|
289
|
+
oneditcancel: function () {
|
|
290
|
+
|
|
291
|
+
$("#node-input-server").off(".adtInflux");
|
|
292
|
+
$("#node-input-debugMode").off(".adtInfluxDebug");
|
|
293
|
+
$("#node-input-statusOutput").off(".adtInfluxOutputs");
|
|
294
|
+
$("#node-influx-test").off(".adtInfluxTest");
|
|
295
|
+
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
</script>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
<script type="text/html" data-template-name="adt-influxdb-server">
|
|
304
|
+
|
|
305
|
+
<div class="form-row">
|
|
306
|
+
|
|
307
|
+
<label for="node-config-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
308
|
+
|
|
309
|
+
<input type="text" id="node-config-input-name" placeholder="Server InfluxDB">
|
|
310
|
+
|
|
311
|
+
</div>
|
|
312
|
+
|
|
313
|
+
<div class="form-row">
|
|
314
|
+
|
|
315
|
+
<label for="node-config-input-url"><i class="fa fa-link"></i> URL</label>
|
|
316
|
+
|
|
317
|
+
<input type="text" id="node-config-input-url" placeholder="http://localhost:8086">
|
|
318
|
+
|
|
319
|
+
</div>
|
|
320
|
+
|
|
321
|
+
<div class="form-row">
|
|
322
|
+
|
|
323
|
+
<label for="node-config-input-org"><i class="fa fa-building"></i> Organizatie</label>
|
|
324
|
+
|
|
325
|
+
<input type="text" id="node-config-input-org" placeholder="Service">
|
|
326
|
+
|
|
327
|
+
</div>
|
|
328
|
+
|
|
329
|
+
<div class="form-row">
|
|
330
|
+
|
|
331
|
+
<label for="node-config-input-token"><i class="fa fa-key"></i> Token</label>
|
|
332
|
+
|
|
333
|
+
<input type="password" id="node-config-input-token">
|
|
334
|
+
|
|
335
|
+
</div>
|
|
336
|
+
|
|
337
|
+
</script>
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
<script type="text/html" data-help-name="adt-influxdb-server">
|
|
341
|
+
|
|
342
|
+
<p>Configuratie reutilizabila pentru conexiunea InfluxDB v2: URL, organizatie si token API.</p>
|
|
343
|
+
|
|
344
|
+
</script>
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
<script type="text/html" data-template-name="adt-influxdb">
|
|
348
|
+
<div class="form-row"><label for="node-input-license"><i class="fa fa-key"></i> License</label><input type="text" id="node-input-license"></div>
|
|
349
|
+
|
|
350
|
+
<style>
|
|
351
|
+
|
|
352
|
+
.influxdb-editor {
|
|
353
|
+
|
|
354
|
+
--influx-border: #d8e1ea;
|
|
355
|
+
|
|
356
|
+
--influx-bg: #f7fbff;
|
|
357
|
+
|
|
358
|
+
--influx-text: #263241;
|
|
359
|
+
|
|
360
|
+
--influx-muted: #5f6b7a;
|
|
361
|
+
|
|
362
|
+
max-width: 980px;
|
|
363
|
+
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
.influxdb-editor .form-row {
|
|
368
|
+
|
|
369
|
+
margin-bottom: 12px;
|
|
370
|
+
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
.influxdb-editor .form-row > label {
|
|
375
|
+
|
|
376
|
+
width: 120px;
|
|
377
|
+
|
|
378
|
+
font-weight: 600;
|
|
379
|
+
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
.influxdb-editor .form-row > input[type="text"],
|
|
384
|
+
|
|
385
|
+
.influxdb-editor .form-row > input[type="password"],
|
|
386
|
+
|
|
387
|
+
.influxdb-editor .form-row > input[type="number"],
|
|
388
|
+
|
|
389
|
+
.influxdb-editor .form-row > select {
|
|
390
|
+
|
|
391
|
+
width: calc(100% - 130px);
|
|
392
|
+
|
|
393
|
+
max-width: 430px;
|
|
394
|
+
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
.influxdb-editor .influx-section {
|
|
399
|
+
|
|
400
|
+
border: 1px solid var(--influx-border);
|
|
401
|
+
|
|
402
|
+
background: var(--influx-bg);
|
|
403
|
+
|
|
404
|
+
border-radius: 6px;
|
|
405
|
+
|
|
406
|
+
padding: 12px;
|
|
407
|
+
|
|
408
|
+
margin-bottom: 14px;
|
|
409
|
+
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
.influxdb-editor .influx-section-title {
|
|
414
|
+
|
|
415
|
+
margin: 0 0 6px 0;
|
|
416
|
+
|
|
417
|
+
font-weight: 700;
|
|
418
|
+
|
|
419
|
+
color: var(--influx-text);
|
|
420
|
+
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
.influxdb-editor .influx-section-title i.fa {
|
|
425
|
+
|
|
426
|
+
width: 16px;
|
|
427
|
+
|
|
428
|
+
margin-right: 6px;
|
|
429
|
+
|
|
430
|
+
text-align: center;
|
|
431
|
+
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
.influxdb-editor .influx-section-note {
|
|
436
|
+
|
|
437
|
+
margin: 0 0 12px 0;
|
|
438
|
+
|
|
439
|
+
color: var(--influx-muted);
|
|
440
|
+
|
|
441
|
+
line-height: 1.45;
|
|
442
|
+
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
.influxdb-editor .influx-grid {
|
|
447
|
+
|
|
448
|
+
display: grid;
|
|
449
|
+
|
|
450
|
+
grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
|
|
451
|
+
|
|
452
|
+
gap: 0 10px;
|
|
453
|
+
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
.influxdb-editor .influx-checkbox-row {
|
|
458
|
+
|
|
459
|
+
display: flex;
|
|
460
|
+
|
|
461
|
+
align-items: center;
|
|
462
|
+
|
|
463
|
+
gap: 8px;
|
|
464
|
+
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
.influxdb-editor .influx-checkbox-row input[type="checkbox"] {
|
|
469
|
+
|
|
470
|
+
width: auto;
|
|
471
|
+
|
|
472
|
+
margin: 0;
|
|
473
|
+
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
.influxdb-editor .influx-inline-note {
|
|
478
|
+
|
|
479
|
+
color: var(--influx-muted);
|
|
480
|
+
|
|
481
|
+
line-height: 1.35;
|
|
482
|
+
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
.influxdb-editor .influx-actions {
|
|
487
|
+
|
|
488
|
+
display: flex;
|
|
489
|
+
|
|
490
|
+
align-items: center;
|
|
491
|
+
|
|
492
|
+
gap: 10px;
|
|
493
|
+
|
|
494
|
+
flex-wrap: wrap;
|
|
495
|
+
|
|
496
|
+
margin-top: 4px;
|
|
497
|
+
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
|
|
501
|
+
.influxdb-editor .influx-test-result {
|
|
502
|
+
|
|
503
|
+
color: var(--influx-muted);
|
|
504
|
+
|
|
505
|
+
line-height: 1.35;
|
|
506
|
+
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
.influxdb-editor .influx-advanced {
|
|
511
|
+
|
|
512
|
+
display: none;
|
|
513
|
+
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
@media (max-width: 700px) {
|
|
518
|
+
|
|
519
|
+
.influxdb-editor .influx-grid {
|
|
520
|
+
|
|
521
|
+
grid-template-columns: 1fr;
|
|
522
|
+
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
</style>
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
<div class="influxdb-editor">
|
|
531
|
+
|
|
532
|
+
<div class="influx-section">
|
|
533
|
+
|
|
534
|
+
<p class="influx-section-title"><i class="fa fa-database"></i> InfluxDB v2</p>
|
|
535
|
+
|
|
536
|
+
<p class="influx-section-note">Bucket-ul reprezinta clientul, iar measurement-ul reprezinta dispozitivul care transmite date.</p>
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
<div class="influx-grid">
|
|
540
|
+
|
|
541
|
+
<div class="form-row">
|
|
542
|
+
|
|
543
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
|
|
544
|
+
|
|
545
|
+
<input type="text" id="node-input-name" placeholder="adt-influxdb">
|
|
546
|
+
|
|
547
|
+
</div>
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
<div class="form-row">
|
|
551
|
+
|
|
552
|
+
<label for="node-input-server"><i class="fa fa-server"></i> Server</label>
|
|
553
|
+
|
|
554
|
+
<input type="text" id="node-input-server">
|
|
555
|
+
|
|
556
|
+
</div>
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
<div class="form-row influx-legacy-connection">
|
|
560
|
+
|
|
561
|
+
<label for="node-input-url"><i class="fa fa-link"></i> URL</label>
|
|
562
|
+
|
|
563
|
+
<input type="text" id="node-input-url" placeholder="http://localhost:8086">
|
|
564
|
+
|
|
565
|
+
</div>
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
<div class="form-row influx-legacy-connection">
|
|
569
|
+
|
|
570
|
+
<label for="node-input-token"><i class="fa fa-key"></i> Token</label>
|
|
571
|
+
|
|
572
|
+
<input type="password" id="node-input-token">
|
|
573
|
+
|
|
574
|
+
</div>
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
<div class="form-row influx-legacy-connection">
|
|
578
|
+
|
|
579
|
+
<label for="node-input-org"><i class="fa fa-building"></i> Organizatie</label>
|
|
580
|
+
|
|
581
|
+
<input type="text" id="node-input-org" placeholder="Service">
|
|
582
|
+
|
|
583
|
+
</div>
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
<div class="form-row">
|
|
587
|
+
|
|
588
|
+
<label for="node-input-bucket"><i class="fa fa-archive"></i> Bucket client</label>
|
|
589
|
+
|
|
590
|
+
<input type="text" id="node-input-bucket" placeholder="Nume Client">
|
|
591
|
+
|
|
592
|
+
</div>
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
<div class="form-row">
|
|
596
|
+
|
|
597
|
+
<label for="node-input-measurement"><i class="fa fa-line-chart"></i> Measurement</label>
|
|
598
|
+
|
|
599
|
+
<input type="text" id="node-input-measurement" placeholder="Fronius">
|
|
600
|
+
|
|
601
|
+
</div>
|
|
602
|
+
|
|
603
|
+
</div>
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
<div class="influx-actions">
|
|
607
|
+
|
|
608
|
+
<button type="button" class="red-ui-button" id="node-influx-test"><i class="fa fa-plug"></i> Test connection</button>
|
|
609
|
+
|
|
610
|
+
<span class="influx-test-result" id="node-influx-test-result"></span>
|
|
611
|
+
|
|
612
|
+
</div>
|
|
613
|
+
|
|
614
|
+
</div>
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
<div class="influx-section">
|
|
618
|
+
|
|
619
|
+
<p class="influx-section-title"><i class="fa fa-cogs"></i> Scriere</p>
|
|
620
|
+
|
|
621
|
+
<p class="influx-section-note">Field-urile sunt valorile numerice trimise de dispozitiv; tag-urile raman pentru context suplimentar.</p>
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
<div class="influx-grid">
|
|
625
|
+
|
|
626
|
+
<div class="form-row">
|
|
627
|
+
|
|
628
|
+
<label for="node-input-staticTags"><i class="fa fa-tags"></i> Tags</label>
|
|
629
|
+
|
|
630
|
+
<input type="text" id="node-input-staticTags" placeholder="site=site1,system=ems">
|
|
631
|
+
|
|
632
|
+
</div>
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
<div class="form-row">
|
|
636
|
+
|
|
637
|
+
<label for="node-input-precision"><i class="fa fa-clock-o"></i> Precision</label>
|
|
638
|
+
|
|
639
|
+
<select id="node-input-precision">
|
|
640
|
+
|
|
641
|
+
<option value="ns">ns</option>
|
|
642
|
+
|
|
643
|
+
<option value="us">us</option>
|
|
644
|
+
|
|
645
|
+
<option value="ms">ms</option>
|
|
646
|
+
|
|
647
|
+
<option value="s">s</option>
|
|
648
|
+
|
|
649
|
+
</select>
|
|
650
|
+
|
|
651
|
+
</div>
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
<div class="form-row">
|
|
655
|
+
|
|
656
|
+
<label for="node-input-batchSize"><i class="fa fa-list-ol"></i> Batch size</label>
|
|
657
|
+
|
|
658
|
+
<input type="number" id="node-input-batchSize" min="1" step="1" placeholder="500">
|
|
659
|
+
|
|
660
|
+
</div>
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
<div class="form-row">
|
|
664
|
+
|
|
665
|
+
<label for="node-input-flushIntervalMs"><i class="fa fa-refresh"></i> Flush ms</label>
|
|
666
|
+
|
|
667
|
+
<input type="number" id="node-input-flushIntervalMs" min="100" step="100" placeholder="1000">
|
|
668
|
+
|
|
669
|
+
</div>
|
|
670
|
+
|
|
671
|
+
</div>
|
|
672
|
+
|
|
673
|
+
|
|
674
|
+
<div class="form-row influx-checkbox-row">
|
|
675
|
+
|
|
676
|
+
<label for="node-input-includeTopicTag"><i class="fa fa-bookmark"></i> Topic tag</label>
|
|
677
|
+
|
|
678
|
+
<input type="checkbox" id="node-input-includeTopicTag">
|
|
679
|
+
|
|
680
|
+
<span class="influx-inline-note">Adauga automat <code>msg.topic</code> ca tag daca mesajul nu are deja tag explicit.</span>
|
|
681
|
+
|
|
682
|
+
</div>
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
<div class="form-row influx-checkbox-row">
|
|
686
|
+
|
|
687
|
+
<label for="node-input-debugMode"><i class="fa fa-bug"></i> Debug</label>
|
|
688
|
+
|
|
689
|
+
<input type="checkbox" id="node-input-debugMode">
|
|
690
|
+
|
|
691
|
+
</div>
|
|
692
|
+
|
|
693
|
+
</div>
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
<div class="influx-section influx-advanced">
|
|
697
|
+
|
|
698
|
+
<p class="influx-section-title"><i class="fa fa-wrench"></i> Setari avansate</p>
|
|
699
|
+
|
|
700
|
+
<p class="influx-section-note">Setari pentru coada, retry si diagnostic. Se folosesc doar cand ai nevoie de control operational fin.</p>
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
<div class="influx-grid">
|
|
704
|
+
|
|
705
|
+
<div class="form-row">
|
|
706
|
+
|
|
707
|
+
<label for="node-input-maxQueueSize"><i class="fa fa-list"></i> Max queue</label>
|
|
708
|
+
|
|
709
|
+
<input type="number" id="node-input-maxQueueSize" min="1" step="1" placeholder="50000">
|
|
710
|
+
|
|
711
|
+
</div>
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
<div class="form-row">
|
|
715
|
+
|
|
716
|
+
<label for="node-input-requestTimeoutMs"><i class="fa fa-hourglass"></i> Timeout ms</label>
|
|
717
|
+
|
|
718
|
+
<input type="number" id="node-input-requestTimeoutMs" min="100" step="100" placeholder="10000">
|
|
719
|
+
|
|
720
|
+
</div>
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
<div class="form-row">
|
|
724
|
+
|
|
725
|
+
<label for="node-input-retryBaseMs"><i class="fa fa-repeat"></i> Retry base</label>
|
|
726
|
+
|
|
727
|
+
<input type="number" id="node-input-retryBaseMs" min="100" step="100" placeholder="1000">
|
|
728
|
+
|
|
729
|
+
</div>
|
|
730
|
+
|
|
731
|
+
|
|
732
|
+
<div class="form-row">
|
|
733
|
+
|
|
734
|
+
<label for="node-input-retryMaxMs"><i class="fa fa-clock-o"></i> Retry max</label>
|
|
735
|
+
|
|
736
|
+
<input type="number" id="node-input-retryMaxMs" min="100" step="100" placeholder="30000">
|
|
737
|
+
|
|
738
|
+
</div>
|
|
739
|
+
|
|
740
|
+
|
|
741
|
+
<div class="form-row">
|
|
742
|
+
|
|
743
|
+
<label for="node-input-minWriteIntervalMs"><i class="fa fa-filter"></i> Min interval</label>
|
|
744
|
+
|
|
745
|
+
<input type="number" id="node-input-minWriteIntervalMs" min="0" step="100" placeholder="1000">
|
|
746
|
+
|
|
747
|
+
</div>
|
|
748
|
+
|
|
749
|
+
|
|
750
|
+
<div class="form-row">
|
|
751
|
+
|
|
752
|
+
<label for="node-input-heartbeatMs"><i class="fa fa-heartbeat"></i> Heartbeat</label>
|
|
753
|
+
|
|
754
|
+
<input type="number" id="node-input-heartbeatMs" min="0" step="1000" placeholder="60000">
|
|
755
|
+
|
|
756
|
+
</div>
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
<div class="form-row">
|
|
760
|
+
|
|
761
|
+
<label for="node-input-dropPolicy"><i class="fa fa-trash"></i> Drop policy</label>
|
|
762
|
+
|
|
763
|
+
<select id="node-input-dropPolicy">
|
|
764
|
+
|
|
765
|
+
<option value="drop_oldest">Drop oldest</option>
|
|
766
|
+
|
|
767
|
+
<option value="drop_newest">Drop newest</option>
|
|
768
|
+
|
|
769
|
+
</select>
|
|
770
|
+
|
|
771
|
+
</div>
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
<div class="form-row">
|
|
775
|
+
|
|
776
|
+
<label for="node-input-errorLogMaxRepeats"><i class="fa fa-exclamation-triangle"></i> Err repeats</label>
|
|
777
|
+
|
|
778
|
+
<input type="number" id="node-input-errorLogMaxRepeats" min="1" step="1" placeholder="10">
|
|
779
|
+
|
|
780
|
+
</div>
|
|
781
|
+
|
|
782
|
+
|
|
783
|
+
<div class="form-row">
|
|
784
|
+
|
|
785
|
+
<label for="node-input-errorLogWindowMs"><i class="fa fa-hourglass-half"></i> Err window</label>
|
|
786
|
+
|
|
787
|
+
<input type="number" id="node-input-errorLogWindowMs" min="1000" step="1000" placeholder="60000">
|
|
788
|
+
|
|
789
|
+
</div>
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
<div class="form-row">
|
|
793
|
+
|
|
794
|
+
<label for="node-input-errorLogMuteMs"><i class="fa fa-volume-off"></i> Err mute</label>
|
|
795
|
+
|
|
796
|
+
<input type="number" id="node-input-errorLogMuteMs" min="1000" step="1000" placeholder="300000">
|
|
797
|
+
|
|
798
|
+
</div>
|
|
799
|
+
|
|
800
|
+
</div>
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
<div class="form-row influx-checkbox-row">
|
|
804
|
+
|
|
805
|
+
<label for="node-input-statusOutput"><i class="fa fa-sign-out"></i> Status output</label>
|
|
806
|
+
|
|
807
|
+
<input type="checkbox" id="node-input-statusOutput">
|
|
808
|
+
|
|
809
|
+
<span class="influx-inline-note">Adauga o iesire cu mesaje pentru write, error, drop, throttle si empty.</span>
|
|
810
|
+
|
|
811
|
+
</div>
|
|
812
|
+
|
|
813
|
+
</div>
|
|
814
|
+
|
|
815
|
+
</div>
|
|
816
|
+
|
|
817
|
+
</script>
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
<script type="text/html" data-help-name="adt-influxdb">
|
|
821
|
+
|
|
822
|
+
<p>
|
|
823
|
+
|
|
824
|
+
Nodul <b>adt-influxdb</b> grupeaza puncte si le scrie in InfluxDB v2 prin API-ul HTTP <code>/api/v2/write</code>.
|
|
825
|
+
|
|
826
|
+
</p>
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
<h3>Configurare</h3>
|
|
830
|
+
|
|
831
|
+
<ul>
|
|
832
|
+
|
|
833
|
+
<li><b>Server</b>: configuratie reutilizabila cu URL, organizatie si token API. O definesti o singura data si o alegi in fiecare nod.</li>
|
|
834
|
+
|
|
835
|
+
<li><b>URL</b>: adresa serverului, de exemplu <code>http://localhost:8086</code></li>
|
|
836
|
+
|
|
837
|
+
<li><b>Token</b>: token InfluxDB v2 cu drept de scriere in bucket</li>
|
|
838
|
+
|
|
839
|
+
<li><b>Organization</b>: organizatia InfluxDB</li>
|
|
840
|
+
|
|
841
|
+
<li><b>Bucket client</b>: bucket-ul clientului, de exemplu <code>Phoenix Contact</code></li>
|
|
842
|
+
|
|
843
|
+
<li><b>Measurement</b>: dispozitivul sau sursa, de exemplu <code>Fronius</code>, <code>Meter Traf 1</code>, <code>Janitza</code></li>
|
|
844
|
+
|
|
845
|
+
<li><b>Tags</b>: context suplimentar in format <code>site=site1,device_type=fronius</code> sau JSON <code>{"site":"site1"}</code></li>
|
|
846
|
+
|
|
847
|
+
</ul>
|
|
848
|
+
|
|
849
|
+
|
|
850
|
+
<h3>Structura recomandata</h3>
|
|
851
|
+
|
|
852
|
+
<ul>
|
|
853
|
+
|
|
854
|
+
<li><b>Bucket</b>: clientul</li>
|
|
855
|
+
|
|
856
|
+
<li><b>Measurement</b>: dispozitivul care transmite date</li>
|
|
857
|
+
|
|
858
|
+
<li><b>Field</b>: valorile numerice efective, de exemplu <code>power_w</code>, <code>current_l1_a</code>, <code>CosFi_Avg</code></li>
|
|
859
|
+
|
|
860
|
+
</ul>
|
|
861
|
+
|
|
862
|
+
|
|
863
|
+
<h3>Format recomandat</h3>
|
|
864
|
+
|
|
865
|
+
<pre>{
|
|
866
|
+
|
|
867
|
+
"topic": "Meter Traf 1",
|
|
868
|
+
|
|
869
|
+
"influx": {
|
|
870
|
+
|
|
871
|
+
"measurement": "Meter Traf 1",
|
|
872
|
+
|
|
873
|
+
"tags": { "device_type": "carlo_gavazzi", "site": "tablou_principal" },
|
|
874
|
+
|
|
875
|
+
"fields": { "power_w": 1234, "frequency_hz": 50.01, "CosFi_Avg": 0.98 },
|
|
876
|
+
|
|
877
|
+
"timestamp": "2026-04-23T09:00:00.000Z"
|
|
878
|
+
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
}</pre>
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
<h3>Format generic</h3>
|
|
885
|
+
|
|
886
|
+
<p>
|
|
887
|
+
|
|
888
|
+
Daca primeste un <code>msg.payload</code> obiect, nodul extrage recursiv doar campurile numerice. String-urile numerice sunt convertite, iar textul si booleenele sunt ignorate. Daca primeste o valoare numerica simpla, o scrie in campul <code>value</code>.
|
|
889
|
+
|
|
890
|
+
</p>
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
<h3>Referinta completa parametri</h3>
|
|
894
|
+
|
|
895
|
+
<ul>
|
|
896
|
+
|
|
897
|
+
<li><code>server</code>: config node optional de tip <code>adt-influxdb-server</code>. Daca este setat, nodul foloseste URL, org si token din aceasta configuratie.</li>
|
|
898
|
+
|
|
899
|
+
<li><code>url</code>: URL-ul serverului InfluxDB v2.</li>
|
|
900
|
+
|
|
901
|
+
<li><code>org</code>: organizatia InfluxDB.</li>
|
|
902
|
+
|
|
903
|
+
<li><code>bucket</code>: bucket-ul in care se scriu punctele.</li>
|
|
904
|
+
|
|
905
|
+
<li><code>measurement</code>: measurement implicit daca mesajul nu contine <code>msg.influx.measurement</code>.</li>
|
|
906
|
+
|
|
907
|
+
<li><code>precision</code>: precizia timestamp-ului trimis catre API, de exemplu <code>ms</code> sau <code>ns</code>.</li>
|
|
908
|
+
|
|
909
|
+
<li><code>staticTags</code>: tag-uri fixe in format <code>key=value,key2=value2</code>.</li>
|
|
910
|
+
|
|
911
|
+
<li><code>includeTopicTag</code>: adauga <code>msg.topic</code> ca tag pentru trasabilitate.</li>
|
|
912
|
+
|
|
913
|
+
<li><code>batchSize</code>: numarul maxim de puncte acumulate inainte de flush. Implicit <code>500</code>.</li>
|
|
914
|
+
|
|
915
|
+
<li><code>flushIntervalMs</code>: intervalul maxim de asteptare pana la scrierea batch-ului. Implicit <code>1000</code> ms.</li>
|
|
916
|
+
|
|
917
|
+
<li><code>debugMode</code>: afiseaza detalii suplimentare in statusul nodului si activeaza iesirea de diagnostic.</li>
|
|
918
|
+
|
|
919
|
+
<li><code>statusOutput</code>: adauga o iesire cu evenimente de diagnostic.</li>
|
|
920
|
+
|
|
921
|
+
<li><code>maxQueueSize</code>: limita maxima a cozii; la depasire se elimina cele mai vechi puncte.</li>
|
|
922
|
+
|
|
923
|
+
<li><code>requestTimeoutMs</code>: timeout HTTP pentru scrierea in InfluxDB.</li>
|
|
924
|
+
|
|
925
|
+
<li><code>retryBaseMs</code> si <code>retryMaxMs</code>: controleaza retry-ul exponential dupa erori.</li>
|
|
926
|
+
|
|
927
|
+
<li><code>minWriteIntervalMs</code>: interval minim intre doua scrieri pentru aceeasi serie InfluxDB (<code>measurement + tags</code>).</li>
|
|
928
|
+
|
|
929
|
+
<li><code>heartbeatMs</code>: daca valorile sunt identice, scrie totusi periodic dupa acest interval.</li>
|
|
930
|
+
|
|
931
|
+
<li><code>dropPolicy</code>: alege ce puncte sunt eliminate cand coada depaseste limita: cele mai vechi sau cele mai noi.</li>
|
|
932
|
+
|
|
933
|
+
<li><code>errorLogMaxRepeats</code>: numarul maxim de erori identice scrise in <code>Logs</code> intr-o fereastra. Implicit <code>10</code>.</li>
|
|
934
|
+
|
|
935
|
+
<li><code>errorLogWindowMs</code>: fereastra in care se numara erorile identice. Implicit <code>60000</code> ms.</li>
|
|
936
|
+
|
|
937
|
+
<li><code>errorLogMuteMs</code>: perioada in care erorile identice sunt suprimate dupa depasirea limitei. Implicit <code>300000</code> ms.</li>
|
|
938
|
+
|
|
939
|
+
</ul>
|
|
940
|
+
|
|
941
|
+
|
|
942
|
+
<h3>Parametri de scriere si performanta</h3>
|
|
943
|
+
|
|
944
|
+
<ul>
|
|
945
|
+
|
|
946
|
+
<li><b>Batch size</b> (<code>batchSize</code>) - cate puncte sunt trimise intr-un singur request HTTP catre InfluxDB. Valoarea mica produce multe request-uri; valoarea mare reduce traficul HTTP si ajuta cand multe noduri trimit simultan. Recomandat pentru mai multe invertoare: <code>500</code> sau <code>1000</code>.</li>
|
|
947
|
+
|
|
948
|
+
<li><b>Flush ms</b> (<code>flushIntervalMs</code>) - timpul maxim cat nodul asteapta inainte sa trimita ce are in coada, chiar daca nu s-a atins <code>batchSize</code>. Valori mici trimit mai des, valori mari cresc intarzierea dar reduc request-urile. Recomandat: <code>1000</code>-<code>2000</code> ms.</li>
|
|
949
|
+
|
|
950
|
+
<li><b>Max queue</b> (<code>maxQueueSize</code>) - limita de siguranta pentru punctele pastrate in memorie cand InfluxDB nu poate primi date destul de repede. Cand limita este depasita, se aplica <code>dropPolicy</code>. Recomandat: suficient de mare pentru cateva minute de date, dar nu infinit.</li>
|
|
951
|
+
|
|
952
|
+
<li><b>Timeout ms</b> (<code>requestTimeoutMs</code>) - timpul maxim permis pentru un request HTTP de scriere. Daca expira, batch-ul este pus inapoi in coada si intra retry-ul. Recomandat: <code>10000</code> ms pentru retea locala.</li>
|
|
953
|
+
|
|
954
|
+
<li><b>Retry base</b> (<code>retryBaseMs</code>) - prima intarziere dupa o eroare de scriere. Retry-ul creste exponential pornind de aici.</li>
|
|
955
|
+
|
|
956
|
+
<li><b>Retry max</b> (<code>retryMaxMs</code>) - limita maxima pana la care poate creste intarzierea de retry. Recomandat: <code>30000</code> ms, ca sa nu inunde serverul cand InfluxDB este indisponibil.</li>
|
|
957
|
+
|
|
958
|
+
</ul>
|
|
959
|
+
|
|
960
|
+
|
|
961
|
+
<h3>Reducerea traficului</h3>
|
|
962
|
+
|
|
963
|
+
<ul>
|
|
964
|
+
|
|
965
|
+
<li><b>Min interval</b> (<code>minWriteIntervalMs</code>) - intervalul minim intre doua scrieri acceptate pentru aceeasi serie InfluxDB. Seria este identificata prin <code>measurement + tags</code>, de exemplu <code>Fronius,inverter_id=inv1,host=192.168...</code>. Daca o serie trimite mai des decat intervalul, punctele intermediare sunt sarite. <code>0</code> dezactiveaza limitarea. Recomandat: <code>1000</code> ms.</li>
|
|
966
|
+
|
|
967
|
+
<li><b>Heartbeat</b> (<code>heartbeatMs</code>) - daca valorile pentru aceeasi serie sunt identice, nodul nu le rescrie continuu, dar pastreaza o scriere periodica dupa acest interval. Asa vezi ca dispozitivul este inca activ fara sa incarci baza inutil. <code>0</code> foloseste <code>minWriteIntervalMs</code> ca prag pentru valori identice. Recomandat: <code>60000</code> ms.</li>
|
|
968
|
+
|
|
969
|
+
<li><b>Drop policy</b> (<code>dropPolicy</code>) - decide ce se elimina cand <code>maxQueueSize</code> este depasit. <code>drop_oldest</code> pastreaza datele cele mai recente si este recomandat pentru monitorizare live. <code>drop_newest</code> pastreaza backlog-ul vechi si elimina datele noi intrate peste limita.</li>
|
|
970
|
+
|
|
971
|
+
<li><b>Debug</b> (<code>debugMode</code>) - adauga in statusul nodului informatii precum coada curenta, puncte eliminate si puncte sarite prin throttling, apoi activeaza iesirea de diagnostic a nodului. Setarile avansate apar in editor doar dupa apasare 5 secunde pe bifa Debug.</li>
|
|
972
|
+
|
|
973
|
+
<li><b>Status output</b> (<code>statusOutput</code>) - adauga o iesire care emite evenimente de diagnostic: <code>write</code>, <code>error</code>, <code>drop</code>, <code>throttle</code> si <code>empty</code>. Este util pentru alarme sau dashboard operational.</li>
|
|
974
|
+
|
|
975
|
+
<li><b>Err repeats/window/mute</b> (<code>errorLogMaxRepeats</code>, <code>errorLogWindowMs</code>, <code>errorLogMuteMs</code>) - limiteaza scrierea erorilor repetitive in <code>Logs</code>. Implicit: maximum <code>10</code> erori identice in <code>60000</code> ms, apoi pauza de <code>300000</code> ms.</li>
|
|
976
|
+
|
|
977
|
+
</ul>
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
<h3>Note de migrare</h3>
|
|
981
|
+
|
|
982
|
+
<p>
|
|
983
|
+
|
|
984
|
+
Nodurile deja existente in flow pastreaza valorile salvate anterior. Dupa update, deschide nodul <b>adt-influxdb</b> si seteaza explicit
|
|
985
|
+
<code>batchSize=500</code>, <code>flushIntervalMs=1000</code>, <code>minWriteIntervalMs=1000</code> si <code>heartbeatMs=60000</code>
|
|
986
|
+
daca vrei profilul optimizat pentru multe valori pe secunda.
|
|
987
|
+
|
|
988
|
+
</p>
|
|
989
|
+
|
|
990
|
+
|
|
991
|
+
<h3>Setari avansate</h3>
|
|
992
|
+
|
|
993
|
+
<p>
|
|
994
|
+
|
|
995
|
+
Bifa <b>Debug</b> este vizibila in editor. Pentru a afisa setarile avansate, tine apasat 5 secunde pe bifa.
|
|
996
|
+
Setarile avansate includ limita cozii, timeout-ul HTTP, retry-ul, reducerea scrierilor repetate, limitarea logurilor de eroare si iesirea de status.
|
|
997
|
+
|
|
998
|
+
</p>
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
<h3>Reducerea scrierilor repetate</h3>
|
|
1002
|
+
|
|
1003
|
+
<p>
|
|
1004
|
+
|
|
1005
|
+
Nodul tine minte ultima scriere pentru fiecare serie InfluxDB, identificata prin <code>measurement + tags</code>.
|
|
1006
|
+
Daca valorile se schimba prea repede, <code>minWriteIntervalMs</code> limiteaza frecventa scrierilor.
|
|
1007
|
+
Daca valorile sunt identice, <code>heartbeatMs</code> pastreaza o scriere periodica fara sa incarce inutil baza de date.
|
|
1008
|
+
|
|
1009
|
+
</p>
|
|
1010
|
+
|
|
1011
|
+
<p>
|
|
1012
|
+
|
|
1013
|
+
Pentru multe invertoare care trimit des, o configuratie de pornire buna este:
|
|
1014
|
+
<code>batchSize=500</code>, <code>flushIntervalMs=1000</code>, <code>minWriteIntervalMs=1000</code>,
|
|
1015
|
+
<code>heartbeatMs=60000</code> si <code>dropPolicy=drop_oldest</code>.
|
|
1016
|
+
|
|
1017
|
+
</p>
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
<h3>Test connection</h3>
|
|
1021
|
+
|
|
1022
|
+
<p>
|
|
1023
|
+
|
|
1024
|
+
Butonul <b>Test connection</b> scrie un punct numeric in measurement-ul <code>Logs</code> din <b>Bucket client</b> setat in editor.
|
|
1025
|
+
Measurement-ul dispozitivului nu este folosit pentru test. Pentru testarea tokenului din credentiale, salveaza/deploy nodul sau config node-ul inainte de test.
|
|
1026
|
+
|
|
1027
|
+
</p>
|
|
1028
|
+
|
|
1029
|
+
<p>
|
|
1030
|
+
|
|
1031
|
+
Punctul de test foloseste tag-uri sugestive, precum <code>source=node_red</code>, <code>node_type=adt-influxdb</code>,
|
|
1032
|
+
<code>event=connection_test</code> si <code>test=manual</code>. Field-urile sunt numerice:
|
|
1033
|
+
<code>connection_test=1</code> si <code>connection_error=0</code>.
|
|
1034
|
+
|
|
1035
|
+
</p>
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
<h3>Loguri de eroare</h3>
|
|
1039
|
+
|
|
1040
|
+
<p>
|
|
1041
|
+
|
|
1042
|
+
Erorile interne ale nodului sunt scrise tot in measurement-ul <code>Logs</code>, best-effort, ca sa nu creeze bucle daca InfluxDB este indisponibil.
|
|
1043
|
+
Cand apare o eroare de configurare sau scriere, nodul scrie field-uri numerice <code>0/1</code>, de exemplu
|
|
1044
|
+
<code>error=1</code>, <code>write_error=1</code> sau <code>config_error=1</code>.
|
|
1045
|
+
|
|
1046
|
+
</p>
|
|
1047
|
+
|
|
1048
|
+
<p>
|
|
1049
|
+
|
|
1050
|
+
Dupa o scriere reusita, nodul scrie starea de revenire numai daca anterior exista o eroare activa:
|
|
1051
|
+
<code>error=0</code>, <code>write_error=0</code>, <code>config_error=0</code>, <code>recovered=1</code>.
|
|
1052
|
+
Tag-urile includ context precum <code>node</code>, <code>bucket</code>, <code>measurement</code>, <code>event</code> si <code>reason</code>.
|
|
1053
|
+
|
|
1054
|
+
</p>
|
|
1055
|
+
|
|
1056
|
+
<p>
|
|
1057
|
+
|
|
1058
|
+
Pentru a evita buclele de logare, erorile sunt grupate dupa <code>event</code>, <code>reason</code> si <code>error_class</code>.
|
|
1059
|
+
Daca aceeasi eroare apare de peste <code>10</code> ori in <code>60000</code> ms, nodul scrie un singur punct cu
|
|
1060
|
+
<code>error=1</code>, <code>muted=1</code> si <code>suppressed_count</code>, apoi suprima aceeasi eroare timp de
|
|
1061
|
+
<code>300000</code> ms. Valorile sunt campuri numerice.
|
|
1062
|
+
|
|
1063
|
+
</p>
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
<h3>Exemplu generic</h3>
|
|
1067
|
+
|
|
1068
|
+
<pre>{
|
|
1069
|
+
"topic": "grid",
|
|
1070
|
+
"payload": {
|
|
1071
|
+
"power_w": -1200,
|
|
1072
|
+
"voltage_l1_v": 230.2
|
|
1073
|
+
}
|
|
1074
|
+
}</pre>
|
|
1075
|
+
|
|
1076
|
+
</script>
|
|
1077
|
+
|