node-red-contrib-knx-ultimate 2.3.5 → 2.4.2
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/.github/ISSUE_TEMPLATE/bug_report.md +7 -7
- package/CHANGELOG.md +26 -0
- package/KNXEngine/CHANGELOG.md +5 -1
- package/KNXEngine/package.json +1 -1
- package/KNXEngine/src/dptlib/dpt275.js +59 -0
- package/KNXEngine/src/dptlib/index.js +79 -65
- package/nodes/commonFunctions.js +419 -0
- package/nodes/hue-config.html +56 -40
- package/nodes/hue-config.js +0 -108
- package/nodes/knxUltimate-config.html +1 -1
- package/nodes/knxUltimate-config.js +13 -232
- package/nodes/knxUltimate.html +24 -18
- package/nodes/knxUltimateHueBattery.html +2 -2
- package/nodes/knxUltimateHueButton.html +3 -3
- package/nodes/knxUltimateHueLight.html +969 -924
- package/nodes/knxUltimateHueLight.js +17 -9
- package/nodes/knxUltimateHueLightSensor.html +2 -2
- package/nodes/knxUltimateHueMotion.html +2 -2
- package/nodes/knxUltimateHueScene.html +3 -3
- package/nodes/knxUltimateHueTapDial.html +2 -2
- package/nodes/knxUltimateHueTemperatureSensor.html +2 -2
- package/nodes/knxUltimateLoadControl.html +1 -1
- package/nodes/knxUltimateSceneController.html +6 -6
- package/nodes/knxUltimateSceneController.js +1 -9
- package/package.json +2 -2
- package/nodes/utils/commonFunctions.js +0 -21
|
@@ -5,564 +5,18 @@
|
|
|
5
5
|
<script type="text/javascript">
|
|
6
6
|
(function () {
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let timerBlinkBackground;
|
|
16
|
-
function blinkBackground(_elementIDwithHashAtTheBeginning) {
|
|
17
|
-
if (timerBlinkBackground !== undefined) clearInterval(timerBlinkBackground);
|
|
18
|
-
timerBlinkBackground = setInterval(() => {
|
|
19
|
-
if (isEven(blinkStatus)) $(_elementIDwithHashAtTheBeginning).css("background-color", "lightgreen");
|
|
20
|
-
if (!isEven(blinkStatus)) $(_elementIDwithHashAtTheBeginning).css("background-color", "");
|
|
21
|
-
blinkStatus += 1;
|
|
22
|
-
if (blinkStatus >= 14) {
|
|
23
|
-
clearInterval(timerBlinkBackground);
|
|
24
|
-
blinkStatus = 2;
|
|
25
|
-
$(_elementIDwithHashAtTheBeginning).css("background-color", "");
|
|
26
|
-
}
|
|
27
|
-
}, 100);
|
|
28
|
-
}
|
|
29
|
-
function isEven(n) {
|
|
30
|
-
return (n % 2 == 0);
|
|
31
|
-
}
|
|
32
|
-
// ################################################################
|
|
33
|
-
|
|
34
|
-
$("#tabs").tabs(); // Tabs gestione KNX
|
|
35
|
-
|
|
36
|
-
// 19/02/2020 Used to get the server sooner als deploy.
|
|
37
|
-
$("#node-input-server").change(function () {
|
|
38
|
-
try {
|
|
39
|
-
oNodeServer = RED.nodes.node($(node).val());
|
|
40
|
-
} catch (error) { }
|
|
41
|
-
});
|
|
42
|
-
// 19/02/2020 Used to get the server sooner als deploy.
|
|
43
|
-
$("#node-input-serverHue").change(function () {
|
|
44
|
-
try {
|
|
45
|
-
oNodeServerHue = RED.nodes.node($(node).val());
|
|
46
|
-
} catch (error) { }
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
// 31/03/2020 Search Helper
|
|
50
|
-
function fullSearch(sourceText, searchString) {
|
|
51
|
-
// node searches for all words in a string
|
|
52
|
-
var aSearchWords = searchString.toLowerCase().split(" ");
|
|
53
|
-
var i = 0;
|
|
54
|
-
for (let index = 0; index < aSearchWords.length; index++) {
|
|
55
|
-
if (sourceText.toLowerCase().indexOf(aSearchWords[index]) > -1) i += 1;
|
|
56
|
-
}
|
|
57
|
-
return i == aSearchWords.length;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
function getDPT(_dpt, _destinationWidget) {
|
|
61
|
-
// DPT Switch command
|
|
62
|
-
// ########################
|
|
63
|
-
$(_destinationWidget).empty();
|
|
64
|
-
$.getJSON("knxUltimateDpts", (data) => {
|
|
65
|
-
data.forEach((dpt) => {
|
|
66
|
-
if (dpt.value.startsWith(_dpt)) {
|
|
67
|
-
// Adjustment for HUE Temperature
|
|
68
|
-
if (dpt.value.startsWith("7.600")) {
|
|
69
|
-
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - KNX Kelvin range 0-65535k (Homeassistant color_temperature_mode: absolute)"));
|
|
70
|
-
} else if (dpt.value.startsWith("9.002")) {
|
|
71
|
-
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - HUE Kelvin range 2000-6535k (Homeassistant color_temperature_mode: absolute_float)"));
|
|
72
|
-
} else if (dpt.value.startsWith("5.001")) {
|
|
73
|
-
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - Homeassistant color_temperature_mode: relative"));
|
|
74
|
-
} else {
|
|
75
|
-
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
// Eval
|
|
80
|
-
const format = "node." + _destinationWidget.replace("#node-input-", "");
|
|
81
|
-
try {
|
|
82
|
-
if (format !== undefined) $(_destinationWidget).val(eval(format).toString());
|
|
83
|
-
} catch (error) { }
|
|
84
|
-
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
function getGroupAddress(_sourceWidgetAutocomplete, _destinationWidgetName, _destinationWidgetDPT, _additionalSearchTerm) {
|
|
89
|
-
$(_sourceWidgetAutocomplete).autocomplete({
|
|
90
|
-
minLength: 1,
|
|
91
|
-
source: function (request, response) {
|
|
92
|
-
//$.getJSON("csv", request, function( data, status, xhr ) {
|
|
93
|
-
$.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
|
|
94
|
-
response(
|
|
95
|
-
$.map(data, function (value, key) {
|
|
96
|
-
var sSearch = value.ga + " (" + value.devicename + ") DPT" + value.dpt;
|
|
97
|
-
if (fullSearch(sSearch, request.term + _additionalSearchTerm)) {
|
|
98
|
-
return {
|
|
99
|
-
label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
|
|
100
|
-
value: value.ga, // Value
|
|
101
|
-
};
|
|
102
|
-
} else {
|
|
103
|
-
return null;
|
|
104
|
-
}
|
|
105
|
-
})
|
|
106
|
-
);
|
|
107
|
-
});
|
|
108
|
-
},
|
|
109
|
-
select: function (event, ui) {
|
|
110
|
-
// Sets Datapoint and device name automatically
|
|
111
|
-
var sDevName = ui.item.label.split("#")[1].trim();
|
|
112
|
-
try {
|
|
113
|
-
sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
|
|
114
|
-
} catch (error) { }
|
|
115
|
-
$(_destinationWidgetName).val(sDevName);
|
|
116
|
-
var optVal = $(_destinationWidgetDPT + " option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr("value");
|
|
117
|
-
// Select the option value
|
|
118
|
-
$(_destinationWidgetDPT).val(optVal);
|
|
119
|
-
},
|
|
120
|
-
});
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
getDPT("1.", "#node-input-dptLightSwitch");
|
|
124
|
-
getGroupAddress("#node-input-GALightSwitch", "#node-input-nameLightSwitch", "#node-input-dptLightSwitch", " 1.");
|
|
125
|
-
|
|
126
|
-
getDPT("1.", "#node-input-dptLightState");
|
|
127
|
-
getGroupAddress("#node-input-GALightState", "#node-input-nameLightState", "#node-input-dptLightState", " 1.");
|
|
128
|
-
|
|
129
|
-
getDPT("3.007", "#node-input-dptLightDIM");
|
|
130
|
-
getGroupAddress("#node-input-GALightDIM", "#node-input-nameLightDIM", "#node-input-dptLightDIM", " 3.007");
|
|
131
|
-
|
|
132
|
-
getDPT("5.001", "#node-input-dptLightBrightness");
|
|
133
|
-
getGroupAddress("#node-input-GALightBrightness", "#node-input-nameLightBrightness", "#node-input-dptLightBrightness", " 5.001");
|
|
134
|
-
|
|
135
|
-
getDPT("5.001", "#node-input-dptLightBrightnessState");
|
|
136
|
-
getGroupAddress("#node-input-GALightBrightnessState", "#node-input-nameLightBrightnessState", "#node-input-dptLightBrightnessState", " 5.001");
|
|
137
|
-
|
|
138
|
-
getDPT("232.600", "#node-input-dptLightColor");
|
|
139
|
-
getGroupAddress("#node-input-GALightColor", "#node-input-nameLightColor", "#node-input-dptLightColor", " 232.600");
|
|
140
|
-
|
|
141
|
-
getDPT("232.600", "#node-input-dptLightColorState");
|
|
142
|
-
getGroupAddress("#node-input-GALightColorState", "#node-input-nameLightColorState", "#node-input-dptLightColorState", " 232.600");
|
|
143
|
-
|
|
144
|
-
getDPT("3.007", "#node-input-dptLightKelvinDIM");
|
|
145
|
-
getGroupAddress("#node-input-GALightKelvinDIM", "#node-input-nameLightKelvinDIM", "#node-input-dptLightKelvinDIM", " 3.007");
|
|
146
|
-
|
|
147
|
-
getDPT("5.001", "#node-input-dptLightKelvinPercentage");
|
|
148
|
-
getGroupAddress("#node-input-GALightKelvinPercentage", "#node-input-nameLightKelvinPercentage", "#node-input-dptLightKelvinPercentage", " 5.001");
|
|
149
|
-
|
|
150
|
-
getDPT("5.001", "#node-input-dptLightKelvinPercentageState");
|
|
151
|
-
getGroupAddress("#node-input-GALightKelvinPercentageState", "#node-input-nameLightKelvinPercentageState", "#node-input-dptLightKelvinPercentageState", " 5.001");
|
|
152
|
-
|
|
153
|
-
getDPT("1.", "#node-input-dptLightBlink");
|
|
154
|
-
getGroupAddress("#node-input-GALightBlink", "#node-input-nameLightBlink", "#node-input-dptLightBlink", " 1.");
|
|
155
|
-
|
|
156
|
-
getDPT("1.", "#node-input-dptLightColorCycle");
|
|
157
|
-
getGroupAddress("#node-input-GALightColorCycle", "#node-input-nameLightColorCycle", "#node-input-dptLightColorCycle", " 1.");
|
|
158
|
-
|
|
159
|
-
getDPT("1.", "#node-input-dptDaylightSensor");
|
|
160
|
-
getGroupAddress("#node-input-GADaylightSensor", "#node-input-nameDaylightSensor", "#node-input-dptDaylightSensor", " 1.");
|
|
161
|
-
|
|
162
|
-
getDPT("7.600", "#node-input-dptLightKelvin");
|
|
163
|
-
getGroupAddress("#node-input-GALightKelvin", "#node-input-nameLightKelvin", "#node-input-dptLightKelvin", " 7.600");
|
|
164
|
-
|
|
165
|
-
getDPT("7.600", "#node-input-dptLightKelvinState");
|
|
166
|
-
getGroupAddress("#node-input-GALightKelvinState", "#node-input-nameLightKelvinState", "#node-input-dptLightKelvinState", " 7.600");
|
|
167
|
-
|
|
168
|
-
getDPT("9.002", "#node-input-dptLightKelvin");
|
|
169
|
-
getGroupAddress("#node-input-GALightKelvin", "#node-input-nameLightKelvin", "#node-input-dptLightKelvin", " 9.002");
|
|
170
|
-
|
|
171
|
-
getDPT("9.002", "#node-input-dptLightKelvinState");
|
|
172
|
-
getGroupAddress("#node-input-GALightKelvinState", "#node-input-nameLightKelvinState", "#node-input-dptLightKelvinState", " 9.002");
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
// Get the HUE capabilities to enable/disable UI parts
|
|
176
|
-
var getJsonPromise;
|
|
177
|
-
if ($("#node-input-hueDevice").val() === '') {
|
|
178
|
-
$("#tabs").hide();
|
|
179
|
-
} else {
|
|
180
|
-
if (getJsonPromise !== undefined) getJsonPromise.abort();
|
|
181
|
-
getJsonPromise = $.getJSON("knxUltimateGetLightObject?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&" + { _: new Date().getTime() }, (data) => {
|
|
182
|
-
let oLight = data;
|
|
183
|
-
// Check if grouped, to hide/show the "Get current" buttons
|
|
184
|
-
if (oLight.type === "grouped_light") {
|
|
185
|
-
$("#tabs").tabs("enable", "#tabs-4");
|
|
186
|
-
$("#tabs").tabs("enable", "#tabs-3");
|
|
187
|
-
$("#tabs").tabs("enable", "#tabs-2");
|
|
188
|
-
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
189
|
-
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
190
|
-
$("#node-input-specifySwitchOnBrightness").empty().append(
|
|
191
|
-
$("<option>")
|
|
192
|
-
.val("no")
|
|
193
|
-
.text("None")
|
|
194
|
-
).append(
|
|
195
|
-
$("<option>")
|
|
196
|
-
.val("yes")
|
|
197
|
-
.text("Select color")
|
|
198
|
-
).append(
|
|
199
|
-
$("<option>")
|
|
200
|
-
.val("temperature")
|
|
201
|
-
.text("Select temperature and brightness")
|
|
202
|
-
);
|
|
203
|
-
$("#node-input-enableDayNightLighting").empty().append(
|
|
204
|
-
$("<option>")
|
|
205
|
-
.val("no")
|
|
206
|
-
.text("No")
|
|
207
|
-
).append(
|
|
208
|
-
$("<option>")
|
|
209
|
-
.val("yes")
|
|
210
|
-
.text("Select color")
|
|
211
|
-
).append(
|
|
212
|
-
$("<option>")
|
|
213
|
-
.val("temperature")
|
|
214
|
-
.text("Select temperature and brightness")
|
|
215
|
-
);
|
|
216
|
-
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
217
|
-
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
218
|
-
return;
|
|
219
|
-
} else {
|
|
220
|
-
|
|
221
|
-
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
222
|
-
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
223
|
-
$("#node-input-specifySwitchOnBrightness").empty().append(
|
|
224
|
-
$("<option>")
|
|
225
|
-
.val("no")
|
|
226
|
-
.text("None")
|
|
227
|
-
);
|
|
228
|
-
$("#node-input-enableDayNightLighting").empty().append(
|
|
229
|
-
$("<option>")
|
|
230
|
-
.val("no")
|
|
231
|
-
.text("No")
|
|
232
|
-
);
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
$("#tabs").tabs("disable", "#tabs-4");
|
|
236
|
-
$("#tabs").tabs("disable", "#tabs-3");
|
|
237
|
-
$("#tabs").tabs("disable", "#tabs-2");
|
|
238
|
-
$("#divColorsAtSwitchOn").hide();
|
|
239
|
-
$("#divColorsAtSwitchOnNightTime").hide();
|
|
240
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
241
|
-
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
242
|
-
$("#divColorCycle").hide();
|
|
243
|
-
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").hide();
|
|
244
|
-
$("#divBehaviourBrightness").hide();
|
|
245
|
-
$("#comboTemperatureAtSwitchOn").hide();
|
|
246
|
-
$("#comboTemperatureAtSwitchOnNightTime").hide();
|
|
247
|
-
|
|
248
|
-
// Enable options/tabs one by one
|
|
249
|
-
if (oLight.dimming !== undefined) {
|
|
250
|
-
$("#tabs").tabs("enable", "#tabs-2");
|
|
251
|
-
$("#divBehaviourBrightness").show();
|
|
252
|
-
}
|
|
253
|
-
if (oLight.color !== undefined) {
|
|
254
|
-
$("#tabs").tabs("enable", "#tabs-4");
|
|
255
|
-
$("#divColorsAtSwitchOn").show();
|
|
256
|
-
$("#divColorsAtSwitchOnNightTime").show();
|
|
257
|
-
$("#divColorCycle").show();
|
|
258
|
-
$("#node-input-specifySwitchOnBrightness").append(
|
|
259
|
-
$("<option>")
|
|
260
|
-
.val("yes")
|
|
261
|
-
.text("Select color")
|
|
262
|
-
);
|
|
263
|
-
$("#node-input-enableDayNightLighting").append(
|
|
264
|
-
$("<option>")
|
|
265
|
-
.val("yes")
|
|
266
|
-
.text("Select color")
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
// Check temperature (if the light supports temperature, it support dimming as well)
|
|
270
|
-
if (oLight.color_temperature !== undefined) {
|
|
271
|
-
$("#tabs").tabs("enable", "#tabs-3");
|
|
272
|
-
//$("#tabs").tabs("enable", "#tabs-2");
|
|
273
|
-
$("#node-input-specifySwitchOnBrightness").append(
|
|
274
|
-
$("<option>")
|
|
275
|
-
.val("temperature")
|
|
276
|
-
.text("Select temperature and brightness")
|
|
277
|
-
);
|
|
278
|
-
$("#node-input-enableDayNightLighting").append(
|
|
279
|
-
$("<option>")
|
|
280
|
-
.val("temperature")
|
|
281
|
-
.text("Select temperature and brightness")
|
|
282
|
-
);
|
|
283
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
284
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
285
|
-
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
286
|
-
$("#divBehaviourBrightness").show();
|
|
287
|
-
$("#comboTemperatureAtSwitchOn").show();
|
|
288
|
-
$("#comboTemperatureAtSwitchOnNightTime").show();
|
|
289
|
-
} else {
|
|
290
|
-
//$("#tabs").tabs("enable", "#tabs-2");
|
|
291
|
-
$("#node-input-specifySwitchOnBrightness").append(
|
|
292
|
-
$("<option>")
|
|
293
|
-
.val("temperature")
|
|
294
|
-
.text("Select brightness")
|
|
295
|
-
);
|
|
296
|
-
$("#node-input-enableDayNightLighting").append(
|
|
297
|
-
$("<option>")
|
|
298
|
-
.val("temperature")
|
|
299
|
-
.text("Select brightness")
|
|
300
|
-
);
|
|
301
|
-
$("#comboTemperatureAtSwitchOn").val(0);
|
|
302
|
-
$("#comboTemperatureAtSwitchOnNightTime").val(0);
|
|
303
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
304
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
305
|
-
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
306
|
-
//$("#divBehaviourBrightness").show();
|
|
307
|
-
}
|
|
308
|
-
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
309
|
-
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
310
|
-
});
|
|
311
|
-
setTimeout(function () { if (getJsonPromise !== undefined) getJsonPromise.abort(); }, 10000);
|
|
312
|
-
}
|
|
313
|
-
// Show/Hide the div of the color at swich on
|
|
314
|
-
if (node.specifySwitchOnBrightness === "yes") {
|
|
315
|
-
$("#divColorsAtSwitchOn").show();
|
|
316
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
317
|
-
} else if (node.specifySwitchOnBrightness === "temperature") {
|
|
318
|
-
$("#divColorsAtSwitchOn").hide();
|
|
319
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
320
|
-
} else {
|
|
321
|
-
$("#divColorsAtSwitchOn").hide();
|
|
322
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
$("#node-input-specifySwitchOnBrightness").on("change", function () {
|
|
326
|
-
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") {
|
|
327
|
-
$("#divColorsAtSwitchOn").show();
|
|
328
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
329
|
-
blinkBackground("#colorPickerDay");
|
|
330
|
-
} else if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") {
|
|
331
|
-
$("#divColorsAtSwitchOn").hide();
|
|
332
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
333
|
-
} else {
|
|
334
|
-
$("#divColorsAtSwitchOn").hide();
|
|
335
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
|
|
339
|
-
// Show/Hide and enable/disable day/night Lighting behaviour
|
|
340
|
-
if (node.enableDayNightLighting === "yes") {
|
|
341
|
-
$("#divEnableDayNightLighting").show();
|
|
342
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
343
|
-
$("#divColorsAtSwitchOnNightTime").show();
|
|
344
|
-
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
345
|
-
} else if (node.enableDayNightLighting === "temperature") {
|
|
346
|
-
$("#divEnableDayNightLighting").show();
|
|
347
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
348
|
-
$("#divColorsAtSwitchOnNightTime").hide();
|
|
349
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
350
|
-
} else {
|
|
351
|
-
$("#divEnableDayNightLighting").hide();
|
|
352
|
-
$("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
$("#node-input-enableDayNightLighting").on("change", function () {
|
|
356
|
-
if ($("#node-input-enableDayNightLighting").val() === "yes") {
|
|
357
|
-
$("#divEnableDayNightLighting").show();
|
|
358
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
359
|
-
$("#divColorsAtSwitchOnNightTime").show();
|
|
360
|
-
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
361
|
-
blinkBackground("#colorPickerNight")
|
|
362
|
-
$("#getColorAtSwitchOnDayTimeButton").text("Get current");
|
|
363
|
-
} else if ($("#node-input-enableDayNightLighting").val() === "temperature") {
|
|
364
|
-
$("#divEnableDayNightLighting").show();
|
|
365
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
366
|
-
$("#divColorsAtSwitchOnNightTime").hide();
|
|
367
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
368
|
-
} else {
|
|
369
|
-
$("#divEnableDayNightLighting").hide();
|
|
370
|
-
$("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
$("#getColorAtSwitchOnDayTimeButton").on("click", function () {
|
|
375
|
-
$("#getColorAtSwitchOnDayTimeButton").text("Wait...");
|
|
376
|
-
let jRet;
|
|
377
|
-
let sQuery;
|
|
378
|
-
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
379
|
-
if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
|
|
380
|
-
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
|
|
381
|
-
$("#node-input-colorAtSwitchOnDayTime").val(data);
|
|
382
|
-
$("#colorPickerDay").val(data);
|
|
383
|
-
blinkBackground("#colorPickerDay")
|
|
384
|
-
$("#getColorAtSwitchOnDayTimeButton").text("Get again");
|
|
385
|
-
});
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
$("#getColorAtSwitchOnNightTimeButton").on("click", function () {
|
|
389
|
-
$("#getColorAtSwitchOnNightTimeButton").text("Wait...");
|
|
390
|
-
let jRet;
|
|
391
|
-
let sQuery;
|
|
392
|
-
if ($("#node-input-enableDayNightLighting").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
393
|
-
if ($("#node-input-enableDayNightLighting").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
|
|
394
|
-
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
|
|
395
|
-
$("#node-input-colorAtSwitchOnNightTime").val(data);
|
|
396
|
-
$("#colorPickerNight").val(data);
|
|
397
|
-
blinkBackground("#colorPickerNight")
|
|
398
|
-
$("#getColorAtSwitchOnNightTimeButton").text("Get again");
|
|
399
|
-
});
|
|
400
|
-
});
|
|
401
|
-
|
|
402
|
-
// Fill options for minDimLevel and maxDimLevel and comboBrightnessAtSwitchOn (for color brightness at switch on, with temperature toghedher)
|
|
403
|
-
for (let index = 100; index >= 0; index -= 5) {
|
|
404
|
-
if (index === 0) {
|
|
405
|
-
$("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
406
|
-
$("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
407
|
-
$("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
408
|
-
} else {
|
|
409
|
-
$("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "%"));
|
|
410
|
-
$("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "%"));
|
|
411
|
-
$("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "%"));
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
// Temperatures, from 2000 to 6535K (circa)
|
|
415
|
-
for (let index = 2000; index <= 6500; index += 100) {
|
|
416
|
-
if (index === 2200) {
|
|
417
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (start of philips white ambiance lights range)"));
|
|
418
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (start of philips white ambiance lights range)"));
|
|
419
|
-
} else if (index === 2700) {
|
|
420
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (warm white, intimate, cozy, personal, for living rooms)"));
|
|
421
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (warm white, intimate, cozy, personal, for living rooms)"));
|
|
422
|
-
} else if (index === 3000) {
|
|
423
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (soft white, warm, calming, for bathrooms and kitchens)"));
|
|
424
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (soft white, warm, calming, for bathrooms and kitchens)"));
|
|
425
|
-
} else if (index === 3500) {
|
|
426
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (neutral white, balanced, friendly, inviting, for office spaces and retail)"));
|
|
427
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - neutral white, for office spaces and retail)"));
|
|
428
|
-
} else if (index === 4100) {
|
|
429
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (cool white, precise, clean, focused, for garages and grocery stores)"));
|
|
430
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - cool white, precise, clean, focused, for garages and grocery stores)"));
|
|
431
|
-
} else if (index === 5000) {
|
|
432
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (bright white, vibrant, crisp, for warehouses, sports stadiums and healthcare)"));
|
|
433
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - bright white, vibrant, crisp, for warehouses, sports stadiums and healthcare)"));
|
|
434
|
-
} else if (index === 6500) {
|
|
435
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (daylight, alert, energetic, for indoor agriculture)"));
|
|
436
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - daylight, alert, energetic, for indoor agriculture)"));
|
|
437
|
-
} else {
|
|
438
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K"));
|
|
439
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K"));
|
|
440
|
-
}
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
// Calculate kelvin/color
|
|
445
|
-
let json;
|
|
446
|
-
node.colorAtSwitchOnDayTime = node.colorAtSwitchOnDayTime.replace("geen", "green"); // Old bug in "geen" property
|
|
447
|
-
node.colorAtSwitchOnNightTime = node.colorAtSwitchOnNightTime.replace("geen", "green"); // Old bug in "geen" property
|
|
448
|
-
try {
|
|
449
|
-
json = JSON.parse(node.colorAtSwitchOnDayTime);
|
|
450
|
-
} catch (error) {
|
|
451
|
-
console.log("json = JSON.parse(node.colorAtSwitchOnDayTime) in HTML: " + error.message)
|
|
8
|
+
// 31/03/2020 Search Helper
|
|
9
|
+
function fullSearch(sourceText, searchString) {
|
|
10
|
+
// node searches for all words in a string
|
|
11
|
+
var aSearchWords = searchString.toLowerCase().split(" ");
|
|
12
|
+
var i = 0;
|
|
13
|
+
for (let index = 0; index < aSearchWords.length; index++) {
|
|
14
|
+
if (sourceText.toLowerCase().indexOf(aSearchWords[index]) > -1) i += 1;
|
|
452
15
|
}
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
$("#comboTemperatureAtSwitchOn").val(json.kelvin);
|
|
456
|
-
$("#comboBrightnessAtSwitchOn").val(json.brightness);
|
|
457
|
-
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
458
|
-
} else if (json !== undefined && json.red !== undefined) {
|
|
459
|
-
// Must transform RGB into HTML HEX color
|
|
460
|
-
try {
|
|
461
|
-
$("#node-input-colorAtSwitchOnDayTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
462
|
-
} catch (error) {
|
|
463
|
-
}
|
|
464
|
-
$("#colorPickerDay").val($("#node-input-colorAtSwitchOnDayTime").val());
|
|
465
|
-
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
466
|
-
} else {
|
|
467
|
-
// It's already an HEX color
|
|
468
|
-
$("#colorPickerDay").val(node.colorAtSwitchOnDayTime);
|
|
469
|
-
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
470
|
-
}
|
|
471
|
-
//Night
|
|
472
|
-
json = undefined;
|
|
473
|
-
try {
|
|
474
|
-
json = JSON.parse(node.colorAtSwitchOnNightTime);
|
|
475
|
-
} catch (error) { }
|
|
476
|
-
if (json !== undefined && json.kelvin !== undefined) {
|
|
477
|
-
// Kelvin
|
|
478
|
-
$("#comboTemperatureAtSwitchOnNightTime").val(json.kelvin);
|
|
479
|
-
$("#comboBrightnessAtSwitchOnNightTime").val(json.brightness);
|
|
480
|
-
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
481
|
-
} else if (json !== undefined && json.red !== undefined) {
|
|
482
|
-
// Must transform RGB into HTML HEX color
|
|
483
|
-
try {
|
|
484
|
-
$("#node-input-colorAtSwitchOnNightTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
485
|
-
} catch (error) {
|
|
486
|
-
}
|
|
487
|
-
$("#colorPickerNight").val($("#node-input-colorAtSwitchOnNightTime").val());
|
|
488
|
-
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
489
|
-
} else {
|
|
490
|
-
// It's already an HEX color
|
|
491
|
-
$("#colorPickerNight").val(node.colorAtSwitchOnNightTime);
|
|
492
|
-
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
$("#comboTemperatureAtSwitchOn, #comboBrightnessAtSwitchOn").on("change", function () {
|
|
497
|
-
$("#node-input-colorAtSwitchOnDayTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOn").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOn").val() + ' }');
|
|
498
|
-
});
|
|
499
|
-
$("#comboTemperatureAtSwitchOnNightTime, #comboBrightnessAtSwitchOnNightTime").on("change", function () {
|
|
500
|
-
$("#node-input-colorAtSwitchOnNightTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOnNightTime").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOnNightTime").val() + ' }');
|
|
501
|
-
});
|
|
502
|
-
|
|
503
|
-
// Create and put the JSON to node-input-colorAtSwitchOnDayTime
|
|
504
|
-
$("#colorPickerDay").on("change", function () {
|
|
505
|
-
$("#node-input-colorAtSwitchOnDayTime").val(this.value);
|
|
506
|
-
});
|
|
507
|
-
$("#colorPickerNight").on("change", function () {
|
|
508
|
-
$("#node-input-colorAtSwitchOnNightTime").val(this.value);
|
|
509
|
-
});
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
$("#node-input-minDimLevelLight").val(node.minDimLevelLight);
|
|
513
|
-
for (let index = 100; index >= 10; index--) {
|
|
514
|
-
$("#node-input-maxDimLevelLight").append(
|
|
515
|
-
$("<option>")
|
|
516
|
-
.val(index)
|
|
517
|
-
.text(index.toString() + "%")
|
|
518
|
-
);
|
|
519
|
-
}
|
|
520
|
-
$("#node-input-maxDimLevelLight").val(node.maxDimLevelLight);
|
|
521
|
-
|
|
522
|
-
if (node.hueDevice !== "") $("#tabs").show(); // Light options
|
|
523
|
-
|
|
16
|
+
return i == aSearchWords.length;
|
|
17
|
+
}
|
|
524
18
|
|
|
525
19
|
|
|
526
|
-
// Autocomplete suggestion with HUE Lights
|
|
527
|
-
$("#node-input-name").autocomplete({
|
|
528
|
-
minLength: 1,
|
|
529
|
-
source: function (request, response) {
|
|
530
|
-
$.getJSON("KNXUltimateGetResourcesHUE?rtype=light&nodeID=" + oNodeServerHue.id + "&" + { _: new Date().getTime() }, (data) => {
|
|
531
|
-
response(
|
|
532
|
-
$.map(data.devices, function (value, key) {
|
|
533
|
-
//alert(JSON.stringify(value) + " "+ key)
|
|
534
|
-
var sSearch = value.name;
|
|
535
|
-
if (!value.name.includes("I'm still connecting")) {
|
|
536
|
-
if (fullSearch(sSearch, request.term)) {
|
|
537
|
-
return {
|
|
538
|
-
hueDevice: value.id,
|
|
539
|
-
value: value.name,
|
|
540
|
-
};
|
|
541
|
-
} else {
|
|
542
|
-
return null;
|
|
543
|
-
}
|
|
544
|
-
} else {
|
|
545
|
-
return {
|
|
546
|
-
hueDevice: value.id,
|
|
547
|
-
value: value.name,
|
|
548
|
-
};
|
|
549
|
-
}
|
|
550
|
-
})
|
|
551
|
-
);
|
|
552
|
-
});
|
|
553
|
-
},
|
|
554
|
-
select: function (event, ui) {
|
|
555
|
-
// Distinguish between group of lights an single light.
|
|
556
|
-
if (ui.item.value.toLowerCase().startsWith("grouped_light")) {
|
|
557
|
-
$("#node-input-hueDevice").val(ui.item.hueDevice + "#grouped_light");
|
|
558
|
-
} else {
|
|
559
|
-
$("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
|
|
560
|
-
}
|
|
561
|
-
onEditPrepare(node);
|
|
562
|
-
//$("#tabs").show();
|
|
563
|
-
},
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
20
|
|
|
567
21
|
RED.nodes.registerType("knxUltimateHueLight", {
|
|
568
22
|
category: "KNX Ultimate",
|
|
@@ -663,26 +117,611 @@
|
|
|
663
117
|
},
|
|
664
118
|
paletteLabel: "Hue Light",
|
|
665
119
|
oneditprepare: function () {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
120
|
+
|
|
121
|
+
var node = this;
|
|
122
|
+
|
|
123
|
+
function onEditPrepare() {
|
|
124
|
+
// TIMER BLINK ####################################################
|
|
125
|
+
let blinkStatus = 2;
|
|
126
|
+
let timerBlinkBackground;
|
|
127
|
+
function blinkBackground(_elementIDwithHashAtTheBeginning) {
|
|
128
|
+
if (timerBlinkBackground !== undefined) clearInterval(timerBlinkBackground);
|
|
129
|
+
timerBlinkBackground = setInterval(() => {
|
|
130
|
+
if (isEven(blinkStatus)) $(_elementIDwithHashAtTheBeginning).css("background-color", "lightgreen");
|
|
131
|
+
if (!isEven(blinkStatus)) $(_elementIDwithHashAtTheBeginning).css("background-color", "");
|
|
132
|
+
blinkStatus += 1;
|
|
133
|
+
if (blinkStatus >= 14) {
|
|
134
|
+
clearInterval(timerBlinkBackground);
|
|
135
|
+
blinkStatus = 2;
|
|
136
|
+
$(_elementIDwithHashAtTheBeginning).css("background-color", "");
|
|
137
|
+
}
|
|
138
|
+
}, 100);
|
|
139
|
+
}
|
|
140
|
+
function isEven(n) {
|
|
141
|
+
return (n % 2 == 0);
|
|
142
|
+
}
|
|
143
|
+
// ################################################################
|
|
144
|
+
|
|
145
|
+
$("#tabs").tabs(); // Tabs gestione KNX
|
|
146
|
+
|
|
147
|
+
function getDPT(_dpt, _destinationWidget) {
|
|
148
|
+
// DPT Switch command
|
|
149
|
+
// ########################
|
|
150
|
+
$(_destinationWidget).empty();
|
|
151
|
+
$.getJSON("knxUltimateDpts?serverId=" + $("#node-input-server").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
152
|
+
data.forEach((dpt) => {
|
|
153
|
+
if (dpt.value.startsWith(_dpt)) {
|
|
154
|
+
// Adjustment for HUE Temperature
|
|
155
|
+
if (dpt.value.startsWith("7.600")) {
|
|
156
|
+
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - KNX Kelvin range 2000-6535k (Homeassistant color_temperature_mode: absolute)"));
|
|
157
|
+
} else if (dpt.value.startsWith("9.002")) {
|
|
158
|
+
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - HUE Kelvin range 2000-6535k (Homeassistant color_temperature_mode: absolute_float)"));
|
|
159
|
+
} else if (dpt.value.startsWith("5.001")) {
|
|
160
|
+
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text + " - Homeassistant color_temperature_mode: relative"));
|
|
161
|
+
} else {
|
|
162
|
+
$(_destinationWidget).append($("<option></option>").attr("value", dpt.value).text(dpt.text));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
// Eval
|
|
167
|
+
const format = "node." + _destinationWidget.replace("#node-input-", "");
|
|
168
|
+
try {
|
|
169
|
+
if (format !== undefined) $(_destinationWidget).val(eval(format).toString());
|
|
170
|
+
} catch (error) { }
|
|
171
|
+
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
function getGroupAddress(_sourceWidgetAutocomplete, _destinationWidgetName, _destinationWidgetDPT, _additionalSearchTerm) {
|
|
176
|
+
$(_sourceWidgetAutocomplete).autocomplete({
|
|
177
|
+
minLength: 1,
|
|
178
|
+
source: function (request, response) {
|
|
179
|
+
//$.getJSON("csv", request, function( data, status, xhr ) {
|
|
180
|
+
$.getJSON("knxUltimatecsv?nodeID=" + $("#node-input-server").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
181
|
+
response(
|
|
182
|
+
$.map(data, function (value, key) {
|
|
183
|
+
var sSearch = value.ga + " (" + value.devicename + ") DPT" + value.dpt;
|
|
184
|
+
for (let index = 0; index < _additionalSearchTerm.length; index++) {
|
|
185
|
+
const sDPT = _additionalSearchTerm[index];
|
|
186
|
+
if (fullSearch(sSearch, request.term + " " + sDPT)) {
|
|
187
|
+
return {
|
|
188
|
+
label: value.ga + " # " + value.devicename + " # " + value.dpt, // Label for Display
|
|
189
|
+
value: value.ga, // Value
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
})
|
|
194
|
+
);
|
|
195
|
+
});
|
|
196
|
+
},
|
|
197
|
+
select: function (event, ui) {
|
|
198
|
+
// Sets Datapoint and device name automatically
|
|
199
|
+
var sDevName = ui.item.label.split("#")[1].trim();
|
|
200
|
+
try {
|
|
201
|
+
sDevName = sDevName.substr(sDevName.indexOf(")") + 1).trim();
|
|
202
|
+
} catch (error) { }
|
|
203
|
+
$(_destinationWidgetName).val(sDevName);
|
|
204
|
+
var optVal = $(_destinationWidgetDPT + " option:contains('" + ui.item.label.split("#")[2].trim() + "')").attr("value");
|
|
205
|
+
// Select the option value
|
|
206
|
+
$(_destinationWidgetDPT).val(optVal);
|
|
207
|
+
},
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
getDPT("1.", "#node-input-dptLightSwitch");
|
|
212
|
+
getGroupAddress("#node-input-GALightSwitch", "#node-input-nameLightSwitch", "#node-input-dptLightSwitch", ["1."]);
|
|
213
|
+
|
|
214
|
+
getDPT("1.", "#node-input-dptLightState");
|
|
215
|
+
getGroupAddress("#node-input-GALightState", "#node-input-nameLightState", "#node-input-dptLightState", ["1."]);
|
|
216
|
+
|
|
217
|
+
getDPT("3.007", "#node-input-dptLightDIM");
|
|
218
|
+
getGroupAddress("#node-input-GALightDIM", "#node-input-nameLightDIM", "#node-input-dptLightDIM", ["3.007"]);
|
|
219
|
+
|
|
220
|
+
getDPT("5.001", "#node-input-dptLightBrightness");
|
|
221
|
+
getGroupAddress("#node-input-GALightBrightness", "#node-input-nameLightBrightness", "#node-input-dptLightBrightness", ["5.001"]);
|
|
222
|
+
|
|
223
|
+
getDPT("5.001", "#node-input-dptLightBrightnessState");
|
|
224
|
+
getGroupAddress("#node-input-GALightBrightnessState", "#node-input-nameLightBrightnessState", "#node-input-dptLightBrightnessState", ["5.001"]);
|
|
225
|
+
|
|
226
|
+
getDPT("232.600", "#node-input-dptLightColor");
|
|
227
|
+
getGroupAddress("#node-input-GALightColor", "#node-input-nameLightColor", "#node-input-dptLightColor", ["232.600"]);
|
|
228
|
+
|
|
229
|
+
getDPT("232.600", "#node-input-dptLightColorState");
|
|
230
|
+
getGroupAddress("#node-input-GALightColorState", "#node-input-nameLightColorState", "#node-input-dptLightColorState", ["232.600"]);
|
|
231
|
+
|
|
232
|
+
getDPT("3.007", "#node-input-dptLightKelvinDIM");
|
|
233
|
+
getGroupAddress("#node-input-GALightKelvinDIM", "#node-input-nameLightKelvinDIM", "#node-input-dptLightKelvinDIM", ["3.007"]);
|
|
234
|
+
|
|
235
|
+
getDPT("5.001", "#node-input-dptLightKelvinPercentage");
|
|
236
|
+
getGroupAddress("#node-input-GALightKelvinPercentage", "#node-input-nameLightKelvinPercentage", "#node-input-dptLightKelvinPercentage", ["5.001"]);
|
|
237
|
+
|
|
238
|
+
getDPT("5.001", "#node-input-dptLightKelvinPercentageState");
|
|
239
|
+
getGroupAddress("#node-input-GALightKelvinPercentageState", "#node-input-nameLightKelvinPercentageState", "#node-input-dptLightKelvinPercentageState", ["5.001"]);
|
|
240
|
+
|
|
241
|
+
getDPT("1.", "#node-input-dptLightBlink");
|
|
242
|
+
getGroupAddress("#node-input-GALightBlink", "#node-input-nameLightBlink", "#node-input-dptLightBlink", ["1."]);
|
|
243
|
+
|
|
244
|
+
getDPT("1.", "#node-input-dptLightColorCycle");
|
|
245
|
+
getGroupAddress("#node-input-GALightColorCycle", "#node-input-nameLightColorCycle", "#node-input-dptLightColorCycle", ["1."]);
|
|
246
|
+
|
|
247
|
+
getDPT("1.", "#node-input-dptDaylightSensor");
|
|
248
|
+
getGroupAddress("#node-input-GADaylightSensor", "#node-input-nameDaylightSensor", "#node-input-dptDaylightSensor", ["1."]);
|
|
249
|
+
|
|
250
|
+
getDPT("7.600", "#node-input-dptLightKelvin");
|
|
251
|
+
getDPT("9.002", "#node-input-dptLightKelvin");
|
|
252
|
+
getDPT("9.002", "#node-input-dptLightKelvinState");
|
|
253
|
+
getDPT("7.600", "#node-input-dptLightKelvinState");
|
|
254
|
+
getGroupAddress("#node-input-GALightKelvin", "#node-input-nameLightKelvin", "#node-input-dptLightKelvin", ["7.600", "9.002"]);
|
|
255
|
+
getGroupAddress("#node-input-GALightKelvinState", "#node-input-nameLightKelvinState", "#node-input-dptLightKelvinState", ["7.600", "9.002"]);
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
// Get the HUE capabilities to enable/disable UI parts
|
|
259
|
+
var getJsonPromise;
|
|
260
|
+
if ($("#node-input-hueDevice").val() === '') {
|
|
261
|
+
$("#tabs").hide();
|
|
262
|
+
return;
|
|
263
|
+
} else {
|
|
264
|
+
$("#tabs").show();
|
|
265
|
+
if (getJsonPromise !== undefined) getJsonPromise.abort();
|
|
266
|
+
getJsonPromise = $.getJSON("knxUltimateGetLightObject?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
267
|
+
let oLight = data;
|
|
268
|
+
// Check if grouped, to hide/show the "Get current" buttons
|
|
269
|
+
if (oLight.type === "grouped_light") {
|
|
270
|
+
$("#tabs").tabs("enable", "#tabs-4");
|
|
271
|
+
$("#tabs").tabs("enable", "#tabs-3");
|
|
272
|
+
$("#tabs").tabs("enable", "#tabs-2");
|
|
273
|
+
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
274
|
+
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
275
|
+
$("#node-input-specifySwitchOnBrightness").empty().append(
|
|
276
|
+
$("<option>")
|
|
277
|
+
.val("no")
|
|
278
|
+
.text("None")
|
|
279
|
+
).append(
|
|
280
|
+
$("<option>")
|
|
281
|
+
.val("yes")
|
|
282
|
+
.text("Select color")
|
|
283
|
+
).append(
|
|
284
|
+
$("<option>")
|
|
285
|
+
.val("temperature")
|
|
286
|
+
.text("Select temperature and brightness")
|
|
287
|
+
);
|
|
288
|
+
$("#node-input-enableDayNightLighting").empty().append(
|
|
289
|
+
$("<option>")
|
|
290
|
+
.val("no")
|
|
291
|
+
.text("No")
|
|
292
|
+
).append(
|
|
293
|
+
$("<option>")
|
|
294
|
+
.val("yes")
|
|
295
|
+
.text("Select color")
|
|
296
|
+
).append(
|
|
297
|
+
$("<option>")
|
|
298
|
+
.val("temperature")
|
|
299
|
+
.text("Select temperature and brightness")
|
|
300
|
+
);
|
|
301
|
+
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
302
|
+
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
303
|
+
return;
|
|
304
|
+
} else {
|
|
305
|
+
|
|
306
|
+
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
307
|
+
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
308
|
+
$("#node-input-specifySwitchOnBrightness").empty().append(
|
|
309
|
+
$("<option>")
|
|
310
|
+
.val("no")
|
|
311
|
+
.text("None")
|
|
312
|
+
);
|
|
313
|
+
$("#node-input-enableDayNightLighting").empty().append(
|
|
314
|
+
$("<option>")
|
|
315
|
+
.val("no")
|
|
316
|
+
.text("No")
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
$("#tabs").tabs("disable", "#tabs-4");
|
|
321
|
+
$("#tabs").tabs("disable", "#tabs-3");
|
|
322
|
+
$("#tabs").tabs("disable", "#tabs-2");
|
|
323
|
+
$("#divColorsAtSwitchOn").hide();
|
|
324
|
+
$("#divColorsAtSwitchOnNightTime").hide();
|
|
325
|
+
$("#divTemperatureAtSwitchOn").hide();
|
|
326
|
+
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
327
|
+
$("#divColorCycle").hide();
|
|
328
|
+
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").hide();
|
|
329
|
+
$("#divBehaviourBrightness").hide();
|
|
330
|
+
$("#comboTemperatureAtSwitchOn").hide();
|
|
331
|
+
$("#comboTemperatureAtSwitchOnNightTime").hide();
|
|
332
|
+
|
|
333
|
+
// Enable options/tabs one by one
|
|
334
|
+
if (oLight.dimming !== undefined) {
|
|
335
|
+
$("#tabs").tabs("enable", "#tabs-2");
|
|
336
|
+
$("#divBehaviourBrightness").show();
|
|
337
|
+
}
|
|
338
|
+
if (oLight.color !== undefined) {
|
|
339
|
+
$("#tabs").tabs("enable", "#tabs-4");
|
|
340
|
+
$("#divColorsAtSwitchOn").show();
|
|
341
|
+
$("#divColorsAtSwitchOnNightTime").show();
|
|
342
|
+
$("#divColorCycle").show();
|
|
343
|
+
$("#node-input-specifySwitchOnBrightness").append(
|
|
344
|
+
$("<option>")
|
|
345
|
+
.val("yes")
|
|
346
|
+
.text("Select color")
|
|
347
|
+
);
|
|
348
|
+
$("#node-input-enableDayNightLighting").append(
|
|
349
|
+
$("<option>")
|
|
350
|
+
.val("yes")
|
|
351
|
+
.text("Select color")
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
// Check temperature (if the light supports temperature, it support dimming as well)
|
|
355
|
+
if (oLight.color_temperature !== undefined) {
|
|
356
|
+
$("#tabs").tabs("enable", "#tabs-3");
|
|
357
|
+
//$("#tabs").tabs("enable", "#tabs-2");
|
|
358
|
+
$("#node-input-specifySwitchOnBrightness").append(
|
|
359
|
+
$("<option>")
|
|
360
|
+
.val("temperature")
|
|
361
|
+
.text("Select temperature and brightness")
|
|
362
|
+
);
|
|
363
|
+
$("#node-input-enableDayNightLighting").append(
|
|
364
|
+
$("<option>")
|
|
365
|
+
.val("temperature")
|
|
366
|
+
.text("Select temperature and brightness")
|
|
367
|
+
);
|
|
368
|
+
$("#divTemperatureAtSwitchOn").show();
|
|
369
|
+
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
370
|
+
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
371
|
+
$("#divBehaviourBrightness").show();
|
|
372
|
+
$("#comboTemperatureAtSwitchOn").show();
|
|
373
|
+
$("#comboTemperatureAtSwitchOnNightTime").show();
|
|
374
|
+
} else {
|
|
375
|
+
//$("#tabs").tabs("enable", "#tabs-2");
|
|
376
|
+
$("#node-input-specifySwitchOnBrightness").append(
|
|
377
|
+
$("<option>")
|
|
378
|
+
.val("temperature")
|
|
379
|
+
.text("Select brightness")
|
|
380
|
+
);
|
|
381
|
+
$("#node-input-enableDayNightLighting").append(
|
|
382
|
+
$("<option>")
|
|
383
|
+
.val("temperature")
|
|
384
|
+
.text("Select brightness")
|
|
385
|
+
);
|
|
386
|
+
$("#comboTemperatureAtSwitchOn").val(0);
|
|
387
|
+
$("#comboTemperatureAtSwitchOnNightTime").val(0);
|
|
388
|
+
$("#divTemperatureAtSwitchOn").show();
|
|
389
|
+
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
390
|
+
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
391
|
+
//$("#divBehaviourBrightness").show();
|
|
392
|
+
}
|
|
393
|
+
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
394
|
+
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
395
|
+
});
|
|
396
|
+
setTimeout(function () { if (getJsonPromise !== undefined) getJsonPromise.abort(); }, 10000);
|
|
397
|
+
}
|
|
398
|
+
// Show/Hide the div of the color at swich on
|
|
399
|
+
if (node.specifySwitchOnBrightness === "yes") {
|
|
400
|
+
$("#divColorsAtSwitchOn").show();
|
|
401
|
+
$("#divTemperatureAtSwitchOn").hide();
|
|
402
|
+
} else if (node.specifySwitchOnBrightness === "temperature") {
|
|
403
|
+
$("#divColorsAtSwitchOn").hide();
|
|
404
|
+
$("#divTemperatureAtSwitchOn").show();
|
|
405
|
+
} else {
|
|
406
|
+
$("#divColorsAtSwitchOn").hide();
|
|
407
|
+
$("#divTemperatureAtSwitchOn").hide();
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
$("#node-input-specifySwitchOnBrightness").on("change", function () {
|
|
411
|
+
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") {
|
|
412
|
+
$("#divColorsAtSwitchOn").show();
|
|
413
|
+
$("#divTemperatureAtSwitchOn").hide();
|
|
414
|
+
blinkBackground("#colorPickerDay");
|
|
415
|
+
} else if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") {
|
|
416
|
+
$("#divColorsAtSwitchOn").hide();
|
|
417
|
+
$("#divTemperatureAtSwitchOn").show();
|
|
418
|
+
} else {
|
|
419
|
+
$("#divColorsAtSwitchOn").hide();
|
|
420
|
+
$("#divTemperatureAtSwitchOn").hide();
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
// Show/Hide and enable/disable day/night Lighting behaviour
|
|
425
|
+
if (node.enableDayNightLighting === "yes") {
|
|
426
|
+
$("#divEnableDayNightLighting").show();
|
|
427
|
+
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
428
|
+
$("#divColorsAtSwitchOnNightTime").show();
|
|
429
|
+
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
430
|
+
} else if (node.enableDayNightLighting === "temperature") {
|
|
431
|
+
$("#divEnableDayNightLighting").show();
|
|
432
|
+
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
433
|
+
$("#divColorsAtSwitchOnNightTime").hide();
|
|
434
|
+
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
435
|
+
} else {
|
|
436
|
+
$("#divEnableDayNightLighting").hide();
|
|
437
|
+
$("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
$("#node-input-enableDayNightLighting").on("change", function () {
|
|
441
|
+
if ($("#node-input-enableDayNightLighting").val() === "yes") {
|
|
442
|
+
$("#divEnableDayNightLighting").show();
|
|
443
|
+
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
444
|
+
$("#divColorsAtSwitchOnNightTime").show();
|
|
445
|
+
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
446
|
+
blinkBackground("#colorPickerNight")
|
|
447
|
+
$("#getColorAtSwitchOnDayTimeButton").text("Get current");
|
|
448
|
+
} else if ($("#node-input-enableDayNightLighting").val() === "temperature") {
|
|
449
|
+
$("#divEnableDayNightLighting").show();
|
|
450
|
+
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
451
|
+
$("#divColorsAtSwitchOnNightTime").hide();
|
|
452
|
+
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
453
|
+
} else {
|
|
454
|
+
$("#divEnableDayNightLighting").hide();
|
|
455
|
+
$("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
|
|
459
|
+
$("#getColorAtSwitchOnDayTimeButton").on("click", function () {
|
|
460
|
+
$("#getColorAtSwitchOnDayTimeButton").text("Wait...");
|
|
461
|
+
let jRet;
|
|
462
|
+
let sQuery;
|
|
463
|
+
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
464
|
+
if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
|
|
465
|
+
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
466
|
+
$("#node-input-colorAtSwitchOnDayTime").val(data);
|
|
467
|
+
$("#colorPickerDay").val(data);
|
|
468
|
+
blinkBackground("#colorPickerDay")
|
|
469
|
+
$("#getColorAtSwitchOnDayTimeButton").text("Get again");
|
|
470
|
+
});
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
$("#getColorAtSwitchOnNightTimeButton").on("click", function () {
|
|
474
|
+
$("#getColorAtSwitchOnNightTimeButton").text("Wait...");
|
|
475
|
+
let jRet;
|
|
476
|
+
let sQuery;
|
|
477
|
+
if ($("#node-input-enableDayNightLighting").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
478
|
+
if ($("#node-input-enableDayNightLighting").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
|
|
479
|
+
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&" + { _: new Date().getTime() }, (data) => {
|
|
480
|
+
$("#node-input-colorAtSwitchOnNightTime").val(data);
|
|
481
|
+
$("#colorPickerNight").val(data);
|
|
482
|
+
blinkBackground("#colorPickerNight")
|
|
483
|
+
$("#getColorAtSwitchOnNightTimeButton").text("Get again");
|
|
484
|
+
});
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
// Fill options for minDimLevel and maxDimLevel and comboBrightnessAtSwitchOn (for color brightness at switch on, with temperature toghedher)
|
|
488
|
+
for (let index = 100; index >= 0; index -= 5) {
|
|
489
|
+
if (index === 0) {
|
|
490
|
+
$("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
491
|
+
$("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
492
|
+
$("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
493
|
+
} else {
|
|
494
|
+
$("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "%"));
|
|
495
|
+
$("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "%"));
|
|
496
|
+
$("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "%"));
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
// Temperatures, from 2000 to 6535K (circa)
|
|
500
|
+
for (let index = 2000; index <= 6500; index += 100) {
|
|
501
|
+
if (index === 2200) {
|
|
502
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (start of philips white ambiance lights range)"));
|
|
503
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (start of philips white ambiance lights range)"));
|
|
504
|
+
} else if (index === 2700) {
|
|
505
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (warm white, intimate, cozy, personal, for living rooms)"));
|
|
506
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (warm white, intimate, cozy, personal, for living rooms)"));
|
|
507
|
+
} else if (index === 3000) {
|
|
508
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (soft white, warm, calming, for bathrooms and kitchens)"));
|
|
509
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (soft white, warm, calming, for bathrooms and kitchens)"));
|
|
510
|
+
} else if (index === 3500) {
|
|
511
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (neutral white, balanced, friendly, inviting, for office spaces and retail)"));
|
|
512
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - neutral white, for office spaces and retail)"));
|
|
513
|
+
} else if (index === 4100) {
|
|
514
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (cool white, precise, clean, focused, for garages and grocery stores)"));
|
|
515
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - cool white, precise, clean, focused, for garages and grocery stores)"));
|
|
516
|
+
} else if (index === 5000) {
|
|
517
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (bright white, vibrant, crisp, for warehouses, sports stadiums and healthcare)"));
|
|
518
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - bright white, vibrant, crisp, for warehouses, sports stadiums and healthcare)"));
|
|
519
|
+
} else if (index === 6500) {
|
|
520
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (daylight, alert, energetic, for indoor agriculture)"));
|
|
521
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - daylight, alert, energetic, for indoor agriculture)"));
|
|
522
|
+
} else {
|
|
523
|
+
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K"));
|
|
524
|
+
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K"));
|
|
525
|
+
}
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
// Calculate kelvin/color
|
|
530
|
+
let json;
|
|
531
|
+
node.colorAtSwitchOnDayTime = node.colorAtSwitchOnDayTime.replace("geen", "green"); // Old bug in "geen" property
|
|
532
|
+
node.colorAtSwitchOnNightTime = node.colorAtSwitchOnNightTime.replace("geen", "green"); // Old bug in "geen" property
|
|
680
533
|
try {
|
|
681
|
-
node.
|
|
534
|
+
json = JSON.parse(node.colorAtSwitchOnDayTime);
|
|
682
535
|
} catch (error) {
|
|
536
|
+
console.log("json = JSON.parse(node.colorAtSwitchOnDayTime) in HTML: " + error.message)
|
|
537
|
+
}
|
|
538
|
+
if (json !== undefined && json.kelvin !== undefined) {
|
|
539
|
+
// Kelvin
|
|
540
|
+
$("#comboTemperatureAtSwitchOn").val(json.kelvin);
|
|
541
|
+
$("#comboBrightnessAtSwitchOn").val(json.brightness);
|
|
542
|
+
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
543
|
+
} else if (json !== undefined && json.red !== undefined) {
|
|
544
|
+
// Must transform RGB into HTML HEX color
|
|
545
|
+
try {
|
|
546
|
+
$("#node-input-colorAtSwitchOnDayTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
547
|
+
} catch (error) {
|
|
548
|
+
}
|
|
549
|
+
$("#colorPickerDay").val($("#node-input-colorAtSwitchOnDayTime").val());
|
|
550
|
+
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
551
|
+
} else {
|
|
552
|
+
// It's already an HEX color
|
|
553
|
+
$("#colorPickerDay").val(node.colorAtSwitchOnDayTime);
|
|
554
|
+
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
555
|
+
}
|
|
556
|
+
//Night
|
|
557
|
+
json = undefined;
|
|
558
|
+
try {
|
|
559
|
+
json = JSON.parse(node.colorAtSwitchOnNightTime);
|
|
560
|
+
} catch (error) { }
|
|
561
|
+
if (json !== undefined && json.kelvin !== undefined) {
|
|
562
|
+
// Kelvin
|
|
563
|
+
$("#comboTemperatureAtSwitchOnNightTime").val(json.kelvin);
|
|
564
|
+
$("#comboBrightnessAtSwitchOnNightTime").val(json.brightness);
|
|
565
|
+
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
566
|
+
} else if (json !== undefined && json.red !== undefined) {
|
|
567
|
+
// Must transform RGB into HTML HEX color
|
|
568
|
+
try {
|
|
569
|
+
$("#node-input-colorAtSwitchOnNightTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
570
|
+
} catch (error) {
|
|
571
|
+
}
|
|
572
|
+
$("#colorPickerNight").val($("#node-input-colorAtSwitchOnNightTime").val());
|
|
573
|
+
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
574
|
+
} else {
|
|
575
|
+
// It's already an HEX color
|
|
576
|
+
$("#colorPickerNight").val(node.colorAtSwitchOnNightTime);
|
|
577
|
+
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
683
578
|
}
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
$("#comboTemperatureAtSwitchOn, #comboBrightnessAtSwitchOn").on("change", function () {
|
|
582
|
+
$("#node-input-colorAtSwitchOnDayTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOn").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOn").val() + ' }');
|
|
583
|
+
});
|
|
584
|
+
$("#comboTemperatureAtSwitchOnNightTime, #comboBrightnessAtSwitchOnNightTime").on("change", function () {
|
|
585
|
+
$("#node-input-colorAtSwitchOnNightTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOnNightTime").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOnNightTime").val() + ' }');
|
|
586
|
+
});
|
|
587
|
+
|
|
588
|
+
// Create and put the JSON to node-input-colorAtSwitchOnDayTime
|
|
589
|
+
$("#colorPickerDay").on("change", function () {
|
|
590
|
+
$("#node-input-colorAtSwitchOnDayTime").val(this.value);
|
|
591
|
+
});
|
|
592
|
+
$("#colorPickerNight").on("change", function () {
|
|
593
|
+
$("#node-input-colorAtSwitchOnNightTime").val(this.value);
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
$("#node-input-minDimLevelLight").val(node.minDimLevelLight);
|
|
598
|
+
for (let index = 100; index >= 10; index--) {
|
|
599
|
+
$("#node-input-maxDimLevelLight").append(
|
|
600
|
+
$("<option>")
|
|
601
|
+
.val(index)
|
|
602
|
+
.text(index.toString() + "%")
|
|
603
|
+
);
|
|
604
|
+
}
|
|
605
|
+
$("#node-input-maxDimLevelLight").val(node.maxDimLevelLight);
|
|
606
|
+
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
function Go() {
|
|
610
|
+
$("#waitWindow").hide();
|
|
611
|
+
$("#mainWindow").show();
|
|
612
|
+
// $.post("banana", { func: "getNameAndTime" }, function (data) {
|
|
613
|
+
// //alert(data.body); // John
|
|
614
|
+
// }, "json");
|
|
615
|
+
try {
|
|
616
|
+
RED.sidebar.show("help");
|
|
617
|
+
} catch (error) { }
|
|
618
|
+
onEditPrepare();
|
|
619
|
+
node.yamlEditor = RED.editor.createEditor({
|
|
620
|
+
id: 'aceEditor',
|
|
621
|
+
mode: 'ace/mode/text'
|
|
622
|
+
});
|
|
623
|
+
node.yamlEditor.session.setValue(yamelize());
|
|
624
|
+
$('[id*="node-input-"]').on('keyup change autocompletechange', function () {
|
|
625
|
+
try {
|
|
626
|
+
node.yamlEditor.session.setValue(yamelize());
|
|
627
|
+
} catch (error) {
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
// 19/02/2020 Used to get the server sooner als deploy.
|
|
634
|
+
$("#node-input-serverHue").change(function () {
|
|
635
|
+
try {
|
|
636
|
+
if ($("#node-input-serverHue").val() !== "_ADD_") {
|
|
637
|
+
$("#waitWindow").show();
|
|
638
|
+
$("#mainWindow").hide();
|
|
639
|
+
checkConnection();
|
|
640
|
+
} else {
|
|
641
|
+
Go();
|
|
642
|
+
}
|
|
643
|
+
} catch (error) { }
|
|
684
644
|
});
|
|
645
|
+
|
|
646
|
+
// Autocomplete suggestion with HUE Lights
|
|
647
|
+
$("#node-input-name").autocomplete({
|
|
648
|
+
minLength: 1,
|
|
649
|
+
source: function (request, response) {
|
|
650
|
+
$.getJSON("KNXUltimateGetResourcesHUE?rtype=light&serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
651
|
+
response(
|
|
652
|
+
$.map(data.devices, function (value, key) {
|
|
653
|
+
var sSearch = value.name;
|
|
654
|
+
if (!value.name.includes("I'm still connecting")) {
|
|
655
|
+
if (fullSearch(sSearch, request.term)) {
|
|
656
|
+
return {
|
|
657
|
+
hueDevice: value.id,
|
|
658
|
+
value: value.name,
|
|
659
|
+
};
|
|
660
|
+
} else {
|
|
661
|
+
return null;
|
|
662
|
+
}
|
|
663
|
+
} else {
|
|
664
|
+
return {
|
|
665
|
+
hueDevice: value.id,
|
|
666
|
+
value: value.name,
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
})
|
|
670
|
+
);
|
|
671
|
+
});
|
|
672
|
+
},
|
|
673
|
+
select: function (event, ui) {
|
|
674
|
+
// Distinguish between group of lights an single light.
|
|
675
|
+
if (ui.item.value.toLowerCase().startsWith("grouped_light")) {
|
|
676
|
+
$("#node-input-hueDevice").val(ui.item.hueDevice + "#grouped_light");
|
|
677
|
+
} else {
|
|
678
|
+
$("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
|
|
679
|
+
}
|
|
680
|
+
Go();
|
|
681
|
+
}
|
|
682
|
+
});
|
|
683
|
+
|
|
684
|
+
// Timer connection to backend ####################################################
|
|
685
|
+
this.timerWaitBackEnd;
|
|
686
|
+
let timerWaitBackEndCounter = 0;
|
|
687
|
+
function checkConnection() {
|
|
688
|
+
if (this.timerBlinkBackground !== undefined) clearTimeout(this.timerBlinkBackground);
|
|
689
|
+
this.timerBlinkBackground = setTimeout(() => {
|
|
690
|
+
timerWaitBackEndCounter++;
|
|
691
|
+
if (timerWaitBackEndCounter > 40) {
|
|
692
|
+
timerWaitBackEndCounter = 0;
|
|
693
|
+
RED.notify("Something went wrong. Please make sure the HUE bridge connection is up and properly configured.",
|
|
694
|
+
{
|
|
695
|
+
modal: false,
|
|
696
|
+
fixed: false,
|
|
697
|
+
type: 'error'
|
|
698
|
+
})
|
|
699
|
+
$("#waitWindow").hide();
|
|
700
|
+
$("#mainWindow").show();
|
|
701
|
+
$("#tabs").hide();
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
// Check wether the HUE node has is connected and the devices have already been read.
|
|
705
|
+
// ##########################################################
|
|
706
|
+
$.getJSON("knxultimateCheckHueConnected?serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
707
|
+
if (data.ready === true) {
|
|
708
|
+
Go();
|
|
709
|
+
} else {
|
|
710
|
+
checkConnection();
|
|
711
|
+
}
|
|
712
|
+
});
|
|
713
|
+
// ##########################################################
|
|
714
|
+
}, 500);
|
|
715
|
+
}
|
|
716
|
+
if ($("#node-input-serverHue").val() === "_ADD_") {
|
|
717
|
+
Go();
|
|
718
|
+
} else {
|
|
719
|
+
checkConnection();
|
|
720
|
+
}
|
|
721
|
+
// ################################################################
|
|
722
|
+
|
|
685
723
|
},
|
|
724
|
+
|
|
686
725
|
oneditsave: function () {
|
|
687
726
|
//RED.sidebar.removeTab("tabNRColor");
|
|
688
727
|
if ($("#node-input-enableNodePINS").val() === "yes") {
|
|
@@ -831,428 +870,434 @@
|
|
|
831
870
|
|
|
832
871
|
|
|
833
872
|
<script type="text/html" data-template-name="knxUltimateHueLight">
|
|
834
|
-
<div
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
873
|
+
<div id="waitWindow">
|
|
874
|
+
<br/><br/><p align="center"><i class="fa-solid fa-hourglass-start fa-spin-pulse fa-4x"></i><br/><br/>
|
|
875
|
+
Wait, i'm talking to your HUE bridge...
|
|
876
|
+
</p>
|
|
877
|
+
</div>
|
|
878
|
+
<div id="mainWindow" hidden>
|
|
879
|
+
<div class="form-row">
|
|
880
|
+
<b>HUE Light/Group node</b>  <span style="color:red"    <i class="fa fa-youtube"></i></span> <a
|
|
881
|
+
target="_blank" href="https://youtu.be/jjEUI1J8bkA"><u>Youtube sample</u></a>
|
|
882
|
+
<br />
|
|
883
|
+
<br />
|
|
884
|
+
<p align="center">
|
|
885
|
+
<i class="fa-regular fa-lightbulb fa-bounce fa-4x"></i>
|
|
886
|
+
</p>
|
|
887
|
+
<br />
|
|
888
|
+
<label for="node-input-server">
|
|
889
|
+
<img
|
|
890
|
+
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAKnRFWHRDcmVhdGlvbiBUaW1lAEZyIDYgQXVnIDIwMTAgMjE6NTI6MTkgKzAxMDD84aS8AAAAB3RJTUUH3gYYCicNV+4WIQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAARnQU1BAACxjwv8YQUAAACUSURBVHjaY2CgFZg5c+Z/ZEyWAZ8+f/6/ZsWs/xoamqMGkGrA6Wla/1+fVARjEBuGsSoGmY4eZSCNL59d/g8DIDbIAHR14OgFGQByKjIGKX5+6/T///8gGMQGiV1+/B0Fg70GIkD+RMYgxf/O5/7//2MSmAZhkBi6OrgB6Bg5DGB4ajr3f2xqsYYLSDE2THJUDg0AAAqyDVd4tp4YAAAAAElFTkSuQmCC"></img>
|
|
891
|
+
KNX GW
|
|
892
|
+
</label>
|
|
893
|
+
<input type="text" id="node-input-server" />
|
|
894
|
+
</div>
|
|
895
|
+
|
|
896
|
+
<div class="form-row">
|
|
897
|
+
<label for="node-input-serverHue">
|
|
898
|
+
<img
|
|
899
|
+
src="data:image/png;base64, iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAEKADAAQAAAABAAAAEAAAAAA0VXHyAAABFUlEQVQ4EZWSsWoCQRCG1yiENEFEi6QSkjqWWoqFoBYJ+Br6JHkMn8Iibd4ihQpaJIhWNkry/ZtdGZY78Qa+m39nZ+dm9s4550awglNBluS/gVtAX6KgDclf68w2OThgfR9iT/jnoEv4TtByDThWTCDKW4SSZTf/zj9/eZbN+izTDuKGimu0vPF8B/YN8aC8LmcOj/AAn9CFTEs70Js/oGqy79C69bqJ5XbQI2kGO5N8QL9D08S8zBtBF5ZaVsznpCMoqJnVdjTpb1Db0fwIWmQV6BLXzFOYgA6/gDVfQN9bBWp2J2hdWDPoBV5FrKnAJutHikk/CHHR8i7x4iG7qQ720IYvu3GFbpHjx3pFrOFYkA354z/5bkK826phyAAAAABJRU5ErkJggg==" />
|
|
900
|
+
HUE Bridge
|
|
901
|
+
</label>
|
|
902
|
+
<input type="text" id="node-input-serverHue" />
|
|
903
|
+
</div>
|
|
904
|
+
|
|
839
905
|
<br />
|
|
840
|
-
<p
|
|
841
|
-
<
|
|
906
|
+
<p>
|
|
907
|
+
<b>Philips HUE</b>
|
|
842
908
|
</p>
|
|
909
|
+
|
|
910
|
+
<div class="form-row">
|
|
911
|
+
<label for="node-input-hueDevice">
|
|
912
|
+
<i class="fa fa-play-circle"></i> Name</label>
|
|
913
|
+
<input type="text" id="node-input-name" placeholder="Enter your hue device name" />
|
|
914
|
+
<input type="hidden" id="node-input-hueDevice" />
|
|
915
|
+
</div>
|
|
916
|
+
|
|
843
917
|
<br />
|
|
844
|
-
<label for="node-input-server">
|
|
845
|
-
<img
|
|
846
|
-
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAKnRFWHRDcmVhdGlvbiBUaW1lAEZyIDYgQXVnIDIwMTAgMjE6NTI6MTkgKzAxMDD84aS8AAAAB3RJTUUH3gYYCicNV+4WIQAAAAlwSFlzAAALEgAACxIB0t1+/AAAAARnQU1BAACxjwv8YQUAAACUSURBVHjaY2CgFZg5c+Z/ZEyWAZ8+f/6/ZsWs/xoamqMGkGrA6Wla/1+fVARjEBuGsSoGmY4eZSCNL59d/g8DIDbIAHR14OgFGQByKjIGKX5+6/T///8gGMQGiV1+/B0Fg70GIkD+RMYgxf/O5/7//2MSmAZhkBi6OrgB6Bg5DGB4ajr3f2xqsYYLSDE2THJUDg0AAAqyDVd4tp4YAAAAAElFTkSuQmCC"></img>
|
|
847
|
-
KNX GW
|
|
848
|
-
</label>
|
|
849
|
-
<input type="text" id="node-input-server" />
|
|
850
|
-
</div>
|
|
851
918
|
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
919
|
+
<div id="tabs" hidden">
|
|
920
|
+
<ul>
|
|
921
|
+
<li><a href="#tabs-1"><i class="fa-solid fa-toggle-on fa-beat"></i> Switching</a></li>
|
|
922
|
+
<li><a href="#tabs-2"><i class="fa-solid fa-arrow-up-wide-short fa-beat"></i> Dim/Brightness</a></li>
|
|
923
|
+
<li><a href="#tabs-3"><i class="fa-solid fa-temperature-quarter fa-beat"></i> Tunable white</a></li>
|
|
924
|
+
<li><a href="#tabs-4"><i class="fa-solid fa-palette fa-beat"></i> Colors</a></li>
|
|
925
|
+
<li><a href="#tabs-5"><i class="fa-solid fa-heart-circle-check fa-beat"></i> Effects</a></li>
|
|
926
|
+
<li><a href="#tabs-6"><i class="fa-solid fa-code-merge fa-beat"></i> Behaviour</a></li>
|
|
927
|
+
<li><a href="#tabs-7"><i class="fa-solid fa-house fa-beat"></i> Home Assistant Export (beta)</a></li>
|
|
928
|
+
</ul>
|
|
929
|
+
<div id="tabs-1">
|
|
930
|
+
<p>
|
|
931
|
+
<div class="form-row">
|
|
932
|
+
<label for="node-input-nameLightSwitch" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
860
933
|
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
</p>
|
|
934
|
+
<label for="node-input-GALightSwitch" style="width:20px;">GA</label>
|
|
935
|
+
<input type="text" id="node-input-GALightSwitch" placeholder="Ex: 1/1/1"
|
|
936
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
865
937
|
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
<i class="fa fa-play-circle"></i> Name</label>
|
|
869
|
-
<input type="text" id="node-input-name" placeholder="Enter your hue device name" />
|
|
870
|
-
<input type="hidden" id="node-input-hueDevice" />
|
|
871
|
-
</div>
|
|
938
|
+
<label for="node-input-dptLightSwitch" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
939
|
+
<select id="node-input-dptLightSwitch" style="width:140px;"></select>
|
|
872
940
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
<li><a href="#tabs-2"><i class="fa-solid fa-arrow-up-wide-short fa-beat"></i> Dim/Brightness</a></li>
|
|
879
|
-
<li><a href="#tabs-3"><i class="fa-solid fa-temperature-quarter fa-beat"></i> Tunable white</a></li>
|
|
880
|
-
<li><a href="#tabs-4"><i class="fa-solid fa-palette fa-beat"></i> Colors</a></li>
|
|
881
|
-
<li><a href="#tabs-5"><i class="fa-solid fa-heart-circle-check fa-beat"></i> Effects</a></li>
|
|
882
|
-
<li><a href="#tabs-6"><i class="fa-solid fa-code-merge fa-beat"></i> Behaviour</a></li>
|
|
883
|
-
<li><a href="#tabs-7"><i class="fa-solid fa-house fa-beat"></i> Home Assistant Export (beta)</a></li>
|
|
884
|
-
</ul>
|
|
885
|
-
<div id="tabs-1">
|
|
886
|
-
<p>
|
|
887
|
-
<div class="form-row">
|
|
888
|
-
<label for="node-input-nameLightSwitch" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
889
|
-
|
|
890
|
-
<label for="node-input-GALightSwitch" style="width:20px;">GA</label>
|
|
891
|
-
<input type="text" id="node-input-GALightSwitch" placeholder="Ex: 1/1/1"
|
|
892
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
893
|
-
|
|
894
|
-
<label for="node-input-dptLightSwitch" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
895
|
-
<select id="node-input-dptLightSwitch" style="width:140px;"></select>
|
|
896
|
-
|
|
897
|
-
<label for="node-input-nameLightSwitch" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
898
|
-
<input type="text" id="node-input-nameLightSwitch" style="width:190px;margin-left: 5px; text-align: left;">
|
|
899
|
-
</div>
|
|
900
|
-
<div class="form-row">
|
|
901
|
-
<label for="node-input-nameLightState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
941
|
+
<label for="node-input-nameLightSwitch" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
942
|
+
<input type="text" id="node-input-nameLightSwitch" style="width:190px;margin-left: 5px; text-align: left;">
|
|
943
|
+
</div>
|
|
944
|
+
<div class="form-row">
|
|
945
|
+
<label for="node-input-nameLightState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
902
946
|
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
947
|
+
<label for="node-input-GALightState" style="width:20px;">GA</label>
|
|
948
|
+
<input type="text" id="node-input-GALightState" placeholder="Ex: 1/1/1"
|
|
949
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
906
950
|
|
|
907
|
-
|
|
908
|
-
|
|
951
|
+
<label for="node-input-dptLightState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
952
|
+
<select id="node-input-dptLightState" style="width:140px;"></select>
|
|
909
953
|
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
954
|
+
<label for="node-input-nameLightState" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
955
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
956
|
+
<input type="text" id="node-input-nameLightState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
957
|
+
</div>
|
|
958
|
+
</p>
|
|
913
959
|
</div>
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
<div class="form-row">
|
|
919
|
-
<label for="node-input-nameLightDIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
960
|
+
<div id="tabs-2">
|
|
961
|
+
<p>
|
|
962
|
+
<div class="form-row">
|
|
963
|
+
<label for="node-input-nameLightDIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
920
964
|
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
965
|
+
<label for="node-input-GALightDIM" style="width:20px;">GA</label>
|
|
966
|
+
<input type="text" id="node-input-GALightDIM" placeholder="Ex: 1/1/1"
|
|
967
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
924
968
|
|
|
925
|
-
|
|
926
|
-
|
|
969
|
+
<label for="node-input-dptLightDIM" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
970
|
+
<select id="node-input-dptLightDIM" style="width:140px;"></select>
|
|
927
971
|
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
972
|
+
<label for="node-input-nameLightDIM" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
973
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
974
|
+
<input type="text" id="node-input-nameLightDIM" style="width:190px;margin-left: 5px; text-align: left;">
|
|
975
|
+
</div>
|
|
976
|
+
<div class="form-row">
|
|
977
|
+
<label for="node-input-nameLightBrightness" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
|
|
978
|
+
%</label>
|
|
935
979
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
980
|
+
<label for="node-input-GALightBrightness" style="width:20px;">GA</label>
|
|
981
|
+
<input type="text" id="node-input-GALightBrightness" placeholder="Ex: 1/1/1"
|
|
982
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
939
983
|
|
|
940
|
-
|
|
941
|
-
|
|
984
|
+
<label for="node-input-dptLightBrightness" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
985
|
+
<select id="node-input-dptLightBrightness" style="width:140px;"></select>
|
|
942
986
|
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
987
|
+
<label for="node-input-nameLightBrightness" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
988
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
989
|
+
<input type="text" id="node-input-nameLightBrightness" style="width:190px;margin-left: 5px; text-align: left;">
|
|
990
|
+
</div>
|
|
947
991
|
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
<label for="node-input-GALightBrightnessState" style="width:20px;"><span
|
|
952
|
-
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
953
|
-
<input type="text" id="node-input-GALightBrightnessState" placeholder="Ex: 1/1/1"
|
|
954
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
955
|
-
|
|
956
|
-
<label for="node-input-dptLightBrightnessState"
|
|
957
|
-
style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
958
|
-
<select id="node-input-dptLightBrightnessState" style="width:140px;"></select>
|
|
959
|
-
|
|
960
|
-
<label for="node-input-nameLightBrightnessState" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
961
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
962
|
-
<input type="text" id="node-input-nameLightBrightnessState"
|
|
963
|
-
style="width:190px;margin-left: 5px; text-align: left;">
|
|
964
|
-
</div>
|
|
965
|
-
<div class="form-row">
|
|
966
|
-
<label for="node-input-dimSpeed" style="width:260px">
|
|
967
|
-
<i class="fa fa-bolt"></i> Dim Speed (ms)
|
|
968
|
-
</label>
|
|
969
|
-
<input type="text" id="node-input-dimSpeed" placeholder='Default is 5000' style="width:210px">
|
|
970
|
-
</div>
|
|
971
|
-
<div class="form-row">
|
|
972
|
-
<label for="node-input-minDimLevelLight" style="width:260px;">
|
|
973
|
-
<i class="fa fa-clone"></i> Min Dim Brightness
|
|
974
|
-
</label>
|
|
975
|
-
<select id="node-input-minDimLevelLight">
|
|
976
|
-
<option value="useHueLightLevel">Use minimum brightness specified in the HUE light</option>
|
|
977
|
-
</select>
|
|
978
|
-
</div>
|
|
979
|
-
<div class="form-row">
|
|
980
|
-
<label for="node-input-maxDimLevelLight" style="width:260px;">
|
|
981
|
-
<i class="fa fa-clone"></i> Max Dim Brightness
|
|
982
|
-
</label>
|
|
983
|
-
<select id="node-input-maxDimLevelLight"></select>
|
|
984
|
-
</div>
|
|
985
|
-
</p>
|
|
986
|
-
</div>
|
|
987
|
-
<div id="tabs-3">
|
|
988
|
-
<p>
|
|
989
|
-
<div class="form-row">
|
|
990
|
-
<label for="node-input-nameLightKelvinDIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control dim</label>
|
|
992
|
+
<div class="form-row">
|
|
993
|
+
<label for="node-input-nameLightBrightnessState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
991
994
|
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
+
<label for="node-input-GALightBrightnessState" style="width:20px;"><span
|
|
996
|
+
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
997
|
+
<input type="text" id="node-input-GALightBrightnessState" placeholder="Ex: 1/1/1"
|
|
998
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
995
999
|
|
|
996
|
-
|
|
997
|
-
|
|
1000
|
+
<label for="node-input-dptLightBrightnessState"
|
|
1001
|
+
style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1002
|
+
<select id="node-input-dptLightBrightnessState" style="width:140px;"></select>
|
|
998
1003
|
|
|
999
|
-
|
|
1000
|
-
|
|
1004
|
+
<label for="node-input-nameLightBrightnessState" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1005
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1006
|
+
<input type="text" id="node-input-nameLightBrightnessState"
|
|
1007
|
+
style="width:190px;margin-left: 5px; text-align: left;">
|
|
1008
|
+
</div>
|
|
1009
|
+
<div class="form-row">
|
|
1010
|
+
<label for="node-input-dimSpeed" style="width:260px">
|
|
1011
|
+
<i class="fa fa-bolt"></i> Dim Speed (ms)
|
|
1012
|
+
</label>
|
|
1013
|
+
<input type="text" id="node-input-dimSpeed" placeholder='Default is 5000' style="width:210px">
|
|
1014
|
+
</div>
|
|
1015
|
+
<div class="form-row">
|
|
1016
|
+
<label for="node-input-minDimLevelLight" style="width:260px;">
|
|
1017
|
+
<i class="fa fa-clone"></i> Min Dim Brightness
|
|
1018
|
+
</label>
|
|
1019
|
+
<select id="node-input-minDimLevelLight">
|
|
1020
|
+
<option value="useHueLightLevel">Use minimum brightness specified in the HUE light</option>
|
|
1021
|
+
</select>
|
|
1022
|
+
</div>
|
|
1023
|
+
<div class="form-row">
|
|
1024
|
+
<label for="node-input-maxDimLevelLight" style="width:260px;">
|
|
1025
|
+
<i class="fa fa-clone"></i> Max Dim Brightness
|
|
1026
|
+
</label>
|
|
1027
|
+
<select id="node-input-maxDimLevelLight"></select>
|
|
1028
|
+
</div>
|
|
1029
|
+
</p>
|
|
1001
1030
|
</div>
|
|
1002
|
-
<div
|
|
1003
|
-
<
|
|
1004
|
-
|
|
1031
|
+
<div id="tabs-3">
|
|
1032
|
+
<p>
|
|
1033
|
+
<div class="form-row">
|
|
1034
|
+
<label for="node-input-nameLightKelvinDIM" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control dim</label>
|
|
1005
1035
|
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1036
|
+
<label for="node-input-GALightKelvinDIM" style="width:20px;">GA</label>
|
|
1037
|
+
<input type="text" id="node-input-GALightKelvinDIM" placeholder="Ex: 1/1/1"
|
|
1038
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1009
1039
|
|
|
1010
|
-
|
|
1011
|
-
|
|
1040
|
+
<label for="node-input-dptLightKelvinDIM" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1041
|
+
<select id="node-input-dptLightKelvinDIM" style="width:140px;"></select>
|
|
1012
1042
|
|
|
1013
|
-
|
|
1014
|
-
style="width:
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
Kelvin</label>
|
|
1043
|
+
<label for="node-input-nameLightKelvinDIM" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1044
|
+
<input type="text" id="node-input-nameLightKelvinDIM" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1045
|
+
</div>
|
|
1046
|
+
<div class="form-row">
|
|
1047
|
+
<label for="node-input-nameLightKelvinPercentage" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
|
|
1048
|
+
%</label>
|
|
1020
1049
|
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1050
|
+
<label for="node-input-GALightKelvinPercentage" style="width:20px;">GA</label>
|
|
1051
|
+
<input type="text" id="node-input-GALightKelvinPercentage" placeholder="Ex: 1/1/1"
|
|
1052
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1024
1053
|
|
|
1025
|
-
|
|
1026
|
-
|
|
1054
|
+
<label for="node-input-dptLightKelvinPercentage" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1055
|
+
<select id="node-input-dptLightKelvinPercentage" style="width:140px;"></select>
|
|
1027
1056
|
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
<
|
|
1033
|
-
|
|
1057
|
+
<label for="node-input-nameLightKelvinPercentage"
|
|
1058
|
+
style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1059
|
+
<input type="text" id="node-input-nameLightKelvinPercentage" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1060
|
+
</div>
|
|
1061
|
+
<div class="form-row">
|
|
1062
|
+
<label for="node-input-nameLightKelvin" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control
|
|
1063
|
+
Kelvin</label>
|
|
1034
1064
|
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1065
|
+
<label for="node-input-GALightKelvin" style="width:20px;">GA</label>
|
|
1066
|
+
<input type="text" id="node-input-GALightKelvin" placeholder="Ex: 1/1/1"
|
|
1067
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1038
1068
|
|
|
1039
|
-
|
|
1040
|
-
|
|
1069
|
+
<label for="node-input-dptLightKelvin" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1070
|
+
<select id="node-input-dptLightKelvin" style="width:140px;"></select>
|
|
1041
1071
|
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1072
|
+
<label for="node-input-nameLightKelvin" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1073
|
+
<input type="text" id="node-input-nameLightKelvin" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1074
|
+
</div>
|
|
1075
|
+
<div class="form-row">
|
|
1076
|
+
<label for="node-input-nameLightKelvinPercentageState" style="width:110px;"><i class="fa fa-question-circle"></i> Status
|
|
1077
|
+
%</label>
|
|
1048
1078
|
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1079
|
+
<label for="node-input-GALightKelvinPercentageState" style="width:20px;">GA</label>
|
|
1080
|
+
<input type="text" id="node-input-GALightKelvinPercentageState" placeholder="Ex: 1/1/1"
|
|
1081
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1052
1082
|
|
|
1053
|
-
|
|
1054
|
-
|
|
1083
|
+
<label for="node-input-dptLightKelvinPercentageState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1084
|
+
<select id="node-input-dptLightKelvinPercentageState" style="width:140px;"></select>
|
|
1055
1085
|
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
</label>
|
|
1063
|
-
<input type="checkbox" id="node-input-invertDimTunableWhiteDirection"
|
|
1064
|
-
style="display:inline-block; width:auto; vertical-align:top;" />
|
|
1065
|
-
</div>
|
|
1066
|
-
</p>
|
|
1067
|
-
</div>
|
|
1068
|
-
<div id="tabs-4">
|
|
1069
|
-
<p>
|
|
1070
|
-
<div class="form-row">
|
|
1071
|
-
<label for="node-input-nameLightColor" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
1072
|
-
|
|
1073
|
-
<label for="node-input-GALightColor" style="width:20px;"><span
|
|
1074
|
-
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
1075
|
-
<input type="text" id="node-input-GALightColor" placeholder="Ex: 1/1/1"
|
|
1076
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1077
|
-
|
|
1078
|
-
<label for="node-input-dptLightColor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1079
|
-
<select id="node-input-dptLightColor" style="width:140px;"></select>
|
|
1080
|
-
|
|
1081
|
-
<label for="node-input-nameLightColor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1082
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1083
|
-
<input type="text" id="node-input-nameLightColor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1084
|
-
</div>
|
|
1085
|
-
<div class="form-row">
|
|
1086
|
-
<label for="node-input-nameLightColorState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
1086
|
+
<label for="node-input-nameLightKelvinPercentageState" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1087
|
+
<input type="text" id="node-input-nameLightKelvinPercentageState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1088
|
+
</div>
|
|
1089
|
+
<div class="form-row">
|
|
1090
|
+
<label for="node-input-nameLightKelvinState" style="width:110px;"><i class="fa fa-question-circle"></i> Status
|
|
1091
|
+
Kelvin</label>
|
|
1087
1092
|
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1093
|
+
<label for="node-input-GALightKelvinState" style="width:20px;">GA</label>
|
|
1094
|
+
<input type="text" id="node-input-GALightKelvinState" placeholder="Ex: 1/1/1"
|
|
1095
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1092
1096
|
|
|
1093
|
-
|
|
1094
|
-
|
|
1097
|
+
<label for="node-input-dptLightKelvinState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1098
|
+
<select id="node-input-dptLightKelvinState" style="width:140px;"></select>
|
|
1095
1099
|
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
<label for="node-input-GALightBlink" style="width:20px;"><span
|
|
1108
|
-
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
1109
|
-
<input type="text" id="node-input-GALightBlink" placeholder="Ex: 1/1/1"
|
|
1110
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1111
|
-
|
|
1112
|
-
<label for="node-input-dptLightBlink" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1113
|
-
<select id="node-input-dptLightBlink" style="width:140px;"></select>
|
|
1114
|
-
|
|
1115
|
-
<label for="node-input-nameLightBlink" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1116
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1117
|
-
<input type="text" id="node-input-nameLightBlink" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1100
|
+
<label for="node-input-nameLightKelvinState" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
1101
|
+
<input type="text" id="node-input-nameLightKelvinState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1102
|
+
</div>
|
|
1103
|
+
<div class="form-row">
|
|
1104
|
+
<label style="width:170px" for="node-input-invertDimTunableWhiteDirection">
|
|
1105
|
+
<i class="fa fa-shuffle"></i> Invert DIM direction
|
|
1106
|
+
</label>
|
|
1107
|
+
<input type="checkbox" id="node-input-invertDimTunableWhiteDirection"
|
|
1108
|
+
style="display:inline-block; width:auto; vertical-align:top;" />
|
|
1109
|
+
</div>
|
|
1110
|
+
</p>
|
|
1118
1111
|
</div>
|
|
1112
|
+
<div id="tabs-4">
|
|
1113
|
+
<p>
|
|
1114
|
+
<div class="form-row">
|
|
1115
|
+
<label for="node-input-nameLightColor" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
1119
1116
|
|
|
1120
|
-
|
|
1117
|
+
<label for="node-input-GALightColor" style="width:20px;"><span
|
|
1118
|
+
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
1119
|
+
<input type="text" id="node-input-GALightColor" placeholder="Ex: 1/1/1"
|
|
1120
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1121
|
+
|
|
1122
|
+
<label for="node-input-dptLightColor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1123
|
+
<select id="node-input-dptLightColor" style="width:140px;"></select>
|
|
1124
|
+
|
|
1125
|
+
<label for="node-input-nameLightColor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1126
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1127
|
+
<input type="text" id="node-input-nameLightColor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1128
|
+
</div>
|
|
1121
1129
|
<div class="form-row">
|
|
1122
|
-
<label for="node-input-
|
|
1123
|
-
Cycle</label>
|
|
1130
|
+
<label for="node-input-nameLightColorState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
1124
1131
|
|
|
1125
|
-
<label for="node-input-
|
|
1126
|
-
|
|
1132
|
+
<label for="node-input-GALightColorState" style="width:20px;"><span
|
|
1133
|
+
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
1134
|
+
<input type="text" id="node-input-GALightColorState" placeholder="Ex: 1/1/1"
|
|
1127
1135
|
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1128
1136
|
|
|
1129
|
-
<label for="node-input-
|
|
1130
|
-
<select id="node-input-
|
|
1137
|
+
<label for="node-input-dptLightColorState" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1138
|
+
<select id="node-input-dptLightColorState" style="width:140px;"></select>
|
|
1131
1139
|
|
|
1132
|
-
<label for="node-input-
|
|
1140
|
+
<label for="node-input-nameLightColorState" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1133
1141
|
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1134
|
-
<input type="text" id="node-input-
|
|
1142
|
+
<input type="text" id="node-input-nameLightColorState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1135
1143
|
</div>
|
|
1144
|
+
</p>
|
|
1136
1145
|
</div>
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
<div id="tabs-6">
|
|
1140
|
-
<p>
|
|
1141
|
-
<div class="form-row">
|
|
1142
|
-
<label style="width:260px;" for="node-input-readStatusAtStartup"><i class="fa fa-question-circle"></i> Read status at
|
|
1143
|
-
startup</label>
|
|
1144
|
-
<select id="node-input-readStatusAtStartup">
|
|
1145
|
-
<option value="no">No</option>
|
|
1146
|
-
<option value="yes">Yes, and emit KNX telegrams.</option>
|
|
1147
|
-
</select>
|
|
1148
|
-
</div>
|
|
1149
|
-
<div class="form-row" id="divUpdateKNXBrightnessStatusOnHUEOnOff">
|
|
1150
|
-
<label style="width:260px;" for="node-input-updateKNXBrightnessStatusOnHUEOnOff">
|
|
1151
|
-
<i class="fa fa-tag"></i> KNX Brightness Status
|
|
1152
|
-
</label>
|
|
1153
|
-
<select id="node-input-updateKNXBrightnessStatusOnHUEOnOff">
|
|
1154
|
-
<option value="onhueoff">When HUE light is Off send 0%. When HUE On, restore previous value (Default KNX behaviour)</option>
|
|
1155
|
-
<option value="no">Leave as is (default HUE behaviour)</option>
|
|
1156
|
-
</select>
|
|
1157
|
-
</div>
|
|
1158
|
-
<div id ="divBehaviourBrightness">
|
|
1146
|
+
<div id="tabs-5">
|
|
1147
|
+
<p>
|
|
1159
1148
|
<div class="form-row">
|
|
1160
|
-
<label for="node-input-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
</
|
|
1149
|
+
<label for="node-input-nameLightBlink" style="width:110px;"><i class="fa fa-play-circle-o"></i> Blink</label>
|
|
1150
|
+
|
|
1151
|
+
<label for="node-input-GALightBlink" style="width:20px;"><span
|
|
1152
|
+
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
1153
|
+
<input type="text" id="node-input-GALightBlink" placeholder="Ex: 1/1/1"
|
|
1154
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1155
|
+
|
|
1156
|
+
<label for="node-input-dptLightBlink" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1157
|
+
<select id="node-input-dptLightBlink" style="width:140px;"></select>
|
|
1158
|
+
|
|
1159
|
+
<label for="node-input-nameLightBlink" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1160
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1161
|
+
<input type="text" id="node-input-nameLightBlink" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1168
1162
|
</div>
|
|
1169
1163
|
|
|
1170
|
-
<div
|
|
1171
|
-
<
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1164
|
+
<div id="divColorCycle">
|
|
1165
|
+
<div class="form-row">
|
|
1166
|
+
<label for="node-input-nameLightColorCycle" style="width:110px;"><i class="fa fa-play-circle-o"></i> Color
|
|
1167
|
+
Cycle</label>
|
|
1168
|
+
|
|
1169
|
+
<label for="node-input-GALightColorCycle" style="width:20px;">GA</label>
|
|
1170
|
+
<input type="text" id="node-input-GALightColorCycle" placeholder="Ex: 1/1/1"
|
|
1171
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1172
|
+
|
|
1173
|
+
<label for="node-input-dptLightColorCycle" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1174
|
+
<select id="node-input-dptLightColorCycle" style="width:140px;"></select>
|
|
1175
|
+
|
|
1176
|
+
<label for="node-input-nameLightColorCycle" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1177
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1178
|
+
<input type="text" id="node-input-nameLightColorCycle" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1179
|
+
</div>
|
|
1176
1180
|
</div>
|
|
1177
|
-
|
|
1178
|
-
|
|
1181
|
+
</p>
|
|
1182
|
+
</div>
|
|
1183
|
+
<div id="tabs-6">
|
|
1184
|
+
<p>
|
|
1185
|
+
<div class="form-row">
|
|
1186
|
+
<label style="width:260px;" for="node-input-readStatusAtStartup"><i class="fa fa-question-circle"></i> Read status at
|
|
1187
|
+
startup</label>
|
|
1188
|
+
<select id="node-input-readStatusAtStartup">
|
|
1189
|
+
<option value="no">No</option>
|
|
1190
|
+
<option value="yes">Yes, and emit KNX telegrams.</option>
|
|
1191
|
+
</select>
|
|
1192
|
+
</div>
|
|
1193
|
+
<div class="form-row" id="divUpdateKNXBrightnessStatusOnHUEOnOff">
|
|
1194
|
+
<label style="width:260px;" for="node-input-updateKNXBrightnessStatusOnHUEOnOff">
|
|
1195
|
+
<i class="fa fa-tag"></i> KNX Brightness Status
|
|
1179
1196
|
</label>
|
|
1180
|
-
<select
|
|
1181
|
-
|
|
1197
|
+
<select id="node-input-updateKNXBrightnessStatusOnHUEOnOff">
|
|
1198
|
+
<option value="onhueoff">When HUE light is Off send 0%. When HUE On, restore previous value (Default KNX behaviour)</option>
|
|
1199
|
+
<option value="no">Leave as is (default HUE behaviour)</option>
|
|
1200
|
+
</select>
|
|
1182
1201
|
</div>
|
|
1183
|
-
|
|
1184
|
-
<div id="divCCSBoxAtNightLighting">
|
|
1202
|
+
<div id ="divBehaviourBrightness">
|
|
1185
1203
|
<div class="form-row">
|
|
1186
|
-
<label for="node-input-
|
|
1187
|
-
<i class="fa fa-
|
|
1204
|
+
<label for="node-input-specifySwitchOnBrightness" style="width:260px;">
|
|
1205
|
+
<i class="fa fa-tag"></i> Switch on behaviour
|
|
1188
1206
|
</label>
|
|
1189
|
-
<select id="node-input-
|
|
1190
|
-
<option value="no">
|
|
1207
|
+
<select id="node-input-specifySwitchOnBrightness">
|
|
1208
|
+
<option value="no">None</option>
|
|
1191
1209
|
<!-- <option value="temperature">Select temperature and brightness</option>
|
|
1192
1210
|
<option value="yes">Select color</option> -->
|
|
1193
1211
|
</select>
|
|
1194
1212
|
</div>
|
|
1195
1213
|
|
|
1196
|
-
<div id="
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
<
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1214
|
+
<div class="form-row" id="divColorsAtSwitchOn">
|
|
1215
|
+
<label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
|
|
1216
|
+
</label>
|
|
1217
|
+
<input type="hidden" id="node-input-colorAtSwitchOnDayTime">
|
|
1218
|
+
<input type="color" id="colorPickerDay" style="width:260px">
|
|
1219
|
+
<button id="getColorAtSwitchOnDayTimeButton" type="button" class="red-ui-button">Get current</button>
|
|
1220
|
+
</div>
|
|
1221
|
+
<div class="form-row" id="divTemperatureAtSwitchOn" hidden>
|
|
1222
|
+
<label for="node-input-colorAtSwitchOnDayTime" style="width:260px">
|
|
1223
|
+
</label>
|
|
1224
|
+
<select style="width:12%;" id="comboTemperatureAtSwitchOn"></select>
|
|
1225
|
+
<select style="width:25%;" id="comboBrightnessAtSwitchOn"></select>
|
|
1226
|
+
</div>
|
|
1209
1227
|
|
|
1228
|
+
<div id="divCCSBoxAtNightLighting">
|
|
1210
1229
|
<div class="form-row">
|
|
1211
|
-
<label for="node-input-
|
|
1212
|
-
|
|
1213
|
-
<label for="node-input-GADaylightSensor" style="width:20px;">GA</label>
|
|
1214
|
-
<input type="text" id="node-input-GADaylightSensor" placeholder="Ex: 1/1/1"
|
|
1215
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1216
|
-
|
|
1217
|
-
<label for="node-input-dptDaylightSensor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1218
|
-
<select id="node-input-dptDaylightSensor" style="width:140px;"></select>
|
|
1219
|
-
|
|
1220
|
-
<label for="node-input-nameDaylightSensor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1221
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1222
|
-
<input type="text" id="node-input-nameDaylightSensor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1223
|
-
</div>
|
|
1224
|
-
<div class="form-row">
|
|
1225
|
-
<label style="width:170px" for="node-input-invertDayNight">
|
|
1226
|
-
<i class="fa fa-shuffle"></i> Invert day/night values
|
|
1230
|
+
<label for="node-input-enableDayNightLighting" style="width:260px;">
|
|
1231
|
+
<i class="fa fa-clone"></i> Night Lighting
|
|
1227
1232
|
</label>
|
|
1228
|
-
<
|
|
1229
|
-
|
|
1233
|
+
<select id="node-input-enableDayNightLighting">
|
|
1234
|
+
<option value="no">No night lighting</option>
|
|
1235
|
+
<!-- <option value="temperature">Select temperature and brightness</option>
|
|
1236
|
+
<option value="yes">Select color</option> -->
|
|
1237
|
+
</select>
|
|
1238
|
+
</div>
|
|
1239
|
+
|
|
1240
|
+
<div id="divEnableDayNightLighting">
|
|
1241
|
+
|
|
1242
|
+
<div class="form-row" id="divColorsAtSwitchOnNightTime">
|
|
1243
|
+
<label for="node-input-colorAtSwitchOnNightTime" style="width:260px"></label>
|
|
1244
|
+
<input type="hidden" id="node-input-colorAtSwitchOnNightTime">
|
|
1245
|
+
<input type="color" id="colorPickerNight" style="width:260px">
|
|
1246
|
+
<button id="getColorAtSwitchOnNightTimeButton" type="button" class="red-ui-button">Get current</button>
|
|
1247
|
+
</div>
|
|
1248
|
+
<div class="form-row" id="divTemperatureAtSwitchOnNightTime" hidden>
|
|
1249
|
+
<label for="node-input-colorAtSwitchOnNightTime" style="width:260px"></label>
|
|
1250
|
+
<select style="width:25%;" id="comboTemperatureAtSwitchOnNightTime"></select>
|
|
1251
|
+
<select style="width:25%;" id="comboBrightnessAtSwitchOnNightTime"></select>
|
|
1252
|
+
</div>
|
|
1253
|
+
|
|
1254
|
+
<div class="form-row">
|
|
1255
|
+
<label for="node-input-nameDaylightSensor" style="width:110px;"><i class="fa fa-clock-o"></i>
|
|
1256
|
+
Day/Night</label>
|
|
1257
|
+
<label for="node-input-GADaylightSensor" style="width:20px;">GA</label>
|
|
1258
|
+
<input type="text" id="node-input-GADaylightSensor" placeholder="Ex: 1/1/1"
|
|
1259
|
+
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1260
|
+
|
|
1261
|
+
<label for="node-input-dptDaylightSensor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1262
|
+
<select id="node-input-dptDaylightSensor" style="width:140px;"></select>
|
|
1263
|
+
|
|
1264
|
+
<label for="node-input-nameDaylightSensor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1265
|
+
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1266
|
+
<input type="text" id="node-input-nameDaylightSensor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1267
|
+
</div>
|
|
1268
|
+
<div class="form-row">
|
|
1269
|
+
<label style="width:170px" for="node-input-invertDayNight">
|
|
1270
|
+
<i class="fa fa-shuffle"></i> Invert day/night values
|
|
1271
|
+
</label>
|
|
1272
|
+
<input type="checkbox" id="node-input-invertDayNight"
|
|
1273
|
+
style="display:inline-block; width:auto; vertical-align:top;" />
|
|
1274
|
+
</div>
|
|
1230
1275
|
</div>
|
|
1231
1276
|
</div>
|
|
1277
|
+
<br/>
|
|
1278
|
+
</div>
|
|
1279
|
+
<div class="form-row">
|
|
1280
|
+
<label for="node-input-enableNodePINS" style="width:260px;">
|
|
1281
|
+
<i class="fa fa-circle"></i> Node Input/Output PINs
|
|
1282
|
+
</label>
|
|
1283
|
+
<select id="node-input-enableNodePINS">
|
|
1284
|
+
<option value="no">Hide</option>
|
|
1285
|
+
<option value="yes">Show node input/output PINs</option>
|
|
1286
|
+
</select>
|
|
1232
1287
|
</div>
|
|
1233
|
-
|
|
1288
|
+
</p>
|
|
1234
1289
|
</div>
|
|
1235
|
-
<div
|
|
1236
|
-
<
|
|
1237
|
-
<
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
<option value="yes">Show node input/output PINs</option>
|
|
1242
|
-
</select>
|
|
1290
|
+
<div id="tabs-7">
|
|
1291
|
+
<p>
|
|
1292
|
+
<br/> <b>YAML</b> <br/>
|
|
1293
|
+
<div style="height: 220px; min-height:150px;" class="node-text-editor" id="aceEditor"></div>
|
|
1294
|
+
<!-- <button type="button" class="red-ui-button">Button</button> -->
|
|
1295
|
+
</p>
|
|
1243
1296
|
</div>
|
|
1244
|
-
</p>
|
|
1245
|
-
</div>
|
|
1246
|
-
<div id="tabs-7">
|
|
1247
|
-
<p>
|
|
1248
|
-
<br/> <b>YAML</b> <br/>
|
|
1249
|
-
<div style="height: 220px; min-height:150px;" class="node-text-editor" id="aceEditor"></div>
|
|
1250
|
-
<!-- <button type="button" class="red-ui-button">Button</button> -->
|
|
1251
|
-
</p>
|
|
1252
1297
|
</div>
|
|
1253
1298
|
</div>
|
|
1254
|
-
|
|
1255
|
-
|
|
1299
|
+
<br />
|
|
1300
|
+
</script>
|
|
1256
1301
|
|
|
1257
1302
|
|
|
1258
1303
|
<script type="text/markdown" data-help-name="knxUltimateHueLight">
|
|
@@ -1297,9 +1342,9 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
1297
1342
|
|--|--|
|
|
1298
1343
|
| Control dim | Changes the HUE light's white temperature, using DPT 3.007 dimming. You can set the dimming speed in the **_Behaviour_** tab.|
|
|
1299
1344
|
| 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.|
|
|
1300
|
-
| Control kelvin | **DPT 7.600:** set the HUE light's temperature in Kelvin degrees, using the KNX range from
|
|
1345
|
+
| Control kelvin | **DPT 7.600:** set the HUE light's temperature in Kelvin degrees, using the KNX range from 2000 to 6535. This range will be then transformed in mirek.<br/>**DPT 9.002:** set the temperature using Philips HUE range: 2000K - 6535K (Ambiance range starts at 2200K). Please be aware, conversion may produce slightly changes in Kelvin degrees value, due to KNX RGB or Kelvin degrees to HUE mirek degrees conversion.|
|
|
1301
1346
|
| Status %| Link this to the light temperature status group address. Datapoint is 5.001 absolute value. 0 is full warm, 100 is full cold.|
|
|
1302
|
-
| Status kelvin | **DPT 7.600:** get the HUE light's temperature in Kelvin degrees, using the KNX range from
|
|
1347
|
+
| Status kelvin | **DPT 7.600:** get the HUE light's temperature in Kelvin degrees, using the KNX range from 2000 to 6535. This range will be then transformed in kelvin degrees.<br/>**DPT 9.002:** get the temperature using Philips HUE range: 2000K - 6535K (Ambiance range starts at 2200K). Please be aware, conversion may produce slightly changes in Kelvin degrees value, due to KNX RGB or Kelvin degrees to HUE mirek degrees conversion. |
|
|
1303
1348
|
| Invert DIM direction | Inverts the DIM direction. |
|
|
1304
1349
|
<br/>
|
|
1305
1350
|
|