node-red-contrib-knx-ultimate 2.3.4 → 2.4.1
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 +29 -0
- package/KNXEngine/CHANGELOG.md +5 -1
- package/KNXEngine/package.json +1 -1
- package/KNXEngine/src/dptlib/dpt275.js +60 -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 +2 -2
- package/nodes/knxUltimateHueBattery.html +2 -2
- package/nodes/knxUltimateHueButton.html +4 -4
- package/nodes/knxUltimateHueLight.html +989 -947
- package/nodes/knxUltimateHueLight.js +50 -26
- package/nodes/knxUltimateHueLightSensor.html +2 -2
- package/nodes/knxUltimateHueMotion.html +2 -2
- package/nodes/knxUltimateHueScene.html +4 -4
- 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,566 +5,19 @@
|
|
|
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-dptLightHSV");
|
|
145
|
-
getGroupAddress("#node-input-GALightHSV", "#node-input-nameLightHSV", "#node-input-dptLightHSV", " 3.007");
|
|
146
|
-
|
|
147
|
-
getDPT("5.001", "#node-input-dptLightHSVPercentage");
|
|
148
|
-
getGroupAddress("#node-input-GALightHSVPercentage", "#node-input-nameLightHSVPercentage", "#node-input-dptLightHSVPercentage", " 5.001");
|
|
149
|
-
|
|
150
|
-
getDPT("5.001", "#node-input-dptLightHSVState");
|
|
151
|
-
getGroupAddress("#node-input-GALightHSVState", "#node-input-nameLightHSVState", "#node-input-dptLightHSVState", " 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
|
-
if ($("#node-input-hueDevice").val() === '') {
|
|
177
|
-
$("#tabs").hide();
|
|
178
|
-
} else {
|
|
179
|
-
$.getJSON("knxUltimateGetLightObject?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&" + { _: new Date().getTime() }, (data) => {
|
|
180
|
-
let oLight = data;
|
|
181
|
-
if (JSON.stringify(data) === "{}") {
|
|
182
|
-
$("#mainWindow").hide();
|
|
183
|
-
RED.notify("Please close and reload this window in few seconds. Still querying the HUE Bridge.", { type: "warning", timeout: 8000 });
|
|
184
|
-
}
|
|
185
|
-
// Check if grouped, to hide/show the "Get current" buttons
|
|
186
|
-
if (oLight.type === "grouped_light") {
|
|
187
|
-
$("#tabs").tabs("enable", "#tabs-4");
|
|
188
|
-
$("#tabs").tabs("enable", "#tabs-3");
|
|
189
|
-
$("#tabs").tabs("enable", "#tabs-2");
|
|
190
|
-
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
191
|
-
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
192
|
-
$("#node-input-specifySwitchOnBrightness").empty().append(
|
|
193
|
-
$("<option>")
|
|
194
|
-
.val("no")
|
|
195
|
-
.text("None")
|
|
196
|
-
).append(
|
|
197
|
-
$("<option>")
|
|
198
|
-
.val("yes")
|
|
199
|
-
.text("Select color")
|
|
200
|
-
).append(
|
|
201
|
-
$("<option>")
|
|
202
|
-
.val("temperature")
|
|
203
|
-
.text("Select temperature and brightness")
|
|
204
|
-
);
|
|
205
|
-
$("#node-input-enableDayNightLighting").empty().append(
|
|
206
|
-
$("<option>")
|
|
207
|
-
.val("no")
|
|
208
|
-
.text("No")
|
|
209
|
-
).append(
|
|
210
|
-
$("<option>")
|
|
211
|
-
.val("yes")
|
|
212
|
-
.text("Select color")
|
|
213
|
-
).append(
|
|
214
|
-
$("<option>")
|
|
215
|
-
.val("temperature")
|
|
216
|
-
.text("Select temperature and brightness")
|
|
217
|
-
);
|
|
218
|
-
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
219
|
-
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
220
|
-
return;
|
|
221
|
-
} else {
|
|
222
|
-
|
|
223
|
-
$("#getColorAtSwitchOnDayTimeButton").show();
|
|
224
|
-
$("#getColorAtSwitchOnNightTimeButton").show();
|
|
225
|
-
$("#node-input-specifySwitchOnBrightness").empty().append(
|
|
226
|
-
$("<option>")
|
|
227
|
-
.val("no")
|
|
228
|
-
.text("None")
|
|
229
|
-
);
|
|
230
|
-
$("#node-input-enableDayNightLighting").empty().append(
|
|
231
|
-
$("<option>")
|
|
232
|
-
.val("no")
|
|
233
|
-
.text("No")
|
|
234
|
-
);
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
$("#tabs").tabs("disable", "#tabs-4");
|
|
238
|
-
$("#tabs").tabs("disable", "#tabs-3");
|
|
239
|
-
$("#tabs").tabs("disable", "#tabs-2");
|
|
240
|
-
$("#divColorsAtSwitchOn").hide();
|
|
241
|
-
$("#divColorsAtSwitchOnNightTime").hide();
|
|
242
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
243
|
-
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
244
|
-
$("#divColorCycle").hide();
|
|
245
|
-
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").hide();
|
|
246
|
-
$("#divBehaviourBrightness").hide();
|
|
247
|
-
$("#comboTemperatureAtSwitchOn").hide();
|
|
248
|
-
$("#comboTemperatureAtSwitchOnNightTime").hide();
|
|
249
|
-
|
|
250
|
-
// Enable options/tabs one by one
|
|
251
|
-
if (oLight.dimming !== undefined) {
|
|
252
|
-
$("#tabs").tabs("enable", "#tabs-2");
|
|
253
|
-
$("#divBehaviourBrightness").show();
|
|
254
|
-
}
|
|
255
|
-
if (oLight.color !== undefined) {
|
|
256
|
-
$("#tabs").tabs("enable", "#tabs-4");
|
|
257
|
-
$("#divColorsAtSwitchOn").show();
|
|
258
|
-
$("#divColorsAtSwitchOnNightTime").show();
|
|
259
|
-
$("#divColorCycle").show();
|
|
260
|
-
$("#node-input-specifySwitchOnBrightness").append(
|
|
261
|
-
$("<option>")
|
|
262
|
-
.val("yes")
|
|
263
|
-
.text("Select color")
|
|
264
|
-
);
|
|
265
|
-
$("#node-input-enableDayNightLighting").append(
|
|
266
|
-
$("<option>")
|
|
267
|
-
.val("yes")
|
|
268
|
-
.text("Select color")
|
|
269
|
-
);
|
|
270
|
-
}
|
|
271
|
-
// Check temperature (if the light supports temperature, it support dimming as well)
|
|
272
|
-
if (oLight.color_temperature !== undefined) {
|
|
273
|
-
$("#tabs").tabs("enable", "#tabs-3");
|
|
274
|
-
//$("#tabs").tabs("enable", "#tabs-2");
|
|
275
|
-
$("#node-input-specifySwitchOnBrightness").append(
|
|
276
|
-
$("<option>")
|
|
277
|
-
.val("temperature")
|
|
278
|
-
.text("Select temperature and brightness")
|
|
279
|
-
);
|
|
280
|
-
$("#node-input-enableDayNightLighting").append(
|
|
281
|
-
$("<option>")
|
|
282
|
-
.val("temperature")
|
|
283
|
-
.text("Select temperature and brightness")
|
|
284
|
-
);
|
|
285
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
286
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
287
|
-
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
288
|
-
$("#divBehaviourBrightness").show();
|
|
289
|
-
$("#comboTemperatureAtSwitchOn").show();
|
|
290
|
-
$("#comboTemperatureAtSwitchOnNightTime").show();
|
|
291
|
-
} else {
|
|
292
|
-
//$("#tabs").tabs("enable", "#tabs-2");
|
|
293
|
-
$("#node-input-specifySwitchOnBrightness").append(
|
|
294
|
-
$("<option>")
|
|
295
|
-
.val("temperature")
|
|
296
|
-
.text("Select brightness")
|
|
297
|
-
);
|
|
298
|
-
$("#node-input-enableDayNightLighting").append(
|
|
299
|
-
$("<option>")
|
|
300
|
-
.val("temperature")
|
|
301
|
-
.text("Select brightness")
|
|
302
|
-
);
|
|
303
|
-
$("#comboTemperatureAtSwitchOn").val(0);
|
|
304
|
-
$("#comboTemperatureAtSwitchOnNightTime").val(0);
|
|
305
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
306
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
307
|
-
$("#divUpdateKNXBrightnessStatusOnHUEOnOff").show();
|
|
308
|
-
//$("#divBehaviourBrightness").show();
|
|
309
|
-
}
|
|
310
|
-
$("#node-input-specifySwitchOnBrightness").val(node.specifySwitchOnBrightness).trigger('change');
|
|
311
|
-
$("#node-input-enableDayNightLighting").val(node.enableDayNightLighting).trigger('change');
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
// Show/Hide the div of the color at swich on
|
|
315
|
-
if (node.specifySwitchOnBrightness === "yes") {
|
|
316
|
-
$("#divColorsAtSwitchOn").show();
|
|
317
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
318
|
-
} else if (node.specifySwitchOnBrightness === "temperature") {
|
|
319
|
-
$("#divColorsAtSwitchOn").hide();
|
|
320
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
321
|
-
} else {
|
|
322
|
-
$("#divColorsAtSwitchOn").hide();
|
|
323
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
$("#node-input-specifySwitchOnBrightness").on("change", function () {
|
|
327
|
-
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") {
|
|
328
|
-
$("#divColorsAtSwitchOn").show();
|
|
329
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
330
|
-
blinkBackground("#colorPickerDay");
|
|
331
|
-
} else if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") {
|
|
332
|
-
$("#divColorsAtSwitchOn").hide();
|
|
333
|
-
$("#divTemperatureAtSwitchOn").show();
|
|
334
|
-
} else {
|
|
335
|
-
$("#divColorsAtSwitchOn").hide();
|
|
336
|
-
$("#divTemperatureAtSwitchOn").hide();
|
|
337
|
-
}
|
|
338
|
-
});
|
|
339
|
-
|
|
340
|
-
// Show/Hide and enable/disable day/night Lighting behaviour
|
|
341
|
-
if (node.enableDayNightLighting === "yes") {
|
|
342
|
-
$("#divEnableDayNightLighting").show();
|
|
343
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
344
|
-
$("#divColorsAtSwitchOnNightTime").show();
|
|
345
|
-
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
346
|
-
} else if (node.enableDayNightLighting === "temperature") {
|
|
347
|
-
$("#divEnableDayNightLighting").show();
|
|
348
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
349
|
-
$("#divColorsAtSwitchOnNightTime").hide();
|
|
350
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
351
|
-
} else {
|
|
352
|
-
$("#divEnableDayNightLighting").hide();
|
|
353
|
-
$("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
$("#node-input-enableDayNightLighting").on("change", function () {
|
|
357
|
-
if ($("#node-input-enableDayNightLighting").val() === "yes") {
|
|
358
|
-
$("#divEnableDayNightLighting").show();
|
|
359
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
360
|
-
$("#divColorsAtSwitchOnNightTime").show();
|
|
361
|
-
$("#divTemperatureAtSwitchOnNightTime").hide();
|
|
362
|
-
blinkBackground("#colorPickerNight")
|
|
363
|
-
$("#getColorAtSwitchOnDayTimeButton").text("Get current");
|
|
364
|
-
} else if ($("#node-input-enableDayNightLighting").val() === "temperature") {
|
|
365
|
-
$("#divEnableDayNightLighting").show();
|
|
366
|
-
$("#divCCSBoxAtNightLighting").css({ border: "1px solid dimgrey", "border-radius": "12px", padding: "5px" }); // Add little box to better understand the property page
|
|
367
|
-
$("#divColorsAtSwitchOnNightTime").hide();
|
|
368
|
-
$("#divTemperatureAtSwitchOnNightTime").show();
|
|
369
|
-
} else {
|
|
370
|
-
$("#divEnableDayNightLighting").hide();
|
|
371
|
-
$("#divCCSBoxAtNightLighting").css({ border: "", "border-radius": "", padding: "" });
|
|
372
|
-
}
|
|
373
|
-
});
|
|
374
|
-
|
|
375
|
-
$("#getColorAtSwitchOnDayTimeButton").on("click", function () {
|
|
376
|
-
$("#getColorAtSwitchOnDayTimeButton").text("Wait...");
|
|
377
|
-
let jRet;
|
|
378
|
-
let sQuery;
|
|
379
|
-
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
380
|
-
if ($("#node-input-specifySwitchOnBrightness").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
|
|
381
|
-
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
|
|
382
|
-
$("#node-input-colorAtSwitchOnDayTime").val(data);
|
|
383
|
-
$("#colorPickerDay").val(data);
|
|
384
|
-
blinkBackground("#colorPickerDay")
|
|
385
|
-
$("#getColorAtSwitchOnDayTimeButton").text("Get again");
|
|
386
|
-
});
|
|
387
|
-
});
|
|
388
|
-
|
|
389
|
-
$("#getColorAtSwitchOnNightTimeButton").on("click", function () {
|
|
390
|
-
$("#getColorAtSwitchOnNightTimeButton").text("Wait...");
|
|
391
|
-
let jRet;
|
|
392
|
-
let sQuery;
|
|
393
|
-
if ($("#node-input-enableDayNightLighting").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
394
|
-
if ($("#node-input-enableDayNightLighting").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
|
|
395
|
-
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
|
|
396
|
-
$("#node-input-colorAtSwitchOnNightTime").val(data);
|
|
397
|
-
$("#colorPickerNight").val(data);
|
|
398
|
-
blinkBackground("#colorPickerNight")
|
|
399
|
-
$("#getColorAtSwitchOnNightTimeButton").text("Get again");
|
|
400
|
-
});
|
|
401
|
-
});
|
|
402
|
-
|
|
403
|
-
// Fill options for minDimLevel and maxDimLevel and comboBrightnessAtSwitchOn (for color brightness at switch on, with temperature toghedher)
|
|
404
|
-
for (let index = 100; index >= 0; index -= 5) {
|
|
405
|
-
if (index === 0) {
|
|
406
|
-
$("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
407
|
-
$("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
408
|
-
$("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "% (Switch Off)"));
|
|
409
|
-
} else {
|
|
410
|
-
$("#node-input-minDimLevelLight").append($("<option>").val(index).text(index.toString() + "%"));
|
|
411
|
-
$("#comboBrightnessAtSwitchOn").append($("<option>").val(index).text(index.toString() + "%"));
|
|
412
|
-
$("#comboBrightnessAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "%"));
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
// Temperatures, from 2000 to 6535K (circa)
|
|
416
|
-
for (let index = 2000; index <= 6500; index += 100) {
|
|
417
|
-
if (index === 2200) {
|
|
418
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (start of philips white ambiance lights range)"));
|
|
419
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (start of philips white ambiance lights range)"));
|
|
420
|
-
} else if (index === 2700) {
|
|
421
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (warm white, intimate, cozy, personal, for living rooms)"));
|
|
422
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (warm white, intimate, cozy, personal, for living rooms)"));
|
|
423
|
-
} else if (index === 3000) {
|
|
424
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (soft white, warm, calming, for bathrooms and kitchens)"));
|
|
425
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (soft white, warm, calming, for bathrooms and kitchens)"));
|
|
426
|
-
} else if (index === 3500) {
|
|
427
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (neutral white, balanced, friendly, inviting, for office spaces and retail)"));
|
|
428
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - neutral white, for office spaces and retail)"));
|
|
429
|
-
} else if (index === 4100) {
|
|
430
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (cool white, precise, clean, focused, for garages and grocery stores)"));
|
|
431
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - cool white, precise, clean, focused, for garages and grocery stores)"));
|
|
432
|
-
} else if (index === 5000) {
|
|
433
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (bright white, vibrant, crisp, for warehouses, sports stadiums and healthcare)"));
|
|
434
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - bright white, vibrant, crisp, for warehouses, sports stadiums and healthcare)"));
|
|
435
|
-
} else if (index === 6500) {
|
|
436
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K (daylight, alert, energetic, for indoor agriculture)"));
|
|
437
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K (not recommended for night time - daylight, alert, energetic, for indoor agriculture)"));
|
|
438
|
-
} else {
|
|
439
|
-
$("#comboTemperatureAtSwitchOn").append($("<option>").val(index).text(index.toString() + "K"));
|
|
440
|
-
$("#comboTemperatureAtSwitchOnNightTime").append($("<option>").val(index).text(index.toString() + "K"));
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
// Calculate kelvin/color
|
|
446
|
-
let json;
|
|
447
|
-
node.colorAtSwitchOnDayTime = node.colorAtSwitchOnDayTime.replace("geen", "green"); // Old bug in "geen" property
|
|
448
|
-
node.colorAtSwitchOnNightTime = node.colorAtSwitchOnNightTime.replace("geen", "green"); // Old bug in "geen" property
|
|
449
|
-
try {
|
|
450
|
-
json = JSON.parse(node.colorAtSwitchOnDayTime);
|
|
451
|
-
} catch (error) {
|
|
452
|
-
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;
|
|
453
15
|
}
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
$("#comboTemperatureAtSwitchOn").val(json.kelvin);
|
|
457
|
-
$("#comboBrightnessAtSwitchOn").val(json.brightness);
|
|
458
|
-
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
459
|
-
} else if (json !== undefined && json.red !== undefined) {
|
|
460
|
-
// Must transform RGB into HTML HEX color
|
|
461
|
-
try {
|
|
462
|
-
$("#node-input-colorAtSwitchOnDayTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
463
|
-
} catch (error) {
|
|
464
|
-
}
|
|
465
|
-
$("#colorPickerDay").val($("#node-input-colorAtSwitchOnDayTime").val());
|
|
466
|
-
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
467
|
-
} else {
|
|
468
|
-
// It's already an HEX color
|
|
469
|
-
$("#colorPickerDay").val(node.colorAtSwitchOnDayTime);
|
|
470
|
-
if (node.specifySwitchOnBrightness !== 'no') $("#node-input-specifySwitchOnBrightness").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
471
|
-
}
|
|
472
|
-
//Night
|
|
473
|
-
json = undefined;
|
|
474
|
-
try {
|
|
475
|
-
json = JSON.parse(node.colorAtSwitchOnNightTime);
|
|
476
|
-
} catch (error) { }
|
|
477
|
-
if (json !== undefined && json.kelvin !== undefined) {
|
|
478
|
-
// Kelvin
|
|
479
|
-
$("#comboTemperatureAtSwitchOnNightTime").val(json.kelvin);
|
|
480
|
-
$("#comboBrightnessAtSwitchOnNightTime").val(json.brightness);
|
|
481
|
-
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('temperature'); // Adjust in case of mismatch (from old geen bug)
|
|
482
|
-
} else if (json !== undefined && json.red !== undefined) {
|
|
483
|
-
// Must transform RGB into HTML HEX color
|
|
484
|
-
try {
|
|
485
|
-
$("#node-input-colorAtSwitchOnNightTime").val("#" + rgbHex(json.red, json.green, json.blue));
|
|
486
|
-
} catch (error) {
|
|
487
|
-
}
|
|
488
|
-
$("#colorPickerNight").val($("#node-input-colorAtSwitchOnNightTime").val());
|
|
489
|
-
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
490
|
-
} else {
|
|
491
|
-
// It's already an HEX color
|
|
492
|
-
$("#colorPickerNight").val(node.colorAtSwitchOnNightTime);
|
|
493
|
-
if (node.enableDayNightLighting !== 'no') $("#node-input-enableDayNightLighting").val('yes'); // Adjust in case of mismatch (from old geen bug)
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
$("#comboTemperatureAtSwitchOn, #comboBrightnessAtSwitchOn").on("change", function () {
|
|
498
|
-
$("#node-input-colorAtSwitchOnDayTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOn").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOn").val() + ' }');
|
|
499
|
-
});
|
|
500
|
-
$("#comboTemperatureAtSwitchOnNightTime, #comboBrightnessAtSwitchOnNightTime").on("change", function () {
|
|
501
|
-
$("#node-input-colorAtSwitchOnNightTime").val('{ "kelvin":' + $("#comboTemperatureAtSwitchOnNightTime").val() + ', "brightness":' + $("#comboBrightnessAtSwitchOnNightTime").val() + ' }');
|
|
502
|
-
});
|
|
503
|
-
|
|
504
|
-
// Create and put the JSON to node-input-colorAtSwitchOnDayTime
|
|
505
|
-
$("#colorPickerDay").on("change", function () {
|
|
506
|
-
$("#node-input-colorAtSwitchOnDayTime").val(this.value);
|
|
507
|
-
});
|
|
508
|
-
$("#colorPickerNight").on("change", function () {
|
|
509
|
-
$("#node-input-colorAtSwitchOnNightTime").val(this.value);
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
$("#node-input-minDimLevelLight").val(node.minDimLevelLight);
|
|
514
|
-
for (let index = 100; index >= 10; index--) {
|
|
515
|
-
$("#node-input-maxDimLevelLight").append(
|
|
516
|
-
$("<option>")
|
|
517
|
-
.val(index)
|
|
518
|
-
.text(index.toString() + "%")
|
|
519
|
-
);
|
|
520
|
-
}
|
|
521
|
-
$("#node-input-maxDimLevelLight").val(node.maxDimLevelLight);
|
|
522
|
-
|
|
523
|
-
if (node.hueDevice !== "") $("#tabs").show(); // Light options
|
|
16
|
+
return i == aSearchWords.length;
|
|
17
|
+
}
|
|
524
18
|
|
|
525
19
|
|
|
526
20
|
|
|
527
|
-
// Autocomplete suggestion with HUE Lights
|
|
528
|
-
$("#node-input-name").autocomplete({
|
|
529
|
-
minLength: 1,
|
|
530
|
-
source: function (request, response) {
|
|
531
|
-
$.getJSON("KNXUltimateGetResourcesHUE?rtype=light&nodeID=" + oNodeServerHue.id + "&" + { _: new Date().getTime() }, (data) => {
|
|
532
|
-
response(
|
|
533
|
-
$.map(data.devices, function (value, key) {
|
|
534
|
-
//alert(JSON.stringify(value) + " "+ key)
|
|
535
|
-
var sSearch = value.name;
|
|
536
|
-
if (!value.name.includes("I'm still connecting")) {
|
|
537
|
-
if (fullSearch(sSearch, request.term)) {
|
|
538
|
-
return {
|
|
539
|
-
hueDevice: value.id,
|
|
540
|
-
value: value.name,
|
|
541
|
-
};
|
|
542
|
-
} else {
|
|
543
|
-
return null;
|
|
544
|
-
}
|
|
545
|
-
} else {
|
|
546
|
-
return {
|
|
547
|
-
hueDevice: value.id,
|
|
548
|
-
value: value.name,
|
|
549
|
-
};
|
|
550
|
-
}
|
|
551
|
-
})
|
|
552
|
-
);
|
|
553
|
-
});
|
|
554
|
-
},
|
|
555
|
-
select: function (event, ui) {
|
|
556
|
-
// Distinguish between group of lights an single light.
|
|
557
|
-
if (ui.item.value.toLowerCase().startsWith("grouped_light")) {
|
|
558
|
-
$("#node-input-hueDevice").val(ui.item.hueDevice + "#grouped_light");
|
|
559
|
-
} else {
|
|
560
|
-
$("#node-input-hueDevice").val(ui.item.hueDevice + "#light");
|
|
561
|
-
}
|
|
562
|
-
onEditPrepare(node);
|
|
563
|
-
$("#tabs").show();
|
|
564
|
-
},
|
|
565
|
-
});
|
|
566
|
-
}
|
|
567
|
-
|
|
568
21
|
RED.nodes.registerType("knxUltimateHueLight", {
|
|
569
22
|
category: "KNX Ultimate",
|
|
570
23
|
color: "#C0C7E9",
|
|
@@ -594,17 +47,25 @@
|
|
|
594
47
|
GALightColorState: { value: "" },
|
|
595
48
|
dptLightColorState: { value: "" },
|
|
596
49
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
50
|
+
nameLightKelvinDIM: { value: "" },
|
|
51
|
+
GALightKelvinDIM: { value: "" },
|
|
52
|
+
dptLightKelvinDIM: { value: "" },
|
|
53
|
+
|
|
54
|
+
nameLightKelvinPercentage: { value: "" },
|
|
55
|
+
GALightKelvinPercentage: { value: "" },
|
|
56
|
+
dptLightKelvinPercentage: { value: "" },
|
|
600
57
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
58
|
+
nameLightKelvinPercentageState: { value: "" },
|
|
59
|
+
GALightKelvinPercentageState: { value: "" },
|
|
60
|
+
dptLightKelvinPercentageState: { value: "" },
|
|
61
|
+
|
|
62
|
+
nameLightKelvin: { value: "" },
|
|
63
|
+
GALightKelvin: { value: "" },
|
|
64
|
+
dptLightKelvin: { value: "" },
|
|
604
65
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
66
|
+
nameLightKelvinState: { value: "" },
|
|
67
|
+
GALightKelvinState: { value: "" },
|
|
68
|
+
dptLightKelvinState: { value: "" },
|
|
608
69
|
|
|
609
70
|
nameLightBrightness: { value: "" },
|
|
610
71
|
GALightBrightness: { value: "" },
|
|
@@ -626,14 +87,6 @@
|
|
|
626
87
|
GADaylightSensor: { value: "" },
|
|
627
88
|
dptDaylightSensor: { value: "" },
|
|
628
89
|
|
|
629
|
-
nameLightKelvin: { value: "" },
|
|
630
|
-
GALightKelvin: { value: "" },
|
|
631
|
-
dptLightKelvin: { value: "" },
|
|
632
|
-
|
|
633
|
-
nameLightKelvinState: { value: "" },
|
|
634
|
-
GALightKelvinState: { value: "" },
|
|
635
|
-
dptLightKelvinState: { value: "" },
|
|
636
|
-
|
|
637
90
|
specifySwitchOnBrightness: { value: "temperature" },
|
|
638
91
|
colorAtSwitchOnDayTime: { value: '{"kelvin":3000, "brightness":100 }' },
|
|
639
92
|
|
|
@@ -664,26 +117,611 @@
|
|
|
664
117
|
},
|
|
665
118
|
paletteLabel: "Hue Light",
|
|
666
119
|
oneditprepare: function () {
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
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(), (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(), (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(), (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], (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
|
|
681
533
|
try {
|
|
682
|
-
node.
|
|
534
|
+
json = JSON.parse(node.colorAtSwitchOnDayTime);
|
|
683
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)
|
|
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) { }
|
|
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();
|
|
684
681
|
}
|
|
685
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
|
+
|
|
686
723
|
},
|
|
724
|
+
|
|
687
725
|
oneditsave: function () {
|
|
688
726
|
//RED.sidebar.removeTab("tabNRColor");
|
|
689
727
|
if ($("#node-input-enableNodePINS").val() === "yes") {
|
|
@@ -781,12 +819,12 @@
|
|
|
781
819
|
|
|
782
820
|
//#region color_temperature_mode
|
|
783
821
|
// ----------------------------
|
|
784
|
-
if ($("#node-input-
|
|
822
|
+
if ($("#node-input-GALightKelvinPercentage").val !== '') {
|
|
785
823
|
|
|
786
824
|
// color_temperature_mode: relative
|
|
787
825
|
sYaml += ' color_temperature_mode: relative' + '\n';
|
|
788
|
-
sYaml += ' color_temperature_address: "' + $("#node-input-
|
|
789
|
-
sYaml += $("#node-input-
|
|
826
|
+
sYaml += ' color_temperature_address: "' + $("#node-input-GALightKelvinPercentage").val() + '"\n';
|
|
827
|
+
sYaml += $("#node-input-GALightKelvinPercentageState").val() != '' ? ' color_temperature_state_address: "' + $("#node-input-GALightKelvinPercentageState").val() + '"' + "\n" : '';
|
|
790
828
|
sYaml += ' min_kelvin: 2200' + '\n';
|
|
791
829
|
sYaml += ' max_kelvin: 6500' + '\n';
|
|
792
830
|
|
|
@@ -832,430 +870,434 @@
|
|
|
832
870
|
|
|
833
871
|
|
|
834
872
|
<script type="text/html" data-template-name="knxUltimateHueLight">
|
|
835
|
-
<div
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
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
|
+
|
|
840
905
|
<br />
|
|
841
|
-
<p
|
|
842
|
-
<
|
|
906
|
+
<p>
|
|
907
|
+
<b>Philips HUE</b>
|
|
843
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
|
+
|
|
844
917
|
<br />
|
|
845
|
-
<label for="node-input-server">
|
|
846
|
-
<img
|
|
847
|
-
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>
|
|
848
|
-
KNX GW
|
|
849
|
-
</label>
|
|
850
|
-
<input type="text" id="node-input-server" />
|
|
851
|
-
</div>
|
|
852
918
|
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
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>
|
|
861
933
|
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
</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;">
|
|
866
937
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
<i class="fa fa-play-circle"></i> Name</label>
|
|
870
|
-
<input type="text" id="node-input-name" placeholder="Enter your hue device name" />
|
|
871
|
-
<input type="hidden" id="node-input-hueDevice" />
|
|
872
|
-
</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>
|
|
873
940
|
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
<li><a href="#tabs-2"><i class="fa-solid fa-arrow-up-wide-short fa-beat"></i> Dim/Brightness</a></li>
|
|
880
|
-
<li><a href="#tabs-3"><i class="fa-solid fa-temperature-quarter fa-beat"></i> Tunable white</a></li>
|
|
881
|
-
<li><a href="#tabs-4"><i class="fa-solid fa-palette fa-beat"></i> Colors</a></li>
|
|
882
|
-
<li><a href="#tabs-5"><i class="fa-solid fa-heart-circle-check fa-beat"></i> Effects</a></li>
|
|
883
|
-
<li><a href="#tabs-6"><i class="fa-solid fa-code-merge fa-beat"></i> Behaviour</a></li>
|
|
884
|
-
<li><a href="#tabs-7"><i class="fa-solid fa-house fa-beat"></i> Home Assistant Export (beta)</a></li>
|
|
885
|
-
</ul>
|
|
886
|
-
<div id="tabs-1">
|
|
887
|
-
<p>
|
|
888
|
-
<div class="form-row">
|
|
889
|
-
<label for="node-input-nameLightSwitch" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
890
|
-
|
|
891
|
-
<label for="node-input-GALightSwitch" style="width:20px;">GA</label>
|
|
892
|
-
<input type="text" id="node-input-GALightSwitch" placeholder="Ex: 1/1/1"
|
|
893
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
894
|
-
|
|
895
|
-
<label for="node-input-dptLightSwitch" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
896
|
-
<select id="node-input-dptLightSwitch" style="width:140px;"></select>
|
|
897
|
-
|
|
898
|
-
<label for="node-input-nameLightSwitch" style="width:50px; margin-left: 0px; text-align: right;">Name</label>
|
|
899
|
-
<input type="text" id="node-input-nameLightSwitch" style="width:190px;margin-left: 5px; text-align: left;">
|
|
900
|
-
</div>
|
|
901
|
-
<div class="form-row">
|
|
902
|
-
<label for="node-input-nameLightState" style="width:110px;"><i class="fa fa-play-circle-o"></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>
|
|
903
946
|
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
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;">
|
|
907
950
|
|
|
908
|
-
|
|
909
|
-
|
|
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>
|
|
910
953
|
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
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>
|
|
914
959
|
</div>
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
<div class="form-row">
|
|
920
|
-
<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>
|
|
921
964
|
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
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;">
|
|
925
968
|
|
|
926
|
-
|
|
927
|
-
|
|
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>
|
|
928
971
|
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
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>
|
|
936
979
|
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
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;">
|
|
940
983
|
|
|
941
|
-
|
|
942
|
-
|
|
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>
|
|
943
986
|
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
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>
|
|
948
991
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
Status</label>
|
|
952
|
-
|
|
953
|
-
<label for="node-input-GALightBrightnessState" style="width:20px;"><span
|
|
954
|
-
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
955
|
-
<input type="text" id="node-input-GALightBrightnessState" placeholder="Ex: 1/1/1"
|
|
956
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
957
|
-
|
|
958
|
-
<label for="node-input-dptLightBrightnessState"
|
|
959
|
-
style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
960
|
-
<select id="node-input-dptLightBrightnessState" style="width:140px;"></select>
|
|
961
|
-
|
|
962
|
-
<label for="node-input-nameLightBrightnessState" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
963
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
964
|
-
<input type="text" id="node-input-nameLightBrightnessState"
|
|
965
|
-
style="width:190px;margin-left: 5px; text-align: left;">
|
|
966
|
-
</div>
|
|
967
|
-
<div class="form-row">
|
|
968
|
-
<label for="node-input-dimSpeed" style="width:260px">
|
|
969
|
-
<i class="fa fa-bolt"></i> Dim Speed (ms)
|
|
970
|
-
</label>
|
|
971
|
-
<input type="text" id="node-input-dimSpeed" placeholder='Default is 5000' style="width:210px">
|
|
972
|
-
</div>
|
|
973
|
-
<div class="form-row">
|
|
974
|
-
<label for="node-input-minDimLevelLight" style="width:260px;">
|
|
975
|
-
<i class="fa fa-clone"></i> Min Dim Brightness
|
|
976
|
-
</label>
|
|
977
|
-
<select id="node-input-minDimLevelLight">
|
|
978
|
-
<option value="useHueLightLevel">Use minimum brightness specified in the HUE light</option>
|
|
979
|
-
</select>
|
|
980
|
-
</div>
|
|
981
|
-
<div class="form-row">
|
|
982
|
-
<label for="node-input-maxDimLevelLight" style="width:260px;">
|
|
983
|
-
<i class="fa fa-clone"></i> Max Dim Brightness
|
|
984
|
-
</label>
|
|
985
|
-
<select id="node-input-maxDimLevelLight"></select>
|
|
986
|
-
</div>
|
|
987
|
-
</p>
|
|
988
|
-
</div>
|
|
989
|
-
<div id="tabs-3">
|
|
990
|
-
<p>
|
|
991
|
-
<div class="form-row">
|
|
992
|
-
<label for="node-input-nameLightHSV" 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>
|
|
993
994
|
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
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;">
|
|
997
999
|
|
|
998
|
-
|
|
999
|
-
|
|
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>
|
|
1000
1003
|
|
|
1001
|
-
|
|
1002
|
-
|
|
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>
|
|
1003
1030
|
</div>
|
|
1004
|
-
<div
|
|
1005
|
-
<
|
|
1006
|
-
|
|
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>
|
|
1007
1035
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
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;">
|
|
1011
1039
|
|
|
1012
|
-
|
|
1013
|
-
|
|
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>
|
|
1014
1042
|
|
|
1015
|
-
|
|
1016
|
-
style="width:
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
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>
|
|
1022
1049
|
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
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;">
|
|
1026
1053
|
|
|
1027
|
-
|
|
1028
|
-
|
|
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>
|
|
1029
1056
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
<
|
|
1035
|
-
|
|
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>
|
|
1036
1064
|
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
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;">
|
|
1040
1068
|
|
|
1041
|
-
|
|
1042
|
-
|
|
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>
|
|
1043
1071
|
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
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>
|
|
1050
1078
|
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
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;">
|
|
1054
1082
|
|
|
1055
|
-
|
|
1056
|
-
|
|
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>
|
|
1057
1085
|
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
</label>
|
|
1065
|
-
<input type="checkbox" id="node-input-invertDimTunableWhiteDirection"
|
|
1066
|
-
style="display:inline-block; width:auto; vertical-align:top;" />
|
|
1067
|
-
</div>
|
|
1068
|
-
</p>
|
|
1069
|
-
</div>
|
|
1070
|
-
<div id="tabs-4">
|
|
1071
|
-
<p>
|
|
1072
|
-
<div class="form-row">
|
|
1073
|
-
<label for="node-input-nameLightColor" style="width:110px;"><i class="fa fa-play-circle-o"></i> Control</label>
|
|
1074
|
-
|
|
1075
|
-
<label for="node-input-GALightColor" style="width:20px;"><span
|
|
1076
|
-
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
1077
|
-
<input type="text" id="node-input-GALightColor" placeholder="Ex: 1/1/1"
|
|
1078
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1079
|
-
|
|
1080
|
-
<label for="node-input-dptLightColor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1081
|
-
<select id="node-input-dptLightColor" style="width:140px;"></select>
|
|
1082
|
-
|
|
1083
|
-
<label for="node-input-nameLightColor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1084
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1085
|
-
<input type="text" id="node-input-nameLightColor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1086
|
-
</div>
|
|
1087
|
-
<div class="form-row">
|
|
1088
|
-
<label for="node-input-nameLightColorState" style="width:110px;"><i class="fa fa-play-circle-o"></i>
|
|
1089
|
-
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>
|
|
1090
1092
|
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
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;">
|
|
1095
1096
|
|
|
1096
|
-
|
|
1097
|
-
|
|
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>
|
|
1098
1099
|
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
<label for="node-input-GALightBlink" style="width:20px;"><span
|
|
1111
|
-
data-i18n="knxUltimateHueLight.node-input-GALightState"></span></label>
|
|
1112
|
-
<input type="text" id="node-input-GALightBlink" placeholder="Ex: 1/1/1"
|
|
1113
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1114
|
-
|
|
1115
|
-
<label for="node-input-dptLightBlink" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1116
|
-
<select id="node-input-dptLightBlink" style="width:140px;"></select>
|
|
1117
|
-
|
|
1118
|
-
<label for="node-input-nameLightBlink" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1119
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1120
|
-
<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>
|
|
1121
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>
|
|
1116
|
+
|
|
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;">
|
|
1122
1121
|
|
|
1123
|
-
|
|
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>
|
|
1124
1129
|
<div class="form-row">
|
|
1125
|
-
<label for="node-input-
|
|
1126
|
-
Cycle</label>
|
|
1130
|
+
<label for="node-input-nameLightColorState" style="width:110px;"><i class="fa fa-question-circle"></i> Status</label>
|
|
1127
1131
|
|
|
1128
|
-
<label for="node-input-
|
|
1129
|
-
|
|
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"
|
|
1130
1135
|
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1131
1136
|
|
|
1132
|
-
<label for="node-input-
|
|
1133
|
-
<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>
|
|
1134
1139
|
|
|
1135
|
-
<label for="node-input-
|
|
1140
|
+
<label for="node-input-nameLightColorState" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1136
1141
|
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1137
|
-
<input type="text" id="node-input-
|
|
1142
|
+
<input type="text" id="node-input-nameLightColorState" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1138
1143
|
</div>
|
|
1144
|
+
</p>
|
|
1139
1145
|
</div>
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
<div id="tabs-6">
|
|
1143
|
-
<p>
|
|
1144
|
-
<div class="form-row">
|
|
1145
|
-
<label style="width:260px;" for="node-input-readStatusAtStartup"><i class="fa fa-play-circle"></i> Read status at
|
|
1146
|
-
startup</label>
|
|
1147
|
-
<select id="node-input-readStatusAtStartup">
|
|
1148
|
-
<option value="no">No</option>
|
|
1149
|
-
<option value="yes">Yes, and emit KNX telegrams.</option>
|
|
1150
|
-
</select>
|
|
1151
|
-
</div>
|
|
1152
|
-
<div class="form-row" id="divUpdateKNXBrightnessStatusOnHUEOnOff">
|
|
1153
|
-
<label style="width:260px;" for="node-input-updateKNXBrightnessStatusOnHUEOnOff">
|
|
1154
|
-
<i class="fa fa-tag"></i> KNX Brightness Status
|
|
1155
|
-
</label>
|
|
1156
|
-
<select id="node-input-updateKNXBrightnessStatusOnHUEOnOff">
|
|
1157
|
-
<option value="onhueoff">When HUE light is Off send 0%. When HUE On, restore previous value (Default KNX behaviour)</option>
|
|
1158
|
-
<option value="no">Leave as is (default HUE behaviour)</option>
|
|
1159
|
-
</select>
|
|
1160
|
-
</div>
|
|
1161
|
-
<div id ="divBehaviourBrightness">
|
|
1146
|
+
<div id="tabs-5">
|
|
1147
|
+
<p>
|
|
1162
1148
|
<div class="form-row">
|
|
1163
|
-
<label for="node-input-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
</
|
|
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;">
|
|
1171
1162
|
</div>
|
|
1172
1163
|
|
|
1173
|
-
<div
|
|
1174
|
-
<
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
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>
|
|
1179
1180
|
</div>
|
|
1180
|
-
|
|
1181
|
-
|
|
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
|
|
1182
1196
|
</label>
|
|
1183
|
-
<select
|
|
1184
|
-
|
|
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>
|
|
1185
1201
|
</div>
|
|
1186
|
-
|
|
1187
|
-
<div id="divCCSBoxAtNightLighting">
|
|
1202
|
+
<div id ="divBehaviourBrightness">
|
|
1188
1203
|
<div class="form-row">
|
|
1189
|
-
<label for="node-input-
|
|
1190
|
-
<i class="fa fa-
|
|
1204
|
+
<label for="node-input-specifySwitchOnBrightness" style="width:260px;">
|
|
1205
|
+
<i class="fa fa-tag"></i> Switch on behaviour
|
|
1191
1206
|
</label>
|
|
1192
|
-
<select id="node-input-
|
|
1193
|
-
<option value="no">
|
|
1207
|
+
<select id="node-input-specifySwitchOnBrightness">
|
|
1208
|
+
<option value="no">None</option>
|
|
1194
1209
|
<!-- <option value="temperature">Select temperature and brightness</option>
|
|
1195
1210
|
<option value="yes">Select color</option> -->
|
|
1196
1211
|
</select>
|
|
1197
1212
|
</div>
|
|
1198
1213
|
|
|
1199
|
-
<div id="
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
<
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
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>
|
|
1212
1227
|
|
|
1228
|
+
<div id="divCCSBoxAtNightLighting">
|
|
1213
1229
|
<div class="form-row">
|
|
1214
|
-
<label for="node-input-
|
|
1215
|
-
|
|
1216
|
-
<label for="node-input-GADaylightSensor" style="width:20px;">GA</label>
|
|
1217
|
-
<input type="text" id="node-input-GADaylightSensor" placeholder="Ex: 1/1/1"
|
|
1218
|
-
style="width:70px;margin-left: 5px; text-align: left;">
|
|
1219
|
-
|
|
1220
|
-
<label for="node-input-dptDaylightSensor" style="width:40px; margin-left: 0px; text-align: right;">DPT</label>
|
|
1221
|
-
<select id="node-input-dptDaylightSensor" style="width:140px;"></select>
|
|
1222
|
-
|
|
1223
|
-
<label for="node-input-nameDaylightSensor" style="width:50px; margin-left: 0px; text-align: right;"><span
|
|
1224
|
-
data-i18n="knxUltimateHueLight.node-input-name"></span></label>
|
|
1225
|
-
<input type="text" id="node-input-nameDaylightSensor" style="width:190px;margin-left: 5px; text-align: left;">
|
|
1226
|
-
</div>
|
|
1227
|
-
<div class="form-row">
|
|
1228
|
-
<label style="width:170px" for="node-input-invertDayNight">
|
|
1229
|
-
<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
|
|
1230
1232
|
</label>
|
|
1231
|
-
<
|
|
1232
|
-
|
|
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>
|
|
1233
1275
|
</div>
|
|
1234
1276
|
</div>
|
|
1277
|
+
<br/>
|
|
1235
1278
|
</div>
|
|
1236
|
-
<
|
|
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>
|
|
1287
|
+
</div>
|
|
1288
|
+
</p>
|
|
1237
1289
|
</div>
|
|
1238
|
-
<div
|
|
1239
|
-
<
|
|
1240
|
-
<
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
<option value="yes">Show node input/output PINs</option>
|
|
1245
|
-
</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>
|
|
1246
1296
|
</div>
|
|
1247
|
-
</p>
|
|
1248
|
-
</div>
|
|
1249
|
-
<div id="tabs-7">
|
|
1250
|
-
<p>
|
|
1251
|
-
<br/> <b>YAML</b> <br/>
|
|
1252
|
-
<div style="height: 220px; min-height:150px;" class="node-text-editor" id="aceEditor"></div>
|
|
1253
|
-
<!-- <button type="button" class="red-ui-button">Button</button> -->
|
|
1254
|
-
</p>
|
|
1255
1297
|
</div>
|
|
1256
1298
|
</div>
|
|
1257
|
-
|
|
1258
|
-
|
|
1299
|
+
<br />
|
|
1300
|
+
</script>
|
|
1259
1301
|
|
|
1260
1302
|
|
|
1261
1303
|
<script type="text/markdown" data-help-name="knxUltimateHueLight">
|
|
@@ -1300,9 +1342,9 @@ Start typing in the GA field, the name or group address of your KNX device, the
|
|
|
1300
1342
|
|--|--|
|
|
1301
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.|
|
|
1302
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.|
|
|
1303
|
-
| 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.|
|
|
1304
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.|
|
|
1305
|
-
| 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. |
|
|
1306
1348
|
| Invert DIM direction | Inverts the DIM direction. |
|
|
1307
1349
|
<br/>
|
|
1308
1350
|
|