node-red-contrib-knx-ultimate 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
-
**Version 2.4.
|
|
9
|
+
**Version 2.4.2** - Jan 2024<br/>
|
|
10
10
|
- NEW: Added KNX Datapoint 275.100<br/>
|
|
11
11
|
- HUE Light: fixed https://github.com/Supergiovane/node-red-contrib-knx-ultimate/issues/317<br/>
|
|
12
12
|
- HUE Light: corrected the 7.600 kelvin range https://github.com/Supergiovane/node-red-contrib-knx-ultimate/issues/316<br/>
|
|
@@ -19,9 +19,8 @@ exports.formatAPDU = function (value) {
|
|
|
19
19
|
const economy = dpt9.formatAPDU(value.economy);
|
|
20
20
|
const buildingProtection = dpt9.formatAPDU(value.buildingProtection);
|
|
21
21
|
return Buffer.concat([comfort, standby, economy, buildingProtection]);
|
|
22
|
-
} else {
|
|
23
|
-
knxLog.get().error('DPT275.formatAPDU: Must supply all values, for example {comfort:22, standby:21.5, economy:21, buildingProtection:15}');
|
|
24
22
|
}
|
|
23
|
+
knxLog.get().error('DPT275.formatAPDU: Must supply all values, for example {comfort:22, standby:21.5, economy:21, buildingProtection:15}');
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
exports.fromBuffer = function (buf) {
|
|
@@ -45,13 +44,13 @@ exports.basetype = {
|
|
|
45
44
|
help:
|
|
46
45
|
`// Send comfort, standby, economy mode and buildingProtection temperatures, as n.4 DPT9.001.
|
|
47
46
|
msg.payload = {comfort:22, standby:21.5, economy:21, buildingProtection:15};
|
|
48
|
-
return msg
|
|
47
|
+
return msg;`,
|
|
49
48
|
}
|
|
50
49
|
|
|
51
50
|
// DPT9 subtypes
|
|
52
51
|
exports.subtypes = {
|
|
53
52
|
// 9.001 temperature (oC)
|
|
54
|
-
|
|
53
|
+
100: {
|
|
55
54
|
name: 'Quadruple setpoints (comfort,standby,economy,buildingProtection) (4 float with 16 Bit)',
|
|
56
55
|
desc: 'DPT_TempRoomSetpSetF16[4]',
|
|
57
56
|
unit: '°C',
|
package/nodes/knxUltimate.html
CHANGED
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
|
|
79
79
|
// 15/09/2020 Supergiovane, set the help sample based on Datapoint
|
|
80
80
|
function knxUltimateDptsGetHelp(_dpt, _forceClose) {
|
|
81
|
-
$.getJSON("knxUltimateDptsGetHelp?dpt=" + _dpt + "&serverId=" + $("#node-input-server").val(), (data) => {
|
|
81
|
+
$.getJSON("knxUltimateDptsGetHelp?dpt=" + _dpt + "&serverId=" + $("#node-input-server").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
82
82
|
try {
|
|
83
83
|
$("#example-editor").html("");
|
|
84
84
|
$("#sampleCodeEditor").html();
|
|
@@ -86,23 +86,27 @@
|
|
|
86
86
|
delete node.sampleEditor;
|
|
87
87
|
} catch (error) {
|
|
88
88
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
try {
|
|
90
|
+
if (data.help !== "NO") {
|
|
91
|
+
node.sampleEditor = RED.editor.createEditor({
|
|
92
|
+
id: 'example-editor',
|
|
93
|
+
mode: 'ace/mode/javascript',
|
|
94
|
+
value: data.help//this.exampleText
|
|
95
|
+
}).renderer.setShowGutter(false);//A.setReadOnly(true).setShowPrintMargin(false);
|
|
96
|
+
if (data.helplink !== "") $("#sampleCodeEditor").html(" <i class=\"fa fa-question-circle\"></i> <a target=\"_blank\" href=\"" + data.helplink + "\"><u>Link example of " + _dpt + "</u></a>");
|
|
97
|
+
} else {
|
|
98
|
+
// No help avaiable
|
|
99
|
+
node.sampleEditor = RED.editor.createEditor({
|
|
100
|
+
id: 'example-editor',
|
|
101
|
+
mode: 'ace/mode/javascript',
|
|
102
|
+
value: "Currently, no sample payload is avaiable, sorry."
|
|
103
|
+
}).renderer.setShowGutter(false);//B.setReadOnly(true).setShowPrintMargin(false);
|
|
104
|
+
if (data.helplink !== "") $("#sampleCodeEditor").html(" <i class=\"fa fa-question-circle\"></i> <a target=\"_blank\" href=\"" + data.helplink + "\"><u>Link to wiki</u></a>");
|
|
105
|
+
}
|
|
106
|
+
} catch (error) {
|
|
104
107
|
}
|
|
105
108
|
})
|
|
109
|
+
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
// 02/04/2020 Alert user about data type
|
|
@@ -133,7 +137,7 @@
|
|
|
133
137
|
// ###########################
|
|
134
138
|
|
|
135
139
|
|
|
136
|
-
$.getJSON("knxUltimateDpts?serverId=" + $("#node-input-server").val(), (data) => {
|
|
140
|
+
$.getJSON("knxUltimateDpts?serverId=" + $("#node-input-server").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
137
141
|
data.forEach(dpt => {
|
|
138
142
|
$("#node-input-dpt").append($("<option></option>")
|
|
139
143
|
.attr("value", dpt.value)
|
|
@@ -214,7 +218,7 @@
|
|
|
214
218
|
$("#node-input-topic").autocomplete({
|
|
215
219
|
minLength: 1,
|
|
216
220
|
source: function (request, response) {
|
|
217
|
-
$.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id, (data) => {
|
|
221
|
+
$.getJSON("knxUltimatecsv?nodeID=" + oNodeServer.id + "&" + { _: new Date().getTime() }, (data) => {
|
|
218
222
|
response($.map(data, function (value, key) {
|
|
219
223
|
var sSearch = (value.ga + " (" + value.devicename + ") DPT" + value.dpt);
|
|
220
224
|
if (fullSearch(sSearch, request.term)) {
|
|
@@ -311,6 +315,7 @@
|
|
|
311
315
|
// 15/09/2020 Supergiovane, Detele the sample help editor
|
|
312
316
|
try {
|
|
313
317
|
node.sampleEditor.destroy();
|
|
318
|
+
RED.editor.destroy(); // 23/01/2024 added
|
|
314
319
|
delete node.sampleEditor;
|
|
315
320
|
} catch (error) { }
|
|
316
321
|
|
|
@@ -319,6 +324,7 @@
|
|
|
319
324
|
// 15/09/2020 Supergiovane, Detele the sample help editor
|
|
320
325
|
try {
|
|
321
326
|
node.sampleEditor.destroy();
|
|
327
|
+
RED.editor.destroy(); // 23/01/2024 added
|
|
322
328
|
delete node.sampleEditor;
|
|
323
329
|
} catch (error) { }
|
|
324
330
|
}
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
// DPT Switch command
|
|
149
149
|
// ########################
|
|
150
150
|
$(_destinationWidget).empty();
|
|
151
|
-
$.getJSON("knxUltimateDpts?serverId=" + $("#node-input-server").val(), (data) => {
|
|
151
|
+
$.getJSON("knxUltimateDpts?serverId=" + $("#node-input-server").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
152
152
|
data.forEach((dpt) => {
|
|
153
153
|
if (dpt.value.startsWith(_dpt)) {
|
|
154
154
|
// Adjustment for HUE Temperature
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
minLength: 1,
|
|
178
178
|
source: function (request, response) {
|
|
179
179
|
//$.getJSON("csv", request, function( data, status, xhr ) {
|
|
180
|
-
$.getJSON("knxUltimatecsv?nodeID=" + $("#node-input-server").val(), (data) => {
|
|
180
|
+
$.getJSON("knxUltimatecsv?nodeID=" + $("#node-input-server").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
181
181
|
response(
|
|
182
182
|
$.map(data, function (value, key) {
|
|
183
183
|
var sSearch = value.ga + " (" + value.devicename + ") DPT" + value.dpt;
|
|
@@ -462,7 +462,7 @@
|
|
|
462
462
|
let sQuery;
|
|
463
463
|
if ($("#node-input-specifySwitchOnBrightness").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
464
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) => {
|
|
465
|
+
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
466
466
|
$("#node-input-colorAtSwitchOnDayTime").val(data);
|
|
467
467
|
$("#colorPickerDay").val(data);
|
|
468
468
|
blinkBackground("#colorPickerDay")
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
let sQuery;
|
|
477
477
|
if ($("#node-input-enableDayNightLighting").val() === "yes") sQuery = "knxUltimateGetHueColor";
|
|
478
478
|
if ($("#node-input-enableDayNightLighting").val() === "temperature") sQuery = "knxUltimateGetKelvinColor";
|
|
479
|
-
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0], (data) => {
|
|
479
|
+
$.getJSON(sQuery + "?id=" + $("#node-input-hueDevice").val().split("#")[0] + "&" + { _: new Date().getTime() }, (data) => {
|
|
480
480
|
$("#node-input-colorAtSwitchOnNightTime").val(data);
|
|
481
481
|
$("#colorPickerNight").val(data);
|
|
482
482
|
blinkBackground("#colorPickerNight")
|
|
@@ -703,7 +703,7 @@
|
|
|
703
703
|
}
|
|
704
704
|
// Check wether the HUE node has is connected and the devices have already been read.
|
|
705
705
|
// ##########################################################
|
|
706
|
-
$.getJSON("knxultimateCheckHueConnected?serverId=" + $("#node-input-serverHue").val()
|
|
706
|
+
$.getJSON("knxultimateCheckHueConnected?serverId=" + $("#node-input-serverHue").val() + "&" + { _: new Date().getTime() }, (data) => {
|
|
707
707
|
if (data.ready === true) {
|
|
708
708
|
Go();
|
|
709
709
|
} else {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=16.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.4.
|
|
6
|
+
"version": "2.4.2",
|
|
7
7
|
"description": "Control your KNX intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control and ETS group address importer. Easy to use and highly configurable.",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"binary-parser": "2.2.1",
|