smart-nodes 0.3.36 → 0.4.0
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/CHANGELOG.md +62 -0
- package/README.md +35 -17
- package/central/central.html +27 -24
- package/central/central.js +84 -26
- package/central/locales/de-DE/central.html +10 -0
- package/central/locales/de-DE/central.json +14 -0
- package/central/locales/en-US/central.html +10 -0
- package/central/locales/en-US/central.json +14 -0
- package/compare/compare.html +64 -87
- package/compare/compare.js +69 -29
- package/compare/locales/de-DE/compare.html +36 -0
- package/compare/locales/de-DE/compare.json +35 -0
- package/compare/locales/en-US/compare.html +36 -0
- package/compare/locales/en-US/compare.json +35 -0
- package/counter/counter.html +70 -72
- package/counter/counter.js +43 -20
- package/counter/locales/de-DE/counter.html +48 -0
- package/counter/locales/de-DE/counter.json +21 -0
- package/counter/locales/en-US/counter.html +48 -0
- package/counter/locales/en-US/counter.json +21 -0
- package/delay/delay.html +30 -102
- package/delay/delay.js +63 -20
- package/delay/locales/de-DE/delay.html +71 -0
- package/delay/locales/de-DE/delay.json +19 -0
- package/delay/locales/en-US/delay.html +76 -0
- package/delay/locales/en-US/delay.json +19 -0
- package/forwarder/forwarder.html +11 -42
- package/forwarder/forwarder.js +59 -18
- package/forwarder/locales/de-DE/forwarder.html +32 -0
- package/forwarder/locales/de-DE/forwarder.json +15 -0
- package/forwarder/locales/en-US/forwarder.html +32 -0
- package/forwarder/locales/en-US/forwarder.json +15 -0
- package/heating-curve/heating-curve.html +10 -51
- package/heating-curve/heating-curve.js +38 -13
- package/heating-curve/locales/de-DE/heating-curve.html +38 -0
- package/heating-curve/locales/de-DE/heating-curve.json +12 -0
- package/heating-curve/locales/en-US/heating-curve.html +38 -0
- package/heating-curve/locales/en-US/heating-curve.json +12 -0
- package/hysteresis/hysteresis.html +49 -69
- package/hysteresis/hysteresis.js +94 -68
- package/hysteresis/locales/de-DE/hysteresis.html +36 -0
- package/hysteresis/locales/de-DE/hysteresis.json +27 -0
- package/hysteresis/locales/en-US/hysteresis.html +36 -0
- package/hysteresis/locales/en-US/hysteresis.json +27 -0
- package/light/light.html +250 -0
- package/{light-control/light-control.js → light/light.js} +151 -32
- package/light/locales/de-DE/light.html +149 -0
- package/light/locales/de-DE/light.json +24 -0
- package/light/locales/en-US/light.html +148 -0
- package/light/locales/en-US/light.json +24 -0
- package/logic/locales/de-DE/logic.html +12 -0
- package/logic/locales/de-DE/logic.json +26 -0
- package/logic/locales/en-US/logic.html +12 -0
- package/logic/locales/en-US/logic.json +26 -0
- package/logic/logic.html +48 -64
- package/logic/logic.js +63 -29
- package/long-press/locales/de-DE/long-press.html +5 -0
- package/long-press/locales/de-DE/long-press.json +13 -0
- package/long-press/locales/en-US/long-press.html +5 -0
- package/long-press/locales/en-US/long-press.json +13 -0
- package/{long-press-control/long-press-control.html → long-press/long-press.html} +10 -14
- package/long-press/long-press.js +163 -0
- package/mixing-valve/locales/de-DE/mixing-valve.html +65 -0
- package/mixing-valve/locales/de-DE/mixing-valve.json +19 -0
- package/mixing-valve/locales/en-US/mixing-valve.html +66 -0
- package/mixing-valve/locales/en-US/mixing-valve.json +19 -0
- package/mixing-valve/mixing-valve.html +27 -93
- package/mixing-valve/mixing-valve.js +87 -61
- package/multi-press/locales/de-DE/multi-press.html +5 -0
- package/multi-press/locales/de-DE/multi-press.json +12 -0
- package/multi-press/locales/en-US/multi-press.html +5 -0
- package/multi-press/locales/en-US/multi-press.json +12 -0
- package/{multi-press-control/multi-press-control.html → multi-press/multi-press.html} +9 -13
- package/{multi-press-control/multi-press-control.js → multi-press/multi-press.js} +53 -5
- package/package.json +7 -7
- package/persistence.js +1 -0
- package/scene/locales/de-DE/scene.html +105 -0
- package/scene/locales/de-DE/scene.json +21 -0
- package/scene/locales/en-US/scene.html +107 -0
- package/scene/locales/en-US/scene.json +20 -0
- package/{scene-control/scene-control.html → scene/scene.html} +30 -132
- package/{scene-control/scene-control.js → scene/scene.js} +76 -26
- package/scheduler/locales/de-DE/scheduler.html +30 -0
- package/scheduler/locales/de-DE/scheduler.json +21 -0
- package/scheduler/locales/en-US/scheduler.html +30 -0
- package/scheduler/locales/en-US/scheduler.json +21 -0
- package/scheduler/scheduler.html +34 -64
- package/scheduler/scheduler.js +85 -53
- package/shutter/locales/de-DE/shutter.html +127 -0
- package/shutter/locales/de-DE/shutter.json +11 -0
- package/shutter/locales/en-US/shutter.html +133 -0
- package/shutter/locales/en-US/shutter.json +11 -0
- package/{shutter-control/shutter-control.html → shutter/shutter.html} +7 -133
- package/{shutter-control/shutter-control.js → shutter/shutter.js} +116 -56
- package/shutter-complex/locales/de-DE/shutter-complex.html +120 -0
- package/shutter-complex/locales/de-DE/shutter-complex.json +20 -0
- package/shutter-complex/locales/en-US/shutter-complex.html +120 -0
- package/shutter-complex/locales/en-US/shutter-complex.json +20 -0
- package/{shutter-complex-control/shutter-complex-control.html → shutter-complex/shutter-complex.html} +36 -140
- package/shutter-complex/shutter-complex.js +578 -0
- package/smart_helper.js +52 -9
- package/statistic/locales/de-DE/statistic.html +10 -0
- package/statistic/locales/de-DE/statistic.json +29 -0
- package/statistic/locales/en-US/statistic.html +10 -0
- package/statistic/locales/en-US/statistic.json +29 -0
- package/statistic/statistic.html +38 -43
- package/statistic/statistic.js +57 -28
- package/text-exec/locales/de-DE/text-exec.html +18 -0
- package/text-exec/locales/de-DE/text-exec.json +7 -0
- package/text-exec/locales/en-US/text-exec.html +18 -0
- package/text-exec/locales/en-US/text-exec.json +7 -0
- package/text-exec/text-exec.html +9 -25
- package/text-exec/text-exec.js +43 -2
- package/light-control/light-control.html +0 -363
- package/long-press-control/long-press-control.js +0 -76
- package/shutter-complex-control/shutter-complex-control.js +0 -442
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
2
|
(function ()
|
|
3
3
|
{
|
|
4
|
-
let node;
|
|
5
|
-
|
|
6
4
|
RED.nodes.registerType("smart_heating-curve", {
|
|
7
5
|
category: "Smart Nodes",
|
|
8
6
|
paletteLabel: "Heating Curve",
|
|
@@ -24,7 +22,7 @@
|
|
|
24
22
|
},
|
|
25
23
|
oneditprepare: function ()
|
|
26
24
|
{
|
|
27
|
-
node = this;
|
|
25
|
+
let node = this;
|
|
28
26
|
|
|
29
27
|
$("#node-input-room_setpoint")
|
|
30
28
|
.spinner({
|
|
@@ -278,69 +276,30 @@
|
|
|
278
276
|
|
|
279
277
|
<script type="text/html" data-template-name="smart_heating-curve">
|
|
280
278
|
<div class="form-row">
|
|
281
|
-
<label for="node-input-name"><i class="fa fa-tag"></i>
|
|
282
|
-
<input type="text" id="node-input-name"
|
|
279
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="heating.ui.name"></span></label>
|
|
280
|
+
<input type="text" id="node-input-name" data-i18n="[placeholder]heating.ui.name" />
|
|
283
281
|
</div>
|
|
284
282
|
<div class="form-row">
|
|
285
|
-
<label for="node-input-room_setpoint"><i class="fa fa-thermometer-three-quarters"></i>
|
|
283
|
+
<label for="node-input-room_setpoint"><i class="fa fa-thermometer-three-quarters"></i> <span data-i18n="heating.ui.room_setpoint"></span></label>
|
|
286
284
|
<input id="node-input-room_setpoint" value="0" /> °C [15 - 25]
|
|
287
285
|
</div>
|
|
288
286
|
<div class="form-row">
|
|
289
|
-
<label for="node-input-slope"><i class="fa fa-expand"></i>
|
|
287
|
+
<label for="node-input-slope"><i class="fa fa-expand"></i> <span data-i18n="heating.ui.slope"></span></label>
|
|
290
288
|
<input id="node-input-slope" value="0" /> [0,05 - 4]
|
|
291
289
|
</div>
|
|
292
290
|
<div class="form-row">
|
|
293
|
-
<label for="node-input-offset"><i class="fa fa-arrows-v"></i>
|
|
291
|
+
<label for="node-input-offset"><i class="fa fa-arrows-v"></i> <span data-i18n="heating.ui.offset"></span></label>
|
|
294
292
|
<input id="node-input-offset" value="0" />
|
|
295
293
|
</div>
|
|
296
294
|
<div class="form-row">
|
|
297
|
-
<label for="node-input-
|
|
298
|
-
<input id="node-input-
|
|
295
|
+
<label for="node-input-flow_min"><i class="fa fa-arrow-down"></i> <span data-i18n="heating.ui.min_setpoint"></span></label>
|
|
296
|
+
<input id="node-input-flow_min" value="0" />
|
|
299
297
|
</div>
|
|
300
298
|
<div class="form-row">
|
|
301
|
-
<label for="node-input-
|
|
302
|
-
<input id="node-input-
|
|
299
|
+
<label for="node-input-flow_max"><i class="fa fa-arrow-up"></i> <span data-i18n="heating.ui.max_setpoint"></span></label>
|
|
300
|
+
<input id="node-input-flow_max" value="0" />
|
|
303
301
|
</div>
|
|
304
302
|
<div class="form-row">
|
|
305
303
|
<canvas id="heating-curve-diagram" width="450" height="300"></canvas>
|
|
306
304
|
</div>
|
|
307
|
-
</script>
|
|
308
|
-
|
|
309
|
-
<script type="text/html" data-help-name="smart_heating-curve">
|
|
310
|
-
<p>
|
|
311
|
-
Diese Node berechnet anhand den eingestellten Werten, die Vorlaufsolltemperatur. Diese kann verwendet werden um ein Mischventil anzusteuern.
|
|
312
|
-
</p>
|
|
313
|
-
<p>
|
|
314
|
-
<b>Hinweis:</b> Smart Nodes verwenden Topics im Format <code>name#nummer</code>, damit können verschiedene Smart Nodes mit dem gleichen Topic angesteuert werden.<br/>
|
|
315
|
-
Diese Node verwendet nur den Teil <code>name</code>. <code>#</code> und <code>nummer</code> sind dabei optional.
|
|
316
|
-
</p>
|
|
317
|
-
<p>
|
|
318
|
-
Folgende topics werden akzeptiert:
|
|
319
|
-
<table>
|
|
320
|
-
<thead>
|
|
321
|
-
<tr>
|
|
322
|
-
<th>Topic</th>
|
|
323
|
-
<th>Beschreibung</th>
|
|
324
|
-
</tr>
|
|
325
|
-
</thead>
|
|
326
|
-
<tbody>
|
|
327
|
-
<tr>
|
|
328
|
-
<td><code>room_setpoint</code></td>
|
|
329
|
-
<td>Überschreibt die Raum-Solltemperatur.</td>
|
|
330
|
-
</tr>
|
|
331
|
-
<tr>
|
|
332
|
-
<td><code>flow_min</code></td>
|
|
333
|
-
<td>Überschreibt die minimale Vorlaufsolltemperatur.</td>
|
|
334
|
-
</tr>
|
|
335
|
-
<tr>
|
|
336
|
-
<td><code>flow_max</code></td>
|
|
337
|
-
<td>Überschreibt die maximale Vorlaufsolltemperatur.</td>
|
|
338
|
-
</tr>
|
|
339
|
-
<tr>
|
|
340
|
-
<td><code>temperature_outside</code></td>
|
|
341
|
-
<td>Setzt die aktuelle Außentemperatur.</td>
|
|
342
|
-
</tr>
|
|
343
|
-
</tbody>
|
|
344
|
-
</table>
|
|
345
|
-
</p>
|
|
346
305
|
</script>
|
|
@@ -7,11 +7,22 @@ module.exports = function (RED)
|
|
|
7
7
|
const node = this;
|
|
8
8
|
RED.nodes.createNode(node, config);
|
|
9
9
|
|
|
10
|
+
// ###################
|
|
11
|
+
// # Class constants #
|
|
12
|
+
// ###################
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
// #######################
|
|
16
|
+
// # Global help objects #
|
|
17
|
+
// #######################
|
|
10
18
|
const smart_context = require("../persistence.js")(RED);
|
|
11
19
|
const helper = require("../smart_helper.js");
|
|
12
20
|
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
|
|
22
|
+
// #####################
|
|
23
|
+
// # persistent values #
|
|
24
|
+
// #####################
|
|
25
|
+
var node_settings = helper.cloneObject({
|
|
15
26
|
room_setpoint: config.room_setpoint,
|
|
16
27
|
flow_min: config.flow_min,
|
|
17
28
|
flow_max: config.flow_max,
|
|
@@ -19,17 +30,30 @@ module.exports = function (RED)
|
|
|
19
30
|
last_flow_temperature: null
|
|
20
31
|
}, smart_context.get(node.id));
|
|
21
32
|
|
|
22
|
-
|
|
33
|
+
|
|
34
|
+
// ##################
|
|
35
|
+
// # Dynamic config #
|
|
36
|
+
// ##################
|
|
23
37
|
let slope = config.slope;
|
|
24
38
|
let offset = config.offset;
|
|
25
39
|
|
|
26
|
-
// runtime values
|
|
27
40
|
|
|
41
|
+
// ##################
|
|
42
|
+
// # Runtime values #
|
|
43
|
+
// ##################
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
// ###############
|
|
47
|
+
// # Node events #
|
|
48
|
+
// ###############
|
|
28
49
|
node.on("input", function (msg)
|
|
29
50
|
{
|
|
30
51
|
handleTopic(msg);
|
|
52
|
+
|
|
31
53
|
sendResult();
|
|
32
54
|
setStatus();
|
|
55
|
+
|
|
56
|
+
smart_context.set(node.id, node_settings);
|
|
33
57
|
});
|
|
34
58
|
|
|
35
59
|
node.on("close", function ()
|
|
@@ -37,6 +61,11 @@ module.exports = function (RED)
|
|
|
37
61
|
});
|
|
38
62
|
|
|
39
63
|
|
|
64
|
+
// #####################
|
|
65
|
+
// # Private functions #
|
|
66
|
+
// #####################
|
|
67
|
+
|
|
68
|
+
// This is the main function which handles all topics that was received.
|
|
40
69
|
let handleTopic = msg =>
|
|
41
70
|
{
|
|
42
71
|
let real_topic = helper.getTopicName(msg.topic);
|
|
@@ -46,48 +75,44 @@ module.exports = function (RED)
|
|
|
46
75
|
let new_setpoint = parseFloat(msg.payload);
|
|
47
76
|
if (isNaN(new_setpoint) && !isFinite(new_setpoint))
|
|
48
77
|
{
|
|
49
|
-
|
|
78
|
+
console.warn("Invalid payload: " + msg.payload);
|
|
50
79
|
return;
|
|
51
80
|
}
|
|
52
81
|
|
|
53
82
|
node_settings.room_setpoint = msg.payload;
|
|
54
|
-
smart_context.set(node.id, node_settings);
|
|
55
83
|
break;
|
|
56
84
|
|
|
57
85
|
case "temperature_outside":
|
|
58
86
|
let new_temp = parseFloat(msg.payload);
|
|
59
87
|
if (isNaN(new_temp) && !isFinite(new_temp))
|
|
60
88
|
{
|
|
61
|
-
|
|
89
|
+
console.warn("Invalid payload: " + msg.payload);
|
|
62
90
|
return;
|
|
63
91
|
}
|
|
64
92
|
|
|
65
93
|
node_settings.temperature_outside = msg.payload;
|
|
66
|
-
smart_context.set(node.id, node_settings);
|
|
67
94
|
break;
|
|
68
95
|
|
|
69
96
|
case "flow_min":
|
|
70
97
|
let new_flow_min = parseFloat(msg.payload);
|
|
71
98
|
if (isNaN(new_flow_min) && !isFinite(new_flow_min))
|
|
72
99
|
{
|
|
73
|
-
|
|
100
|
+
console.warn("Invalid payload: " + msg.payload);
|
|
74
101
|
return;
|
|
75
102
|
}
|
|
76
103
|
|
|
77
104
|
node_settings.flow_min = msg.payload;
|
|
78
|
-
smart_context.set(node.id, node_settings);
|
|
79
105
|
break;
|
|
80
106
|
|
|
81
107
|
case "flow_max":
|
|
82
108
|
let new_flow_max = parseFloat(msg.payload);
|
|
83
109
|
if (isNaN(new_flow_max) && !isFinite(new_flow_max))
|
|
84
110
|
{
|
|
85
|
-
|
|
111
|
+
console.warn("Invalid payload: " + msg.payload);
|
|
86
112
|
return;
|
|
87
113
|
}
|
|
88
114
|
|
|
89
115
|
node_settings.flow_max = msg.payload;
|
|
90
|
-
smart_context.set(node.id, node_settings);
|
|
91
116
|
break;
|
|
92
117
|
|
|
93
118
|
default:
|
|
@@ -125,7 +150,7 @@ module.exports = function (RED)
|
|
|
125
150
|
}
|
|
126
151
|
|
|
127
152
|
if (node_settings.last_flow_temperature !== null)
|
|
128
|
-
setTimeout(sendResult,
|
|
153
|
+
setTimeout(sendResult, 10000);
|
|
129
154
|
|
|
130
155
|
setStatus();
|
|
131
156
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_heating-curve">
|
|
2
|
+
<p>
|
|
3
|
+
Diese Node berechnet anhand den eingestellten Werten, die Vorlaufsolltemperatur. Diese kann verwendet werden um ein Mischventil anzusteuern.
|
|
4
|
+
</p>
|
|
5
|
+
<p>
|
|
6
|
+
<b>Hinweis:</b> Smart Nodes verwenden Topics im Format <code>name#nummer</code>, damit können verschiedene Smart Nodes mit dem gleichen Topic angesteuert werden.<br/>
|
|
7
|
+
Diese Node verwendet nur den Teil <code>name</code>. <code>#</code> und <code>nummer</code> sind dabei optional.
|
|
8
|
+
</p>
|
|
9
|
+
<p>
|
|
10
|
+
Folgende topics werden akzeptiert:
|
|
11
|
+
<table>
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th>Topic</th>
|
|
15
|
+
<th>Beschreibung</th>
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
<tbody>
|
|
19
|
+
<tr>
|
|
20
|
+
<td><code>room_setpoint</code></td>
|
|
21
|
+
<td>Überschreibt die Raum-Solltemperatur.</td>
|
|
22
|
+
</tr>
|
|
23
|
+
<tr>
|
|
24
|
+
<td><code>flow_min</code></td>
|
|
25
|
+
<td>Überschreibt die minimale Vorlaufsolltemperatur.</td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td><code>flow_max</code></td>
|
|
29
|
+
<td>Überschreibt die maximale Vorlaufsolltemperatur.</td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td><code>temperature_outside</code></td>
|
|
33
|
+
<td>Setzt die aktuelle Außentemperatur.</td>
|
|
34
|
+
</tr>
|
|
35
|
+
</tbody>
|
|
36
|
+
</table>
|
|
37
|
+
</p>
|
|
38
|
+
</script>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_heating-curve">
|
|
2
|
+
<p>
|
|
3
|
+
This node calculates the target flow temperature based on the set values. This can be used to control a mixing valve.
|
|
4
|
+
</p>
|
|
5
|
+
<p>
|
|
6
|
+
<b>Note:</b> Smart Nodes use topics in the format <code>name#number</code>, so that different Smart Nodes can be controlled with the same topic.<br />
|
|
7
|
+
This node only uses the part <code>name</code>. <code>#</code> and <code>number</code> are optional.
|
|
8
|
+
</p>
|
|
9
|
+
<p>
|
|
10
|
+
The following topics are accepted:
|
|
11
|
+
<table>
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th>Topic</th>
|
|
15
|
+
<th>Description</th>
|
|
16
|
+
</tr>
|
|
17
|
+
</thead>
|
|
18
|
+
<tbody>
|
|
19
|
+
<tr>
|
|
20
|
+
<td><code>room_setpoint</code></td>
|
|
21
|
+
<td>Overwrites the room setpoint temperature.</td>
|
|
22
|
+
</tr>
|
|
23
|
+
<tr>
|
|
24
|
+
<td><code>flow_min</code></td>
|
|
25
|
+
<td>Overwrites the minimum flow setpoint temperature.</td>
|
|
26
|
+
</tr>
|
|
27
|
+
<tr>
|
|
28
|
+
<td><code>flow_max</code></td>
|
|
29
|
+
<td>Overwrites the maximum flow setpoint temperature.</td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td><code>temperature_outside</code></td>
|
|
33
|
+
<td>Sets the current outside temperature.</td>
|
|
34
|
+
</tr>
|
|
35
|
+
</tbody>
|
|
36
|
+
</table>
|
|
37
|
+
</p>
|
|
38
|
+
</script>
|
|
@@ -29,6 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
oneditprepare: function ()
|
|
31
31
|
{
|
|
32
|
+
let node = this;
|
|
33
|
+
|
|
32
34
|
$("#node-input-setpoint").typedInput({
|
|
33
35
|
type: "num",
|
|
34
36
|
types: ["num"]
|
|
@@ -45,16 +47,17 @@
|
|
|
45
47
|
type: "json",
|
|
46
48
|
types: ["json",
|
|
47
49
|
{
|
|
48
|
-
value: "
|
|
49
|
-
label: "
|
|
50
|
+
value: "NOTHING",
|
|
51
|
+
label: node._("hysteresis.ui.send_nothing"),
|
|
50
52
|
icon: "fa fa-times",
|
|
51
53
|
hasValue: false,
|
|
52
54
|
}, {
|
|
53
|
-
value: "
|
|
54
|
-
label: "
|
|
55
|
+
value: "ORIGINAL",
|
|
56
|
+
label: node._("hysteresis.ui.original_message"),
|
|
55
57
|
icon: "fa fa-arrow-right",
|
|
56
58
|
hasValue: false,
|
|
57
|
-
}
|
|
59
|
+
}
|
|
60
|
+
],
|
|
58
61
|
typeField: "#node-input-out_higher_type"
|
|
59
62
|
});
|
|
60
63
|
|
|
@@ -62,26 +65,27 @@
|
|
|
62
65
|
type: "json",
|
|
63
66
|
types: ["json",
|
|
64
67
|
{
|
|
65
|
-
value: "
|
|
66
|
-
label: "
|
|
68
|
+
value: "NOTHING",
|
|
69
|
+
label: node._("hysteresis.ui.send_nothing"),
|
|
67
70
|
icon: "fa fa-times",
|
|
68
71
|
hasValue: false,
|
|
69
72
|
}, {
|
|
70
|
-
value: "
|
|
71
|
-
label: "
|
|
73
|
+
value: "ORIGINAL",
|
|
74
|
+
label: node._("hysteresis.ui.original_message"),
|
|
72
75
|
icon: "fa fa-arrow-right",
|
|
73
76
|
hasValue: false,
|
|
74
|
-
}
|
|
77
|
+
}
|
|
78
|
+
],
|
|
75
79
|
typeField: "#node-input-out_lower_type"
|
|
76
80
|
});
|
|
77
81
|
|
|
78
82
|
$("#node-input-send_only_change").typedInput({
|
|
79
83
|
type: "bool",
|
|
80
84
|
types: [{
|
|
81
|
-
value: "
|
|
85
|
+
value: "send_only_change",
|
|
82
86
|
options: [
|
|
83
|
-
{ value: "true", label: "
|
|
84
|
-
{ value: "false", label: "
|
|
87
|
+
{ value: "true", label: node._("hysteresis.ui.send_only_change") },
|
|
88
|
+
{ value: "false", label: node._("hysteresis.ui.always") },
|
|
85
89
|
]
|
|
86
90
|
}]
|
|
87
91
|
});
|
|
@@ -89,10 +93,10 @@
|
|
|
89
93
|
$("#node-input-outputs").typedInput({
|
|
90
94
|
type: "num",
|
|
91
95
|
types: [{
|
|
92
|
-
value: "
|
|
96
|
+
value: "outputs",
|
|
93
97
|
options: [
|
|
94
|
-
{ value: "1", label: "
|
|
95
|
-
{ value: "2", label: "
|
|
98
|
+
{ value: "1", label: node._("hysteresis.ui.common_output") },
|
|
99
|
+
{ value: "2", label: node._("hysteresis.ui.separate_output") },
|
|
96
100
|
]
|
|
97
101
|
}]
|
|
98
102
|
});
|
|
@@ -107,9 +111,24 @@
|
|
|
107
111
|
$("#resend_on_start_row").hide();
|
|
108
112
|
});
|
|
109
113
|
$("#node-input-save_state").trigger("change");
|
|
114
|
+
|
|
115
|
+
// Backward compatibility
|
|
116
|
+
if (this.out_higher_type == "null")
|
|
117
|
+
{
|
|
118
|
+
this.out_higher_type = "NOTHING";
|
|
119
|
+
$("#node-input-out_higher_type").val("NOTHING");
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
if (this.out_lower_type == "null")
|
|
123
|
+
{
|
|
124
|
+
this.out_lower_type = "NOTHING";
|
|
125
|
+
$("#node-input-out_lower_type").val("NOTHING");
|
|
126
|
+
}
|
|
110
127
|
},
|
|
111
128
|
oneditsave: function ()
|
|
112
129
|
{
|
|
130
|
+
let node = this;
|
|
131
|
+
|
|
113
132
|
this.setpoint = parseFloat(this.setpoint);
|
|
114
133
|
this.hysteresis = parseFloat(this.hysteresis);
|
|
115
134
|
}
|
|
@@ -118,88 +137,49 @@
|
|
|
118
137
|
|
|
119
138
|
<script type="text/html" data-template-name="smart_hysteresis">
|
|
120
139
|
<div class="form-row">
|
|
121
|
-
<label for="node-input-name"><i class="fa fa-tag"></i>
|
|
122
|
-
<input type="text" id="node-input-name"
|
|
140
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="hysteresis.ui.name"></span></label>
|
|
141
|
+
<input type="text" id="node-input-name" data-i18n="[placeholder]hysteresis.ui.name" />
|
|
123
142
|
</div>
|
|
124
143
|
<div class="form-row">
|
|
125
|
-
<label for="node-input-setpoint"><i class="fa fa-sign-out"></i>
|
|
144
|
+
<label for="node-input-setpoint"><i class="fa fa-sign-out"></i> <span data-i18n="hysteresis.ui.setpoint"></span></label>
|
|
126
145
|
<input id="node-input-setpoint" />
|
|
127
146
|
</div>
|
|
128
147
|
<div class="form-row">
|
|
129
|
-
<label for="node-input-hysteresis"><i class="fa fa-sort"></i>
|
|
148
|
+
<label for="node-input-hysteresis"><i class="fa fa-sort"></i> <span data-i18n="hysteresis.ui.hysteresis"></span></label>
|
|
130
149
|
<input id="node-input-hysteresis" />
|
|
131
150
|
</div>
|
|
132
151
|
<hr/>
|
|
133
|
-
<h4 style="margin: 0.5rem 0;"
|
|
152
|
+
<h4 style="margin: 0.5rem 0;" data-i18n="hysteresis.ui.output_messages"></h4>
|
|
134
153
|
<div class="form-row">
|
|
135
|
-
<label for="node-input-out_higher"><i class="fa fa-arrow-up"></i>
|
|
154
|
+
<label for="node-input-out_higher"><i class="fa fa-arrow-up"></i> <span data-i18n="hysteresis.ui.over"></span></label>
|
|
136
155
|
<input type="text" id="node-input-out_higher"/>
|
|
137
156
|
<input type="hidden" id="node-input-out_higher_type">
|
|
138
157
|
</div>
|
|
139
158
|
<div class="form-row">
|
|
140
|
-
<label for="node-input-out_lower"><i class="fa fa-arrow-down"></i>
|
|
159
|
+
<label for="node-input-out_lower"><i class="fa fa-arrow-down"></i> <span data-i18n="hysteresis.ui.under"></span></label>
|
|
141
160
|
<input type="text" id="node-input-out_lower" />
|
|
142
161
|
<input type="hidden" id="node-input-out_lower_type">
|
|
143
162
|
</div>
|
|
144
163
|
<div class="form-row">
|
|
145
|
-
<label for="node-input-send_only_change"><i class="fa fa-repeat"></i>
|
|
164
|
+
<label for="node-input-send_only_change"><i class="fa fa-repeat"></i> <span data-i18n="hysteresis.ui.send"></span></label>
|
|
146
165
|
<input id="node-input-send_only_change" />
|
|
147
166
|
</div>
|
|
148
167
|
<div class="form-row">
|
|
149
|
-
<label for="node-input-outputs"><i class="fa fa-hashtag"></i>
|
|
168
|
+
<label for="node-input-outputs"><i class="fa fa-hashtag"></i> <span data-i18n="hysteresis.ui.outputs"></span></label>
|
|
150
169
|
<input id="node-input-outputs" />
|
|
151
170
|
</div>
|
|
152
171
|
<div class="form-row">
|
|
153
|
-
<div><strong
|
|
154
|
-
<div
|
|
155
|
-
<div>sofern es nicht bereits hier in der Konfiguration gesetzt wurde.</div>
|
|
156
|
-
<div><code>true</code>, wenn höher, <code>false</code> wenn niedriger.</div>
|
|
172
|
+
<div><strong data-i18n="hysteresis.ui.note"></strong></div>
|
|
173
|
+
<div data-i18n="[html]hysteresis.ui.note_text"></div>
|
|
157
174
|
</div>
|
|
158
175
|
<hr/>
|
|
159
|
-
<h4 style="margin: 0.5rem 0;"
|
|
176
|
+
<h4 style="margin: 0.5rem 0;" data-i18n="hysteresis.ui.system_start"></h4>
|
|
160
177
|
<div class="form-row">
|
|
161
178
|
<input type="checkbox" id="node-input-save_state" style="width: 20px;" />
|
|
162
|
-
<label for="node-input-save_state" style="width: calc(100% - 30px);"
|
|
179
|
+
<label for="node-input-save_state" style="width: calc(100% - 30px);" data-i18n="hysteresis.ui.save_state"></label>
|
|
163
180
|
</div>
|
|
164
181
|
<div class="form-row" id="resend_on_start_row">
|
|
165
182
|
<input type="checkbox" id="node-input-resend_on_start" style="width: 20px;" />
|
|
166
|
-
<label for="node-input-resend_on_start" style="width: calc(100% - 30px);"
|
|
183
|
+
<label for="node-input-resend_on_start" style="width: calc(100% - 30px);" data-i18n="hysteresis.ui.send_after_start"></label>
|
|
167
184
|
</div>
|
|
168
|
-
</script>
|
|
169
|
-
|
|
170
|
-
<script type="text/html" data-help-name="smart_hysteresis">
|
|
171
|
-
<p>
|
|
172
|
-
Diese Node sendet die einkommende Nachricht an den Ausgang <code>Über</code>, wenn der einkommende Wert größer gleich dem Sollwert plus Hysterese ist und
|
|
173
|
-
die einkommende Nachricht an den Ausgang <code>Unter</code>, wenn der einkommende Wert kleiner gleich dem Sollwert minus Hysterese ist.<br/>
|
|
174
|
-
Die Nachricht wird dabei nur einmalig bei über- bzw. unterschreiten des Grenzwertes weitergeleitet.<br/>
|
|
175
|
-
Die Note behält den aktuellen Zustand auch nach dem Deploy bei.
|
|
176
|
-
</p>
|
|
177
|
-
<p>
|
|
178
|
-
<b>Hinweis:</b> Smart Nodes verwenden Topics im Format <code>name#nummer</code>, damit können verschiedene Smart Nodes mit dem gleichen Topic angesteuert werden.<br/>
|
|
179
|
-
Diese Node verwendet nur den Teil <code>name</code>. <code>#</code> und <code>nummer</code> sind dabei optional.
|
|
180
|
-
</p>
|
|
181
|
-
<p>
|
|
182
|
-
Folgende topics werden akzeptiert:
|
|
183
|
-
<table>
|
|
184
|
-
<thead>
|
|
185
|
-
<tr>
|
|
186
|
-
<th>Topic</th>
|
|
187
|
-
<th>Beschreibung</th>
|
|
188
|
-
</tr>
|
|
189
|
-
</thead>
|
|
190
|
-
<tbody>
|
|
191
|
-
<tr>
|
|
192
|
-
<td><code>setpoint</code></td>
|
|
193
|
-
<td>Überschreibt den Sollwert mit <code>msg.payload</code>.</td>
|
|
194
|
-
</tr>
|
|
195
|
-
<tr>
|
|
196
|
-
<td><code>hysteresis</code></td>
|
|
197
|
-
<td>Überschreibt die Hysterese mit <code>msg.payload</code>.</td>
|
|
198
|
-
</tr>
|
|
199
|
-
</tbody>
|
|
200
|
-
</table>
|
|
201
|
-
</p>
|
|
202
|
-
<p>
|
|
203
|
-
Die einkommende Nachricht wird mit den angegebenen Ausgangsnachrichten ergänzt, sofern nicht Originalnachricht ausgewählt wurde.
|
|
204
|
-
</p>
|
|
205
185
|
</script>
|