node-red-contrib-knx-ultimate 2.2.9 → 2.2.10

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.
@@ -1,24 +1,5 @@
1
1
  <script type="text/javascript">
2
- RED.events.on('nodes:add', function (node) {
3
- if (node.type === 'uibuilder') {
4
- // Keep a list of uib nodes in the editor
5
- // may be different to the deployed list
6
- editorInstances[node.id] = node.url
7
- // -- IF uibuilderInstances <> editorInstances THEN there are undeployed instances. --
8
- }
9
- })
10
- RED.events.on('nodes:change', function (node) {
11
- if (node.type === 'uibuilder') {
12
- mylog('nodes:change:', node)
13
- editorInstances[node.id] = node.url
14
- }
15
- })
16
- RED.events.on('nodes:remove', function (node) {
17
- if (node.type === 'uibuilder') {
18
- mylog('>> nodes:remove >>', node)
19
- delete editorInstances[node.id]
20
- }
21
- })
2
+
22
3
  RED.nodes.registerType("knxUltimateHueLight", {
23
4
  category: "KNX Ultimate",
24
5
  color: "#C0C7E9",
@@ -99,6 +80,10 @@
99
80
  minDimLevelLight: { value: 10, required: false },
100
81
  maxDimLevelLight: { value: 100, required: false },
101
82
  readStatusAtStartup: { value: "yes" },
83
+ enableNodePINS: { value: "no" },
84
+
85
+ outputs: { value: 0 },
86
+ inputs: { value: 0 },
102
87
 
103
88
  hueDevice: { value: "" },
104
89
  },
@@ -113,24 +98,43 @@
113
98
  // enabled: function() {
114
99
  // // return whether or not the button is enabled, based on the current
115
100
  // // configuration of the node
116
- // return !this.changed
101
+ // return !node.changed
117
102
  // },
118
103
  // visible: function() {
119
104
  // // return whether or not the button is visible, based on the current
120
105
  // // configuration of the node
121
- // return this.hasButton
106
+ // return node.hasButton
122
107
  // },
123
108
  // //toggle: "buttonState",
124
109
  // onclick: function() {}
125
110
  // },
126
- oneditprepare: function () {
127
- var node = this;
128
- var oNodeServer = RED.nodes.node($("#node-input-server").val()); // Store the config-node
129
- var oNodeServerHue = RED.nodes.node($("#node-input-serverHue").val()); // Store the config-node
111
+ oneditprepare: prepareUI,
112
+ oneditsave: function () {
113
+ RED.sidebar.removeTab("tabNRColor");
114
+ RED.sidebar.show("help");
115
+ if ($("#node-input-enableNodePINS").val() === "yes") {
116
+ this.outputs = 1;
117
+ this.inputs = 1;
118
+ } else {
119
+ this.outputs = 0;
120
+ this.inputs = 0;
121
+ }
122
+ },
123
+ oneditcancel: function () {
124
+ RED.sidebar.removeTab("tabNRColor");
125
+ RED.sidebar.show("help");
126
+ }
127
+ });
130
128
 
131
- // Create the TAB in Node-Red
132
- // ####################################
133
- const content = `<html>
129
+
130
+ function prepareUI() {
131
+ var node = this;
132
+ var oNodeServer = RED.nodes.node($("#node-input-server").val()); // Store the config-node
133
+ var oNodeServerHue = RED.nodes.node($("#node-input-serverHue").val()); // Store the config-node
134
+
135
+ // Create the TAB in Node-Red
136
+ // ####################################
137
+ const content = `<html>
134
138
 
135
139
  <head>
136
140
  <div class="red-ui-sidebar-header">Color Selector</div>
@@ -165,416 +169,407 @@
165
169
  </html>
