node-red-contrib-knx-ultimate 4.1.0 → 4.1.6

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,23 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
- **Version 4.1.0** - November 2025<br/>
9
+ **Version 4.1.5** - December 2025<br/>
10
+ - Bump KNX Engine to 5.2.3.<br/>
11
+ <br/>
12
+
13
+ **Version 4.1.4** - December 2025<br/>
14
+ - KNX config node: cache and force-close the FT1.2 serial driver on deploy/close even when the KNX client instance is already null, preventing orphaned handles from blocking reconnects after a redeploy.<br/>
15
+ <br/>
16
+
17
+ **Version 4.1.3** - December 2025<br/>
18
+ - KNX config node: strengthened FT1.2 teardown with a direct serial-driver close fallback so the KBerry port is reliably released even if a previous disconnect was in a "disconnected" state; prevents reconnection stalls with "Timeout waiting for FT1.2 ACK (reset)".<br/>
19
+ <br/>
20
+
21
+ **Version 4.1.2** - December 2025<br/>
22
+ - KNX config node: deploy/disconnect now always tears down the KNX client and clears timers, ensuring Serial FT1.2/KBerry ports are released and can reconnect after configuration changes.<br/>
23
+ <br/>
24
+
25
+ **Version 4.1.1** - November 2025<br/>
10
26
  - KNX config node: Serial FT1.2 now exposes a dedicated **Serial FT1.2 mode** selector with *KBerry/BAOS* vs *Standard FT1.2*; the choice is forwarded to the KNX engine as `serialInterface.isKBERRY` (default: KBerry/BAOS).<br/>
11
27
  - KNX config node: when `SerialFT12` is selected, Secure KNX options that only apply to IP tunnelling (manual tunnel IA, tunnel user ID/password, mixed keyring+manual mode) are automatically hidden or disabled to keep the UI focused; help and wiki pages in all languages now clearly state that KNX/IP Secure & Data Secure apply only to IP transports, not to Serial FT1.2.<br/>
12
28
  - KNX Device node: the manual command button in the editor is now enabled by default and set to **Toggle boolean (write)**, with the notification message correctly translated in all locales and extended to show the payload value when relevant.<br/>
