node-red-contrib-knx-ultimate 3.0.0 → 3.0.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,6 +6,14 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
**Version 3.0.2** - Juli 2024<br/>
|
|
10
|
+
- Warning: Node-Red version **equals or major than 3.1.1** is needed to run this node.<br/>
|
|
11
|
+
- HUE BRIDGE: added the message to DEPLOY the flow prior to proceed, when you're creating a new HUE CONFIG node.<br/>
|
|
12
|
+
|
|
13
|
+
**Version 3.0.1** - Juli 2024<br/>
|
|
14
|
+
- Warning: Node-Red version **equals or major than 3.1.1** is needed to run this node.<br/>
|
|
15
|
+
- FEATURE: Due to multiple users not well knowing the KNX Protocol, by default new nodes have "Auto" in the protocol field. The node will automatically detect and apply the correct protocol. This is the real AI.<br/>
|
|
16
|
+
|
|
9
17
|
**Version 3.0.0** - Juli 2024<br/>
|
|
10
18
|
- Warning: Node-Red version **equals or major than 3.1.1** is needed to run this node.<br/>
|
|
11
19
|
- FEATURE CAUTION: rewrote the KNX engine in Typescript. If you encounter problems, please open a gitub issue. You can revert by installing the older version 2.5.1 <br/>
|
package/img/readmemain.png
CHANGED
|
Binary file
|
|
Binary file
|
package/nodes/commonFunctions.js
CHANGED
|
@@ -354,7 +354,9 @@ module.exports = (RED) => {
|
|
|
354
354
|
const serverId = RED.nodes.getNode(req.query.serverId); // Retrieve node.id of the config node.
|
|
355
355
|
if (serverId === null) {
|
|
356
356
|
RED.log.warn(`Warn KNXUltimateGetResourcesHUE serverId is null`);
|
|
357
|
-
|
|
357
|
+
const jRet = [];
|
|
358
|
+
jRet.push({ name: 'PLEASE DEPLOY FIRST: then try again.', id: 'error' })
|
|
359
|
+
res.json({ devices: jRet });
|
|
358
360
|
return;
|
|
359
361
|
}
|
|
360
362
|
const jRet = serverId.getResources(req.query.rtype);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
port: { value: 3671, required: true, validate: RED.validators.number() },
|
|
9
9
|
// the KNX physical address we'd like to use
|
|
10
10
|
physAddr: { value: "15.15.22", required: true },
|
|
11
|
-
hostProtocol: { value: "
|
|
11
|
+
hostProtocol: { value: "Auto", required: false }, // TunnelUDP/TunnelTCP/Multicast
|
|
12
12
|
// enable this option to suppress the acknowledge flag with outgoing L_Data.req requests. LoxOne needs this
|
|
13
13
|
suppressACKRequest: { value: false },
|
|
14
14
|
csv: { value: "", required: false },
|
|
@@ -48,43 +48,6 @@
|
|
|
48
48
|
.text("Manually enter interface's name")
|
|
49
49
|
);
|
|
50
50
|
|
|
51
|
-
// Auto set the tunnel type, if hostProtocol is null (comes from older versions not having such property)
|
|
52
|
-
if ($("#node-config-input-hostProtocol").val() === null) {
|
|
53
|
-
$("#node-config-input-hostProtocol").val($("#node-config-input-host").val() === "224.0.23.12" ? "Multicast" : "TunnelUDP");
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Auto set protocol based on IP
|
|
57
|
-
|
|
58
|
-
$("#node-config-input-host").on('focusout', function () {
|
|
59
|
-
let suggestedProtocol = "";
|
|
60
|
-
// 11/07/2022 only if the previous value was undefined, automatic set the protocol
|
|
61
|
-
if ($("#node-config-input-host").val().startsWith("224.") ||
|
|
62
|
-
$("#node-config-input-host").val().startsWith("225.") ||
|
|
63
|
-
$("#node-config-input-host").val().startsWith("232.") ||
|
|
64
|
-
$("#node-config-input-host").val().startsWith("233.") ||
|
|
65
|
-
$("#node-config-input-host").val().startsWith("234.") ||
|
|
66
|
-
$("#node-config-input-host").val().startsWith("235.") ||
|
|
67
|
-
$("#node-config-input-host").val().startsWith("239.")) {
|
|
68
|
-
suggestedProtocol = "Multicast.";
|
|
69
|
-
} else {
|
|
70
|
-
suggestedProtocol = "TunnelUDP or TunnelTCP (if the interface is KNX-Secure).";
|
|
71
|
-
}
|
|
72
|
-
var myNotification = RED.notify("The suggested protocol based on your input, is " + suggestedProtocol,
|
|
73
|
-
{
|
|
74
|
-
modal: false,
|
|
75
|
-
fixed: false,
|
|
76
|
-
type: 'info',
|
|
77
|
-
buttons: [
|
|
78
|
-
{
|
|
79
|
-
text: "Ok",
|
|
80
|
-
click: function (e) {
|
|
81
|
-
myNotification.close();
|
|
82
|
-
}
|
|
83
|
-
}]
|
|
84
|
-
})
|
|
85
|
-
|
|
86
|
-
});
|
|
87
|
-
|
|
88
51
|
$.getJSON('knxUltimateETHInterfaces', (data) => {
|
|
89
52
|
data.sort().forEach(iFace => {
|
|
90
53
|
$("#node-config-input-KNXEthInterface").append($("<option></option>")
|
|
@@ -215,32 +178,18 @@
|
|
|
215
178
|
<script type="text/html" data-template-name="knxUltimate-config">
|
|
216
179
|
<div class="form-row">
|
|
217
180
|
<b><span data-i18n="knxUltimate-config.properties.title"></span></b>  <span style="color:red" data-i18n="[html]knxUltimate-config.properties.helplink"></span>
|
|
218
|
-
<br/><br/>
|
|
219
|
-
<div class="form-row">
|
|
220
|
-
<label for="node-config-input-name" style="width: 50px" >
|
|
221
|
-
<i class="fa fa-tag"></i>
|
|
222
|
-
<span data-i18n="knxUltimate-config.properties.node-config-input-name"></span>
|
|
223
|
-
</label>
|
|
224
|
-
<input type="text" id="node-config-input-name" >Name
|
|
181
|
+
<br/><br/>
|
|
225
182
|
</div>
|
|
226
183
|
|
|
227
184
|
<div class="form-row">
|
|
228
|
-
<label for="node-config-input-
|
|
229
|
-
<i class="fa fa-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
</label>
|
|
237
|
-
<input type="text" id="node-config-input-port" style="width: 50px"><data-i18n="[Title]knxUltimate-config.properties.port_info" style="margin-left:5px;">
|
|
238
|
-
|
|
239
|
-
<select id="node-config-input-hostProtocol" style="margin-left:5px; width:120px;">
|
|
240
|
-
<option value="TunnelUDP" >Tunnel UDP</option>
|
|
241
|
-
<option value="Multicast" >Multicast</option>
|
|
242
|
-
<!-- <option value="TunnelTCP" >Tunnel TCP</option> -->
|
|
243
|
-
</select>
|
|
185
|
+
<label for="node-config-input-name" style="width: 200px" >
|
|
186
|
+
<i class="fa fa-tag"></i> Name </label>
|
|
187
|
+
<input type="text" id="node-config-input-name" style="width: 200px">
|
|
188
|
+
</div>
|
|
189
|
+
<div class="form-row">
|
|
190
|
+
<label for="node-config-input-host" style="width: 200px">
|
|
191
|
+
<i class="fa fa-server"></i> IP/Hostname</label>
|
|
192
|
+
<input type="text" id="node-config-input-host" style="width: 200px">
|
|
244
193
|
</div>
|
|
245
194
|
|
|
246
195
|
<!-- KNX Secure / Unsecure tabbed selector-->
|
|
@@ -286,12 +235,30 @@
|
|
|
286
235
|
</ul>
|
|
287
236
|
<div id="tabs-1">
|
|
288
237
|
<p>
|
|
238
|
+
|
|
239
|
+
<div class="form-row">
|
|
240
|
+
<label for="node-config-input-port" style="width: 200px">
|
|
241
|
+
IP Port
|
|
242
|
+
</label>
|
|
243
|
+
<input type="text" id="node-config-input-port" style="width: 100px">
|
|
244
|
+
</div>
|
|
245
|
+
<div class="form-row">
|
|
246
|
+
<label for="node-config-input-hostProtocol" style="width: 200px">
|
|
247
|
+
IP Protocol
|
|
248
|
+
</label>
|
|
249
|
+
<select id="node-config-input-hostProtocol" >
|
|
250
|
+
<option value="Auto" >Auto</option>
|
|
251
|
+
<option value="TunnelUDP" >Tunnel UDP (KNX/IP Interface)</option>
|
|
252
|
+
<option value="Multicast" >Multicast (KNX/IP Router)</option>
|
|
253
|
+
<!-- <option value="TunnelTCP" >Tunnel TCP</option> -->
|
|
254
|
+
</select>
|
|
255
|
+
</div>
|
|
289
256
|
<div class="form-row">
|
|
290
257
|
<label for="node-config-input-physAddr" style="width: 200px">
|
|
291
258
|
<i class="fa fa-microchip"></i>
|
|
292
259
|
<span data-i18n="knxUltimate-config.advanced.knx_phy_addr"></span>
|
|
293
260
|
</label>
|
|
294
|
-
<input type="text" id="node-config-input-physAddr" style="width:
|
|
261
|
+
<input type="text" id="node-config-input-physAddr" style="width:100px">
|
|
295
262
|
</div>
|
|
296
263
|
|
|
297
264
|
<div class="form-row">
|
|
@@ -443,14 +410,14 @@
|
|
|
443
410
|
|--|--|
|
|
444
411
|
| Name | Node name. |
|
|
445
412
|
| IP/Hostname | ETH/KNX Router multicast address or Interface unicast IP address. If you have an KNX/IP interface, use the interface's IP address, for example 1982.168.1.22, otherwise, if you have a KNX/IP router, put the multicast address 224.0.23.12. You can also type an **Hostname** instead of an IP. |
|
|
446
|
-
| Port | The port. |
|
|
447
|
-
| Protocol dropdown | *Tunnel UDP* is for KNX/IP interfaces, *Multicast UDP* is for KNX/IP Routers. |
|
|
448
413
|
|
|
449
414
|
<br/>
|
|
450
415
|
|
|
451
416
|
**Configuration**
|
|
452
417
|
|Property|Description|
|
|
453
418
|
|--|--|
|
|
419
|
+
| IP Port | The port. |
|
|
420
|
+
| IP Protocol | *Tunnel UDP* is for KNX/IP interfaces, *Multicast UDP* is for KNX/IP Routers. Leave **Auto** for auto detect. |
|
|
454
421
|
| Bind to local interface | The Node will use this local interface for communications. Leave "Auto" for automatic selection. If you have more than one lan connection, for example Ethernet and Wifi, it's strongly recommended to manually select the interface, otherwise not all UDP telegram will reach your computer, thus the Node may not work as expected. |
|
|
455
422
|
| Automatically connect to KNX BUS at start | Auto connect to the bus at start. You want to leave it enabled. |
|
|
456
423
|
| KNX Physical Address | The physical KNX address, example 1.1.200 |
|
|
@@ -102,12 +102,12 @@ module.exports = (RED) => {
|
|
|
102
102
|
node.knxConnectionProperties = null; // Retains the connection properties
|
|
103
103
|
node.allowLauch_initKNXConnection = true; // See the node.timerKNXUltimateCheckState function
|
|
104
104
|
node.timerClearTelegramQueue = null; // Timer to clear the telegram's queue after long disconnection
|
|
105
|
-
node.hostProtocol = "
|
|
105
|
+
node.hostProtocol = config.hostProtocol === undefined ? "Auto" : config.hostProtocol; // 20/03/2022 Default
|
|
106
106
|
node.knxConnection = null; // 20/03/2022 Default
|
|
107
107
|
// 15/12/2021
|
|
108
108
|
|
|
109
109
|
// 05/12/2021 Set the protocol (this is undefined if coming from ild versions
|
|
110
|
-
if (config.hostProtocol ===
|
|
110
|
+
if (config.hostProtocol === "Auto") {
|
|
111
111
|
// Auto set protocol based on IP
|
|
112
112
|
if (
|
|
113
113
|
node.host.startsWith("224.") ||
|
|
@@ -120,12 +120,9 @@ module.exports = (RED) => {
|
|
|
120
120
|
) {
|
|
121
121
|
node.hostProtocol = "Multicast";
|
|
122
122
|
} else {
|
|
123
|
-
// 11/07/2022
|
|
124
123
|
node.hostProtocol = "TunnelUDP";
|
|
125
124
|
}
|
|
126
|
-
if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info("IP Protocol
|
|
127
|
-
} else {
|
|
128
|
-
node.hostProtocol = config.hostProtocol;
|
|
125
|
+
if (node.sysLogger !== undefined && node.sysLogger !== null) node.sysLogger.info("IP Protocol AUTO SET to " + node.hostProtocol + ", based on IP " + node.host);
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
node.setAllClientsStatus = (_status, _color, _text) => {
|
|
@@ -728,11 +728,18 @@
|
|
|
728
728
|
timerWaitBackEndCounter++;
|
|
729
729
|
if (timerWaitBackEndCounter > 40) {
|
|
730
730
|
timerWaitBackEndCounter = 0;
|
|
731
|
-
RED.notify("Something went wrong. Please make sure the HUE bridge connection is
|
|
731
|
+
const myNotification = RED.notify("Something went wrong. Please make sure the HUE bridge connection is properly configured. For further info, see the node-red log. IF YOU ARE CREATING A NEW HUE CONFIGURATION NODE, PLEASE DEPLOY AND RETRY.",
|
|
732
732
|
{
|
|
733
733
|
modal: false,
|
|
734
|
-
fixed:
|
|
735
|
-
type: 'error'
|
|
734
|
+
fixed: true,
|
|
735
|
+
type: 'error',
|
|
736
|
+
buttons: [
|
|
737
|
+
{
|
|
738
|
+
text: "OK",
|
|
739
|
+
click: function (e) {
|
|
740
|
+
myNotification.close();
|
|
741
|
+
}
|
|
742
|
+
}]
|
|
736
743
|
})
|
|
737
744
|
$("#waitWindow").hide();
|
|
738
745
|
$("#mainWindow").show();
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=16.0.0"
|
|
5
5
|
},
|
|
6
|
-
"version": "3.0.
|
|
6
|
+
"version": "3.0.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",
|