node-red-contrib-knx-ultimate 2.0.9 → 2.0.11
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 +15 -1
- package/nodes/knxUltimateHueButton.html +54 -197
- package/nodes/knxUltimateHueButton.js +42 -54
- package/nodes/knxUltimateHueLight.html +14 -28
- package/nodes/knxUltimateHueLight.js +4 -5
- package/nodes/knxUltimateHueMotion.html +4 -8
- package/nodes/knxUltimateHueMotion.js +2 -4
- package/nodes/knxUltimateHueTapDial.html +8 -12
- package/nodes/knxUltimateHueTapDial.js +2 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,10 +6,24 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
<p>
|
|
10
|
+
<b>Version 2.0.10</b> - June 2023<br/>
|
|
11
|
+
- HUE: CAUTION BREAKING CHANGES TO THE HUE NODES. PLEASE BE AWARE THAT HUE NODES ARE STILL IN BETA<br/>
|
|
12
|
+
- Hotfix for Hue Button node, not retain property in config window.<br/>
|
|
13
|
+
- Removed "Double Tap" event, because it doesn't exists yet.<br/>
|
|
14
|
+
</p>
|
|
15
|
+
<p>
|
|
16
|
+
<b>Version 2.0.10</b> - June 2023<br/>
|
|
17
|
+
- HUE: CAUTION BREAKING CHANGES TO THE HUE NODES. PLEASE BE AWARE THAT HUE NODES ARE STILL IN BETA<br/>
|
|
18
|
+
- Hue Button node redesign.<br/>
|
|
19
|
+
- Other hue nodes fixes<br/>
|
|
20
|
+
</p>
|
|
21
|
+
<p>
|
|
9
22
|
<p>
|
|
10
23
|
<b>Version 2.0.9</b> - June 2023<br/>
|
|
11
24
|
- NEW: HUE Motion node<br/>
|
|
12
|
-
- NEW: HUE Tap Dial node<br
|
|
25
|
+
- NEW: HUE Tap Dial node<br/>
|
|
26
|
+
</p>
|
|
13
27
|
<p>
|
|
14
28
|
<b>Version 2.0.7</b> - June 2023<br/>
|
|
15
29
|
- HUE Button node: added an output PIN<br/>
|
|
@@ -8,29 +8,17 @@
|
|
|
8
8
|
serverHue: { type: "hue-config", required: true },
|
|
9
9
|
name: { value: "" },
|
|
10
10
|
|
|
11
|
-
nameinitial_press: { value: "" },
|
|
12
|
-
GAinitial_press: { value: "" },
|
|
13
|
-
dptinitial_press: { value: "" },
|
|
14
|
-
|
|
15
11
|
namerepeat: { value: "" },
|
|
16
12
|
GArepeat: { value: "" },
|
|
17
|
-
dptrepeat: { value: "" },
|
|
13
|
+
dptrepeat: { value: "3.007" },
|
|
18
14
|
|
|
19
15
|
nameshort_release: { value: "" },
|
|
20
16
|
GAshort_release: { value: "" },
|
|
21
|
-
dptshort_release: { value: "" },
|
|
22
|
-
|
|
23
|
-
namelong_release: { value: "" },
|
|
24
|
-
GAlong_release: { value: "" },
|
|
25
|
-
dptlong_release: { value: "" },
|
|
17
|
+
dptshort_release: { value: "1.001" },
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
namelong_press: { value: "" },
|
|
32
|
-
GAlong_press: { value: "" },
|
|
33
|
-
dptlong_press: { value: "" },
|
|
19
|
+
nameshort_releaseStatus: { value: "" },
|
|
20
|
+
GAshort_releaseStatus: { value: "" },
|
|
21
|
+
dptshort_releaseStatus: { value: "1.001" },
|
|
34
22
|
|
|
35
23
|
toggleValues: { value: true },
|
|
36
24
|
hueDevice: { value: "" }
|
|
@@ -85,65 +73,16 @@
|
|
|
85
73
|
return i == aSearchWords.length;
|
|
86
74
|
}
|
|
87
75
|
|
|
88
|
-
// DPT Switch command
|
|
89
|
-
// ########################
|
|
90
|
-
$.getJSON('knxUltimateDpts', (data) => {
|
|
91
|
-
data.forEach(dpt => {
|
|
92
|
-
if (dpt.value.startsWith("1.")) {
|
|
93
|
-
$("#node-input-dptinitial_press").append($("<option></option>")
|
|
94
|
-
.attr("value", dpt.value)
|
|
95
|
-
.text(dpt.text))
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
$("#node-input-dptinitial_press").val(this.dptinitial_press)
|
|
99
|
-
})
|
|
100
|
-
|
|
101
|
-
// Autocomplete suggestion with ETS csv File
|
|
102
|
-
$("#node-input-GAinitial_press").autocomplete({
|
|
103
|
-
minLength: 1,
|
|
104
|
-
source: function (request, response) {
|
|
105
|
-
//$.getJSON("csv", request, function( data, status, xhr ) {
|
|
106
|
-
$.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
|
|
107
|
-
response($.map(data, function (value, key) {
|
|
108
|
-
var sSearch = (value.ga + " (" + value.devicename + ") DPT" + value.dpt);
|
|
109
|
-
if (fullSearch(sSearch, request.term + " 1.")) {
|
|
110
|
-
return {
|
|
111
|
-
label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
|
|
112
|
-
value: value.ga // Value
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
return null;
|
|
116
|
-
}
|
|
117
|
-
}));
|
|
118
|
-
});
|
|
119
|
-
}, select: function (event, ui) {
|
|
120
|
-
// Sets Datapoint and device name automatically
|
|
121
|
-
var sDevName = ui.item.label.split("#")[1].trim();
|
|
122
|
-
try {
|
|
123
|
-
sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
|
|
124
|
-
} catch (error) {
|
|
125
|
-
}
|
|
126
|
-
$('#node-input-nameinitial_press').val(sDevName);
|
|
127
|
-
var optVal = $("#node-input-dptinitial_press option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
|
|
128
|
-
// Select the option value
|
|
129
|
-
$("#node-input-dptinitial_press").val(optVal);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
// ########################
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
76
|
// DPT repeat
|
|
137
77
|
// ########################
|
|
138
78
|
$.getJSON('knxUltimateDpts', (data) => {
|
|
139
79
|
data.forEach(dpt => {
|
|
140
|
-
if (dpt.value.startsWith("
|
|
80
|
+
if (dpt.value.startsWith("3.007")) {
|
|
141
81
|
$("#node-input-dptrepeat").append($("<option></option>")
|
|
142
82
|
.attr("value", dpt.value)
|
|
143
83
|
.text(dpt.text))
|
|
144
84
|
}
|
|
145
85
|
});
|
|
146
|
-
|
|
147
86
|
$("#node-input-dptrepeat").val(this.dptrepeat)
|
|
148
87
|
})
|
|
149
88
|
|
|
@@ -155,7 +94,7 @@
|
|
|
155
94
|
response($.map(data, function (value, key) {
|
|
156
95
|
var sSearch = (value.ga + " (" + value.devicename + ") DPT" + value.dpt);
|
|
157
96
|
if (fullSearch(sSearch, request.term)) {
|
|
158
|
-
if (value.dpt.startsWith('
|
|
97
|
+
if (value.dpt.startsWith('3.007')) {
|
|
159
98
|
return {
|
|
160
99
|
label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
|
|
161
100
|
value: value.ga // Value
|
|
@@ -189,11 +128,12 @@
|
|
|
189
128
|
$("#node-input-dptshort_release").append($("<option></option>")
|
|
190
129
|
.attr("value", dpt.value)
|
|
191
130
|
.text(dpt.text))
|
|
131
|
+
$("#node-input-dptshort_releaseStatus").append($("<option></option>")
|
|
132
|
+
.attr("value", dpt.value)
|
|
133
|
+
.text(dpt.text))
|
|
192
134
|
}
|
|
193
135
|
});
|
|
194
|
-
|
|
195
136
|
$("#node-input-dptshort_release").val(this.dptshort_release)
|
|
196
|
-
|
|
197
137
|
})
|
|
198
138
|
|
|
199
139
|
// Autocomplete suggestion with ETS csv File
|
|
@@ -227,28 +167,8 @@
|
|
|
227
167
|
}
|
|
228
168
|
});
|
|
229
169
|
|
|
230
|
-
|
|
231
|
-
// DPT dptlong_release and dptLightColorStateƒ
|
|
232
|
-
// ########################
|
|
233
|
-
$.getJSON('knxUltimateDpts', (data) => {
|
|
234
|
-
data.forEach(dpt => {
|
|
235
|
-
if (dpt.value.startsWith('1.')) {
|
|
236
|
-
$("#node-input-dptlong_release").append($("<option></option>")
|
|
237
|
-
.attr("value", dpt.value)
|
|
238
|
-
.text(dpt.text))
|
|
239
|
-
$("#node-input-dptdouble_short_release").append($("<option></option>")
|
|
240
|
-
.attr("value", dpt.value)
|
|
241
|
-
.text(dpt.text))
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
|
|
245
|
-
$("#node-input-dptlong_release").val(this.dptlong_release)
|
|
246
|
-
$("#node-input-dptdouble_short_release").val(this.dptdouble_short_release)
|
|
247
|
-
|
|
248
|
-
})
|
|
249
|
-
|
|
250
170
|
// Autocomplete suggestion with ETS csv File
|
|
251
|
-
$("#node-input-
|
|
171
|
+
$("#node-input-GAshort_releaseStatus").autocomplete({
|
|
252
172
|
minLength: 1,
|
|
253
173
|
source: function (request, response) {
|
|
254
174
|
$.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
|
|
@@ -271,13 +191,14 @@
|
|
|
271
191
|
sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
|
|
272
192
|
} catch (error) {
|
|
273
193
|
}
|
|
274
|
-
$('#node-input-
|
|
275
|
-
var optVal = $("#node-input-
|
|
194
|
+
$('#node-input-nameshort_releaseStatus').val(sDevName);
|
|
195
|
+
var optVal = $("#node-input-dptshort_releaseStatus option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
|
|
276
196
|
// Select the option value
|
|
277
|
-
$("#node-input-
|
|
197
|
+
$("#node-input-dptshort_releaseStatus").val(optVal);
|
|
278
198
|
}
|
|
279
199
|
});
|
|
280
200
|
|
|
201
|
+
|
|
281
202
|
// Autocomplete suggestion with ETS csv File
|
|
282
203
|
$("#node-input-GAdouble_short_release").autocomplete({
|
|
283
204
|
minLength: 1,
|
|
@@ -309,25 +230,8 @@
|
|
|
309
230
|
}
|
|
310
231
|
});
|
|
311
232
|
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
// DPT dptlong_press
|
|
315
|
-
// ########################
|
|
316
|
-
$.getJSON('knxUltimateDpts', (data) => {
|
|
317
|
-
data.forEach(dpt => {
|
|
318
|
-
if (dpt.value.startsWith('1.')) {
|
|
319
|
-
$("#node-input-dptlong_press").append($("<option></option>")
|
|
320
|
-
.attr("value", dpt.value)
|
|
321
|
-
.text(dpt.text))
|
|
322
|
-
}
|
|
323
|
-
});
|
|
324
|
-
|
|
325
|
-
$("#node-input-dptlong_press").val(this.dptlong_press)
|
|
326
|
-
|
|
327
|
-
})
|
|
328
|
-
|
|
329
233
|
// Autocomplete suggestion with ETS csv File
|
|
330
|
-
$("#node-input-
|
|
234
|
+
$("#node-input-GAdouble_short_releaseStatus").autocomplete({
|
|
331
235
|
minLength: 1,
|
|
332
236
|
source: function (request, response) {
|
|
333
237
|
$.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
|
|
@@ -350,18 +254,13 @@
|
|
|
350
254
|
sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
|
|
351
255
|
} catch (error) {
|
|
352
256
|
}
|
|
353
|
-
$('#node-input-
|
|
354
|
-
var optVal = $("#node-input-
|
|
257
|
+
$('#node-input-namedouble_short_releaseStatus').val(sDevName);
|
|
258
|
+
var optVal = $("#node-input-dptdouble_short_releaseStatus option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr('value');
|
|
355
259
|
// Select the option value
|
|
356
|
-
$("#node-input-
|
|
260
|
+
$("#node-input-dptdouble_short_releaseStatus").val(optVal);
|
|
357
261
|
}
|
|
358
262
|
});
|
|
359
263
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
264
|
// Autocomplete suggestion with HUE
|
|
366
265
|
$("#node-input-name").autocomplete({
|
|
367
266
|
minLength: 1,
|
|
@@ -406,7 +305,7 @@
|
|
|
406
305
|
|
|
407
306
|
|
|
408
307
|
<div class="form-row">
|
|
409
|
-
<b>HUE
|
|
308
|
+
<b>HUE Button node</b>  <span style="color:red"
|
|
410
309
|
 <i class="fa fa-question-circle"></i></span>
|
|
411
310
|
 <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/en-hue-configuration"><u>Configuration</u></a>
|
|
412
311
|
<br />
|
|
@@ -444,87 +343,51 @@
|
|
|
444
343
|
<!-- <p> <img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/knx.png' width='32px'> -> <img src='https://raw.githubusercontent.com/Supergiovane/node-red-contrib-knx-ultimate/master/img/hue.png' width='32px'></p> -->
|
|
445
344
|
|
|
446
345
|
<p>
|
|
447
|
-
<b>
|
|
346
|
+
<b>KNX DATAPOINTS</b>
|
|
448
347
|
</p>
|
|
449
348
|
|
|
450
349
|
<div class="form-row">
|
|
451
|
-
<label for="node-input-
|
|
452
|
-
|
|
453
|
-
<label for="node-input-GAinitial_press" style="width:20px;">GA</label>
|
|
454
|
-
<input type="text" id="node-input-GAinitial_press" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
455
|
-
|
|
456
|
-
<label for="node-input-dptinitial_press" style="width:40px; margin-left: 0px; text-align: right;">dpt</label>
|
|
457
|
-
<select id="node-input-dptinitial_press" style="width:140px;"></select>
|
|
458
|
-
|
|
459
|
-
<label for="node-input-nameinitial_press" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
460
|
-
<input type="text" id="node-input-nameinitial_press" style="width:200px;margin-left: 5px; text-align: left;">
|
|
461
|
-
</div>
|
|
462
|
-
|
|
463
|
-
<div class="form-row">
|
|
464
|
-
<label for="node-input-namerepeat" style="width:100px;"><i class="fa fa-play-circle-o"></i> Repeat</span></label>
|
|
465
|
-
|
|
466
|
-
<label for="node-input-GArepeat" style="width:20px;">GA</label>
|
|
467
|
-
<input type="text" id="node-input-GArepeat" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
468
|
-
|
|
469
|
-
<label for="node-input-dptrepeat" style="width:40px; margin-left: 0px; text-align: right;">dpt</label>
|
|
470
|
-
<select id="node-input-dptrepeat" style="width:140px;"></select>
|
|
471
|
-
|
|
472
|
-
<label for="node-input-namerepeat" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
473
|
-
<input type="text" id="node-input-namerepeat" style="width:200px;margin-left: 5px; text-align: left;">
|
|
474
|
-
</div>
|
|
475
|
-
|
|
476
|
-
<div class="form-row">
|
|
477
|
-
<label for="node-input-nameshort_release" style="width:100px;"><i class="fa fa-play-circle-o"></i> Short release</label>
|
|
350
|
+
<label for="node-input-nameshort_release" style="width:100px;"><i class="fa fa-play-circle-o"></i> Switch</label>
|
|
478
351
|
|
|
479
352
|
<label for="node-input-GAhort_release" style="width:20px;">GA</label>
|
|
480
353
|
<input type="text" id="node-input-GAshort_release" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
481
|
-
|
|
482
|
-
<label for="node-input-dptshort_release" style="width:40px; margin-left: 0px; text-align: right;">
|
|
354
|
+
|
|
355
|
+
<label for="node-input-dptshort_release" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
483
356
|
<select id="node-input-dptshort_release" style="width:140px;"></select>
|
|
484
|
-
|
|
357
|
+
|
|
485
358
|
<label for="node-input-nameshort_release" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
486
359
|
<input type="text" id="node-input-nameshort_release" style="width:200px;margin-left: 5px; text-align: left;">
|
|
487
360
|
</div>
|
|
488
|
-
|
|
489
361
|
<div class="form-row">
|
|
490
|
-
<label
|
|
362
|
+
<label style="width:100px;"><i class="fa fa-play-circle-o"></i> Switch Status</label>
|
|
491
363
|
|
|
492
|
-
<label for="node-input-
|
|
493
|
-
<input type="text" id="node-input-
|
|
494
|
-
|
|
495
|
-
<label for="node-input-
|
|
496
|
-
<select id="node-input-
|
|
497
|
-
|
|
498
|
-
<label for="node-input-
|
|
499
|
-
<input type="text" id="node-input-
|
|
364
|
+
<label for="node-input-GAshort_releaseStatus" style="width:20px;">GA</label>
|
|
365
|
+
<input type="text" id="node-input-GAshort_releaseStatus" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
366
|
+
|
|
367
|
+
<label for="node-input-dptshort_releaseStatus" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
368
|
+
<select id="node-input-dptshort_releaseStatus" style="width:140px;"></select>
|
|
369
|
+
|
|
370
|
+
<label for="node-input-nameshort_releaseStatus" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
371
|
+
<input type="text" id="node-input-nameshort_releaseStatus" style="width:200px;margin-left: 5px; text-align: left;">
|
|
500
372
|
</div>
|
|
373
|
+
<br/>
|
|
374
|
+
<br/>
|
|
501
375
|
|
|
502
376
|
<div class="form-row">
|
|
503
|
-
<label
|
|
377
|
+
<label style="width:100px;"><i class="fa fa-play-circle-o"></i> Dim</span></label>
|
|
504
378
|
|
|
505
|
-
<label for="node-input-
|
|
506
|
-
<input type="text" id="node-input-
|
|
379
|
+
<label for="node-input-GArepeat" style="width:20px;">GA</label>
|
|
380
|
+
<input type="text" id="node-input-GArepeat" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
507
381
|
|
|
508
|
-
<label for="node-input-
|
|
509
|
-
<select id="node-input-
|
|
382
|
+
<label for="node-input-dptrepeat" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
383
|
+
<select id="node-input-dptrepeat" style="width:140px;"></select>
|
|
510
384
|
|
|
511
|
-
<label for="node-input-
|
|
512
|
-
<input type="text" id="node-input-
|
|
385
|
+
<label for="node-input-namerepeat" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
386
|
+
<input type="text" id="node-input-namerepeat" style="width:200px;margin-left: 5px; text-align: left;">
|
|
513
387
|
</div>
|
|
388
|
+
<br/>
|
|
389
|
+
<br/>
|
|
514
390
|
|
|
515
|
-
<div class="form-row">
|
|
516
|
-
<label for="node-input-namelong_press" style="width:100px;"><i class="fa fa-play-circle-o"></i> Long press</label>
|
|
517
|
-
|
|
518
|
-
<label for="node-input-GAhort_release" style="width:20px;">GA</label>
|
|
519
|
-
<input type="text" id="node-input-GAlong_press" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
520
|
-
|
|
521
|
-
<label for="node-input-dptlong_press" style="width:40px; margin-left: 0px; text-align: right;">dpt</label>
|
|
522
|
-
<select id="node-input-dptlong_press" style="width:140px;"></select>
|
|
523
|
-
|
|
524
|
-
<label for="node-input-namelong_press" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
525
|
-
<input type="text" id="node-input-namelong_press" style="width:200px;margin-left: 5px; text-align: left;">
|
|
526
|
-
</div>
|
|
527
|
-
|
|
528
391
|
<div class="form-row">
|
|
529
392
|
<input type="checkbox" id="node-input-toggleValues" style="display:inline-block; width:auto; vertical-align:top;" />
|
|
530
393
|
<label style="width:auto" for="node-input-toggleValues">
|
|
@@ -537,11 +400,6 @@
|
|
|
537
400
|
</div>
|
|
538
401
|
|
|
539
402
|
|
|
540
|
-
<br/>
|
|
541
|
-
<br/>
|
|
542
|
-
<br/>
|
|
543
|
-
<br/>
|
|
544
|
-
<br/>
|
|
545
403
|
<br/>
|
|
546
404
|
<br/>
|
|
547
405
|
<br/>
|
|
@@ -552,11 +410,9 @@
|
|
|
552
410
|
<script type="text/markdown" data-help-name="knxUltimateHueButton">
|
|
553
411
|
<p> This node lets you get the events from your HUE button.<br/>
|
|
554
412
|
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
In *repeat* event, you can DIM a KNX light.
|
|
413
|
+
Link the Group Adresses you want, to the respective events.
|
|
414
|
+
All fields are optional.
|
|
558
415
|
The **toggle values** option is enabled by default. This option toggles the value of each KNX group address (*true/false, increase/decrease dim*)
|
|
559
|
-
If you want to simply switch on and off a KNX load or light, use the *Initial press* group address and be sure that the *Toggle values* is enabled.
|
|
560
416
|
|
|
561
417
|
|
|
562
418
|
**General**
|
|
@@ -568,17 +424,17 @@ If you want to simply switch on and off a KNX load or light, use the *Initial pr
|
|
|
568
424
|
|
|
569
425
|
<br/>
|
|
570
426
|
|
|
571
|
-
**
|
|
427
|
+
**KNX DATAPOINTS**
|
|
572
428
|
Here you can get the HUE button events.<br/>
|
|
573
429
|
Start typing in the GA field, the name or group address of your KNX device, the avaiable devices start showing up while you're typing.
|
|
430
|
+
The Status fields need to be filled only if you set the *Toggle values* option.
|
|
431
|
+
This allows the internal logic to be aware of external devices, like wall switches.
|
|
574
432
|
|
|
575
433
|
|Property|Description|
|
|
576
434
|
|--|--|
|
|
577
|
-
|
|
|
435
|
+
| Switch | As soon as you quickly press and release your HUE button, this event fires |
|
|
436
|
+
| Switch Status | To allow internal logic to take care of the external KNX devices, for example an external wall switch, you should set this group address |
|
|
578
437
|
| Repeat | This event is used either to send DIM (increase/decrease) or true/false commands to the KNX group address |
|
|
579
|
-
| Short release | Rapid push of the button, fired as soon as you release your finger from the button. Usually used to toggle a KNX light true/false |
|
|
580
|
-
| Long release | Long press of the button, fired as soon as you release your finger from the button |
|
|
581
|
-
| Long press | Long press of the button, fired as soon as you long press the button |
|
|
582
438
|
| Toggle values | Enable or disable toggling values. If enabled, all values toggles, otherwise, all values are sent as *true* or *increase dim*, to the selected KNX group address |
|
|
583
439
|
|
|
584
440
|
### Outputs
|
|
@@ -589,7 +445,8 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
589
445
|
### Details
|
|
590
446
|
|
|
591
447
|
`msg.payload` is used as the payload of the published message.
|
|
592
|
-
If it contains an Object it will be converted to a JSON string before being sent.
|
|
448
|
+
If it contains an Object it will be converted to a JSON string before being sent.
|
|
449
|
+
It contains the detailed event sent by your Hue devicem so you can use it for whatever you want.
|
|
593
450
|
|
|
594
451
|
[Find it useful?](https://www.paypal.me/techtoday)
|
|
595
452
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
module.exports = function (RED) {
|
|
2
|
+
const dptlib = require('./../KNXEngine/dptlib')
|
|
2
3
|
|
|
3
4
|
function knxUltimateHueButton(config) {
|
|
4
5
|
RED.nodes.createNode(this, config)
|
|
@@ -23,14 +24,8 @@ module.exports = function (RED) {
|
|
|
23
24
|
node.formatmultiplyvalue = 1
|
|
24
25
|
node.formatnegativevalue = 'leave'
|
|
25
26
|
node.formatdecimalsvalue = 2
|
|
26
|
-
node.
|
|
27
|
-
node.
|
|
28
|
-
node.toggle3 = false
|
|
29
|
-
node.toggle4 = false
|
|
30
|
-
node.toggle4 = false
|
|
31
|
-
node.toggle5 = false
|
|
32
|
-
node.toggle5 = false
|
|
33
|
-
node.toggle6 = false
|
|
27
|
+
node.toggleGArepeat = false // up or down if repeat field is set to DIM
|
|
28
|
+
node.toggleGAshort_release = false
|
|
34
29
|
|
|
35
30
|
// Used to call the status update from the config node.
|
|
36
31
|
node.setNodeStatus = ({ fill, shape, text, payload }) => {
|
|
@@ -39,66 +34,59 @@ module.exports = function (RED) {
|
|
|
39
34
|
|
|
40
35
|
// This function is called by the knx-ultimate config node, to output a msg.payload.
|
|
41
36
|
node.handleSend = msg => {
|
|
37
|
+
const state = {}
|
|
38
|
+
try {
|
|
39
|
+
switch (msg.knx.destination) {
|
|
40
|
+
case config.GAshort_releaseStatus:
|
|
41
|
+
msg.payload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptshort_release))
|
|
42
|
+
node.toggleGAshort_release = msg.payload
|
|
43
|
+
setTimeout(() => {
|
|
44
|
+
node.status({ fill: 'blue', shape: 'dot', text: 'Updated Switch ' + msg.knx.destination + ' ' + JSON.stringify(msg.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
45
|
+
}, 500)
|
|
46
|
+
break
|
|
47
|
+
case config.GArepeatStatus:
|
|
48
|
+
msg.payload = dptlib.fromBuffer(msg.knx.rawValue, dptlib.resolve(config.dptrepeat))
|
|
49
|
+
node.toggleGArepeat = msg.payload.decr_incr === 1
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
node.status({ fill: 'blue', shape: 'dot', text: 'Updated Dim ' + msg.knx.destination + ' ' + JSON.stringify(msg.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
52
|
+
}, 500)
|
|
53
|
+
break
|
|
54
|
+
default:
|
|
55
|
+
break
|
|
56
|
+
}
|
|
57
|
+
} catch (error) {
|
|
58
|
+
node.status({ fill: 'red', shape: 'dot', text: 'KNX->HUE error ' + error.message + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
59
|
+
}
|
|
42
60
|
}
|
|
43
61
|
|
|
44
62
|
node.handleSendHUE = _event => {
|
|
45
63
|
try {
|
|
46
64
|
if (_event.id === config.hueDevice) {
|
|
47
65
|
const knxMsgPayload = {}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
knxMsgPayload.dpt = config.dptinitial_press
|
|
51
|
-
config.toggleValues ? node.toggle1 = !node.toggle1 : node.toggle1 = true
|
|
52
|
-
knxMsgPayload.payload = node.toggle1
|
|
53
|
-
// Toggle the DIM direction
|
|
54
|
-
config.toggleValues ? node.toggle2 = !node.toggle2 : node.toggle2 = true
|
|
55
|
-
}
|
|
56
|
-
if (_event.button.last_event === 'repeat') {
|
|
57
|
-
knxMsgPayload.ga = config.GArepeat
|
|
58
|
-
knxMsgPayload.dpt = config.dptrepeat
|
|
59
|
-
// True/False or DIM
|
|
60
|
-
if (knxMsgPayload.dpt.startsWith('1.')) {
|
|
61
|
-
config.toggleValues ? node.toggle2 = !node.toggle2 : node.toggle2 = true
|
|
62
|
-
knxMsgPayload.payload = node.toggle2
|
|
63
|
-
}
|
|
64
|
-
if (knxMsgPayload.dpt.startsWith('3.007')) {
|
|
65
|
-
if (!config.toggleValues) node.toggle2 = true
|
|
66
|
-
knxMsgPayload.payload = node.toggle2 ? { decr_incr: 1, data: 5 } : { decr_incr: 0, data: 5 }
|
|
67
|
-
}
|
|
68
|
-
}
|
|
66
|
+
|
|
67
|
+
// Switch
|
|
69
68
|
if (_event.button.last_event === 'short_release') {
|
|
70
|
-
knxMsgPayload.
|
|
69
|
+
knxMsgPayload.topic = config.GAshort_release
|
|
71
70
|
knxMsgPayload.dpt = config.dptshort_release
|
|
72
|
-
config.toggleValues ? node.
|
|
73
|
-
knxMsgPayload.payload = node.
|
|
74
|
-
|
|
75
|
-
if (_event.button.last_event === 'long_release') {
|
|
76
|
-
knxMsgPayload.ga = config.GAlong_release
|
|
77
|
-
knxMsgPayload.dpt = config.dptlong_release
|
|
78
|
-
config.toggleValues ? node.toggle4 = !node.toggle4 : node.toggle4 = true
|
|
79
|
-
knxMsgPayload.payload = node.toggle4
|
|
80
|
-
}
|
|
81
|
-
if (_event.button.last_event === 'double_short_release') {
|
|
82
|
-
knxMsgPayload.ga = config.GAdouble_short_release
|
|
83
|
-
knxMsgPayload.dpt = config.dptdouble_short_release
|
|
84
|
-
config.toggleValues ? node.toggle5 = !node.toggle5 : node.toggle5 = true
|
|
85
|
-
knxMsgPayload.payload = node.toggle5
|
|
71
|
+
config.toggleValues ? (node.toggleGAshort_release = !node.toggleGAshort_release) : node.toggleGAshort_release = true
|
|
72
|
+
knxMsgPayload.payload = node.toggleGAshort_release
|
|
73
|
+
node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX ' + _event.button.last_event + ' ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
86
74
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
knxMsgPayload.
|
|
90
|
-
|
|
91
|
-
|
|
75
|
+
// Dim
|
|
76
|
+
if (_event.button.last_event === 'repeat') {
|
|
77
|
+
knxMsgPayload.topic = config.GArepeat
|
|
78
|
+
knxMsgPayload.dpt = config.dptrepeat
|
|
79
|
+
if (!config.toggleValues) node.toggleGArepeat = true
|
|
80
|
+
knxMsgPayload.payload = node.toggleGArepeat ? { decr_incr: 1, data: 5 } : { decr_incr: 0, data: 5 }
|
|
81
|
+
node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX ' + _event.button.last_event + ' ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
92
82
|
}
|
|
83
|
+
|
|
93
84
|
// Send to KNX bus
|
|
94
|
-
if (knxMsgPayload.
|
|
95
|
-
node.server.writeQueueAdd({ grpaddr: knxMsgPayload.
|
|
85
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) {
|
|
86
|
+
node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
|
|
96
87
|
}
|
|
97
|
-
node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX ' + _event.button.last_event + ' ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
98
88
|
|
|
99
89
|
// Setup the output msg
|
|
100
|
-
knxMsgPayload.topic = knxMsgPayload.ga
|
|
101
|
-
delete knxMsgPayload.ga
|
|
102
90
|
knxMsgPayload.name = node.name
|
|
103
91
|
knxMsgPayload.event = _event.button.last_event
|
|
104
92
|
knxMsgPayload.rawEvent = _event
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
|
|
442
442
|
|
|
443
443
|
<div class="form-row">
|
|
444
|
-
<b>HUE Light</b>  <span style="color:red"
|
|
444
|
+
<b>HUE Light node</b>  <span style="color:red"
|
|
445
445
|
 
|
|
446
446
|
 <i class="fa fa-youtube"></i></span> <a target="_blank" href="https://youtu.be/3M02Du2gero"><u>Youtube sample</u></a>
|
|
447
447
|
<br />
|
|
@@ -488,8 +488,7 @@
|
|
|
488
488
|
<label for="node-input-GALightSwitch" style="width:20px;"><span data-i18n="knxUltimateHueLight.node-input-GALightSwitch"></span></label>
|
|
489
489
|
<input type="text" id="node-input-GALightSwitch" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
490
490
|
|
|
491
|
-
<label for="node-input-dptLightSwitch" style="width:40px; margin-left: 0px; text-align: right;">
|
|
492
|
-
<span data-i18n="knxUltimateHueLight.node-input-dptLightSwitch"></span> </label>
|
|
491
|
+
<label for="node-input-dptLightSwitch" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
493
492
|
<select id="node-input-dptLightSwitch" style="width:140px;"></select>
|
|
494
493
|
|
|
495
494
|
<label for="node-input-nameLightSwitch" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
@@ -502,8 +501,7 @@
|
|
|
502
501
|
<label for="node-input-GALightDIM" style="width:20px;"><span data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
503
502
|
<input type="text" id="node-input-GALightDIM" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
504
503
|
|
|
505
|
-
<label for="node-input-dptLightDIM" style="width:40px; margin-left: 0px; text-align: right;">
|
|
506
|
-
<span data-i18n="knxUltimateHueLight.node-input-dptLightState"></span> </label>
|
|
504
|
+
<label for="node-input-dptLightDIM" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
507
505
|
<select id="node-input-dptLightDIM" style="width:140px;"></select>
|
|
508
506
|
|
|
509
507
|
<label for="node-input-nameLightDIM" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
@@ -516,8 +514,7 @@
|
|
|
516
514
|
<label for="node-input-GALightColor" style="width:20px;"><span data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
517
515
|
<input type="text" id="node-input-GALightColor" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
518
516
|
|
|
519
|
-
<label for="node-input-dptLightColor" style="width:40px; margin-left: 0px; text-align: right;">
|
|
520
|
-
<span data-i18n="knxUltimateHueLight.node-input-dptLightState"></span> </label>
|
|
517
|
+
<label for="node-input-dptLightColor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
521
518
|
<select id="node-input-dptLightColor" style="width:140px;"></select>
|
|
522
519
|
|
|
523
520
|
<label for="node-input-nameLightColor" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
@@ -531,8 +528,7 @@
|
|
|
531
528
|
<label for="node-input-GALightBrightness" style="width:20px;"><span data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
532
529
|
<input type="text" id="node-input-GALightBrightness" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
533
530
|
|
|
534
|
-
<label for="node-input-dptLightBrightness" style="width:40px; margin-left: 0px; text-align: right;">
|
|
535
|
-
<span data-i18n="knxUltimateHueLight.node-input-dptLightState"></span> </label>
|
|
531
|
+
<label for="node-input-dptLightBrightness" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
536
532
|
<select id="node-input-dptLightBrightness" style="width:140px;"></select>
|
|
537
533
|
|
|
538
534
|
<label for="node-input-nameLightBrightness" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
@@ -545,26 +541,24 @@
|
|
|
545
541
|
</p>
|
|
546
542
|
|
|
547
543
|
<div class="form-row">
|
|
548
|
-
<label for="node-input-nameLightState" style="width:100px;"><i class="fa fa-play-circle-o"></i> Switch</label>
|
|
544
|
+
<label for="node-input-nameLightState" style="width:100px;"><i class="fa fa-play-circle-o"></i> Switch Status</label>
|
|
549
545
|
|
|
550
546
|
<label for="node-input-GALightState" style="width:20px;">GA</label>
|
|
551
547
|
<input type="text" id="node-input-GALightState" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
552
548
|
|
|
553
|
-
<label for="node-input-dptLightState" style="width:40px; margin-left: 0px; text-align: right;">
|
|
554
|
-
<span data-i18n="knxUltimateHueLight.node-input-dptLightState"></span> </label>
|
|
549
|
+
<label for="node-input-dptLightState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
555
550
|
<select id="node-input-dptLightState" style="width:140px;"></select>
|
|
556
551
|
|
|
557
552
|
<label for="node-input-nameLightState" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
558
553
|
<input type="text" id="node-input-nameLightState" style="width:200px;margin-left: 5px; text-align: left;">
|
|
559
554
|
</div>
|
|
560
555
|
<div class="form-row">
|
|
561
|
-
<label for="node-input-nameLightColorState" style="width:100px;"><i class="fa fa-play-circle-o"></i
|
|
556
|
+
<label for="node-input-nameLightColorState" style="width:100px;"><i class="fa fa-play-circle-o"></i> Color Status</label>
|
|
562
557
|
|
|
563
558
|
<label for="node-input-GALightColorState" style="width:20px;"><span data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
564
559
|
<input type="text" id="node-input-GALightColorState" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
565
560
|
|
|
566
|
-
<label for="node-input-dptLightColorState" style="width:40px; margin-left: 0px; text-align: right;">
|
|
567
|
-
<span data-i18n="knxUltimateHueLight.node-input-dptLightState"></span> </label>
|
|
561
|
+
<label for="node-input-dptLightColorState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
568
562
|
<select id="node-input-dptLightColorState" style="width:140px;"></select>
|
|
569
563
|
|
|
570
564
|
<label for="node-input-nameLightColorState" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
@@ -572,13 +566,12 @@
|
|
|
572
566
|
</div>
|
|
573
567
|
</div>
|
|
574
568
|
<div class="form-row">
|
|
575
|
-
<label for="node-input-nameLightBrightnessState" style="width:100px;"><i class="fa fa-play-circle-o"></i
|
|
569
|
+
<label for="node-input-nameLightBrightnessState" style="width:100px;"><i class="fa fa-play-circle-o"></i>Brightness Status</label>
|
|
576
570
|
|
|
577
571
|
<label for="node-input-GALightBrightnessState" style="width:20px;"><span data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
578
572
|
<input type="text" id="node-input-GALightBrightnessState" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
579
573
|
|
|
580
|
-
<label for="node-input-dptLightBrightnessState" style="width:40px; margin-left: 0px; text-align: right;">
|
|
581
|
-
<span data-i18n="knxUltimateHueLight.node-input-dptLightState"></span> </label>
|
|
574
|
+
<label for="node-input-dptLightBrightnessState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
582
575
|
<select id="node-input-dptLightBrightnessState" style="width:140px;"></select>
|
|
583
576
|
|
|
584
577
|
<label for="node-input-nameLightBrightnessState" style="width:50px; margin-left: 0px; text-align: right;"><span data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
@@ -588,13 +581,6 @@
|
|
|
588
581
|
<br/>
|
|
589
582
|
<br/>
|
|
590
583
|
<br/>
|
|
591
|
-
<br/>
|
|
592
|
-
<br/>
|
|
593
|
-
<br/>
|
|
594
|
-
<br/>
|
|
595
|
-
<br/>
|
|
596
|
-
|
|
597
|
-
|
|
598
584
|
</script>
|
|
599
585
|
|
|
600
586
|
|
|
@@ -629,9 +615,9 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
629
615
|
|
|
630
616
|
|Property|Description|
|
|
631
617
|
|--|--|
|
|
632
|
-
| Switch | This state is used to send on/off value to the selected KNX group address |
|
|
633
|
-
| Color | This state is used to send changes of the HUE light's color. Accepted datapoint is RGB triplet (r,g,b)|
|
|
634
|
-
| Brightness | This state is used to send changes of your absolute HUE light's brightness, to a KNX group address |
|
|
618
|
+
| Switch Status| This state is used to send on/off value to the selected KNX group address |
|
|
619
|
+
| Color Status | This state is used to send changes of the HUE light's color. Accepted datapoint is RGB triplet (r,g,b)|
|
|
620
|
+
| Brightness Status| This state is used to send changes of your absolute HUE light's brightness, to a KNX group address |
|
|
635
621
|
|
|
636
622
|
[Find it useful?](https://www.paypal.me/techtoday)
|
|
637
623
|
|
|
@@ -93,7 +93,6 @@ module.exports = function (RED) {
|
|
|
93
93
|
} catch (error) {
|
|
94
94
|
node.status({ fill: 'red', shape: 'dot', text: 'KNX->HUE error ' + error.message + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
95
95
|
}
|
|
96
|
-
// node.exposedGAs.push({ address: msg.knx.destination, addressRAW: sAddressRAW, dpt: msg.knx.dpt, payload: msg.payload, devicename: sDeviceName, lastupdate: new Date(), rawPayload: 'HEX Raw: ' + msg.knx.rawValue.toString('hex') || '?', payloadmeasureunit: (msg.payloadmeasureunit !== 'unknown' ? ' ' + msg.payloadmeasureunit : '') })
|
|
97
96
|
}
|
|
98
97
|
|
|
99
98
|
node.handleSendHUE = _event => {
|
|
@@ -101,22 +100,22 @@ module.exports = function (RED) {
|
|
|
101
100
|
if (_event.id === config.hueDevice) {
|
|
102
101
|
let knxMsgPayload = {}
|
|
103
102
|
if (_event.hasOwnProperty('on')) {
|
|
104
|
-
knxMsgPayload.
|
|
103
|
+
knxMsgPayload.topic = config.GALightState
|
|
105
104
|
knxMsgPayload.dpt = config.dptLightState
|
|
106
105
|
knxMsgPayload.payload = _event.on.on
|
|
107
106
|
}
|
|
108
107
|
if (_event.hasOwnProperty('color')) {
|
|
109
|
-
knxMsgPayload.
|
|
108
|
+
knxMsgPayload.topic = config.GALightColorState
|
|
110
109
|
knxMsgPayload.dpt = config.dptLightColorState
|
|
111
110
|
knxMsgPayload.payload = hueColorConverter.ColorConverter.xyBriToRgb(_event.color.xy.x, _event.color.xy.y, node.currentHUEDevice.dimming.brightness)
|
|
112
111
|
}
|
|
113
112
|
if (_event.hasOwnProperty('dimming')) {
|
|
114
|
-
knxMsgPayload.
|
|
113
|
+
knxMsgPayload.topic = config.GALightBrightnessState
|
|
115
114
|
knxMsgPayload.dpt = config.dptLightBrightnessState
|
|
116
115
|
knxMsgPayload.payload = _event.dimming.brightness
|
|
117
116
|
}
|
|
118
117
|
// Send to KNX bus
|
|
119
|
-
if (knxMsgPayload.
|
|
118
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
|
|
120
119
|
node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX State ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
121
120
|
|
|
122
121
|
}
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
|
|
158
158
|
|
|
159
159
|
<div class="form-row">
|
|
160
|
-
<b>HUE
|
|
160
|
+
<b>HUE Motion node</b>  <span style="color:red"
|
|
161
161
|
 <i class="fa fa-question-circle"></i></span>
|
|
162
162
|
 <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/en-hue-configuration"><u>Configuration</u></a>
|
|
163
163
|
<br />
|
|
@@ -202,7 +202,7 @@
|
|
|
202
202
|
<label for="node-input-GAmotion" style="width:20px;">GA</label>
|
|
203
203
|
<input type="text" id="node-input-GAmotion" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
204
204
|
|
|
205
|
-
<label for="node-input-dptmotion" style="width:40px; margin-left: 0px; text-align: right;">
|
|
205
|
+
<label for="node-input-dptmotion" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
206
206
|
<select id="node-input-dptmotion" style="width:140px;"></select>
|
|
207
207
|
|
|
208
208
|
<label for="node-input-namemotion" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
@@ -212,11 +212,6 @@
|
|
|
212
212
|
</div>
|
|
213
213
|
|
|
214
214
|
|
|
215
|
-
<br/>
|
|
216
|
-
<br/>
|
|
217
|
-
<br/>
|
|
218
|
-
<br/>
|
|
219
|
-
<br/>
|
|
220
215
|
<br/>
|
|
221
216
|
<br/>
|
|
222
217
|
<br/>
|
|
@@ -242,7 +237,8 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
242
237
|
|
|
243
238
|
### Details
|
|
244
239
|
|
|
245
|
-
`msg.payload` is used as the payload of the published message.
|
|
240
|
+
`msg.payload` is used as the payload of the published message.
|
|
241
|
+
It contains the detailed event sent by your Hue devicem so you can use it for whatever you want.
|
|
246
242
|
|
|
247
243
|
[Find it useful?](https://www.paypal.me/techtoday)
|
|
248
244
|
|
|
@@ -40,18 +40,16 @@ module.exports = function (RED) {
|
|
|
40
40
|
try {
|
|
41
41
|
if (_event.id === config.hueDevice) {
|
|
42
42
|
const knxMsgPayload = {}
|
|
43
|
-
knxMsgPayload.
|
|
43
|
+
knxMsgPayload.topic = config.GAmotion
|
|
44
44
|
knxMsgPayload.dpt = config.dptmotion
|
|
45
45
|
knxMsgPayload.payload = _event.motion.motion
|
|
46
46
|
|
|
47
47
|
if (_event.hasOwnProperty('motion') && _event.motion.hasOwnProperty('motion')) {
|
|
48
48
|
// Send to KNX bus
|
|
49
|
-
if (knxMsgPayload.
|
|
49
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
|
|
50
50
|
node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
51
51
|
|
|
52
52
|
// Setup the output msg
|
|
53
|
-
knxMsgPayload.topic = knxMsgPayload.ga
|
|
54
|
-
delete knxMsgPayload.ga
|
|
55
53
|
knxMsgPayload.name = node.name
|
|
56
54
|
knxMsgPayload.event = 'motion'
|
|
57
55
|
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
|
|
160
160
|
|
|
161
161
|
<div class="form-row">
|
|
162
|
-
<b>HUE
|
|
162
|
+
<b>HUE Tap Dial node (rotary)</b>  <span style="color:red"
|
|
163
163
|
 <i class="fa fa-question-circle"></i></span>
|
|
164
164
|
 <a target="_blank" href="https://github.com/Supergiovane/node-red-contrib-knx-ultimate/wiki/en-hue-configuration"><u>Configuration</u></a>
|
|
165
165
|
<br />
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
<label for="node-input-GArepeat" style="width:20px;">GA</label>
|
|
205
205
|
<input type="text" id="node-input-GArepeat" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
206
206
|
|
|
207
|
-
<label for="node-input-dptrepeat" style="width:40px; margin-left: 0px; text-align: right;">
|
|
207
|
+
<label for="node-input-dptrepeat" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
208
208
|
<select id="node-input-dptrepeat" style="width:140px;"></select>
|
|
209
209
|
|
|
210
210
|
<label for="node-input-namerepeat" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
@@ -215,11 +215,6 @@
|
|
|
215
215
|
</div>
|
|
216
216
|
|
|
217
217
|
|
|
218
|
-
<br/>
|
|
219
|
-
<br/>
|
|
220
|
-
<br/>
|
|
221
|
-
<br/>
|
|
222
|
-
<br/>
|
|
223
218
|
<br/>
|
|
224
219
|
<br/>
|
|
225
220
|
<br/>
|
|
@@ -228,11 +223,11 @@
|
|
|
228
223
|
</script>
|
|
229
224
|
|
|
230
225
|
<script type="text/markdown" data-help-name="knxUltimateHueTapDial">
|
|
231
|
-
<p> This node lets you get the events from your HUE rotary, for example Tap Dial.<br/>
|
|
226
|
+
<p> This node lets you get the events from your HUE rotary device, for example the Tap Dial.<br/>
|
|
232
227
|
|
|
233
|
-
The Tap Dial
|
|
234
|
-
You can find the 4 buttons in the **Button node**, not here!
|
|
235
|
-
The rotary service of the Tap Dial
|
|
228
|
+
The Tap Dial device has 4 buttons and 1 rotary knob.
|
|
229
|
+
You can find the 4 buttons in the **Hue Button node**, not here!
|
|
230
|
+
The rotary service of the Tap Dial, can send a DIM (Datapoint 3.007) or absolute brightness (Datapoint 5.001) to the KNX bus,
|
|
236
231
|
to the selected group address.
|
|
237
232
|
|
|
238
233
|
**General**
|
|
@@ -260,7 +255,8 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
260
255
|
### Details
|
|
261
256
|
|
|
262
257
|
`msg.payload` is used as the payload of the published message.
|
|
263
|
-
If it contains an Object it will be converted to a JSON string before being sent.
|
|
258
|
+
If it contains an Object it will be converted to a JSON string before being sent.
|
|
259
|
+
It contains the detailed event sent by your Hue devicem so you can use it for whatever you want.
|
|
264
260
|
|
|
265
261
|
[Find it useful?](https://www.paypal.me/techtoday)
|
|
266
262
|
|
|
@@ -61,7 +61,7 @@ module.exports = function (RED) {
|
|
|
61
61
|
try {
|
|
62
62
|
if (_event.id === config.hueDevice) {
|
|
63
63
|
const knxMsgPayload = {}
|
|
64
|
-
knxMsgPayload.
|
|
64
|
+
knxMsgPayload.topic = config.GArepeat
|
|
65
65
|
knxMsgPayload.dpt = config.dptrepeat
|
|
66
66
|
if (_event.relative_rotary.last_event.rotation.direction === 'clock_wise') {
|
|
67
67
|
if (knxMsgPayload.dpt.startsWith('3.007')) {
|
|
@@ -81,12 +81,10 @@ module.exports = function (RED) {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// Send to KNX bus
|
|
84
|
-
if (knxMsgPayload.
|
|
84
|
+
if (knxMsgPayload.topic !== '' && knxMsgPayload.topic !== undefined) node.server.writeQueueAdd({ grpaddr: knxMsgPayload.topic, payload: knxMsgPayload.payload, dpt: knxMsgPayload.dpt, outputtype: 'write', nodecallerid: node.id })
|
|
85
85
|
node.status({ fill: 'green', shape: 'dot', text: 'HUE->KNX ' + JSON.stringify(knxMsgPayload.payload) + ' (' + new Date().getDate() + ', ' + new Date().toLocaleTimeString() + ')' })
|
|
86
86
|
|
|
87
87
|
// Setup the output msg
|
|
88
|
-
knxMsgPayload.topic = knxMsgPayload.ga
|
|
89
|
-
delete knxMsgPayload.ga
|
|
90
88
|
knxMsgPayload.name = node.name
|
|
91
89
|
knxMsgPayload.event = 'rotation ' + _event.relative_rotary.last_event.rotation.direction
|
|
92
90
|
knxMsgPayload.payload = _event
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=14.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.0.
|
|
6
|
+
"version": "2.0.11",
|
|
7
7
|
"description": "Control your KNX intallation via Node-Red! Single Node KNX IN/OUT with optional ETS group address importer. Easy to use and highly configurable. With integrated Philips HUE devices handling.",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"mkdirp": "1.0.4",
|