@@ -326,6 +326,7 @@ module.exports = (RED) => {
326
326
  node.isKBERRY = parseBoolean(config.isKBERRY, true)
327
327
  node.hostProtocol = config.hostProtocol === undefined ? 'Auto' : config.hostProtocol // 20/03/2022 Default
328
328
  node.knxConnection = null // 20/03/2022 Default
329
+ node.serialDriverRef = null // Keep last FT1.2 driver to force-close on redeploy
329
330
  node.delaybetweentelegrams = (config.delaybetweentelegrams === undefined || config.delaybetweentelegrams === null || config.delaybetweentelegrams === '') ? 25 : Number(config.delaybetweentelegrams)
330
331
  if (node.delaybetweentelegrams < 25) node.delaybetweentelegrams = 25 // Protection avoiding handleKNXQueue hangs
331
332
  if (node.delaybetweentelegrams > 100) node.delaybetweentelegrams = 100 // Protection avoiding handleKNXQueue hangs
@@ -1114,6 +1115,11 @@ module.exports = (RED) => {
1114
1115
  node.knxConnection.on(knx.KNXClientEvents.connected, (info) => {
1115
1116
  node.linkStatus = 'connected'
1116
1117
 
1118
+ // Track serial driver for forced close on redeploy
1119
+ if (node.hostProtocol === 'SerialFT12' && node.knxConnection && node.knxConnection._serialDriver) {
1120
+ node.serialDriverRef = node.knxConnection._serialDriver
1121
+ }
1122
+
1117
1123
  // Start the timer to do initial read.
1118
1124
  if (node.timerDoInitialRead !== null) clearTimeout(node.timerDoInitialRead)
1119
1125
  node.timerDoInitialRead = setTimeout(() => {
@@ -2283,20 +2289,66 @@ module.exports = (RED) => {
2283
2289
  }, 10000)
2284
2290
 
2285
2291
  node.Disconnect = async (_sNodeStatus = '', _sColor = 'grey') => {
2286
- if (node.timerSaveExposedGAs !== null) clearInterval(node.timerSaveExposedGAs)
2287
- if (node.linkStatus === 'disconnected') {
2288
- node.sysLogger?.debug('Disconnect: already not connected:' + node.linkStatus + ', node.autoReconnect:' + node.autoReconnect)
2289
- return
2292
+ if (node.timerSaveExposedGAs !== null) {
2293
+ clearInterval(node.timerSaveExposedGAs)
2294
+ node.timerSaveExposedGAs = null
2290
2295
  }
2296
+ if (node.timerDoInitialRead !== null) {
2297
+ clearTimeout(node.timerDoInitialRead) // 17/02/2020 Stop the initial read timer
2298
+ node.timerDoInitialRead = null
2299
+ }
2300
+
2301
+ const previousStatus = node.linkStatus
2291
2302
  node.linkStatus = 'disconnected' // 29/08/2019 signal disconnection
2292
- if (node.timerDoInitialRead !== null) clearTimeout(node.timerDoInitialRead) // 17/02/2020 Stop the initial read timer
2293
- try {
2294
- if (node.knxConnection !== null) await node.knxConnection.Disconnect()
2295
- } catch (error) {
2296
- node.sysLogger?.debug(
2297
- 'Disconnected: node.knxConnection.Disconnect() ' + (error.message || '') + ' , node.autoReconnect:' + node.autoReconnect
2298
- )
2303
+
2304
+ const connection = node.knxConnection
2305
+ const serialDriver = (node.knxConnection && node.knxConnection._serialDriver) || node.serialDriverRef
2306
+ const isSerial = node.hostProtocol === 'SerialFT12'
2307
+ if (connection) {
2308
+ try {
2309
+ await connection.Disconnect()
2310
+ } catch (error) {
2311
+ node.sysLogger?.debug(
2312
+ 'Disconnected: node.knxConnection.Disconnect() ' + (error.message || '') + ' , node.autoReconnect:' + node.autoReconnect
2313
+ )
2314
+ // Extra guard for FT1.2: if Disconnect failed, try closing the serial driver directly
2315
+ if (isSerial && connection._serialDriver && typeof connection._serialDriver.close === 'function') {
2316
+ try {
2317
+ await connection._serialDriver.close()
2318
+ node.sysLogger?.debug('Disconnect: fallback close on serial driver executed')
2319
+ } catch (closeErr) {
2320
+ node.sysLogger?.debug('Disconnect: fallback close on serial driver failed: ' + (closeErr.message || ''))
2321
+ }
2322
+ }
2323
+ } finally {
2324
+ try {
2325
+ connection.removeAllListeners()
2326
+ } catch (error) { /* empty */ }
2327
+ if (isSerial && serialDriver && typeof serialDriver.close === 'function') {
2328
+ try {
2329
+ await serialDriver.close()
2330
+ node.sysLogger?.debug('Disconnect: ensured serial driver close')
2331
+ } catch (closeErr) {
2332
+ node.sysLogger?.debug('Disconnect: ensure serial driver close failed: ' + (closeErr.message || ''))
2333
+ }
2334
+ }
2335
+ node.knxConnection = null
2336
+ node.serialDriverRef = null
2337
+ }
2338
+ } else {
2339
+ if (isSerial && serialDriver && typeof serialDriver.close === 'function') {
2340
+ try {
2341
+ await serialDriver.close()
2342
+ node.sysLogger?.debug('Disconnect: closed cached serial driver without knxConnection')
2343
+ } catch (closeErr) {
2344
+ node.sysLogger?.debug('Disconnect: cached serial driver close failed: ' + (closeErr.message || ''))
2345
+ } finally {
2346
+ node.serialDriverRef = null
2347
+ }
2348
+ }
2349
+ node.sysLogger?.debug('Disconnect: no knxConnection instance. previous status: ' + previousStatus)
2299
2350
  }
2351
+
2300
2352
  node.setAllClientsStatus('Disconnected', _sColor, _sNodeStatus)
2301
2353
  await saveExposedGAs() // 04/04/2021 save the current values of GA payload
2302
2354
  node.sysLogger?.debug('Disconnected, node.autoReconnect:' + node.autoReconnect)
@@ -2304,6 +2356,10 @@ module.exports = (RED) => {
2304
2356
 
2305
2357
  node.on('close', async function (done) {
2306
2358
  try {
2359
+ if (node.timerKNXUltimateCheckState !== null) {
2360
+ clearInterval(node.timerKNXUltimateCheckState)
2361
+ node.timerKNXUltimateCheckState = null
2362
+ }
2307
2363
  await node.Disconnect()
2308
2364
  } catch (error) { /* empty */ }
2309
2365
  node.nodeClients = [] // 05/04/2022 Nullify
@@ -30,7 +30,7 @@ Dieser Node stellt die Verbindung zu deinem KNX/IP‑Gateway her.
30
30
  > **KNX Secure im Überblick** \
31
31
  > • _KNX Data Secure_ schützt Gruppenadress-Telegramme und benötigt immer eine Keyring-Datei mit den Gruppenschlüsseln.\
32
32
  > • _KNX IP Tunnelling Secure_ schützt den Verbindungsaufbau mittels Commissioning-Passwort. Je nach Modus stammt dieses aus dem Keyring oder wird manuell eingetragen.\
33
- > • KNX/IP Secure und Data Secure gelten nur für IP-Transporte (Tunnel TCP / sicheres Routing); der Serial-FT1.2-Modus verwendet diese Sicherheitseinstellungen nicht.
33
+ > • KNX/IP Secure (Tunnel-Handshake) gilt nur für IP-Transporte (Tunnel TCP / sicheres Routing). KNX Data Secure schützt Gruppenadress-Telegramme und kann sowohl über IP (Tunneling/Routing) als auch über TP via Serial FT1.2 verwendet werden, sofern ein ETS-Keyring vorhanden ist.
34
34
 
35
35
  <br/>
36
36
 
@@ -30,7 +30,7 @@
30
30
  > **KNX Secure essentials** \
31
31
  > • _KNX Data Secure_ protects group-address telegrams and **always** needs a keyring file containing the group keys.\
32
32
  > • _KNX IP Tunnelling Secure_ protects the connection handshake with a commissioning password. Depending on the selected mode, the password can come from the keyring or be entered manually.\
33
- > • KNX/IP Secure and Data Secure apply only to IP transports (Tunnel TCP / secure routing); Serial FT1.2 does not use these secure settings.
33
+ > • KNX/IP Secure (tunnel handshake) applies only to IP transports (Tunnel TCP / secure routing). KNX Data Secure protects group-address telegrams and can be used both on IP (tunnelling/routing) and on TP via Serial FT1.2 when an ETS keyring is provided.
34
34
 
35
35
  <br/>
36
36
 
@@ -27,7 +27,7 @@
27
27
  > ** KNX Secure Essentials** \
28
28
  > • _knx data secure_ protege los telegramas de la dirección del grupo y ** siempre** necesita un archivo de llavero que contenga las claves de grupo. \
29
29
  > • _knx Tunneling IP Secure_ protege el apretón de manos de la conexión con una contraseña de puesta en marcha. Dependiendo del modo seleccionado, la contraseña puede provenir del llavero o ingresarse manualmente.\
30
- > • KNX/IP Secure y Data Secure solo se aplican a los transportes IP (Tunnel TCP / routing seguro); el modo Serial FT1.2 no utiliza estas opciones de seguridad.
30
+ > • KNX/IP Secure (handshake del túnel) solo se aplica a los transportes IP (Tunnel TCP / routing seguro). KNX Data Secure protege los telegramas de direcciones de grupo y puede usarse tanto sobre IP (túnel/enrutamiento) como sobre TP vía Serial FT1.2 cuando se proporciona un archivo keyring de ETS.
31
31
 
32
32
  <br/> **Avanzado** | Propiedad | Descripción |
33
33
 
@@ -30,7 +30,7 @@ Configuration de la passerelle KNX
30
30
  > **KNX Secure Essentials** \
31
31
  > • _KNX Data Secure_ protège les télégrammes d'adresses de groupe et **toujours** a besoin d'un fichier de clés contenant les touches de groupe. \
32
32
  > • _KNX IP Tunneling Secure_ protège la poignée de main de connexion avec un mot de passe de mise en service. Selon le mode sélectionné, le mot de passe peut provenir du clés ou être entré manuellement.\
33
- > • KNX/IP Secure et Data Secure ne s’appliquent qu’aux transports IP (Tunnel TCP / routage sécurisé) ; le mode Serial FT1.2 nutilise pas ces paramètres de sécurité.
33
+ > • KNX/IP Secure (handshake du tunnel) ne s’applique qu’aux transports IP (Tunnel TCP / routage sécurisé). KNX Data Secure protège les télégrammes d’adresses de groupe et peut être utilisé à la fois sur IP (tunneling/routage) et sur TP via Serial FT1.2 lorsquun fichier keyring ETS est fourni.
34
34
 
35
35
  <br/>
36
36
 
@@ -30,7 +30,7 @@ Questo nodo si connette al tuo KNX/IP Gateway.
30
30
  > **Nota su KNX Secure** \
31
31
  > • _KNX Data Secure_ protegge i telegrammi sugli indirizzi di gruppo e richiede sempre un file keyring con le chiavi di gruppo.\
32
32
  > • _KNX IP Tunnelling Secure_ protegge l'handshake della connessione tramite una password di commissioning, che può essere letta dal keyring oppure inserita manualmente in base alla modalità scelta.\
33
- > • KNX/IP Secure e Data Secure si applicano solo ai trasporti IP (Tunnel TCP / routing sicuro); la modalità Serial FT1.2 non utilizza queste impostazioni di sicurezza.
33
+ > • KNX/IP Secure (handshake del tunnel) si applica solo ai trasporti IP (Tunnel TCP / routing sicuro). KNX Data Secure protegge i telegrammi sugli indirizzi di gruppo e può essere usato sia su IP (tunnelling/routing) sia su TP via Serial FT1.2 quando è presente un file keyring ETS.
34
34
 
35
35
  <br/>
36
36
 
@@ -30,7 +30,7 @@
30
30
  > **KNX Secure 概览** \
31
31
  > • _KNX Data Secure_ 用于保护组地址报文, **始终** 需要包含组密钥的密钥环文件。\
32
32
  > • _KNX IP Tunnelling Secure_ 通过调试密码保护连接握手,密码可根据模式从密钥环读取或在界面中手动输入。\
33
- > • KNX/IP Secure 和 Data Secure 仅适用于 IP 传输(Tunnel TCP / 安全路由);串口 FT1.2 模式不会使用这些安全参数。
33
+ > • KNX/IP Secure(隧道握手)仅适用于 IP 传输(Tunnel TCP / 安全路由)。KNX Data Secure 用于保护组地址报文,可在 IP(隧道/路由)和 TP(通过串口 FT1.2)上使用,只要提供 ETS 导出的 keyring 文件。
34
34
 
35
35
  <br/>
36
36
 
package/package.json CHANGED
@@ -3,14 +3,14 @@
3
3
  "engines": {
4
4
  "node": ">=20.18.1"
5
5
  },
6
- "version": "4.1.0",
6
+ "version": "4.1.6",
7
7
  "description": "Control your KNX and KNX Secure 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",
10
10
  "crypto-js": "4.2.0",
11
11
  "dns-sync": "0.2.1",
12
12
  "js-yaml": "4.1.1",
13
- "knxultimate": "5.2.0-beta.0",
13
+ "knxultimate": "5.2.3",
14
14
  "lodash": "4.17.21",
15
15
  "mkdirp": "3.0.1",
16
16
  "node-color-log": "12.0.1",