166
170
  `;
167
171
 
168
- // COLOR BAR HANDLING ###########################
169
- RED.sidebar.addTab({
170
- id: "tabNRColor",
171
- label: "Color Picker",
172
- name: "Color Picker",
173
- iconClass: "fa fa-pencil",
174
- content: content,
175
- enableOnEdit: true,
176
- });
177
-
178
- // Temperature
179
- node.kelvinPicker = new iro.ColorPicker("#kelvinPicker", {
180
- width: 250,
181
- color: "rgb(255, 0, 0)",
182
- borderWidth: 1,
183
- borderColor: "#fff",
184
- layoutDirection: "vertical",
185
- layout: [
186
- {
187
- component: iro.ui.Slider,
188
- options: {
189
- sliderType: "kelvin",
190
- sliderSize: 20,
191
- },
172
+ // COLOR BAR HANDLING ###########################
173
+ RED.sidebar.addTab({
174
+ id: "tabNRColor",
175
+ label: "Color Picker",
176
+ name: "Color Picker",
177
+ iconClass: "fa fa-pencil",
178
+ content: content,
179
+ enableOnEdit: true,
180
+ });
181
+
182
+ // Temperature
183
+ this.kelvinPicker = new iro.ColorPicker("#kelvinPicker", {
184
+ width: 250,
185
+ color: "rgb(255, 0, 0)",
186
+ borderWidth: 1,
187
+ borderColor: "#fff",
188
+ layoutDirection: "vertical",
189
+ layout: [
190
+ {
191
+ component: iro.ui.Slider,
192
+ options: {
193
+ sliderType: "kelvin",
194
+ sliderSize: 20,
192
195
  },
193
- ],
194
- });
195
- // color:change callbacks receive the current color
196
- node.kelvinPicker.on("color:change", function (color) {
197
- const resultRGBForNode = '{"red": ' + color.rgb.r + ', "green": ' + color.rgb.g + ', "blue": ' + color.rgb.b + "}";
198
- $("#resultRGB").val(resultRGBForNode);
199
- $("#resultKelvin").val(Math.round(color.kelvin, 0));
200
- });
201
-
202
- $("#resultKelvin").on("keyup", function () {
203
- setIroColorKelvin();
204
- });
205
- function setIroColorKelvin() {
206
- try {
207
- const color = JSON.parse($("#resultKelvin").val());
208
- node.kelvinPicker.color.setChannel("kelvin", color);
209
- } catch (error) { }
210
- }
196
+ },
197
+ ],
198
+ });
199
+ // color:change callbacks receive the current color
200
+ this.kelvinPicker.on("color:change", function (color) {
201
+ const resultRGBForNode = '{"red": ' + color.rgb.r + ', "green": ' + color.rgb.g + ', "blue": ' + color.rgb.b + "}";
202
+ $("#resultRGB").val(resultRGBForNode);
203
+ $("#resultKelvin").val(Math.round(color.kelvin, 0));
204
+ });
205
+
206
+ $("#resultKelvin").on("keyup", function () {
207
+ setIroColorKelvin();
208
+ });
209
+ function setIroColorKelvin() {
210
+ try {
211
+ const color = JSON.parse($("#resultKelvin").val());
212
+ this.kelvinPicker.color.setChannel("kelvin", color);
213
+ } catch (error) { }
214
+ }
211
215
 
212
- // Color
213
- node.colorPicker = new iro.ColorPicker("#colorPicker", {
214
- width: 250,
215
- color: "rgb(255, 0, 0)",
216
- borderWidth: 1,
217
- borderColor: "#fff",
218
- layout: [
219
- {
220
- component: iro.ui.Box,
221
- },
222
- {
223
- component: iro.ui.Slider,
224
- options: {
225
- id: "hue-slider",
226
- sliderType: "hue",
227
- },
216
+ // Color
217
+ this.colorPicker = new iro.ColorPicker("#colorPicker", {
218
+ width: 250,
219
+ color: "rgb(255, 0, 0)",
220
+ borderWidth: 1,
221
+ borderColor: "#fff",
222
+ layout: [
223
+ {
224
+ component: iro.ui.Box,
225
+ },
226
+ {
227
+ component: iro.ui.Slider,
228
+ options: {
229
+ id: "hue-slider",
230
+ sliderType: "hue",
228
231
  },
229
- ],
230
- });
231
- // color:change callbacks receive the current color
232
- node.colorPicker.on("color:change", function (color) {
233
- // Transform to compatible value for the node { "red": 255, "green": 255, "blue": 255 }
234
- const resultRGBForNode = '{"red": ' + color.rgb.r + ', "green": ' + color.rgb.g + ', "blue": ' + color.rgb.b + "}";
235
- $("#resultRGB").val(resultRGBForNode);
236
- });
237
-
238
- $("#resultRGB").on("keyup", function () {
239
- setIroColor();
240
- });
241
- function setIroColor() {
242
- try {
243
- const color = JSON.parse($("#resultRGB").val());
244
- node.colorPicker.color.setChannel("rgb", "r", color.red);
245
- node.colorPicker.color.setChannel("rgb", "g", color.green);
246
- node.colorPicker.color.setChannel("rgb", "b", color.blue);
247
- } catch (error) { }
232
+ },
233
+ ],
234
+ });
235
+ // color:change callbacks receive the current color
236
+ this.colorPicker.on("color:change", function (color) {
237
+ // Transform to compatible value for the node { "red": 255, "green": 255, "blue": 255 }
238
+ const resultRGBForNode = '{"red": ' + color.rgb.r + ', "green": ' + color.rgb.g + ', "blue": ' + color.rgb.b + "}";
239
+ $("#resultRGB").val(resultRGBForNode);
240
+ });
241
+
242
+ $("#resultRGB").on("keyup", function () {
243
+ setIroColor();
244
+ });
245
+ function setIroColor() {
246
+ try {
247
+ const color = JSON.parse($("#resultRGB").val());
248
+ this.colorPicker.color.setChannel("rgb", "r", color.red);
249
+ this.colorPicker.color.setChannel("rgb", "g", color.green);
250
+ this.colorPicker.color.setChannel("rgb", "b", color.blue);
251
+ } catch (error) { }
252
+ }
253
+ // Copy to clipboard button
254
+ $("#tabNRColor_colorSelectorTABApplyTextButton").on("click", function () {
255
+ // const aa = $("#resultRGB").val()
256
+ // navigator.clipboard.writeText(aa)
257
+ const destTextBox = "#" + $("#tabNRColor_destinationTextbox").val();
258
+ const resultRGB = $("#resultRGB").val();
259
+ const resultKelvin = node.kelvinPicker.colors[0].kelvin;
260
+ if (destTextBox === "#node-input-colorAtSwitchOnNightTime" || destTextBox === "#node-input-colorAtSwitchOnDayTime") {
261
+ $(destTextBox).val(resultRGB);
262
+ } else {
263
+ $(destTextBox).val(resultKelvin);
248
264
  }
249
- // Copy to clipboard button
250
- $("#tabNRColor_colorSelectorTABApplyTextButton").on("click", function () {
251
- // const aa = $("#resultRGB").val()
252
- // navigator.clipboard.writeText(aa)
253
- const destTextBox = "#" + $("#tabNRColor_destinationTextbox").val();
254
- const resultRGB = $("#resultRGB").val();
255
- const resultKelvin = node.kelvinPicker.colors[0].kelvin;
256
- if (destTextBox === "#node-input-colorAtSwitchOnNightTime" || destTextBox === "#node-input-colorAtSwitchOnDayTime") {
257
- $(destTextBox).val(resultRGB);
258
- } else {
259
- $(destTextBox).val(resultKelvin);
260
- }
261
- // Flash the destination control
262
- $(destTextBox).css("background-color", "lightgreen");
263
- $("#tabNRColor_divApplyCancel").hide();
264
- RED.sidebar.show("help");
265
- setTimeout(() => {
266
- $(destTextBox).css("background-color", "");
267
- }, 500);
268
- });
269
- $("#tabNRColor_colorSelectorTABCancelTextButton").on("click", function () {
270
- $("#tabNRColor_destinationTextbox").val("");
271
- RED.sidebar.show("help");
272
- $("#tabNRColor_divApplyCancel").hide();
273
- });
274
- $("#node-input-colorAtSwitchOnDayTime").on("focus", function () {
275
- RED.sidebar.show("tabNRColor"); // Node-Red custom color TAB
276
- $("#tabNRColor_destinationTextbox").val("node-input-colorAtSwitchOnDayTime");
277
- $("#tabNRColor_divApplyCancel").show();
278
- const color = $("#node-input-colorAtSwitchOnDayTime").val();
279
- $("#resultRGB").val(color);
280
- setIroColor();
281
- });
282
- // $("#node-input-colorAtSwitchOnDayTime").on("blur", function () {
283
- // RED.sidebar.show("help");
284
- // });
285
- $("#node-input-colorAtSwitchOnNightTime").on("focus", function () {
286
- RED.sidebar.show("tabNRColor"); // Node-Red custom color TAB
287
- $("#tabNRColor_destinationTextbox").val("node-input-colorAtSwitchOnNightTime");
288
- $("#tabNRColor_divApplyCancel").show();
289
- const color = $("#node-input-colorAtSwitchOnNightTime").val();
290
- $("#resultRGB").val(color);
291
- setIroColor();
292
- });
293
- // ####################################
294
-
295
- $("#tabs").tabs(); // Tabs gestione KNX
265
+ // Flash the destination control
266
+ $(destTextBox).css("background-color", "lightgreen");
267
+ $("#tabNRColor_divApplyCancel").hide();
268
+ RED.sidebar.show("help");
269
+ setTimeout(() => {
270
+ $(destTextBox).css("background-color", "");
271
+ }, 500);
272
+ });
273
+ $("#tabNRColor_colorSelectorTABCancelTextButton").on("click", function () {
274
+ $("#tabNRColor_destinationTextbox").val("");
275
+ RED.sidebar.show("help");
276
+ $("#tabNRColor_divApplyCancel").hide();
277
+ });
278
+ $("#node-input-colorAtSwitchOnDayTime").on("focus", function () {
279
+ RED.sidebar.show("tabNRColor"); // Node-Red custom color TAB
280
+ $("#tabNRColor_destinationTextbox").val("node-input-colorAtSwitchOnDayTime");
281
+ $("#tabNRColor_divApplyCancel").show();
282
+ const color = $("#node-input-colorAtSwitchOnDayTime").val();
283
+ $("#resultRGB").val(color);
284
+ setIroColor();
285
+ });
286
+ // $("#node-input-colorAtSwitchOnDayTime").on("blur", function () {
287
+ // RED.sidebar.show("help");
288
+ // });
289
+ $("#node-input-colorAtSwitchOnNightTime").on("focus", function () {
290
+ RED.sidebar.show("tabNRColor"); // Node-Red custom color TAB
291
+ $("#tabNRColor_destinationTextbox").val("node-input-colorAtSwitchOnNightTime");
292
+ $("#tabNRColor_divApplyCancel").show();
293
+ const color = $("#node-input-colorAtSwitchOnNightTime").val();
294
+ $("#resultRGB").val(color);
295
+ setIroColor();
296
+ });
297
+ // ####################################
298
+
299
+ $("#tabs").tabs(); // Tabs gestione KNX
300
+
301
+ // 19/02/2020 Used to get the server sooner als deploy.
302
+ $("#node-input-server").change(function () {
303
+ try {
304
+ oNodeServer = RED.nodes.node($(this).val());
305
+ } catch (error) { }
306
+ });
307
+ // 19/02/2020 Used to get the server sooner als deploy.
308
+ $("#node-input-serverHue").change(function () {
309
+ try {
310
+ oNodeServerHue = RED.nodes.node($(this).val());
311
+ } catch (error) { }
312
+ });
313
+
314
+ // 31/03/2020 Search Helper
315
+ function fullSearch(sourceText, searchString) {
316
+ // This searches for all words in a string
317
+ var aSearchWords = searchString.toLowerCase().split(" ");
318
+ var i = 0;
319
+ for (let index = 0; index < aSearchWords.length; index++) {
320
+ if (sourceText.toLowerCase().indexOf(aSearchWords[index]) > -1) i += 1;
321
+ }
322
+ return i == aSearchWords.length;
323
+ }
296
324
 
297
- // 19/02/2020 Used to get the server sooner als deploy.
298
- $("#node-input-server").change(function () {
299
- try {
300
- oNodeServer = RED.nodes.node($(this).val());
301
- } catch (error) { }
302
- });
303
- // 19/02/2020 Used to get the server sooner als deploy.
304
- $("#node-input-serverHue").change(function () {
305
- try {
306
- oNodeServerHue = RED.nodes.node($(this).val());
307
- } catch (error) { }
325
+ function getDPT(_dpt, _destinationWidget) {
326
+ // DPT Switch command
327
+ // ########################
328
+ $.getJSON("knxUltimateDpts", (data) => {
329
+ data.forEach((dpt) => {
330
+ if (dpt.value.startsWith(_dpt)) {
331
+ $(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text));
332
+ }
333
+ });
334
+ // Eval
335
+ const format = "this." + _destinationWidget.replace("#node-input-", "");
336
+ $(_destinationWidget).val(eval(format).toString());
308
337
  });
338
+ }
309
339
 
310
- // 31/03/2020 Search Helper
311
- function fullSearch(sourceText, searchString) {
312
- // This searches for all words in a string
313
- var aSearchWords = searchString.toLowerCase().split(" ");
314
- var i = 0;
315
- for (let index = 0; index < aSearchWords.length; index++) {
316
- if (sourceText.toLowerCase().indexOf(aSearchWords[index]) > -1) i += 1;
317
- }
318
- return i == aSearchWords.length;
319
- }
320
-
321
- function getDPT(_dpt, _destinationWidget) {
322
- // DPT Switch command
323
- // ########################
324
- $.getJSON("knxUltimateDpts", (data) => {
325
- data.forEach((dpt) => {
326
- if (dpt.value.startsWith(_dpt)) {
327
- $(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text));
328
- }
340
+ function getGroupAddress(_sourceWidgetAutocomplete, _destinationWidgetName, _destinationWidgetDPT, _additionalSearchTerm) {
341
+ $(_sourceWidgetAutocomplete).autocomplete({
342
+ minLength: 1,
343
+ source: function (request, response) {
344
+ //$.getJSON("csv", request, function( data, status, xhr ) {
345
+ $.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
346
+ response(
347
+ $.map(data, function (value, key) {
348
+ var sSearch = value.ga + " (" + value.devicename + ") DPT" + value.dpt;
349
+ if (fullSearch(sSearch, request.term + _additionalSearchTerm)) {
350
+ return {
351
+ label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
352
+ value: value.ga, // Value
353
+ };
354
+ } else {
355
+ return null;
356
+ }
357
+ })
358
+ );
329
359
  });
330
- // Eval
331
- const format = "node." + _destinationWidget.replace("#node-input-", "");
332
- $(_destinationWidget).val(eval(format).toString());
333
- });
334
- }
360
+ },
361
+ select: function (event, ui) {
362
+ // Sets Datapoint and device name automatically
363
+ var sDevName = ui.item.label.split("#")[1].trim();
364
+ try {
365
+ sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
366
+ } catch (error) { }
367
+ $(_destinationWidgetName).val(sDevName);
368
+ var optVal = $(_destinationWidgetDPT + " option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr("value");
369
+ // Select the option value
370
+ $(_destinationWidgetDPT).val(optVal);
371
+ },
372
+ });
373
+ }
335
374
 
336
- function getGroupAddress(_sourceWidgetAutocomplete, _destinationWidgetName, _destinationWidgetDPT, _additionalSearchTerm) {
337
- $(_sourceWidgetAutocomplete).autocomplete({
338
- minLength: 1,
339
- source: function (request, response) {
340
- //$.getJSON("csv", request, function( data, status, xhr ) {
341
- $.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
342
- response(
343
- $.map(data, function (value, key) {
344
- var sSearch = value.ga + " (" + value.devicename + ") DPT" + value.dpt;
345
- if (fullSearch(sSearch, request.term + _additionalSearchTerm)) {
346
- return {
347
- label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
348
- value: value.ga, // Value
349
- };
350
- } else {
351
- return null;
352
- }
353
- })
354
- );
355
- });
356
- },
357
- select: function (event, ui) {
358
- // Sets Datapoint and device name automatically
359
- var sDevName = ui.item.label.split("#")[1].trim();
360
- try {
361
- sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
362
- } catch (error) { }
363
- $(_destinationWidgetName).val(sDevName);
364
- var optVal = $(_destinationWidgetDPT + " option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr("value");
365
- // Select the option value
366
- $(_destinationWidgetDPT).val(optVal);
367
- },
368
- });
369
- }
375
+ getDPT("1.", "#node-input-dptLightSwitch");
376
+ getGroupAddress("#node-input-GALightSwitch", "#node-input-nameLightSwitch", "#node-input-dptLightSwitch", " 1.");
370
377
 
371
- getDPT("1.", "#node-input-dptLightSwitch");
372
- getGroupAddress("#node-input-GALightSwitch", "#node-input-nameLightSwitch", "#node-input-dptLightSwitch", " 1.");
378
+ getDPT("1.", "#node-input-dptLightState");
379
+ getGroupAddress("#node-input-GALightState", "#node-input-nameLightState", "#node-input-dptLightState", " 1.");
373
380
 
374
- getDPT("1.", "#node-input-dptLightState");
375
- getGroupAddress("#node-input-GALightState", "#node-input-nameLightState", "#node-input-dptLightState", " 1.");
381
+ getDPT("3.007", "#node-input-dptLightDIM");
382
+ getGroupAddress("#node-input-GALightDIM", "#node-input-nameLightDIM", "#node-input-dptLightDIM", " 3.007");
376
383
 
377
- getDPT("3.007", "#node-input-dptLightDIM");
378
- getGroupAddress("#node-input-GALightDIM", "#node-input-nameLightDIM", "#node-input-dptLightDIM", " 3.007");
384
+ getDPT("5.001", "#node-input-dptLightBrightness");
385
+ getGroupAddress("#node-input-GALightBrightness", "#node-input-nameLightBrightness", "#node-input-dptLightBrightness", " 5.001");
379
386
 
380
- getDPT("5.001", "#node-input-dptLightBrightness");
381
- getGroupAddress("#node-input-GALightBrightness", "#node-input-nameLightBrightness", "#node-input-dptLightBrightness", " 5.001");
387
+ getDPT("5.001", "#node-input-dptLightBrightnessState");
388
+ getGroupAddress("#node-input-GALightBrightnessState", "#node-input-nameLightBrightnessState", "#node-input-dptLightBrightnessState", " 5.001");
382
389
 
383
- getDPT("5.001", "#node-input-dptLightBrightnessState");
384
- getGroupAddress("#node-input-GALightBrightnessState", "#node-input-nameLightBrightnessState", "#node-input-dptLightBrightnessState", " 5.001");
390
+ getDPT("232.600", "#node-input-dptLightColor");
391
+ getGroupAddress("#node-input-GALightColor", "#node-input-nameLightColor", "#node-input-dptLightColor", " 232.600");
385
392
 
386
- getDPT("232.600", "#node-input-dptLightColor");
387
- getGroupAddress("#node-input-GALightColor", "#node-input-nameLightColor", "#node-input-dptLightColor", " 232.600");
393
+ getDPT("232.600", "#node-input-dptLightColorState");
394
+ getGroupAddress("#node-input-GALightColorState", "#node-input-nameLightColorState", "#node-input-dptLightColorState", " 232.600");
388
395
 
389
- getDPT("232.600", "#node-input-dptLightColorState");
390
- getGroupAddress("#node-input-GALightColorState", "#node-input-nameLightColorState", "#node-input-dptLightColorState", " 232.600");
396
+ getDPT("3.007", "#node-input-dptLightHSV");
397
+ getGroupAddress("#node-input-GALightHSV", "#node-input-nameLightHSV", "#node-input-dptLightHSV", " 3.007");
391
398
 
392
- getDPT("3.007", "#node-input-dptLightHSV");
393
- getGroupAddress("#node-input-GALightHSV", "#node-input-nameLightHSV", "#node-input-dptLightHSV", " 3.007");
399
+ getDPT("5.001", "#node-input-dptLightHSVPercentage");
400
+ getGroupAddress("#node-input-GALightHSVPercentage", "#node-input-nameLightHSVPercentage", "#node-input-dptLightHSVPercentage", " 5.001");
394
401
 
395
- getDPT("5.001", "#node-input-dptLightHSVPercentage");
396
- getGroupAddress("#node-input-GALightHSVPercentage", "#node-input-nameLightHSVPercentage", "#node-input-dptLightHSVPercentage", " 5.001");
402
+ getDPT("5.001", "#node-input-dptLightHSVState");
403
+ getGroupAddress("#node-input-GALightHSVState", "#node-input-nameLightHSVState", "#node-input-dptLightHSVState", " 5.001");
397
404
 
398
- getDPT("5.001", "#node-input-dptLightHSVState");
399
- getGroupAddress("#node-input-GALightHSVState", "#node-input-nameLightHSVState", "#node-input-dptLightHSVState", " 5.001");
405
+ getDPT("1.", "#node-input-dptLightBlink");
406
+ getGroupAddress("#node-input-GALightBlink", "#node-input-nameLightBlink", "#node-input-dptLightBlink", " 1.");
400
407
 
401
- getDPT("1.", "#node-input-dptLightBlink");
402
- getGroupAddress("#node-input-GALightBlink", "#node-input-nameLightBlink", "#node-input-dptLightBlink", " 1.");
408
+ getDPT("1.", "#node-input-dptLightColorCycle");
409
+ getGroupAddress("#node-input-GALightColorCycle", "#node-input-nameLightColorCycle", "#node-input-dptLightColorCycle", " 1.");
403
410
 
404
- getDPT("1.", "#node-input-dptLightColorCycle");
405
- getGroupAddress("#node-input-GALightColorCycle", "#node-input-nameLightColorCycle", "#node-input-dptLightColorCycle", " 1.");
411
+ getDPT("1.", "#node-input-dptDaylightSensor");
412
+ getGroupAddress("#node-input-GADaylightSensor", "#node-input-nameDaylightSensor", "#node-input-dptDaylightSensor", " 1.");
406
413
 
407
- getDPT("1.", "#node-input-dptDaylightSensor");
408
- getGroupAddress("#node-input-GADaylightSensor", "#node-input-nameDaylightSensor", "#node-input-dptDaylightSensor", " 1.");
414
+ getDPT("7.600", "#node-input-dptLightKelvin");
415
+ getGroupAddress("#node-input-GALightKelvin", "#node-input-nameLightKelvin", "#node-input-dptLightKelvin", " 7.600");
409
416
 
410
- getDPT("7.600", "#node-input-dptLightKelvin");
411
- getGroupAddress("#node-input-GALightKelvin", "#node-input-nameLightKelvin", "#node-input-dptLightKelvin", " 7.600");
417
+ getDPT("7.600", "#node-input-dptLightKelvinState");
418
+ getGroupAddress("#node-input-GALightKelvinState", "#node-input-nameLightKelvinState", "#node-input-dptLightKelvinState", " 7.600");
412
419
 
413
- getDPT("7.600", "#node-input-dptLightKelvinState");
414
- getGroupAddress("#node-input-GALightKelvinState", "#node-input-nameLightKelvinState", "#node-input-dptLightKelvinState", " 7.600");
415
420
 
421
+ // Show/Hide and enable/disable day/night Lighting behaviour
422
+ if (this.enableDayNightLighting === "yes") {
423
+ $("#divEnableDayNightLighting").show();
424
+ $("#divCCSBoxayNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
425
+ } else {
426
+ $("#divEnableDayNightLighting").hide();
427
+ $("#divCCSBoxayNightLighting").css({ border: "", "border-radius": "", padding: "" });
428
+ }
416
429
 
417
- // Show/Hide and enable/disable day/night Lighting behaviour
418
- if (this.enableDayNightLighting === "yes") {
430
+ $("#node-input-enableDayNightLighting").on("change", function () {
431
+ if ($("#node-input-enableDayNightLighting").val() === "yes") {
419
432
  $("#divEnableDayNightLighting").show();
420
433
  $("#divCCSBoxayNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
421
434
  } else {
422
435
  $("#divEnableDayNightLighting").hide();
423
436
  $("#divCCSBoxayNightLighting").css({ border: "", "border-radius": "", padding: "" });
424
437
  }
438
+ });
439
+
440
+ // Show/Hide the div of the color at swich on
441
+ if (this.specifySwitchOnBrightness === "yes") {
442
+ $("#divColorsAtSwitchOn").show();
443
+ } else {
444
+ $("#divColorsAtSwitchOn").hide();
445
+ $("#node-input-colorAtSwitchOnDayTime").val("");
446
+ }
425
447
 
426
- $("#node-input-enableDayNightLighting").on("change", function () {
427
- if ($("#node-input-enableDayNightLighting").val() === "yes") {
428
- $("#divEnableDayNightLighting").show();
429
- $("#divCCSBoxayNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
430
- } else {
431
- $("#divEnableDayNightLighting").hide();
432
- $("#divCCSBoxayNightLighting").css({ border: "", "border-radius": "", padding: "" });
433
- }
434
- });
435
-
436
- // Show/Hide the div of the color at swich on
437
- if (this.specifySwitchOnBrightness === "yes") {
448
+ $("#node-input-specifySwitchOnBrightness").on("change", function () {
449
+ if ($("#node-input-specifySwitchOnBrightness").val() === "yes") {
438
450
  $("#divColorsAtSwitchOn").show();
451
+ if ($("#node-input-colorAtSwitchOnDayTime").val() === "") $("#node-input-colorAtSwitchOnDayTime").val('{ "red": 255, "green": 255, "blue": 255 }');
439
452
  } else {
440
453
  $("#divColorsAtSwitchOn").hide();
441
454
  $("#node-input-colorAtSwitchOnDayTime").val("");
442
455
  }
443
-
444
- $("#node-input-specifySwitchOnBrightness").on("change", function () {
445
- if ($("#node-input-specifySwitchOnBrightness").val() === "yes") {
446
- $("#divColorsAtSwitchOn").show();
447
- if ($("#node-input-colorAtSwitchOnDayTime").val() === "") $("#node-input-colorAtSwitchOnDayTime").val('{ "red": 255, "green": 255, "blue": 255 }');
456
+ });
457
+
458
+ // Autocomplete suggestion with HUE Lights
459
+ $("#node-input-name").autocomplete({
460
+ minLength: 1,
461
+ source: function (request, response) {
462
+ $.getJSON("KNXUltimateGetResourcesHUE?rtype=light&nodeID=" + oNodeServerHue.id, (data) => {
463
+ response(
464
+ $.map(data.devices, function (value, key) {
465
+ //alert(JSON.stringify(value) + " "+ key)
466
+ var sSearch = value.name;
467
+ if (fullSearch(sSearch, request.term)) {
468
+ return {
469
+ hueDevice: value.id,
470
+ value: value.name,
471
+ };
472
+ } else {
473
+ return null;
474
+ }
475
+ })
476
+ );
477
+ });
478
+ },
479
+ select: function (event, ui) {
480
+ // Distinguish between group of lights an single light.
481
+ if (ui.item.value.toLowerCase().startsWith("grouped_light")) {
482
+ $("#node-input-hueDevice").val(ui.item.hueDevice + "#grouped_light");
483
+ $("#getColorAtSwitchOnDayTimeButton").hide();
484
+ $("#getColorAtSwitchOnNightTimeButton").hide();
448
485
  } else {
449
- $("#divColorsAtSwitchOn").hide();
450
- $("#node-input-colorAtSwitchOnDayTime").val("");
486
+ $("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
487
+ $("#getColorAtSwitchOnDayTimeButton").show();
488
+ $("#getColorAtSwitchOnNightTimeButton").show();
451
489
  }
452
- });
453
-
454
- // Autocomplete suggestion with HUE Lights
455
- $("#node-input-name").autocomplete({
456
- minLength: 1,
457
- source: function (request, response) {
458
- $.getJSON("KNXUltimateGetResourcesHUE?rtype=light&nodeID=" + oNodeServerHue.id, (data) => {
459
- response(
460
- $.map(data.devices, function (value, key) {
461
- //alert(JSON.stringify(value) + " "+ key)
462
- var sSearch = value.name;
463
- if (fullSearch(sSearch, request.term)) {
464
- return {
465
- hueDevice: value.id,
466
- value: value.name,
467
- };
468
- } else {
469
- return null;
470
- }
471
- })
472
- );
473
- });
474
- },
475
- select: function (event, ui) {
476
- // Distinguish between group of lights an single light.
477
- if (ui.item.value.toLowerCase().startsWith("grouped_light")) {
478
- $("#node-input-hueDevice").val(ui.item.hueDevice + "#grouped_light");
490
+ $("#tabs").show();
491
+ },
492
+ });
493
+
494
+ // Get the HUE capabilities to enable/disable UI parts
495
+ $.getJSON("KNXUltimateGetResourcesHUE?rtype=light&nodeID=" + oNodeServerHue.id, (data) => {
496
+ data.devices.forEach((element) => {
497
+ if (element.id === this.hueDevice.split("#")[0] && element.deviceObject !== undefined) {
498
+ // Check dimming
499
+ if (element.deviceObject.dimming === undefined) {
500
+ $("#tabs").tabs("disable", "#tabs-2");
501
+ $("#divColorsAtSwitchOn").hide();
502
+ $("#divColorCycle").hide();
503
+ }
504
+ // Check color
505
+ if (element.deviceObject.color_temperature === undefined) $("#tabs").tabs("disable", "#tabs-3");
506
+ if (element.deviceObject.color === undefined) {
507
+ $("#tabs").tabs("disable", "#tabs-4");
508
+ $("#divColorsAtSwitchOn").hide();
509
+ $("#divColorCycle").hide();
510
+ }
511
+ // Check if grouped, to hide/show the "Get current" buttons
512
+ if (element.deviceObject.type === "grouped_light") {
479
513
  $("#getColorAtSwitchOnDayTimeButton").hide();
480
514
  $("#getColorAtSwitchOnNightTimeButton").hide();
481
515
  } else {
482
- $("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
483
516
  $("#getColorAtSwitchOnDayTimeButton").show();
484
517
  $("#getColorAtSwitchOnNightTimeButton").show();
485
518
  }
486
- $("#tabs").show();
487
- },
488
- });
489
-
490
- // Get the HUE capabilities to enable/disable UI parts
491
- $.getJSON("KNXUltimateGetResourcesHUE?rtype=light&nodeID=" + oNodeServerHue.id, (data) => {
492
- data.devices.forEach((element) => {
493
- if (element.id === this.hueDevice.split("#")[0] && element.deviceObject !== undefined) {
494
- // Check dimming
495
- if (element.deviceObject.dimming === undefined) {
496
- $("#tabs").tabs("disable", "#tabs-2");
497
- $("#divColorsAtSwitchOn").hide();
498
- $("#divColorCycle").hide();
499
- }
500
- // Check color
501
- if (element.deviceObject.color_temperature === undefined) $("#tabs").tabs("disable", "#tabs-3");
502
- if (element.deviceObject.color === undefined) {
503
- $("#tabs").tabs("disable", "#tabs-4");
504
- $("#divColorsAtSwitchOn").hide();
505
- $("#divColorCycle").hide();
506
- }
507
- // Check if grouped, to hide/show the "Get current" buttons
508
- if (element.deviceObject.type === "grouped_light") {
509
- $("#getColorAtSwitchOnDayTimeButton").hide();
510
- $("#getColorAtSwitchOnNightTimeButton").hide();
511
- } else {
512
- $("#getColorAtSwitchOnDayTimeButton").show();
513
- $("#getColorAtSwitchOnNightTimeButton").show();
514
- }
515
- return;
516
- }
517
- });
519
+ return;
520
+ }
518
521
  });
522
+ });
519
523
 
520
- $("#getColorAtSwitchOnDayTimeButton").on("click", function () {
521
- $("#getColorAtSwitchOnDayTimeButton").text("Wait...");
522
- $.getJSON("knxUltimateGetHueColor?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
523
- $("#node-input-colorAtSwitchOnDayTime").val(data.toString());
524
- $("#node-input-colorAtSwitchOnDayTime").css("background-color", "lightgreen");
525
- setTimeout(() => {
526
- $("#node-input-colorAtSwitchOnDayTime").css("background-color", "");
527
- }, 500);
528
- $("#getColorAtSwitchOnDayTimeButton").text("Get current");
529
- });
524
+ $("#getColorAtSwitchOnDayTimeButton").on("click", function () {
525
+ $("#getColorAtSwitchOnDayTimeButton").text("Wait...");
526
+ $.getJSON("knxUltimateGetHueColor?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
527
+ $("#node-input-colorAtSwitchOnDayTime").val(data.toString());
528
+ $("#node-input-colorAtSwitchOnDayTime").css("background-color", "lightgreen");
529
+ setTimeout(() => {
530
+ $("#node-input-colorAtSwitchOnDayTime").css("background-color", "");
531
+ }, 500);
532
+ $("#getColorAtSwitchOnDayTimeButton").text("Get current");
530
533
  });
531
- $("#getColorAtSwitchOnNightTimeButton").on("click", function () {
532
- $("#getColorAtSwitchOnNightTimeButton").text("Wait...");
533
- $.getJSON("knxUltimateGetHueColor?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
534
- $("#node-input-colorAtSwitchOnNightTime").val(data.toString());
535
- $("#node-input-colorAtSwitchOnNightTime").css("background-color", "lightgreen");
536
- setTimeout(() => {
537
- $("#node-input-colorAtSwitchOnNightTime").css("background-color", "");
538
- }, 500);
539
- $("#getColorAtSwitchOnNightTimeButton").text("Get current");
540
- });
534
+ });
535
+ $("#getColorAtSwitchOnNightTimeButton").on("click", function () {
536
+ $("#getColorAtSwitchOnNightTimeButton").text("Wait...");
537
+ $.getJSON("knxUltimateGetHueColor?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
538
+ $("#node-input-colorAtSwitchOnNightTime").val(data.toString());
539
+ $("#node-input-colorAtSwitchOnNightTime").css("background-color", "lightgreen");
540
+ setTimeout(() => {
541
+ $("#node-input-colorAtSwitchOnNightTime").css("background-color", "");
542
+ }, 500);
543
+ $("#getColorAtSwitchOnNightTimeButton").text("Get current");
541
544
  });
545
+ });
542
546
 
543
- // Fill options for minDimLevel and maxDimLevel
544
- for (let index = 0; index <= 90; index++) {
545
- if (index === 0) {
546
- $("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
547
- } else {
548
- $("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "%"));
549
- }
550
-
551
- }
552
- $("#node-input-minDimLevelLight").val(node.minDimLevelLight);
553
- for (let index = 100; index >= 10; index--) {
554
- $("#node-input-maxDimLevelLight").append(
555
- $("<option>")
556
- .val(index)
557
- .text(index.toString() + "%")
558
- );
547
+ // Fill options for minDimLevel and maxDimLevel
548
+ for (let index = 0; index <= 90; index++) {
549
+ if (index === 0) {
550
+ $("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
551
+ } else {
552
+ $("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "%"));
559
553
  }
560
- $("#node-input-maxDimLevelLight").val(node.maxDimLevelLight);
561
554
 
562
- if (this.hueDevice !== "") $("#tabs").show();
555
+ }
556
+ $("#node-input-minDimLevelLight").val(this.minDimLevelLight);
557
+ for (let index = 100; index >= 10; index--) {
558
+ $("#node-input-maxDimLevelLight").append(
559
+ $("<option>")
560
+ .val(index)
561
+ .text(index.toString() + "%")
562
+ );
563
+ }
564
+ $("#node-input-maxDimLevelLight").val(this.maxDimLevelLight);
563
565
 
566
+ if (this.hueDevice !== "") $("#tabs").show();
567
+
568
+ }
564
569
 
565
- },
566
- oneditsave: function () {
567
- RED.sidebar.removeTab("tabNRColor");
568
- RED.sidebar.show("help");
569
- },
570
- oneditcancel: function () {
571
- RED.sidebar.removeTab("tabNRColor");
572
- RED.sidebar.show("help");
573
- },
574
- });
575
570
  </script>
576
- <script src="https://kit.fontawesome.com/11f26b4500.js" crossorigin="anonymous"></script>
577
- <script src="https://cdn.jsdelivr.net/npm/@jaames/iro@5"></script>
571
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
572
+ <script src="http://localhost:1880/resources/node-red-contrib-knx-ultimate/iro@5"></script>
578
573
 
579
574
  <script type="text/html" data-template-name="knxUltimateHueLight">
580
575
 
@@ -922,7 +917,16 @@
922
917
  <i class="fa fa-clone"></i> Max Dim Brightness
923
918
  </label>
924
919
  <select id="node-input-maxDimLevelLight"></select>
925
- </div>
920
+ </div>
921
+ <div class="form-row">
922
+ <label for="node-input-enableNodePINS" style="width:260px;">
923
+ <i class="fa fa-square-o"></i> Node Input/Output PINs
924
+ </label>
925
+ <select id="node-input-enableNodePINS">
926
+ <option value="no">Hide</option>
927
+ <option value="yes">Show node input/output PINs</option>
928
+ </select>
929
+ </div>
926
930
  </p>
927
931
  </div>
928
932
 
@@ -930,89 +934,89 @@
930
934
  </script>
931
935
 
932
936
  <script type="text/markdown" data-help-name="knxUltimateHueLight">
933
- <p>This node lets you control your Philips HUE light and grouped lights and also gets the states of this lights, to be sent to the KNX bus.</p>
934
-
935
- **General**
936
- |Property|Description|
937
- |--|--|
938
- | KNX GW | Select the KNX gateway to be used |
939
- | HUE Bridge | Select the HUE Bridge to be used |
940
- | Name | HUE light or HUE grouped light to be used. The avaiable lights and groups start showing up while you're typing.|
941
-
942
- <br/>
943
-
944
- **OPTIONS**
945
-
946
- Here you can choose the KNX addresses to be linked to the avaiable HUE light commands/states.<br/>
947
- 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.
948
-
949
- **Switching**
950
- |Property|Description|
951
- |--|--|
952
- | Control | This GA is used to turn on/off the HUE light via a boolean KNX value true/false|
953
- | Status | Link this to the light's switch status group address|
954
-
955
- <br/>
956
-
957
- **Dim/Brightness**
958
- |Property|Description|
959
- |--|--|
960
- | Control | Relative DIM the HUE light. You can set the dimming speed in the **_Behaviour_** tab. |
961
- | Control % | Changes the absolute HUE light's brightness (0-100%)|
962
- | Status| Link this to the light's brightness status group address |
963
-
964
- <br/>
965
-
966
- **Tunable white**
967
- |Property|Description|
968
- |--|--|
969
- | Control dim | Changes the HUE light's white temperature, using DPT 3.007 dimming. You can set the dimming speed in the **_Behaviour_** tab.|
970
- | Control % | Changes the HUE light's white temperature, using the DPT 5.001. A value of 0 is full warm, a value of 100 is full cold.|
971
- | Control kelvin | Changes the HUE light's temperature in Kelvin degrees, using the DPT 7.600. |
972
- | Status %| Link this to the light temperature status group address. Datapoint is 5.001 absolute value. 0 is full warm, 100 is full cold.|
973
- | Status kelvin | Link this to the light temperature status group address. Datapoint 7.600. |
974
-
975
- <br/>
976
-
977
- **Colors**
978
- |Property|Description|
979
- |--|--|
980
- | Control | This command is used to change the HUE light's color. Accepted datapoint is RGB triplet (r,g,b). The node handles the gamut color correction. As soon as you send a color KNX telegran, the light turns on and sets color and brightness, derived from the brightness human perception. As soon as you send a KNX telegram with r,g,b set to zero, the light turns off |
981
- | Status | Link this to the light's color status group address. Accepted datapoint is RGB triplet (r,g,b)|
982
-
983
- <br/>
984
-
985
- **Effects**
986
- |Property|Description|
987
- |--|--|
988
- | Blink | _true_ Blink the light, _false_ Stop blinking. Blinks the light on and off. Useful for signalling. Works with all HUE lights. |
989
- | Color Cycle | _true_ start cycle, _false_ Stop cycle. Randomly changes the HUE light's color at regular interval. Works with all HUE lights having color capabilities. The color effect will start 10 seconds after set. |
990
-
991
- <br/>
992
-
993
- **Behaviour**
994
-
995
- | Property | Description |
996
- | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
997
- | KNX Brightness Status | Updates the KNX brightness group address whenever the HUE lamp is switched ON/OFF. The options are `When HUE light is Off, send 0% (Default KNX behaviour)` and `Leave as is (default HUE behaviour)` |
998
- | Specify switch on brightness | It enables the brightness value to follow the on/off status of the light. If you change the HUE brightness value to 0% (from the HUE App), an "off" telegram is also sent to the KNX bus; if you set it other than 0%, an "on" telegram is also sent to the KNX bus. This is valid also vice-versa: if you change the brightness via KNX bus, the HUE on/off value is also sent to the lamp. If you set it to **No**, the previous HUE light brightness value is retained. Default value is **Yes**. |
999
- | Switch On - color/brightness | You can choose the color/brightness of your light, at switch on. Set it as JSON object, for example **{ "red": 255, "green": 255, "blue": 255 }** |
1000
- | Night Lighting | It allows to set a particular light color/brightness at nighttime. If **checked**, a further set of option shows up and the light changes the behaviour based on these options, everytime you switch the light _on_. |
1001
- | Switch On - color/brightness at Nighttime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object. Default value if you leave blank is **{ "red": 100, "green": 0, "blue": 0 }** |
1002
- | Day/Night | Select the group address used to set the day/night behaviour. The group address value is _true_ if daytime, _false_ if nighttime. |
1003
- | Invert day/night values | Invert the values of _Day/Night_ group address. Default value is **unchecked**. |
1004
- | Dim Speed (ms) | The dimming speed, in Milliseconds. This applies to the **light** and also to the **tunable white** dimming datapoints. It' calculated from 0% to 100%. |
1005
- | Min Dim brightness | Tha Minimum brightness that the lamp can reach. For example, if you are dimming the light down, the light will stop dimming at the specified brightness %. |
1006
- | Max Dim brightness | Tha Maximum brightness that the lamp can reach. For example, if you are dimming the light up, the light will stop dimming at the specified brightness %. |
1007
- | Read status at startup | Read the status at startup and emit the event to the KNX bus at startup/reconnection. (Default "no")|
1008
-
1009
- ### Note
1010
-
1011
- The Dimming function works in **KNX mode `start` and `stop`**. To start dimming, send only one "start" KNX telegram. To stop dimming, send a "stop" KNX telegram. Please **remember that**, when you set your wall swiches properties.
1012
-
1013
- <br/>
1014
-
1015
- [Find it useful?](https://www.paypal.me/techtoday)
1016
-
1017
- <br/>
937
+ <p>This node lets you control your Philips HUE light and grouped lights and also gets the states of this lights, to be sent to the KNX bus.</p>
938
+
939
+ **General**
940
+ |Property|Description|
941
+ |--|--|
942
+ | KNX GW | Select the KNX gateway to be used |
943
+ | HUE Bridge | Select the HUE Bridge to be used |
944
+ | Name | HUE light or HUE grouped light to be used. The avaiable lights and groups start showing up while you're typing.|
945
+
946
+ <br/>
947
+
948
+ **OPTIONS**
949
+
950
+ Here you can choose the KNX addresses to be linked to the avaiable HUE light commands/states.<br/>
951
+ 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.
952
+
953
+ **Switching**
954
+ |Property|Description|
955
+ |--|--|
956
+ | Control | This GA is used to turn on/off the HUE light via a boolean KNX value true/false|
957
+ | Status | Link this to the light's switch status group address|
958
+
959
+ <br/>
960
+
961
+ **Dim/Brightness**
962
+ |Property|Description|
963
+ |--|--|
964
+ | Control | Relative DIM the HUE light. You can set the dimming speed in the **_Behaviour_** tab. |
965
+ | Control % | Changes the absolute HUE light's brightness (0-100%)|
966
+ | Status| Link this to the light's brightness status group address |
967
+
968
+ <br/>
969
+
970
+ **Tunable white**
971
+ |Property|Description|
972
+ |--|--|
973
+ | Control dim | Changes the HUE light's white temperature, using DPT 3.007 dimming. You can set the dimming speed in the **_Behaviour_** tab.|
974
+ | Control % | Changes the HUE light's white temperature, using the DPT 5.001. A value of 0 is full warm, a value of 100 is full cold.|
975
+ | Control kelvin | Changes the HUE light's temperature in Kelvin degrees, using the DPT 7.600. |
976
+ | Status %| Link this to the light temperature status group address. Datapoint is 5.001 absolute value. 0 is full warm, 100 is full cold.|
977
+ | Status kelvin | Link this to the light temperature status group address. Datapoint 7.600. |
978
+
979
+ <br/>
980
+
981
+ **Colors**
982
+ |Property|Description|
983
+ |--|--|
984
+ | Control | This command is used to change the HUE light's color. Accepted datapoint is RGB triplet (r,g,b). The node handles the gamut color correction. As soon as you send a color KNX telegran, the light turns on and sets color and brightness, derived from the brightness human perception. As soon as you send a KNX telegram with r,g,b set to zero, the light turns off |
985
+ | Status | Link this to the light's color status group address. Accepted datapoint is RGB triplet (r,g,b)|
986
+
987
+ <br/>
988
+
989
+ **Effects**
990
+ |Property|Description|
991
+ |--|--|
992
+ | Blink | _true_ Blink the light, _false_ Stop blinking. Blinks the light on and off. Useful for signalling. Works with all HUE lights. |
993
+ | Color Cycle | _true_ start cycle, _false_ Stop cycle. Randomly changes the HUE light's color at regular interval. Works with all HUE lights having color capabilities. The color effect will start 10 seconds after set. |
994
+
995
+ <br/>
996
+
997
+ **Behaviour**
998
+
999
+ | Property | Description |
1000
+ | ----------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
1001
+ | KNX Brightness Status | Updates the KNX brightness group address whenever the HUE lamp is switched ON/OFF. The options are `When HUE light is Off, send 0% (Default KNX behaviour)` and `Leave as is (default HUE behaviour)` |
1002
+ | Specify switch on brightness | It enables the brightness value to follow the on/off status of the light. If you change the HUE brightness value to 0% (from the HUE App), an "off" telegram is also sent to the KNX bus; if you set it other than 0%, an "on" telegram is also sent to the KNX bus. This is valid also vice-versa: if you change the brightness via KNX bus, the HUE on/off value is also sent to the lamp. If you set it to **No**, the previous HUE light brightness value is retained. Default value is **Yes**. |
1003
+ | Switch On - color/brightness | You can choose the color/brightness of your light, at switch on. Set it as JSON object, for example **{ "red": 255, "green": 255, "blue": 255 }** |
1004
+ | Night Lighting | It allows to set a particular light color/brightness at nighttime. If **checked**, a further set of option shows up and the light changes the behaviour based on these options, everytime you switch the light _on_. |
1005
+ | Switch On - color/brightness at Nighttime | You can choose the color/brightness of your light, at switch on, on night time. Set it as JSON object. Default value if you leave blank is **{ "red": 100, "green": 0, "blue": 0 }** |
1006
+ | Day/Night | Select the group address used to set the day/night behaviour. The group address value is _true_ if daytime, _false_ if nighttime. |
1007
+ | Invert day/night values | Invert the values of _Day/Night_ group address. Default value is **unchecked**. |
1008
+ | Dim Speed (ms) | The dimming speed, in Milliseconds. This applies to the **light** and also to the **tunable white** dimming datapoints. It' calculated from 0% to 100%. |
1009
+ | Min Dim brightness | Tha Minimum brightness that the lamp can reach. For example, if you are dimming the light down, the light will stop dimming at the specified brightness %. |
1010
+ | Max Dim brightness | Tha Maximum brightness that the lamp can reach. For example, if you are dimming the light up, the light will stop dimming at the specified brightness %. |
1011
+ | Read status at startup | Read the status at startup and emit the event to the KNX bus at startup/reconnection. (Default "no")|
1012
+ | Node Input/Output PINs | Hide or show the input/output PINs. Input/output PINS allow the node to accept msg input from the flow and send msg output to the flow. Input msg must follow the HUE API v.2 Standards. This is an example msg, that turns on the light: <code>msg.on = {"on":true}</code>. Please refer to the [official HUE Api page](https://developers.meethue.com/develop/hue-api-v2/api-reference/#resource_light__id__put) |
1013
+ ### Note
1014
+
1015
+ The Dimming function works in **KNX mode `start` and `stop`**. To start dimming, send only one "start" KNX telegram. To stop dimming, send a "stop" KNX telegram. Please **remember that**, when you set your wall swiches properties.
1016
+
1017
+ <br/>
1018
+
1019
+ [Find it useful?](https://www.paypal.me/techtoday)
1020
+
1021
+ <br/>
1018
1022
  </script>