node-red-contrib-knx-ultimate 2.2.6 → 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.
- package/CHANGELOG.md +15 -0
- package/nodes/hue-config.js +21 -20
- package/nodes/knxUltimate-config.html +3 -3
- package/nodes/knxUltimate-config.js +1 -1
- package/nodes/knxUltimateHueBattery.html +1 -1
- package/nodes/knxUltimateHueButton.html +1 -10
- package/nodes/knxUltimateHueButton.js +1 -1
- package/nodes/knxUltimateHueLight.html +548 -483
- package/nodes/knxUltimateHueLight.js +75 -35
- package/nodes/knxUltimateHueLightSensor.html +1 -1
- package/nodes/knxUltimateHueMotion.html +1 -11
- package/nodes/knxUltimateHueMotion.js +1 -1
- package/nodes/knxUltimateHueScene.html +32 -9
- package/nodes/knxUltimateHueScene.js +28 -22
- package/nodes/knxUltimateHueTapDial.html +1 -13
- package/nodes/knxUltimateHueTapDial.js +1 -1
- package/nodes/knxUltimateHueTemperatureSensor.html +11 -11
- package/nodes/knxUltimateSceneController.js +4 -5
- package/nodes/utils/hueColorConverter.js +2 -0
- package/package.json +1 -1
- package/resources/11f26b4500.js +2 -0
- package/resources/iro@5 +7 -0
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
<script type="text/javascript">
|
|
2
|
-
|
|
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",
|
|
@@ -85,12 +66,24 @@
|
|
|
85
66
|
GADaylightSensor: { value: "" },
|
|
86
67
|
dptDaylightSensor: { value: "" },
|
|
87
68
|
|
|
69
|
+
nameLightKelvin: { value: "" },
|
|
70
|
+
GALightKelvin: { value: "" },
|
|
71
|
+
dptLightKelvin: { value: "" },
|
|
72
|
+
|
|
73
|
+
nameLightKelvinState: { value: "" },
|
|
74
|
+
GALightKelvinState: { value: "" },
|
|
75
|
+
dptLightKelvinState: { value: "" },
|
|
76
|
+
|
|
88
77
|
specifySwitchOnBrightness: { value: "yes" },
|
|
89
78
|
updateKNXBrightnessStatusOnHUEOnOff: { value: "no" },
|
|
90
79
|
dimSpeed: { value: 5000, required: false },
|
|
91
80
|
minDimLevelLight: { value: 10, required: false },
|
|
92
81
|
maxDimLevelLight: { value: 100, required: false },
|
|
93
82
|
readStatusAtStartup: { value: "yes" },
|
|
83
|
+
enableNodePINS: { value: "no" },
|
|
84
|
+
|
|
85
|
+
outputs: { value: 0 },
|
|
86
|
+
inputs: { value: 0 },
|
|
94
87
|
|
|
95
88
|
hueDevice: { value: "" },
|
|
96
89
|
},
|
|
@@ -105,46 +98,67 @@
|
|
|
105
98
|
// enabled: function() {
|
|
106
99
|
// // return whether or not the button is enabled, based on the current
|
|
107
100
|
// // configuration of the node
|
|
108
|
-
// return !
|
|
101
|
+
// return !node.changed
|
|
109
102
|
// },
|
|
110
103
|
// visible: function() {
|
|
111
104
|
// // return whether or not the button is visible, based on the current
|
|
112
105
|
// // configuration of the node
|
|
113
|
-
// return
|
|
106
|
+
// return node.hasButton
|
|
114
107
|
// },
|
|
115
108
|
// //toggle: "buttonState",
|
|
116
109
|
// onclick: function() {}
|
|
117
110
|
// },
|
|
118
|
-
oneditprepare:
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
+
});
|
|
122
128
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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>
|
|
126
138
|
|
|
127
139
|
<head>
|
|
128
140
|
<div class="red-ui-sidebar-header">Color Selector</div>
|
|
129
141
|
</head>
|
|
130
142
|
<div style='position:relative;height:100%;margin:10px'>
|
|
131
|
-
<p>Choose the desired color/temperature,
|
|
143
|
+
<p>Choose the desired color/temperature, then click <b>Apply</b></p>
|
|
132
144
|
<div>
|
|
133
|
-
<h3>Color</h3>
|
|
145
|
+
<h3>Color RGB</h3>
|
|
134
146
|
<div id="colorPicker"></div>
|
|
135
147
|
</div>
|
|
136
|
-
</br>
|
|
148
|
+
</br>
|
|
149
|
+
<div>
|
|
150
|
+
<input style="width:100%" type="text" id="resultRGB">
|
|
151
|
+
<input type="hidden" id="tabNRColor_destinationTextbox">
|
|
152
|
+
</div>
|
|
153
|
+
</br>
|
|
137
154
|
<div>
|
|
138
|
-
<h3>Temperature</h3>
|
|
155
|
+
<h3>Temperature Kelvin</h3>
|
|
139
156
|
<div id="kelvinPicker"></div>
|
|
140
157
|
</div>
|
|
141
|
-
</br>
|
|
158
|
+
</br>
|
|
142
159
|
<div>
|
|
143
|
-
<
|
|
144
|
-
<
|
|
145
|
-
<input style="width:100%" type="text" id="resultRGB">
|
|
146
|
-
<input type="hidden" id="tabNRColor_destinationTextbox">
|
|
147
|
-
</div>
|
|
160
|
+
<input style="width:100%" type="text" id="resultKelvin">
|
|
161
|
+
<input type="hidden" id="tabNRColor_destinationTextbox">
|
|
148
162
|
</div>
|
|
149
163
|
<div id="tabNRColor_divApplyCancel" hidden>
|
|
150
164
|
<button id="tabNRColor_colorSelectorTABApplyTextButton" type="button" class="red-ui-button">Apply</button>
|
|
@@ -155,392 +169,407 @@
|
|
|
155
169
|
</html>
|
|
156
170
|
`;
|
|
157
171
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
},
|
|
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,
|
|
182
195
|
},
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
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
|
+
}
|
|
190
215
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
},
|
|
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",
|
|
207
231
|
},
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
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") {
|
|
233
261
|
$(destTextBox).val(resultRGB);
|
|
234
|
-
|
|
235
|
-
$(destTextBox).
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
262
|
+
} else {
|
|
263
|
+
$(destTextBox).val(resultKelvin);
|
|
264
|
+
}
|
|
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
|
+
}
|
|
269
324
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
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());
|
|
275
337
|
});
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
338
|
+
}
|
|
339
|
+
|
|
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
|
+
);
|
|
359
|
+
});
|
|
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
|
+
},
|
|
281
372
|
});
|
|
373
|
+
}
|
|
282
374
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
// This searches for all words in a string
|
|
286
|
-
var aSearchWords = searchString.toLowerCase().split(" ");
|
|
287
|
-
var i = 0;
|
|
288
|
-
for (let index = 0; index < aSearchWords.length; index++) {
|
|
289
|
-
if (sourceText.toLowerCase().indexOf(aSearchWords[index]) > -1) i += 1;
|
|
290
|
-
}
|
|
291
|
-
return i == aSearchWords.length;
|
|
292
|
-
}
|
|
375
|
+
getDPT("1.", "#node-input-dptLightSwitch");
|
|
376
|
+
getGroupAddress("#node-input-GALightSwitch", "#node-input-nameLightSwitch", "#node-input-dptLightSwitch", " 1.");
|
|
293
377
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
// ########################
|
|
297
|
-
$.getJSON("knxUltimateDpts", (data) => {
|
|
298
|
-
data.forEach((dpt) => {
|
|
299
|
-
if (dpt.value.startsWith(_dpt)) {
|
|
300
|
-
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text));
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
// Eval
|
|
304
|
-
const format = "node." + _destinationWidget.replace("#node-input-", "");
|
|
305
|
-
$(_destinationWidget).val(eval(format).toString());
|
|
306
|
-
});
|
|
307
|
-
}
|
|
378
|
+
getDPT("1.", "#node-input-dptLightState");
|
|
379
|
+
getGroupAddress("#node-input-GALightState", "#node-input-nameLightState", "#node-input-dptLightState", " 1.");
|
|
308
380
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
$.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
|
|
315
|
-
response(
|
|
316
|
-
$.map(data, function (value, key) {
|
|
317
|
-
var sSearch = value.ga + " (" + value.devicename + ") DPT" + value.dpt;
|
|
318
|
-
if (fullSearch(sSearch, request.term + _additionalSearchTerm)) {
|
|
319
|
-
return {
|
|
320
|
-
label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
|
|
321
|
-
value: value.ga, // Value
|
|
322
|
-
};
|
|
323
|
-
} else {
|
|
324
|
-
return null;
|
|
325
|
-
}
|
|
326
|
-
})
|
|
327
|
-
);
|
|
328
|
-
});
|
|
329
|
-
},
|
|
330
|
-
select: function (event, ui) {
|
|
331
|
-
// Sets Datapoint and device name automatically
|
|
332
|
-
var sDevName = ui.item.label.split("#")[1].trim();
|
|
333
|
-
try {
|
|
334
|
-
sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
|
|
335
|
-
} catch (error) { }
|
|
336
|
-
$(_destinationWidgetName).val(sDevName);
|
|
337
|
-
var optVal = $(_destinationWidgetDPT + " option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr("value");
|
|
338
|
-
// Select the option value
|
|
339
|
-
$(_destinationWidgetDPT).val(optVal);
|
|
340
|
-
},
|
|
341
|
-
});
|
|
342
|
-
}
|
|
381
|
+
getDPT("3.007", "#node-input-dptLightDIM");
|
|
382
|
+
getGroupAddress("#node-input-GALightDIM", "#node-input-nameLightDIM", "#node-input-dptLightDIM", " 3.007");
|
|
383
|
+
|
|
384
|
+
getDPT("5.001", "#node-input-dptLightBrightness");
|
|
385
|
+
getGroupAddress("#node-input-GALightBrightness", "#node-input-nameLightBrightness", "#node-input-dptLightBrightness", " 5.001");
|
|
343
386
|
|
|
344
|
-
|
|
345
|
-
|
|
387
|
+
getDPT("5.001", "#node-input-dptLightBrightnessState");
|
|
388
|
+
getGroupAddress("#node-input-GALightBrightnessState", "#node-input-nameLightBrightnessState", "#node-input-dptLightBrightnessState", " 5.001");
|
|
346
389
|
|
|
347
|
-
|
|
348
|
-
|
|
390
|
+
getDPT("232.600", "#node-input-dptLightColor");
|
|
391
|
+
getGroupAddress("#node-input-GALightColor", "#node-input-nameLightColor", "#node-input-dptLightColor", " 232.600");
|
|
349
392
|
|
|
350
|
-
|
|
351
|
-
|
|
393
|
+
getDPT("232.600", "#node-input-dptLightColorState");
|
|
394
|
+
getGroupAddress("#node-input-GALightColorState", "#node-input-nameLightColorState", "#node-input-dptLightColorState", " 232.600");
|
|
352
395
|
|
|
353
|
-
|
|
354
|
-
|
|
396
|
+
getDPT("3.007", "#node-input-dptLightHSV");
|
|
397
|
+
getGroupAddress("#node-input-GALightHSV", "#node-input-nameLightHSV", "#node-input-dptLightHSV", " 3.007");
|
|
355
398
|
|
|
356
|
-
|
|
357
|
-
|
|
399
|
+
getDPT("5.001", "#node-input-dptLightHSVPercentage");
|
|
400
|
+
getGroupAddress("#node-input-GALightHSVPercentage", "#node-input-nameLightHSVPercentage", "#node-input-dptLightHSVPercentage", " 5.001");
|
|
358
401
|
|
|
359
|
-
|
|
360
|
-
|
|
402
|
+
getDPT("5.001", "#node-input-dptLightHSVState");
|
|
403
|
+
getGroupAddress("#node-input-GALightHSVState", "#node-input-nameLightHSVState", "#node-input-dptLightHSVState", " 5.001");
|
|
361
404
|
|
|
362
|
-
|
|
363
|
-
|
|
405
|
+
getDPT("1.", "#node-input-dptLightBlink");
|
|
406
|
+
getGroupAddress("#node-input-GALightBlink", "#node-input-nameLightBlink", "#node-input-dptLightBlink", " 1.");
|
|
364
407
|
|
|
365
|
-
|
|
366
|
-
|
|
408
|
+
getDPT("1.", "#node-input-dptLightColorCycle");
|
|
409
|
+
getGroupAddress("#node-input-GALightColorCycle", "#node-input-nameLightColorCycle", "#node-input-dptLightColorCycle", " 1.");
|
|
367
410
|
|
|
368
|
-
|
|
369
|
-
|
|
411
|
+
getDPT("1.", "#node-input-dptDaylightSensor");
|
|
412
|
+
getGroupAddress("#node-input-GADaylightSensor", "#node-input-nameDaylightSensor", "#node-input-dptDaylightSensor", " 1.");
|
|
370
413
|
|
|
371
|
-
|
|
372
|
-
|
|
414
|
+
getDPT("7.600", "#node-input-dptLightKelvin");
|
|
415
|
+
getGroupAddress("#node-input-GALightKelvin", "#node-input-nameLightKelvin", "#node-input-dptLightKelvin", " 7.600");
|
|
373
416
|
|
|
374
|
-
|
|
375
|
-
|
|
417
|
+
getDPT("7.600", "#node-input-dptLightKelvinState");
|
|
418
|
+
getGroupAddress("#node-input-GALightKelvinState", "#node-input-nameLightKelvinState", "#node-input-dptLightKelvinState", " 7.600");
|
|
376
419
|
|
|
377
|
-
getDPT("1.", "#node-input-dptLightColorCycle");
|
|
378
|
-
getGroupAddress("#node-input-GALightColorCycle", "#node-input-nameLightColorCycle", "#node-input-dptLightColorCycle", " 1.");
|
|
379
420
|
|
|
380
|
-
|
|
381
|
-
|
|
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
|
+
}
|
|
382
429
|
|
|
383
|
-
|
|
384
|
-
if (
|
|
430
|
+
$("#node-input-enableDayNightLighting").on("change", function () {
|
|
431
|
+
if ($("#node-input-enableDayNightLighting").val() === "yes") {
|
|
385
432
|
$("#divEnableDayNightLighting").show();
|
|
386
433
|
$("#divCCSBoxayNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
387
434
|
} else {
|
|
388
435
|
$("#divEnableDayNightLighting").hide();
|
|
389
436
|
$("#divCCSBoxayNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
390
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
|
+
}
|
|
391
447
|
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
$("#divEnableDayNightLighting").show();
|
|
395
|
-
$("#divCCSBoxayNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
396
|
-
} else {
|
|
397
|
-
$("#divEnableDayNightLighting").hide();
|
|
398
|
-
$("#divCCSBoxayNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
399
|
-
}
|
|
400
|
-
});
|
|
401
|
-
|
|
402
|
-
// Show/Hide the div of the color at swich on
|
|
403
|
-
if (this.specifySwitchOnBrightness === "yes") {
|
|
448
|
+
$("#node-input-specifySwitchOnBrightness").on("change", function () {
|
|
449
|
+
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") {
|
|
404
450
|
$("#divColorsAtSwitchOn").show();
|
|
451
|
+
if ($("#node-input-colorAtSwitchOnDayTime").val() === "") $("#node-input-colorAtSwitchOnDayTime").val('{ "red": 255, "green": 255, "blue": 255 }');
|
|
405
452
|
} else {
|
|
406
453
|
$("#divColorsAtSwitchOn").hide();
|
|
407
454
|
$("#node-input-colorAtSwitchOnDayTime").val("");
|
|
408
455
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
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();
|
|
414
485
|
} else {
|
|
415
|
-
$("#
|
|
416
|
-
$("#
|
|
486
|
+
$("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
|
|
487
|
+
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
488
|
+
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
417
489
|
}
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
select: function (event, ui) {
|
|
442
|
-
// Distinguish between group of lights an single light.
|
|
443
|
-
if (ui.item.value.toLowerCase().startsWith("grouped_light")) {
|
|
444
|
-
$("#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") {
|
|
445
513
|
$("#getColorAtSwitchOnDayTimeButton").hide();
|
|
446
514
|
$("#getColorAtSwitchOnNightTimeButton").hide();
|
|
447
515
|
} else {
|
|
448
|
-
$("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
|
|
449
516
|
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
450
517
|
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
451
518
|
}
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
});
|
|
455
|
-
|
|
456
|
-
// Get the HUE capabilities to enable/disable UI parts
|
|
457
|
-
$.getJSON("KNXUltimateGetResourcesHUE?rtype=light&nodeID=" + oNodeServerHue.id, (data) => {
|
|
458
|
-
data.devices.forEach((element) => {
|
|
459
|
-
if (element.id === this.hueDevice.split("#")[0] && element.deviceObject !== undefined) {
|
|
460
|
-
// Check dimming
|
|
461
|
-
if (element.deviceObject.dimming === undefined) {
|
|
462
|
-
$("#tabs").tabs("disable", "#tabs-2");
|
|
463
|
-
$("#divColorsAtSwitchOn").hide();
|
|
464
|
-
$("#divColorCycle").hide();
|
|
465
|
-
}
|
|
466
|
-
// Check color
|
|
467
|
-
if (element.deviceObject.color_temperature === undefined) $("#tabs").tabs("disable", "#tabs-3");
|
|
468
|
-
if (element.deviceObject.color === undefined) {
|
|
469
|
-
$("#tabs").tabs("disable", "#tabs-4");
|
|
470
|
-
$("#divColorsAtSwitchOn").hide();
|
|
471
|
-
$("#divColorCycle").hide();
|
|
472
|
-
}
|
|
473
|
-
// Check if grouped, to hide/show the "Get current" buttons
|
|
474
|
-
if (element.deviceObject.type === "grouped_light") {
|
|
475
|
-
$("#getColorAtSwitchOnDayTimeButton").hide();
|
|
476
|
-
$("#getColorAtSwitchOnNightTimeButton").hide();
|
|
477
|
-
} else {
|
|
478
|
-
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
479
|
-
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
480
|
-
}
|
|
481
|
-
return;
|
|
482
|
-
}
|
|
483
|
-
});
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
484
521
|
});
|
|
522
|
+
});
|
|
485
523
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
$("#getColorAtSwitchOnDayTimeButton").text("Get current");
|
|
496
|
-
});
|
|
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");
|
|
497
533
|
});
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
});
|
|
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");
|
|
509
544
|
});
|
|
545
|
+
});
|
|
510
546
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
}
|
|
520
|
-
$("#node-input-minDimLevelLight").val(node.minDimLevelLight);
|
|
521
|
-
for (let index = 100; index >= 10; index--) {
|
|
522
|
-
$("#node-input-maxDimLevelLight").append(
|
|
523
|
-
$("<option>")
|
|
524
|
-
.val(index)
|
|
525
|
-
.text(index.toString() + "%")
|
|
526
|
-
);
|
|
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() + "%"));
|
|
527
553
|
}
|
|
528
|
-
$("#node-input-maxDimLevelLight").val(node.maxDimLevelLight);
|
|
529
554
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
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);
|
|
565
|
+
|
|
566
|
+
if (this.hueDevice !== "") $("#tabs").show();
|
|
567
|
+
|
|
568
|
+
}
|
|
569
|
+
|
|
541
570
|
</script>
|
|
542
|
-
<script src="
|
|
543
|
-
<script src="
|
|
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>
|
|
544
573
|
|
|
545
574
|
<script type="text/html" data-template-name="knxUltimateHueLight">
|
|
546
575
|
|
|
@@ -665,43 +694,68 @@
|
|
|
665
694
|
</div>
|
|
666
695
|
<div id="tabs-3">
|
|
667
696
|
<p>
|
|
668
|
-
|
|
669
|
-
|
|
697
|
+
<div class="form-row">
|
|
698
|
+
<label for="node-input-nameLightHSV" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control dim</label>
|
|
670
699
|
|
|
671
|
-
|
|
672
|
-
|
|
700
|
+
<label for="node-input-GALightHSV" style="width:20px;">GA</label>
|
|
701
|
+
<input type="text" id="node-input-GALightHSV" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
673
702
|
|
|
674
|
-
|
|
675
|
-
|
|
703
|
+
<label for="node-input-dptLightHSV" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
704
|
+
<select id="node-input-dptLightHSV" style="width:140px;"></select>
|
|
676
705
|
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
706
|
+
<label for="node-input-nameLightHSV" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
707
|
+
<input type="text" id="node-input-nameLightHSV" style="width:190px;margin-left: 5px; text-align: left;">
|
|
708
|
+
</div>
|
|
709
|
+
<div class="form-row">
|
|
710
|
+
<label for="node-input-nameLightHSVPercentage" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control %</label>
|
|
711
|
+
|
|
712
|
+
<label for="node-input-GALightHSVPercentage" style="width:20px;">GA</label>
|
|
713
|
+
<input type="text" id="node-input-GALightHSVPercentage" placeholder="Ex: 1/1/1"
|
|
714
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
715
|
+
|
|
716
|
+
<label for="node-input-dptLightHSVPercentage" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
717
|
+
<select id="node-input-dptLightHSVPercentage" style="width:140px;"></select>
|
|
718
|
+
|
|
719
|
+
<label for="node-input-nameLightHSVPercentage" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
720
|
+
<input type="text" id="node-input-nameLightHSVPercentage" style="width:190px;margin-left: 5px; text-align: left;">
|
|
721
|
+
</div>
|
|
722
|
+
<div class="form-row">
|
|
723
|
+
<label for="node-input-nameLightKelvin" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control Kelvin</label>
|
|
682
724
|
|
|
683
|
-
<label for="node-input-
|
|
684
|
-
<input type="text" id="node-input-
|
|
725
|
+
<label for="node-input-GALightKelvin" style="width:20px;">GA</label>
|
|
726
|
+
<input type="text" id="node-input-GALightKelvin" placeholder="Ex: 1/1/1"
|
|
685
727
|
style="width:70px;margin-left: 5px; text-align: left;">
|
|
686
728
|
|
|
687
|
-
<label for="node-input-
|
|
688
|
-
<select id="node-input-
|
|
729
|
+
<label for="node-input-dptLightKelvin" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
730
|
+
<select id="node-input-dptLightKelvin" style="width:140px;"></select>
|
|
689
731
|
|
|
690
|
-
<label for="node-input-
|
|
691
|
-
<input type="text" id="node-input-
|
|
732
|
+
<label for="node-input-nameLightKelvin" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
733
|
+
<input type="text" id="node-input-nameLightKelvin" style="width:190px;margin-left: 5px; text-align: left;">
|
|
692
734
|
</div>
|
|
693
|
-
|
|
694
|
-
|
|
735
|
+
<div class="form-row">
|
|
736
|
+
<label for="node-input-nameLightHSVState" style="width:110px;"><i class="fa fa-play-circle-o"></i> Status %</label>
|
|
695
737
|
|
|
696
|
-
|
|
697
|
-
|
|
738
|
+
<label for="node-input-GALightHSVState" style="width:20px;"><span data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
739
|
+
<input type="text" id="node-input-GALightHSVState" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
698
740
|
|
|
699
|
-
|
|
700
|
-
|
|
741
|
+
<label for="node-input-dptLightHSVState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
742
|
+
<select id="node-input-dptLightHSVState" style="width:140px;"></select>
|
|
701
743
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
744
|
+
<label for="node-input-nameLightHSVState" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
745
|
+
<input type="text" id="node-input-nameLightHSVState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
746
|
+
</div>
|
|
747
|
+
<div class="form-row">
|
|
748
|
+
<label for="node-input-nameLightKelvinState" style="width:110px;"><i class="fa fa-play-circle-o"></i> Status Kelvin</label>
|
|
749
|
+
|
|
750
|
+
<label for="node-input-GALightKelvinState" style="width:20px;">GA</label>
|
|
751
|
+
<input type="text" id="node-input-GALightKelvinState" placeholder="Ex: 1/1/1" style="width:70px;margin-left: 5px; text-align: left;">
|
|
752
|
+
|
|
753
|
+
<label for="node-input-dptLightKelvinState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
754
|
+
<select id="node-input-dptLightKelvinState" style="width:140px;"></select>
|
|
755
|
+
|
|
756
|
+
<label for="node-input-nameLightKelvinState" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
757
|
+
<input type="text" id="node-input-nameLightKelvinState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
758
|
+
</div>
|
|
705
759
|
</p>
|
|
706
760
|
</div>
|
|
707
761
|
<div id="tabs-4">
|
|
@@ -863,7 +917,16 @@
|
|
|
863
917
|
<i class="fa fa-clone"></i> Max Dim Brightness
|
|
864
918
|
</label>
|
|
865
919
|
<select id="node-input-maxDimLevelLight"></select>
|
|
866
|
-
</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>
|
|
867
930
|
</p>
|
|
868
931
|
</div>
|
|
869
932
|
|
|
@@ -871,87 +934,89 @@
|
|
|
871
934
|
</script>
|
|
872
935
|
|
|
873
936
|
<script type="text/markdown" data-help-name="knxUltimateHueLight">
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
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/>
|
|
957
1022
|
</script>
|