smart-nodes 0.3.35 → 0.3.37
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/central/central.html +4 -15
- package/central/central.js +3 -3
- package/central/locales/de-DE/central.html +10 -0
- package/central/locales/de-DE/central.json +17 -0
- package/central/locales/en-US/central.html +10 -0
- package/central/locales/en-US/central.json +17 -0
- package/compare/compare.html +41 -80
- package/compare/compare.js +1 -1
- package/compare/locales/de-DE/compare.html +36 -0
- package/compare/locales/de-DE/compare.json +37 -0
- package/compare/locales/en-US/compare.html +36 -0
- package/compare/locales/en-US/compare.json +25 -0
- package/counter/counter.html +11 -60
- package/counter/locales/de-DE/counter.html +48 -0
- package/counter/locales/de-DE/counter.json +24 -0
- package/counter/locales/en-US/counter.html +48 -0
- package/counter/locales/en-US/counter.json +25 -0
- package/delay/delay.html +20 -22
- package/hysteresis/hysteresis.html +6 -4
- package/light-control/light-control.html +27 -30
- package/logic/logic.html +21 -24
- package/mixing-valve/mixing-valve.html +17 -19
- package/mixing-valve/mixing-valve.js +2 -2
- package/package.json +1 -1
- package/scene-control/scene-control.html +16 -15
- package/shutter-complex-control/shutter-complex-control.html +9 -10
- package/statistic/statistic.html +14 -15
package/central/central.html
CHANGED
|
@@ -302,29 +302,18 @@
|
|
|
302
302
|
|
|
303
303
|
<script type="text/html" data-template-name="smart_central-control">
|
|
304
304
|
<div class="form-row">
|
|
305
|
-
<label for="node-input-name"><i class="fa fa-tag"></i>
|
|
305
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="central.ui.name"></span></label>
|
|
306
306
|
<input type="text" id="node-input-name" />
|
|
307
307
|
</div>
|
|
308
308
|
<div class="form-row">
|
|
309
|
-
<label for="node-input-mode"
|
|
309
|
+
<label for="node-input-mode"><span data-i18n="central.ui.type"></span></label>
|
|
310
310
|
<select id="node-input-mode" style="width: 70%">
|
|
311
|
-
<option value="shutter" selected
|
|
312
|
-
<option value="light"
|
|
311
|
+
<option value="shutter" selected><span data-i18n="central.ui.cover"></span></option>
|
|
312
|
+
<option value="light"><span data-i18n="central.ui.light_outlet"></span></option>
|
|
313
313
|
</select>
|
|
314
314
|
</div>
|
|
315
315
|
<div class="node-input-link-rows" style="position:relative; height: 30px; text-align: right;"
|
|
316
316
|
><div style="display:inline-block"><input type="text" id="node-input-link-target-filter" /></div
|
|
317
317
|
></div>
|
|
318
318
|
<div class="form-row node-input-link-row node-input-link-rows"></div>
|
|
319
|
-
</script>
|
|
320
|
-
|
|
321
|
-
<script type="text/html" data-help-name="smart_central-control">
|
|
322
|
-
<p>
|
|
323
|
-
Der Zentralbaustein leitet einkommende Nachrichten an alle verlinkten Unterbausteine weiter.
|
|
324
|
-
Dabei beachtet der Baustein, die Funktion der Unterbausteine synchron zu halten.
|
|
325
|
-
</p>
|
|
326
|
-
<p>
|
|
327
|
-
D.h. Wird ein <code>toggle</code> an mehrere Lichtbausteine geschickt, so werden diese zuerst ausgeschaltet, falls mindestens eines eingeschaltet war.<br />
|
|
328
|
-
Rollladen werden ebenfalls erst gestoppt, falls einer gerade aktiv ist. Ein <code>toggle</code> an mehrere Rollladen wird derzeit nicht unterstützt.
|
|
329
|
-
</p>
|
|
330
319
|
</script>
|
package/central/central.js
CHANGED
|
@@ -16,7 +16,7 @@ module.exports = function (RED)
|
|
|
16
16
|
{
|
|
17
17
|
if (typeof msg.source == "undefined" || typeof msg.state == "undefined")
|
|
18
18
|
{
|
|
19
|
-
console.warn("
|
|
19
|
+
console.warn(RED._("central.errors.unknown_message"), msg);
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
|
|
@@ -24,9 +24,9 @@ module.exports = function (RED)
|
|
|
24
24
|
states.set(msg.source, msg.state);
|
|
25
25
|
|
|
26
26
|
if (isAllOff())
|
|
27
|
-
node.status({ fill: "red", shape: "dot", text: "
|
|
27
|
+
node.status({ fill: "red", shape: "dot", text: "central.status.all_off" });
|
|
28
28
|
else
|
|
29
|
-
node.status({ fill: "green", shape: "dot", text: "
|
|
29
|
+
node.status({ fill: "green", shape: "dot", text: "central.status.Something_is_on" });
|
|
30
30
|
}
|
|
31
31
|
RED.events.on(event, handler);
|
|
32
32
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_central-control">
|
|
2
|
+
<p>
|
|
3
|
+
Der Zentralbaustein leitet einkommende Nachrichten an alle verlinkten Unterbausteine weiter.
|
|
4
|
+
Dabei beachtet der Baustein, die Funktion der Unterbausteine synchron zu halten.
|
|
5
|
+
</p>
|
|
6
|
+
<p>
|
|
7
|
+
D.h. Wird ein <code>toggle</code> an mehrere Lichtbausteine geschickt, so werden diese zuerst ausgeschaltet, falls mindestens eines eingeschaltet war.<br />
|
|
8
|
+
Rollladen werden ebenfalls erst gestoppt, falls einer gerade aktiv ist. Ein <code>toggle</code> an mehrere Rollladen wird derzeit nicht unterstützt.
|
|
9
|
+
</p>
|
|
10
|
+
</script>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"central": {
|
|
3
|
+
"errors": {
|
|
4
|
+
"unknown_message": "Unbekannte Nachricht in smart_node central empfangen."
|
|
5
|
+
},
|
|
6
|
+
"status": {
|
|
7
|
+
"all_off": "Alles aus",
|
|
8
|
+
"Something_is_on": "Something is on"
|
|
9
|
+
},
|
|
10
|
+
"ui": {
|
|
11
|
+
"name": "Name",
|
|
12
|
+
"type": "Typ",
|
|
13
|
+
"cover": "Rollladen",
|
|
14
|
+
"light_outlet": "Licht/Steckdose"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_central-control">
|
|
2
|
+
<p>
|
|
3
|
+
The central node forwards incoming messages to all linked sub-modules.
|
|
4
|
+
The module ensures that the functions of the submodules are kept synchronized.
|
|
5
|
+
</p>
|
|
6
|
+
<p>
|
|
7
|
+
This means that if a <code>toggle</code> is sent to several light modules, these will be switched off first if at least one was switched on.<br />
|
|
8
|
+
Roller shutters will also be stopped if at least one is currently active. A <code>toggle</code> to several roller shutters is not currently supported.
|
|
9
|
+
</p>
|
|
10
|
+
</script>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"central": {
|
|
3
|
+
"errors": {
|
|
4
|
+
"unknown_message": "Unknown message received in smart_node central."
|
|
5
|
+
},
|
|
6
|
+
"status": {
|
|
7
|
+
"all_off": "All off",
|
|
8
|
+
"Something_is_on": "Something is on"
|
|
9
|
+
},
|
|
10
|
+
"ui": {
|
|
11
|
+
"name": "Name",
|
|
12
|
+
"type": "Type",
|
|
13
|
+
"cover": "Cover",
|
|
14
|
+
"light_outlet": "Light/Outlet"
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
package/compare/compare.html
CHANGED
|
@@ -34,26 +34,25 @@
|
|
|
34
34
|
oneditprepare: function ()
|
|
35
35
|
{
|
|
36
36
|
$("#node-input-comparator").typedInput({
|
|
37
|
-
types: [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
],
|
|
37
|
+
types: [{
|
|
38
|
+
default: "EQUAL",
|
|
39
|
+
value: "comperator",
|
|
40
|
+
options: [
|
|
41
|
+
{ value: "SMALLER", label: "< Kleiner" },
|
|
42
|
+
{ value: "SMALLER_EQUAL", label: "<= Kleiner oder gleich" },
|
|
43
|
+
{ value: "EQUAL", label: "== Gleich" },
|
|
44
|
+
{ value: "UNEQUAL", label: "!= Ungleich" },
|
|
45
|
+
{ value: "GREATER_EQUAL", label: ">= Größer oder gleich" },
|
|
46
|
+
{ value: "GREATER", label: "> Größer" }
|
|
47
|
+
],
|
|
48
|
+
}],
|
|
50
49
|
});
|
|
51
50
|
|
|
52
51
|
$("#node-input-value1").typedInput({
|
|
53
52
|
type: "num",
|
|
54
53
|
types: ["str", "num", "bool", {
|
|
55
54
|
value: "null",
|
|
56
|
-
label: "
|
|
55
|
+
label: this._("compare.ui.no_value"),
|
|
57
56
|
icon: "fa fa-times",
|
|
58
57
|
hasValue: false,
|
|
59
58
|
}],
|
|
@@ -64,7 +63,7 @@
|
|
|
64
63
|
type: "num",
|
|
65
64
|
types: ["str", "num", "bool", {
|
|
66
65
|
value: "null",
|
|
67
|
-
label: "
|
|
66
|
+
label: this._("compare.ui.no_value"),
|
|
68
67
|
icon: "fa fa-times",
|
|
69
68
|
hasValue: false,
|
|
70
69
|
}],
|
|
@@ -77,7 +76,7 @@
|
|
|
77
76
|
type: "json",
|
|
78
77
|
types: ["json", {
|
|
79
78
|
value: "null",
|
|
80
|
-
label: "
|
|
79
|
+
label: this._("compare.ui.send_nothing"),
|
|
81
80
|
icon: "fa fa-times",
|
|
82
81
|
hasValue: false,
|
|
83
82
|
}],
|
|
@@ -88,7 +87,7 @@
|
|
|
88
87
|
type: "json",
|
|
89
88
|
types: ["json", {
|
|
90
89
|
value: "null",
|
|
91
|
-
label: "
|
|
90
|
+
label: this._("compare.ui.send_nothing"),
|
|
92
91
|
icon: "fa fa-times",
|
|
93
92
|
hasValue: false,
|
|
94
93
|
}],
|
|
@@ -99,9 +98,10 @@
|
|
|
99
98
|
type: "bool",
|
|
100
99
|
types: [{
|
|
101
100
|
value: "1",
|
|
101
|
+
value: "send_only_change",
|
|
102
102
|
options: [
|
|
103
|
-
{ value: "true", label: "
|
|
104
|
-
{ value: "false", label: "
|
|
103
|
+
{ value: "true", label: this._("compare.ui.only_on_change") },
|
|
104
|
+
{ value: "false", label: this._("compare.ui.always") },
|
|
105
105
|
]
|
|
106
106
|
}]
|
|
107
107
|
});
|
|
@@ -110,9 +110,10 @@
|
|
|
110
110
|
type: "num",
|
|
111
111
|
types: [{
|
|
112
112
|
value: "1",
|
|
113
|
+
value: "outputs",
|
|
113
114
|
options: [
|
|
114
|
-
{ value: "1", label: "
|
|
115
|
-
{ value: "2", label: "
|
|
115
|
+
{ value: "1", label: this._("compare.ui.common_output") },
|
|
116
|
+
{ value: "2", label: this._("compare.ui.separate_output") },
|
|
116
117
|
]
|
|
117
118
|
}]
|
|
118
119
|
});
|
|
@@ -133,99 +134,59 @@
|
|
|
133
134
|
|
|
134
135
|
<script type="text/html" data-template-name="smart_compare">
|
|
135
136
|
<div class="form-row">
|
|
136
|
-
<label for="node-input-name"><i class="fa fa-tag"></i>
|
|
137
|
-
<input type="text" id="node-input-name"
|
|
137
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="compare.ui.name"></span></label>
|
|
138
|
+
<input type="text" id="node-input-name" data-i18n="[placeholder]compare.ui.name"/>
|
|
138
139
|
</div>
|
|
139
140
|
<div class="form-row">
|
|
140
|
-
<label for="node-input-comparator"><i class="fa fa-sort"></i>
|
|
141
|
+
<label for="node-input-comparator"><i class="fa fa-sort"></i> <span data-i18n="compare.ui.compare"></span></label>
|
|
141
142
|
<input id="node-input-comparator" />
|
|
142
143
|
</div>
|
|
143
|
-
<div class="form-row">
|
|
144
|
-
<
|
|
145
|
-
<div>die einkommenden Nachrichten überschrieben werden.</div>
|
|
144
|
+
<div class="form-row" style="max-width: 28rem">
|
|
145
|
+
<span data-i18n="compare.ui.note_default_values"></span>
|
|
146
146
|
</div>
|
|
147
147
|
<div class="form-row">
|
|
148
|
-
<label for="node-input-value1"><i class="fa fa-hashtag"></i>
|
|
148
|
+
<label for="node-input-value1"><i class="fa fa-hashtag"></i> <span data-i18n="compare.ui.value_1"></span></label>
|
|
149
149
|
<input type="text" id="node-input-value1">
|
|
150
150
|
<input type="hidden" id="node-input-value1_type">
|
|
151
151
|
</div>
|
|
152
152
|
<div class="form-row">
|
|
153
|
-
<label for="node-input-value2"><i class="fa fa-hashtag"></i>
|
|
153
|
+
<label for="node-input-value2"><i class="fa fa-hashtag"></i> <span data-i18n="compare.ui.value_2"></span></label>
|
|
154
154
|
<input type="text" id="node-input-value2"/>
|
|
155
155
|
<input type="hidden" id="node-input-value2_type">
|
|
156
156
|
</div>
|
|
157
157
|
<hr/>
|
|
158
|
-
<h4 style="margin: 0.5rem 0;"
|
|
158
|
+
<h4 style="margin: 0.5rem 0;"><span data-i18n="compare.ui.output_messages"></span></h4>
|
|
159
159
|
<div class="form-row">
|
|
160
|
-
<label for="node-input-out_true"><i class="fa fa-check-circle"></i>
|
|
160
|
+
<label for="node-input-out_true"><i class="fa fa-check-circle"></i> <span data-i18n="compare.ui.true"></span></label>
|
|
161
161
|
<input type="text" id="node-input-out_true"/>
|
|
162
162
|
<input type="hidden" id="node-input-out_true_type">
|
|
163
163
|
</div>
|
|
164
164
|
<div class="form-row">
|
|
165
|
-
<label for="node-input-out_false"><i class="fa fa-times-circle"></i>
|
|
165
|
+
<label for="node-input-out_false"><i class="fa fa-times-circle"></i> <span data-i18n="compare.ui.false"></span></label>
|
|
166
166
|
<input type="text" id="node-input-out_false" />
|
|
167
167
|
<input type="hidden" id="node-input-out_false_type">
|
|
168
168
|
</div>
|
|
169
169
|
<div class="form-row">
|
|
170
|
-
<label for="node-input-send_only_change"><i class="fa fa-repeat"></i>
|
|
170
|
+
<label for="node-input-send_only_change"><i class="fa fa-repeat"></i> <span data-i18n="compare.ui.send"></span></label>
|
|
171
171
|
<input id="node-input-send_only_change" />
|
|
172
172
|
</div>
|
|
173
173
|
<div class="form-row">
|
|
174
|
-
<label for="node-input-outputs"><i class="fa fa-hashtag"></i>
|
|
174
|
+
<label for="node-input-outputs"><i class="fa fa-hashtag"></i> <span data-i18n="compare.ui.outputs"></span></label>
|
|
175
175
|
<input id="node-input-outputs" />
|
|
176
176
|
</div>
|
|
177
|
-
<div class="form-row">
|
|
178
|
-
<div><strong
|
|
179
|
-
<div><code>msg.payload</code>
|
|
180
|
-
<div>
|
|
181
|
-
<div><code>msg.comperator</code> wird automatisch auf den Vergleichs-Operator gesetzt,</div>
|
|
182
|
-
<div>sofern es nicht bereits hier in der Konfiguration gesetzt wurde.</div>
|
|
177
|
+
<div class="form-row" style="max-width: 28rem">
|
|
178
|
+
<div><strong><span data-i18n="compare.ui.note"></span>:</strong></div>
|
|
179
|
+
<div><code>msg.payload</code> <span data-i18n="compare.ui.note_payload"></span></div>
|
|
180
|
+
<div><code>msg.comperator</code> <span data-i18n="compare.ui.note_comperator"></span></div>
|
|
183
181
|
</div>
|
|
184
182
|
<hr/>
|
|
185
|
-
<h4 style="margin: 0.5rem 0;"
|
|
183
|
+
<h4 style="margin: 0.5rem 0;"><span data-i18n="compare.ui.system_start"></span></h4>
|
|
186
184
|
<div class="form-row">
|
|
187
185
|
<input type="checkbox" id="node-input-save_state" style="width: 20px;" />
|
|
188
|
-
<label for="node-input-save_state" style="width: calc(100% - 30px);"
|
|
186
|
+
<label for="node-input-save_state" style="width: calc(100% - 30px);"><span data-i18n="compare.ui.save_state"></span></label>
|
|
189
187
|
</div>
|
|
190
188
|
<div class="form-row" id="resend_on_start_row">
|
|
191
189
|
<input type="checkbox" id="node-input-resend_on_start" style="width: 20px;" />
|
|
192
|
-
<label for="node-input-resend_on_start" style="width: calc(100% - 30px);"
|
|
190
|
+
<label for="node-input-resend_on_start" style="width: calc(100% - 30px);"><span data-i18n="compare.ui.send_after_start"></span></label>
|
|
193
191
|
</div>
|
|
194
|
-
</script>
|
|
195
|
-
|
|
196
|
-
<script type="text/html" data-help-name="smart_compare">
|
|
197
|
-
<p>Diese Node führt verschiedene Vergleiche aus. Dabei können nicht nur Zahlen, sondern auch Texte verglichen werden.</p>
|
|
198
|
-
<p>
|
|
199
|
-
<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/>
|
|
200
|
-
Diese Node verwendet nur den Teil <code>nummer</code>. <code>name</code> und <code>#</code> sind dabei optional.
|
|
201
|
-
</p>
|
|
202
|
-
<p>
|
|
203
|
-
Folgende topics werden akzeptiert:
|
|
204
|
-
<table>
|
|
205
|
-
<thead>
|
|
206
|
-
<tr>
|
|
207
|
-
<th>Topic</th>
|
|
208
|
-
<th>Beschreibung</th>
|
|
209
|
-
</tr>
|
|
210
|
-
</thead>
|
|
211
|
-
<tbody>
|
|
212
|
-
<tr>
|
|
213
|
-
<td><code>1</code></td>
|
|
214
|
-
<td>Setzt den linken zu vergleichenden Wert</td>
|
|
215
|
-
</tr>
|
|
216
|
-
<tr>
|
|
217
|
-
<td><code>2</code></td>
|
|
218
|
-
<td>Setzt den rechten zu vergleichenden Wert</td>
|
|
219
|
-
</tr>
|
|
220
|
-
</tbody>
|
|
221
|
-
</table>
|
|
222
|
-
</p>
|
|
223
|
-
<p>Texte werden anhand ihres Ascii-Codes verglichen.<code>"c" < "b"</code> ergibt <code>false</code><code>"C" < "b"</code> ergibt <code>true</code>.</p>
|
|
224
|
-
<p>
|
|
225
|
-
<strong>Hinweis:</strong><br/>
|
|
226
|
-
<code>msg.payload</code> wird automatisch auf das Vergleichs-Ergebnis gesetzt,
|
|
227
|
-
sofern es nicht bereits in der Konfiguration gesetzt wurde.<br/>
|
|
228
|
-
<code>msg.comperator</code> wird automatisch auf den Vergleichs-Operator gesetzt,
|
|
229
|
-
sofern es nicht bereits in der Konfiguration gesetzt wurde.
|
|
230
|
-
</p>
|
|
231
192
|
</script>
|
package/compare/compare.js
CHANGED
|
@@ -46,7 +46,7 @@ module.exports = function (RED)
|
|
|
46
46
|
let input = helper.getTopicNumber(msg.topic);
|
|
47
47
|
if (input == null || input < 1 || input > 2)
|
|
48
48
|
{
|
|
49
|
-
node.error("
|
|
49
|
+
node.error(RED._("compare.errors.wrong_topic") + msg.topic);
|
|
50
50
|
return;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_compare">
|
|
2
|
+
<p>Diese Node führt verschiedene Vergleiche aus. Dabei können nicht nur Zahlen, sondern auch Texte verglichen werden.</p>
|
|
3
|
+
<p>
|
|
4
|
+
<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/>
|
|
5
|
+
Diese Node verwendet nur den Teil <code>nummer</code>. <code>name</code> und <code>#</code> sind dabei optional.
|
|
6
|
+
</p>
|
|
7
|
+
<p>
|
|
8
|
+
Folgende topics werden akzeptiert:
|
|
9
|
+
<table>
|
|
10
|
+
<thead>
|
|
11
|
+
<tr>
|
|
12
|
+
<th>Topic</th>
|
|
13
|
+
<th>Beschreibung</th>
|
|
14
|
+
</tr>
|
|
15
|
+
</thead>
|
|
16
|
+
<tbody>
|
|
17
|
+
<tr>
|
|
18
|
+
<td><code>1</code></td>
|
|
19
|
+
<td>Setzt den linken zu vergleichenden Wert</td>
|
|
20
|
+
</tr>
|
|
21
|
+
<tr>
|
|
22
|
+
<td><code>2</code></td>
|
|
23
|
+
<td>Setzt den rechten zu vergleichenden Wert</td>
|
|
24
|
+
</tr>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
</p>
|
|
28
|
+
<p>Texte werden anhand ihres Ascii-Codes verglichen.<code>"c" < "b"</code> ergibt <code>false</code><code>"C" < "b"</code> ergibt <code>true</code>.</p>
|
|
29
|
+
<p>
|
|
30
|
+
<strong>Hinweis:</strong><br/>
|
|
31
|
+
<code>msg.payload</code> wird automatisch auf das Vergleichs-Ergebnis gesetzt,
|
|
32
|
+
sofern es nicht bereits in der Konfiguration gesetzt wurde.<br/>
|
|
33
|
+
<code>msg.comperator</code> wird automatisch auf den Vergleichs-Operator gesetzt,
|
|
34
|
+
sofern es nicht bereits in der Konfiguration gesetzt wurde.
|
|
35
|
+
</p>
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compare": {
|
|
3
|
+
"errors": {
|
|
4
|
+
"wrong_topic": "Topic muss 1 oder 2 sein, gesendet: "
|
|
5
|
+
},
|
|
6
|
+
"ui": {
|
|
7
|
+
"name": "Name",
|
|
8
|
+
"compare": "Vergleich",
|
|
9
|
+
"note_default_values": "Defaultwerte werden hier gesetzt und können durch die einkommenden Nachrichten überschrieben werden.",
|
|
10
|
+
"value_1": "Wert 1",
|
|
11
|
+
"value_2": "Wert 2",
|
|
12
|
+
"output_messages": "Ausgangsnachrichten",
|
|
13
|
+
"true": "Wahr",
|
|
14
|
+
"false": "Falsch",
|
|
15
|
+
"send": "Senden",
|
|
16
|
+
"outputs": "Ausgänge",
|
|
17
|
+
"note": "Hinweis",
|
|
18
|
+
"note_payload": "wird automatisch auf das Vergleichs-Ergebnis gesetzt, sofern es nicht bereits hier in der Konfiguration gesetzt wurde.",
|
|
19
|
+
"note_comperator": "wird automatisch auf den Vergleichs-Operator gesetzt, sofern es nicht bereits hier in der Konfiguration gesetzt wurde.",
|
|
20
|
+
"system_start": "Systemstart",
|
|
21
|
+
"save_state": "Zustand speichern",
|
|
22
|
+
"send_after_start": "Letze Nachricht 10 Sekunden nach dem Start senden",
|
|
23
|
+
"smaller": "< Kleiner",
|
|
24
|
+
"smaller_equal": "<= Kleiner oder gleich",
|
|
25
|
+
"equal": "== Gleich",
|
|
26
|
+
"unequal": "!= Ungleich",
|
|
27
|
+
"greater_equal": ">= Größer oder gleich",
|
|
28
|
+
"greater": "> Größer",
|
|
29
|
+
"no_value": "Kein Wert",
|
|
30
|
+
"send_nothing": "Nichts senden",
|
|
31
|
+
"only_on_change": "Nur bei Änderung",
|
|
32
|
+
"always": "Immer",
|
|
33
|
+
"common_output": "Gemeinsamer Ausgang",
|
|
34
|
+
"separate_output": "Separate Ausgänge"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_compare">
|
|
2
|
+
<p>This node performs various comparisons. Not only numbers, but also texts can be compared.</p>
|
|
3
|
+
<p>
|
|
4
|
+
<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/>
|
|
5
|
+
This node only uses the <code>number</code> part. <code>name</code> and <code>#</code> are optional.
|
|
6
|
+
</p>
|
|
7
|
+
<p>
|
|
8
|
+
The following topics are accepted:
|
|
9
|
+
<table>
|
|
10
|
+
<thead>
|
|
11
|
+
<tr>
|
|
12
|
+
<th>Topic</th>
|
|
13
|
+
<th>Description</th>
|
|
14
|
+
</tr>
|
|
15
|
+
</thead>
|
|
16
|
+
<tbody>
|
|
17
|
+
<tr>
|
|
18
|
+
<td><code>1</code></td>
|
|
19
|
+
<td>Sets the left value to compare</td>
|
|
20
|
+
</tr>
|
|
21
|
+
<tr>
|
|
22
|
+
<td><code>2</code></td>
|
|
23
|
+
<td>Sets the right value to compare</td>
|
|
24
|
+
</tr>
|
|
25
|
+
</tbody>
|
|
26
|
+
</table>
|
|
27
|
+
</p>
|
|
28
|
+
<p>Texts are compared based on their ASCII code.<code>"c" < "b"</code> returns <code>false</code><code>"C" < "b"</code> results in <code>true</code>.</p>
|
|
29
|
+
<p>
|
|
30
|
+
<strong>Note:</strong><br/>
|
|
31
|
+
<code>msg.payload</code> is automatically set to the comparison result,
|
|
32
|
+
if it has not already been set in the configuration.<br/>
|
|
33
|
+
<code>msg.comperator</code> is automatically set to the comparison operator,
|
|
34
|
+
if it has not already been set in the configuration.
|
|
35
|
+
</p>
|
|
36
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compare": {
|
|
3
|
+
"errors": {
|
|
4
|
+
"wrong_topic": "Topic has to be 1 or 2, sended: "
|
|
5
|
+
},
|
|
6
|
+
"ui": {
|
|
7
|
+
"name": "Name",
|
|
8
|
+
"compare": "Compare",
|
|
9
|
+
"note_default_values": "Default values are set here and can be overwritten by incoming messages.",
|
|
10
|
+
"value_1": "Value 1",
|
|
11
|
+
"value_2": "Value 2",
|
|
12
|
+
"output_messages": "Output message",
|
|
13
|
+
"true": "True",
|
|
14
|
+
"false": "False",
|
|
15
|
+
"send": "Send",
|
|
16
|
+
"outputs": "Outputs",
|
|
17
|
+
"note": "Note",
|
|
18
|
+
"note_payload": "is automatically set to the comparison result, unless it has already been set here in the configuration.",
|
|
19
|
+
"note_comperator": "is automatically set to the comparison operator if it has not already been set here in the configuration.",
|
|
20
|
+
"system_start": "System start",
|
|
21
|
+
"save_state": "Save state",
|
|
22
|
+
"send_after_start": "Send last message 10 seconds after the start"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/counter/counter.html
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
type: "json",
|
|
28
28
|
types: ["json", {
|
|
29
29
|
value: "null",
|
|
30
|
-
label: "
|
|
30
|
+
label: this._("default"),
|
|
31
31
|
icon: "fa fa-times",
|
|
32
32
|
hasValue: false,
|
|
33
33
|
}],
|
|
@@ -48,24 +48,24 @@
|
|
|
48
48
|
|
|
49
49
|
<script type="text/html" data-template-name="smart_counter">
|
|
50
50
|
<div class="form-row">
|
|
51
|
-
<label for="node-input-name"><i class="fa fa-tag"></i>
|
|
52
|
-
<input type="text" id="node-input-name"
|
|
51
|
+
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="counter.ui.name"></span></label>
|
|
52
|
+
<input type="text" id="node-input-name" data-i18n="[placeholder]counter.ui.name">
|
|
53
53
|
</div>
|
|
54
54
|
<div class="form-row">
|
|
55
|
-
<label for="node-input-start"><i class="fa fa-cog"></i>
|
|
56
|
-
<input type="number" id="node-input-start"
|
|
55
|
+
<label for="node-input-start"><i class="fa fa-cog"></i> <span data-i18n="counter.ui.start"></label>
|
|
56
|
+
<input type="number" id="node-input-start" data-i18n="[placeholder]counter.ui.start">
|
|
57
57
|
</div>
|
|
58
58
|
<div class="form-row">
|
|
59
|
-
<label for="node-input-step"><i class="fa fa-forward"></i>
|
|
60
|
-
<input type="number" id="node-input-step"
|
|
59
|
+
<label for="node-input-step"><i class="fa fa-forward"></i> <span data-i18n="counter.ui.step"></label>
|
|
60
|
+
<input type="number" id="node-input-step" data-i18n="[placeholder]counter.ui.step">
|
|
61
61
|
</div>
|
|
62
62
|
<div class="form-row">
|
|
63
|
-
<label for="node-input-min"><i class="fa fa-arrow-down"></i>
|
|
64
|
-
<input type="number" id="node-input-min"
|
|
63
|
+
<label for="node-input-min"><i class="fa fa-arrow-down"></i> <span data-i18n="counter.ui.min"></label>
|
|
64
|
+
<input type="number" id="node-input-min" data-i18n="[placeholder]counter.ui.min">
|
|
65
65
|
</div>
|
|
66
66
|
<div class="form-row">
|
|
67
|
-
<label for="node-input-max"><i class="fa fa-arrow-up"></i>
|
|
68
|
-
<input type="number" id="node-input-max"
|
|
67
|
+
<label for="node-input-max"><i class="fa fa-arrow-up"></i> <span data-i18n="counter.ui.max"></label>
|
|
68
|
+
<input type="number" id="node-input-max" data-i18n="[placeholder]counter.ui.max">
|
|
69
69
|
</div>
|
|
70
70
|
<hr/>
|
|
71
71
|
<h4 style="margin: 0.5rem 0;">Ausgangsnachricht</h4>
|
|
@@ -92,53 +92,4 @@
|
|
|
92
92
|
<input type="checkbox" id="node-input-resend_on_start" style="width: 20px;" />
|
|
93
93
|
<label for="node-input-resend_on_start" style="width: calc(100% - 30px);">Letze Nachricht 10 Sekunden nach dem Start senden</label>
|
|
94
94
|
</div>
|
|
95
|
-
</script>
|
|
96
|
-
|
|
97
|
-
<script type="text/html" data-help-name="smart_counter">
|
|
98
|
-
<p>Diese Node kann verwendet werden um nach oben oder unten zu zählen.</p>
|
|
99
|
-
<p>
|
|
100
|
-
Die Standardschrittweite kann vorgegeben oder durch einkommende Nachrichten temporär überschrieben werden.
|
|
101
|
-
Es sind auch Kommazahlen möglich.
|
|
102
|
-
</p>
|
|
103
|
-
<p>
|
|
104
|
-
<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/>
|
|
105
|
-
Diese Node verwendet nur den Teil <code>name</code>. <code>#</code> und <code>nummer</code> sind dabei optional.
|
|
106
|
-
</p>
|
|
107
|
-
<p>
|
|
108
|
-
Folgende topics werden akzeptiert:
|
|
109
|
-
<table>
|
|
110
|
-
<thead>
|
|
111
|
-
<tr>
|
|
112
|
-
<th>Topic</th>
|
|
113
|
-
<th>Beschreibung</th>
|
|
114
|
-
</tr>
|
|
115
|
-
</thead>
|
|
116
|
-
<tbody>
|
|
117
|
-
<tr>
|
|
118
|
-
<td><code>set_min</code></td>
|
|
119
|
-
<td>Überschreibt den eingestellten Min-Wert mit <code>msg.payload</code>.</td>
|
|
120
|
-
</tr>
|
|
121
|
-
<tr>
|
|
122
|
-
<td><code>set_max</code></td>
|
|
123
|
-
<td>Überschreibt den eingestellten Max-Wert mit <code>msg.payload</code>.</td>
|
|
124
|
-
</tr>
|
|
125
|
-
<tr>
|
|
126
|
-
<td><code>set_step</code></td>
|
|
127
|
-
<td>Überschreibt die eingestellte Schrittweite mit <code>msg.payload</code>.</td>
|
|
128
|
-
</tr>
|
|
129
|
-
<tr>
|
|
130
|
-
<td><code>up</code></td>
|
|
131
|
-
<td>Erhöht den Wert um <code>msg.payload</code> oder falls nicht gesetzt (oder <code>null</code>) um die konfigurierte Schrittweite. Der neue Wert ist dabei immer innerhalb der Min- und Max-Werte.</td>
|
|
132
|
-
</tr>
|
|
133
|
-
<tr>
|
|
134
|
-
<td><code>down</code></td>
|
|
135
|
-
<td>Verringert den Wert um <code>msg.payload</code> oder falls nicht gesetzt (oder <code>null</code>) um die konfigurierte Schrittweite. Der neue Wert ist dabei immer innerhalb der Min- und Max-Werte.</td>
|
|
136
|
-
</tr>
|
|
137
|
-
<tr>
|
|
138
|
-
<td><code>reset</code></td>
|
|
139
|
-
<td>Setzt den Wert auf <code>msg.payload</code> oder falls nicht gesetzt (oder <code>null</code>) auf den Startwert zurück. Der neue Wert ist dabei immer innerhalb der Min- und Max-Werte.</td>
|
|
140
|
-
</tr>
|
|
141
|
-
</tbody>
|
|
142
|
-
</table>
|
|
143
|
-
</p>
|
|
144
95
|
</script>
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_counter">
|
|
2
|
+
<p>Diese Node kann verwendet werden um nach oben oder unten zu zählen.</p>
|
|
3
|
+
<p>
|
|
4
|
+
Die Standardschrittweite kann vorgegeben oder durch einkommende Nachrichten temporär überschrieben werden.
|
|
5
|
+
Es sind auch Kommazahlen möglich.
|
|
6
|
+
</p>
|
|
7
|
+
<p>
|
|
8
|
+
<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/>
|
|
9
|
+
Diese Node verwendet nur den Teil <code>name</code>. <code>#</code> und <code>nummer</code> sind dabei optional.
|
|
10
|
+
</p>
|
|
11
|
+
<p>
|
|
12
|
+
Folgende topics werden akzeptiert:
|
|
13
|
+
<table>
|
|
14
|
+
<thead>
|
|
15
|
+
<tr>
|
|
16
|
+
<th>Topic</th>
|
|
17
|
+
<th>Beschreibung</th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
<tbody>
|
|
21
|
+
<tr>
|
|
22
|
+
<td><code>set_min</code></td>
|
|
23
|
+
<td>Überschreibt den eingestellten Min-Wert mit <code>msg.payload</code>.</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td><code>set_max</code></td>
|
|
27
|
+
<td>Überschreibt den eingestellten Max-Wert mit <code>msg.payload</code>.</td>
|
|
28
|
+
</tr>
|
|
29
|
+
<tr>
|
|
30
|
+
<td><code>set_step</code></td>
|
|
31
|
+
<td>Überschreibt die eingestellte Schrittweite mit <code>msg.payload</code>.</td>
|
|
32
|
+
</tr>
|
|
33
|
+
<tr>
|
|
34
|
+
<td><code>up</code></td>
|
|
35
|
+
<td>Erhöht den Wert um <code>msg.payload</code> oder falls nicht gesetzt (oder <code>null</code>) um die konfigurierte Schrittweite. Der neue Wert ist dabei immer innerhalb der Min- und Max-Werte.</td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td><code>down</code></td>
|
|
39
|
+
<td>Verringert den Wert um <code>msg.payload</code> oder falls nicht gesetzt (oder <code>null</code>) um die konfigurierte Schrittweite. Der neue Wert ist dabei immer innerhalb der Min- und Max-Werte.</td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td><code>reset</code></td>
|
|
43
|
+
<td>Setzt den Wert auf <code>msg.payload</code> oder falls nicht gesetzt (oder <code>null</code>) auf den Startwert zurück. Der neue Wert ist dabei immer innerhalb der Min- und Max-Werte.</td>
|
|
44
|
+
</tr>
|
|
45
|
+
</tbody>
|
|
46
|
+
</table>
|
|
47
|
+
</p>
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"counter": {
|
|
3
|
+
"errors": {
|
|
4
|
+
"wrong_topic": "Topic muss 1 oder 2 sein, gesendet: "
|
|
5
|
+
},
|
|
6
|
+
"ui": {
|
|
7
|
+
"name": "Name",
|
|
8
|
+
"start": "Start",
|
|
9
|
+
"step": "Schritt",
|
|
10
|
+
"min": "Min",
|
|
11
|
+
"max": "Max",
|
|
12
|
+
|
|
13
|
+
"system_start": "Systemstart",
|
|
14
|
+
"save_state": "Zustand speichern",
|
|
15
|
+
"send_after_start": "Letze Nachricht 10 Sekunden nach dem Start senden",
|
|
16
|
+
"no_value": "Kein Wert",
|
|
17
|
+
"send_nothing": "Nichts senden",
|
|
18
|
+
"only_on_change": "Nur bei Änderung",
|
|
19
|
+
"always": "Immer",
|
|
20
|
+
"common_output": "Gemeinsamer Ausgang",
|
|
21
|
+
"separate_output": "Separate Ausgänge"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<script type="text/html" data-help-name="smart_counter">
|
|
2
|
+
<p>This node can be used to count up or down.</p>
|
|
3
|
+
<p>
|
|
4
|
+
The standard step size can be specified or temporarily overwritten by incoming messages.
|
|
5
|
+
Decimal numbers are also possible.
|
|
6
|
+
</p>
|
|
7
|
+
<p>
|
|
8
|
+
<b>Note:</b> Smart nodes use topics in the format <code>name#number</code>, so different smart nodes can be controlled with the same topic.<br/>
|
|
9
|
+
This node only uses the <code>name</code> part. <code>#</code> and <code>number</code> are optional.
|
|
10
|
+
</p>
|
|
11
|
+
<p>
|
|
12
|
+
The following topics are accepted:
|
|
13
|
+
<table>
|
|
14
|
+
<thead>
|
|
15
|
+
<tr>
|
|
16
|
+
<th>Topic</th>
|
|
17
|
+
<th>Description</th>
|
|
18
|
+
</tr>
|
|
19
|
+
</thead>
|
|
20
|
+
<tbody>
|
|
21
|
+
<tr>
|
|
22
|
+
<td><code>set_min</code></td>
|
|
23
|
+
<td>Overwrites the set min value with <code>msg.payload</code>.</td>
|
|
24
|
+
</tr>
|
|
25
|
+
<tr>
|
|
26
|
+
<td><code>set_max</code></td>
|
|
27
|
+
<td>Overwrites the set max value with <code>msg.payload</code>.</td>
|
|
28
|
+
</tr>
|
|
29
|
+
<tr>
|
|
30
|
+
<td><code>set_step</code></td>
|
|
31
|
+
<td>Overwrites the set step size with <code>msg.payload</code>.</td>
|
|
32
|
+
</tr>
|
|
33
|
+
<tr>
|
|
34
|
+
<td><code>up</code></td>
|
|
35
|
+
<td>Increases the value by <code>msg.payload</code> or, if not set (or <code>null</code>), by the configured step size. The new value is always within the min and max values.</td>
|
|
36
|
+
</tr>
|
|
37
|
+
<tr>
|
|
38
|
+
<td><code>down</code></td>
|
|
39
|
+
<td>Decreases the value by <code>msg.payload</code> or, if not set (or <code>null</code>), by the configured step size. The new value is always within the min and max values.</td>
|
|
40
|
+
</tr>
|
|
41
|
+
<tr>
|
|
42
|
+
<td><code>reset</code></td>
|
|
43
|
+
<td>Resets the value to <code>msg.payload</code> or, if not set (or <code>null</code>), to the start value. The new value is always within the min and max values.</td>
|
|
44
|
+
</tr>
|
|
45
|
+
</tbody>
|
|
46
|
+
</table>
|
|
47
|
+
</p>
|
|
48
|
+
</script>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"counter": {
|
|
3
|
+
"errors": {
|
|
4
|
+
"wrong_topic": "Topic has to be 1 or 2, sended: "
|
|
5
|
+
},
|
|
6
|
+
"ui": {
|
|
7
|
+
"name": "Name",
|
|
8
|
+
"compare": "Compare",
|
|
9
|
+
"note_default_values": "Default values are set here and can be overwritten by incoming messages.",
|
|
10
|
+
"value_1": "Value 1",
|
|
11
|
+
"value_2": "Value 2",
|
|
12
|
+
"output_messages": "Output message",
|
|
13
|
+
"true": "True",
|
|
14
|
+
"false": "False",
|
|
15
|
+
"send": "Send",
|
|
16
|
+
"outputs": "Outputs",
|
|
17
|
+
"note": "Note",
|
|
18
|
+
"note_payload": "is automatically set to the comparison result, unless it has already been set here in the configuration.",
|
|
19
|
+
"note_comperator": "is automatically set to the comparison operator if it has not already been set here in the configuration.",
|
|
20
|
+
"system_start": "System start",
|
|
21
|
+
"save_state": "Save state",
|
|
22
|
+
"send_after_start": "Send last message 10 seconds after the start"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
package/delay/delay.html
CHANGED
|
@@ -36,17 +36,16 @@
|
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
$("#node-input-on_delay_unit").css("max-width", "10rem").typedInput({
|
|
39
|
-
types: [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]
|
|
39
|
+
types: [{
|
|
40
|
+
default: "s",
|
|
41
|
+
value: "on_delay_unit",
|
|
42
|
+
options: [
|
|
43
|
+
{ value: "ms", label: "Millisekunden" },
|
|
44
|
+
{ value: "s", label: "Sekunden" },
|
|
45
|
+
{ value: "min", label: "Minuten" },
|
|
46
|
+
{ value: "h", label: "Stunden" },
|
|
47
|
+
]
|
|
48
|
+
}]
|
|
50
49
|
});
|
|
51
50
|
|
|
52
51
|
$("#node-input-off_delay").spinner({
|
|
@@ -63,17 +62,16 @@
|
|
|
63
62
|
});
|
|
64
63
|
|
|
65
64
|
$("#node-input-off_delay_unit").css("max-width", "10rem").typedInput({
|
|
66
|
-
types: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
]
|
|
65
|
+
types: [{
|
|
66
|
+
default: "s",
|
|
67
|
+
value: "on_delay_unit",
|
|
68
|
+
options: [
|
|
69
|
+
{ value: "ms", label: "Millisekunden" },
|
|
70
|
+
{ value: "s", label: "Sekunden" },
|
|
71
|
+
{ value: "min", label: "Minuten" },
|
|
72
|
+
{ value: "h", label: "Stunden" },
|
|
73
|
+
]
|
|
74
|
+
}]
|
|
77
75
|
});
|
|
78
76
|
|
|
79
77
|
$("#node-input-save_state").on("change", ev =>
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
label: "Originalnachricht",
|
|
55
55
|
icon: "fa fa-arrow-right",
|
|
56
56
|
hasValue: false,
|
|
57
|
-
}
|
|
57
|
+
}
|
|
58
|
+
],
|
|
58
59
|
typeField: "#node-input-out_higher_type"
|
|
59
60
|
});
|
|
60
61
|
|
|
@@ -71,14 +72,15 @@
|
|
|
71
72
|
label: "Originalnachricht",
|
|
72
73
|
icon: "fa fa-arrow-right",
|
|
73
74
|
hasValue: false,
|
|
74
|
-
}
|
|
75
|
+
}
|
|
76
|
+
],
|
|
75
77
|
typeField: "#node-input-out_lower_type"
|
|
76
78
|
});
|
|
77
79
|
|
|
78
80
|
$("#node-input-send_only_change").typedInput({
|
|
79
81
|
type: "bool",
|
|
80
82
|
types: [{
|
|
81
|
-
value: "
|
|
83
|
+
value: "send_only_change",
|
|
82
84
|
options: [
|
|
83
85
|
{ value: "true", label: "Nur bei Änderung" },
|
|
84
86
|
{ value: "false", label: "Immer" },
|
|
@@ -89,7 +91,7 @@
|
|
|
89
91
|
$("#node-input-outputs").typedInput({
|
|
90
92
|
type: "num",
|
|
91
93
|
types: [{
|
|
92
|
-
value: "
|
|
94
|
+
value: "outputs",
|
|
93
95
|
options: [
|
|
94
96
|
{ value: "1", label: "Gemeinsamer Ausgang" },
|
|
95
97
|
{ value: "2", label: "Separate Ausgänge" },
|
|
@@ -160,15 +160,14 @@
|
|
|
160
160
|
$("#node-input-icon")
|
|
161
161
|
.css("max-width", "10rem")
|
|
162
162
|
.typedInput({
|
|
163
|
-
types: [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
],
|
|
163
|
+
types: [{
|
|
164
|
+
value: "light",
|
|
165
|
+
default: "light",
|
|
166
|
+
options: [
|
|
167
|
+
{ value: "light", label: "Licht" },
|
|
168
|
+
{ value: "outlet", label: "Steckdose" }
|
|
169
|
+
],
|
|
170
|
+
}],
|
|
172
171
|
});
|
|
173
172
|
|
|
174
173
|
$("#node-input-max_time_on")
|
|
@@ -187,30 +186,28 @@
|
|
|
187
186
|
$("#node-input-max_time_on_unit")
|
|
188
187
|
.css("max-width", "10rem")
|
|
189
188
|
.typedInput({
|
|
190
|
-
types: [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
],
|
|
189
|
+
types: [{
|
|
190
|
+
value: "max_time_on_unit",
|
|
191
|
+
default: "s",
|
|
192
|
+
options: [
|
|
193
|
+
{ value: "ms", label: "Millisekunden" },
|
|
194
|
+
{ value: "s", label: "Sekunden" },
|
|
195
|
+
{ value: "min", label: "Minuten" },
|
|
196
|
+
{ value: "h", label: "Stunden" },
|
|
197
|
+
],
|
|
198
|
+
}],
|
|
201
199
|
});
|
|
202
200
|
|
|
203
201
|
$("#node-input-alarm_action").typedInput({
|
|
204
|
-
types: [
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
],
|
|
202
|
+
types: [{
|
|
203
|
+
value: "alarm_action",
|
|
204
|
+
default: "NOTHING",
|
|
205
|
+
options: [
|
|
206
|
+
{ value: "NOTHING", label: "Keine Aktion" },
|
|
207
|
+
{ value: "ON", label: "Einschalten" },
|
|
208
|
+
{ value: "OFF", label: "Ausschalten" }
|
|
209
|
+
],
|
|
210
|
+
}],
|
|
214
211
|
});
|
|
215
212
|
},
|
|
216
213
|
onadd: function ()
|
package/logic/logic.html
CHANGED
|
@@ -32,16 +32,15 @@
|
|
|
32
32
|
oneditprepare: function ()
|
|
33
33
|
{
|
|
34
34
|
$("#node-input-logic").typedInput({
|
|
35
|
-
types: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
],
|
|
35
|
+
types: [{
|
|
36
|
+
value: "logic",
|
|
37
|
+
default: "AND",
|
|
38
|
+
options: [
|
|
39
|
+
{ value: "AND", label: "AND" },
|
|
40
|
+
{ value: "OR", label: "OR" },
|
|
41
|
+
{ value: "XOR", label: "XOR" }
|
|
42
|
+
],
|
|
43
|
+
}],
|
|
45
44
|
});
|
|
46
45
|
|
|
47
46
|
$("#node-input-logic_inputs").spinner({
|
|
@@ -61,12 +60,11 @@
|
|
|
61
60
|
|
|
62
61
|
$("#node-input-inverts")
|
|
63
62
|
.typedInput({
|
|
64
|
-
types: [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
],
|
|
63
|
+
types: [{
|
|
64
|
+
value: "inverts",
|
|
65
|
+
multiple: true,
|
|
66
|
+
options: []
|
|
67
|
+
}],
|
|
70
68
|
});
|
|
71
69
|
refreshInverts(this.logic_inputs);
|
|
72
70
|
$("#node-input-inverts").typedInput("value", this.inverts);
|
|
@@ -97,7 +95,7 @@
|
|
|
97
95
|
$("#node-input-send_only_change").typedInput({
|
|
98
96
|
type: "bool",
|
|
99
97
|
types: [{
|
|
100
|
-
value: "
|
|
98
|
+
value: "send_only_change",
|
|
101
99
|
options: [
|
|
102
100
|
{ value: "true", label: "Nur bei Änderung" },
|
|
103
101
|
{ value: "false", label: "Immer" },
|
|
@@ -108,7 +106,7 @@
|
|
|
108
106
|
$("#node-input-outputs").typedInput({
|
|
109
107
|
type: "num",
|
|
110
108
|
types: [{
|
|
111
|
-
value: "
|
|
109
|
+
value: "outputs",
|
|
112
110
|
options: [
|
|
113
111
|
{ value: "1", label: "Gemeinsamer Ausgang" },
|
|
114
112
|
{ value: "2", label: "Separate Ausgänge" },
|
|
@@ -143,12 +141,11 @@
|
|
|
143
141
|
}
|
|
144
142
|
|
|
145
143
|
$("#node-input-inverts")
|
|
146
|
-
.typedInput(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
]);
|
|
144
|
+
.typedInput("types", [{
|
|
145
|
+
value: "inverts",
|
|
146
|
+
multiple: true,
|
|
147
|
+
options: options
|
|
148
|
+
}]);
|
|
152
149
|
|
|
153
150
|
$("#node-input-inverts").typedInput("value", newValues.join(","));
|
|
154
151
|
}
|
|
@@ -63,28 +63,26 @@
|
|
|
63
63
|
}).css("max-width", "4rem");
|
|
64
64
|
|
|
65
65
|
$("#node-input-off_mode").typedInput({
|
|
66
|
-
types: [
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
],
|
|
66
|
+
types: [{
|
|
67
|
+
default: "NOTHING",
|
|
68
|
+
value: "off_mode",
|
|
69
|
+
options: [
|
|
70
|
+
{ value: "NOTHING", label: "Nichts" },
|
|
71
|
+
{ value: "OPEN", label: "Öffnen (100%)" },
|
|
72
|
+
{ value: "CLOSE", label: "Schließen (0%)" }
|
|
73
|
+
],
|
|
74
|
+
}],
|
|
76
75
|
});
|
|
77
76
|
|
|
78
77
|
$("#node-input-valve_mode").typedInput({
|
|
79
|
-
types: [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
],
|
|
78
|
+
types: [{
|
|
79
|
+
default: "HEATING",
|
|
80
|
+
value: "valve_mode",
|
|
81
|
+
options: [
|
|
82
|
+
{ value: "HEATING", label: "Heizen (normal)" },
|
|
83
|
+
{ value: "COOLING", label: "Kühlen (invertiert)" }
|
|
84
|
+
],
|
|
85
|
+
}],
|
|
88
86
|
});
|
|
89
87
|
},
|
|
90
88
|
});
|
|
@@ -336,10 +336,10 @@ module.exports = function (RED)
|
|
|
336
336
|
if (calibration_timeout !== null)
|
|
337
337
|
node.status({ fill: "yellow", shape: "ring", text: helper.getCurrentTimeForStatus() + ": In calibration" });
|
|
338
338
|
else
|
|
339
|
-
node.status({ fill: node_settings.enabled ? "green" : "red", shape: "dot", text: helper.getCurrentTimeForStatus() + ": " + (node_settings.valve_mode == "HEATING" ? "🔥" : "❄️") + " Set: " + node_settings.setpoint
|
|
339
|
+
node.status({ fill: node_settings.enabled ? "green" : "red", shape: "dot", text: helper.getCurrentTimeForStatus() + ": " + (node_settings.valve_mode == "HEATING" ? "🔥" : "❄️") + " Set: " + node_settings.setpoint?.toFixed(1) + "°C, Cur: " + current_temperature?.toFixed(1) + "°C, Pos: " + node_settings.last_position?.toFixed(1) + "%" });
|
|
340
340
|
}
|
|
341
341
|
|
|
342
|
-
if (node_settings.last_position
|
|
342
|
+
if (node_settings.last_position == null)
|
|
343
343
|
{
|
|
344
344
|
// Start calibration after 10s
|
|
345
345
|
setTimeout(calibrate, 10 * 1000);
|
package/package.json
CHANGED
|
@@ -204,7 +204,8 @@
|
|
|
204
204
|
{
|
|
205
205
|
let value = $(inputs[i]).typedInput("value");
|
|
206
206
|
$(inputs[i]).typedInput("types", [{
|
|
207
|
-
|
|
207
|
+
value: "output",
|
|
208
|
+
multiple: true,
|
|
208
209
|
options: options
|
|
209
210
|
}]);
|
|
210
211
|
$(inputs[i]).typedInput("value", value);
|
|
@@ -326,10 +327,11 @@
|
|
|
326
327
|
.css("width", "calc(70% - 55px)")
|
|
327
328
|
.appendTo(row)
|
|
328
329
|
.typedInput({
|
|
330
|
+
type: "output",
|
|
329
331
|
types: [{
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
]
|
|
332
|
+
value: "output",
|
|
333
|
+
multiple: true,
|
|
334
|
+
options: []
|
|
333
335
|
}]
|
|
334
336
|
});
|
|
335
337
|
|
|
@@ -404,17 +406,16 @@
|
|
|
404
406
|
$("#node-input-max_time_on_unit")
|
|
405
407
|
.css("max-width", "10rem")
|
|
406
408
|
.typedInput({
|
|
407
|
-
types: [
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
],
|
|
409
|
+
types: [{
|
|
410
|
+
default: "s",
|
|
411
|
+
value: "max_time_on_unit",
|
|
412
|
+
options: [
|
|
413
|
+
{ value: "ms", label: "Millisekunden" },
|
|
414
|
+
{ value: "s", label: "Sekunden" },
|
|
415
|
+
{ value: "min", label: "Minuten" },
|
|
416
|
+
{ value: "h", label: "Stunden" },
|
|
417
|
+
],
|
|
418
|
+
}],
|
|
418
419
|
});
|
|
419
420
|
},
|
|
420
421
|
oneditsave: function ()
|
|
@@ -210,16 +210,15 @@
|
|
|
210
210
|
});
|
|
211
211
|
|
|
212
212
|
$("#node-input-alarm_action").typedInput({
|
|
213
|
-
types: [
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
],
|
|
213
|
+
types: [{
|
|
214
|
+
default: "NOTHING",
|
|
215
|
+
value: "alarm_action",
|
|
216
|
+
options: [
|
|
217
|
+
{ value: "NOTHING", label: "Keine Aktion" },
|
|
218
|
+
{ value: "UP", label: "Hoch / Öffnen" },
|
|
219
|
+
{ value: "DOWN", label: "Runter / Schließen" }
|
|
220
|
+
],
|
|
221
|
+
}],
|
|
223
222
|
});
|
|
224
223
|
},
|
|
225
224
|
onadd: function ()
|
package/statistic/statistic.html
CHANGED
|
@@ -23,21 +23,20 @@
|
|
|
23
23
|
{
|
|
24
24
|
$("#node-input-operation")
|
|
25
25
|
.typedInput({
|
|
26
|
-
types: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
],
|
|
26
|
+
types: [{
|
|
27
|
+
default: "MIN",
|
|
28
|
+
value: "operation",
|
|
29
|
+
options: [
|
|
30
|
+
{ value: "MIN", label: "Minimum" },
|
|
31
|
+
{ value: "MAX", label: "Maximum" },
|
|
32
|
+
{ value: "SUM", label: "Summe" },
|
|
33
|
+
{ value: "DIFF", label: "Differenz" },
|
|
34
|
+
{ value: "ABS", label: "Absoluter Wert" },
|
|
35
|
+
{ value: "ABS_DIFF", label: "Absolute Differenz" },
|
|
36
|
+
{ value: "AVG", label: "Durchschnitt" },
|
|
37
|
+
{ value: "MOV_AVG", label: "Gleitender Mittelwert" }
|
|
38
|
+
],
|
|
39
|
+
}],
|
|
41
40
|
});
|
|
42
41
|
|
|
43
42
|
$("#node-input-count").css("max-width", "4rem").spinner({
|