node-red-contrib-knx-ultimate 6.3.9 → 6.3.11

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 6.3.11** - August 2026<br/>
10
+
11
+ - **Matter Controller**: fixed KNX GA mapping tabs being hidden by transient empty KNX/Matter config-selector values during Node-RED 5 editor initialization; saved gateways now remain selected until the user explicitly changes them.<br/>
12
+
13
+ **Version 6.3.10** - August 2026<br/>
14
+
15
+ - **Watchdog**: added a default-on option to listen for error states reported by KNX-Ultimate nodes, including KNX Device, through the selected gateway; disabling it suppresses `NodeError` flow messages without affecting the Watchdog's own bus checks or control messages. Existing flows retain the previous enabled behavior.<br/>
16
+
9
17
  **Version 6.3.9** - August 2026<br/>
10
18
 
11
19
  - **Matter on Home Assistant**: declared the Node.js platform adapter as a required runtime dependency so Home Assistant's Node-RED add-on cannot omit it while installing optional packages; Matter Controller and Matter Bridge now load normally instead of reporting `Cannot find module '@matter/nodejs'` at startup.<br/>
@@ -23,6 +23,7 @@ const loggerClass = require('./utils/sysLogger')
23
23
  // const { Server } = require('http')
24
24
  const payloadRounder = require('./utils/payloadManipulation')
25
25
  const utils = require('./utils/utils')
26
+ const dispatchWatchDogNodeError = require('./utils/watchDogErrorDispatcher')
26
27
 
27
28
  // Versions logged once at startup (node package + KNXUltimate engine)
28
29
  let NODE_VERSION = 'unknown'
@@ -831,13 +832,7 @@ module.exports = (RED) => {
831
832
  // 16/02/2020 KNX-Ultimate nodes calls this function, then this funcion calls the same function on the Watchdog
832
833
  node.reportToWatchdogCalledByKNXUltimateNode = (_oError) => {
833
834
  // _oError is = { nodeid: node.id, topic: node.outputtopic, devicename: devicename, GA: GA, text: text };
834
- const readHistory = []
835
- const delay = 0
836
- node.nodeClients
837
- .filter((_oClient) => _oClient.isWatchDog !== undefined && _oClient.isWatchDog === true)
838
- .forEach((_oClient) => {
839
- _oClient.signalNodeErrorCalledByConfigNode(_oError)
840
- })
835
+ dispatchWatchDogNodeError(node, _oError)
841
836
  }
842
837
 
843
838
  node.addClient = (_Node) => {
@@ -3,6 +3,7 @@
3
3
  <script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/11f26b4500.js"></script>
4
4
 
5
5
  <script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/htmlUtils.js"></script>
6
+ <script type="text/javascript" src="resources/node-red-contrib-knx-ultimate/configNodeEditorSelection.js"></script>
6
7
 
7
8
  <script type="text/javascript">
8
9
  (function () {
@@ -161,16 +162,6 @@
161
162
  });
162
163
  }
163
164
  $("#node-input-updateLocalStateFromKNXWrite").prop("checked", node.updateLocalStateFromKNXWrite === true || node.updateLocalStateFromKNXWrite === "true"); // Starting from v 4.1.31
164
- const ensureConfigSelection = (selector) => {
165
- if ($(selector).val() !== "_ADD_") return;
166
- try {
167
- $(selector).prop("selectedIndex", 0);
168
- } catch (error) {
169
- // Ignore UI quirks for legacy Node-RED versions
170
- }
171
- };
172
- ["#node-input-server", "#node-input-serverMatter"].forEach(ensureConfigSelection);
173
-
174
165
  function ensureVerticalTabsStyle() {
175
166
  if ($('#knxUltimateMatterControllerDeviceVerticalTabs').length) return;
176
167
  const style = `
@@ -261,7 +252,7 @@
261
252
  function onEditPrepare() {
262
253
  ensureVerticalTabsStyle();
263
254
  const $knxServerInput = $("#node-input-server");
264
- const KNX_EMPTY_VALUES = new Set(['', 'none', '_ADD_', '__NONE__']);
255
+ const KNX_EMPTY_VALUES = new Set(['', 'none', '_add_', '__none__']);
265
256
  // Historical variable names are retained for saved-flow compatibility; they point to Matter widgets.
266
257
  const $hueServerInput = $("#node-input-serverMatter");
267
258
  const $matterControllerModeInput = $("#node-input-matterControllerMode");
@@ -300,6 +291,21 @@
300
291
  let matterDevicePickerMouseDown = false;
301
292
  let showingNoHueDevicesPlaceholder = false;
302
293
  const HUE_EMPTY_SERVER_VALUES = new Set(['', 'none', '_add_', '__none__', '__null__', 'null', 'undefined']);
294
+ const selectionApi = window.KNXUltimateConfigNodeEditorSelection;
295
+ const normalizeConfigSelection = selectionApi && typeof selectionApi.normalizeSelection === 'function'
296
+ ? selectionApi.normalizeSelection
297
+ : (value, emptyValues) => {
298
+ const normalized = value === undefined || value === null ? '' : String(value).trim();
299
+ return emptyValues.has(normalized.toLowerCase()) ? '' : normalized;
300
+ };
301
+ const resolveSelectedOrStoredSelection = selectionApi && typeof selectionApi.resolveSelectedOrStoredSelection === 'function'
302
+ ? selectionApi.resolveSelectedOrStoredSelection
303
+ : (selectedValue, storedValue, emptyValues) => normalizeConfigSelection(selectedValue, emptyValues) || normalizeConfigSelection(storedValue, emptyValues);
304
+ const shouldPreserveSelection = selectionApi && typeof selectionApi.shouldPreserveSelection === 'function'
305
+ ? selectionApi.shouldPreserveSelection
306
+ : (event, nextValue, currentValue, emptyValues) => (!event || !event.originalEvent) && normalizeConfigSelection(nextValue, emptyValues) === '' && normalizeConfigSelection(currentValue, emptyValues) !== '';
307
+ let activeKnxServerId = resolveSelectedOrStoredSelection($knxServerInput.val(), node.server, KNX_EMPTY_VALUES);
308
+ let activeMatterServerId = resolveSelectedOrStoredSelection($hueServerInput.val(), node.serverMatter, HUE_EMPTY_SERVER_VALUES);
303
309
  let locateSessionActive = false;
304
310
  let locateAutoResetTimer = null;
305
311
  let locatePendingRequest = null;
@@ -483,14 +489,7 @@
483
489
  };
484
490
 
485
491
  const resolveKnxServerValue = () => {
486
- const domValue = $knxServerInput.val();
487
- if (domValue !== undefined && domValue !== null && domValue !== '') {
488
- return domValue;
489
- }
490
- if (node.server !== undefined && node.server !== null) {
491
- return node.server;
492
- }
493
- return '';
492
+ return activeKnxServerId;
494
493
  };
495
494
 
496
495
  const hasKnxServerSelected = () => {
@@ -500,17 +499,7 @@
500
499
  };
501
500
 
502
501
  const resolveHueServerValue = ({ allowStored = false } = {}) => {
503
- if ($hueServerInput.length) {
504
- const domValue = $hueServerInput.val();
505
- if (domValue !== undefined && domValue !== null) {
506
- const trimmed = String(domValue).trim();
507
- if (trimmed !== '' && !HUE_EMPTY_SERVER_VALUES.has(trimmed.toLowerCase())) return trimmed;
508
- }
509
- }
510
- if (node.serverMatter !== undefined && node.serverMatter !== null) {
511
- const stored = String(node.serverMatter).trim();
512
- if (stored !== '' && !HUE_EMPTY_SERVER_VALUES.has(stored.toLowerCase())) return stored;
513
- }
502
+ if (activeMatterServerId !== '') return activeMatterServerId;
514
503
  if (allowStored && node.__locateSessionInfo && node.__locateSessionInfo.serverId) {
515
504
  return node.__locateSessionInfo.serverId;
516
505
  }
@@ -1458,8 +1447,20 @@
1458
1447
  $matterControllerModeInput.on('change.knxUltimateMatterControllerDevice', applyControllerMode);
1459
1448
  $universalServiceInput.on('change.knxUltimateMatterControllerDevice', refreshUniversalServiceVisibility);
1460
1449
 
1461
- $knxServerInput.on('change.knxUltimateMatterControllerDevice', () => {
1462
- refreshKnxBindings();
1450
+ $knxServerInput.on('change.knxUltimateMatterControllerDevice', function (event) {
1451
+ const selectedValue = $(this).val();
1452
+ if (shouldPreserveSelection(event, selectedValue, activeKnxServerId, KNX_EMPTY_VALUES)) {
1453
+ // Node-RED 5 can briefly emit an empty placeholder while rebuilding
1454
+ // config-node selectors. Restore the effective saved value so an
1455
+ // untouched save and the mapping tabs both keep the KNX gateway.
1456
+ $knxServerInput.val(activeKnxServerId);
1457
+ updateTabsVisibility();
1458
+ return;
1459
+ }
1460
+ activeKnxServerId = normalizeConfigSelection(selectedValue, KNX_EMPTY_VALUES);
1461
+ // Selecting none only changes visibility. Keep the mounted GA/DPT
1462
+ // controls intact so choosing the gateway again cannot lose values.
1463
+ if (activeKnxServerId !== '') refreshKnxBindings();
1463
1464
  updateTabsVisibility();
1464
1465
  });
1465
1466
 
@@ -1553,7 +1554,15 @@
1553
1554
  }
1554
1555
 
1555
1556
  if ($hueServerInput.length) {
1556
- $hueServerInput.off('.knxUltimateMatterControllerDeviceDevices').on('change.knxUltimateMatterControllerDeviceDevices', () => {
1557
+ $hueServerInput.off('.knxUltimateMatterControllerDeviceDevices').on('change.knxUltimateMatterControllerDeviceDevices', function (event) {
1558
+ const selectedValue = $(this).val();
1559
+ if (shouldPreserveSelection(event, selectedValue, activeMatterServerId, HUE_EMPTY_SERVER_VALUES)) {
1560
+ $hueServerInput.val(activeMatterServerId);
1561
+ return;
1562
+ }
1563
+ const nextMatterServerId = normalizeConfigSelection(selectedValue, HUE_EMPTY_SERVER_VALUES);
1564
+ if (nextMatterServerId === activeMatterServerId) return;
1565
+ activeMatterServerId = nextMatterServerId;
1557
1566
  cachedHueDevices = [];
1558
1567
  node._cachedHueLightDevices = cachedHueDevices;
1559
1568
  showingNoHueDevicesPlaceholder = false;
@@ -1772,11 +1781,6 @@
1772
1781
 
1773
1782
  // The Matter controller needs no readiness poll here: the light list is fetched
1774
1783
  // on demand by the autocomplete. Start the editor immediately.
1775
- $("#node-input-serverMatter").change(function () {
1776
- try {
1777
- node._cachedHueLightDevices = [];
1778
- } catch (error) { }
1779
- });
1780
1784
  Go();
1781
1785
  // ################################################################
1782
1786
 
@@ -11,6 +11,7 @@
11
11
  retryInterval: { value: 10 },
12
12
  name: { value: "" },
13
13
  autoStart: { value: true },
14
+ listenToKnxUltimateNodeErrors: { value: true },
14
15
  checkLevel: { value: "Ethernet" }
15
16
  },
16
17
  inputs: 1,
@@ -190,7 +191,11 @@
190
191
  <div class="form-row">
191
192
  <input type="checkbox" id="node-input-autoStart" style="display:inline-block; width:auto; vertical-align:top;">
192
193
  <label style="width:auto" for="node-input-autoStart">&nbsp;&nbsp;<i class="fa fa-play-circle"></i> <span data-i18n="knxUltimateWatchDog.properties.node-input-autoStart"></span> </label>
193
- </div>
194
+ </div>
195
+ <div class="form-row">
196
+ <input type="checkbox" id="node-input-listenToKnxUltimateNodeErrors" style="display:inline-block; width:auto; vertical-align:top;">
197
+ <label style="width:auto" for="node-input-listenToKnxUltimateNodeErrors">&nbsp;&nbsp;<i class="fa fa-exclamation-triangle"></i> <span data-i18n="knxUltimateWatchDog.properties.node-input-listenToKnxUltimateNodeErrors"></span> </label>
198
+ </div>
194
199
 
195
200
  <div id="advancedOptionsAccordion">
196
201
  <h3><span data-i18n="knxUltimateWatchDog.properties.advancedOptionsAccordion"></span></h3>
@@ -21,6 +21,9 @@ module.exports = function (RED) {
21
21
  node.retryInterval = config.retryInterval !== undefined ? config.retryInterval * 1000 : 10000
22
22
  node.maxRetry = config.maxRetry !== undefined ? config.maxRetry : 6
23
23
  node.autoStart = config.autoStart !== undefined ? config.autoStart : true
24
+ // Keep existing flows compatible: before this option was exposed, KNX-Ultimate
25
+ // node errors were always forwarded by the gateway to every Watchdog node.
26
+ node.listenToKnxUltimateNodeErrors = config.listenToKnxUltimateNodeErrors !== false && config.listenToKnxUltimateNodeErrors !== 'false'
24
27
  node.beatNumber = 0 // Telegram counter
25
28
  node.timerWatchDog = null
26
29
  node.isWatchDog = true
@@ -119,6 +122,8 @@ module.exports = function (RED) {
119
122
 
120
123
  // 16/02/2020 This function is called by the knx-ultimate config node.
121
124
  node.signalNodeErrorCalledByConfigNode = _oError => {
125
+ if (!node.listenToKnxUltimateNodeErrors) return
126
+
122
127
  // Report an error from knx-ultimate node.
123
128
  // let oError = {nodeid:node.id,topic:node.outputtopic,devicename:devicename,GA:GA,text:text};
124
129
  const msg = {
@@ -214,9 +219,10 @@ module.exports = function (RED) {
214
219
  if (node.serverKNX) {
215
220
  if (node.timerWatchDog !== null) clearInterval(node.timerWatchDog)
216
221
  node.serverKNX.removeClient(node)
217
- if (node.topic || node.listenallga) {
222
+ const hasHealthCheckTarget = node.checkLevel === 'Ethernet' || Boolean(node.topic)
223
+ if (hasHealthCheckTarget || node.listenToKnxUltimateNodeErrors) {
218
224
  node.serverKNX.addClient(node)
219
- if (node.autoStart) node.StartWatchDogTimer() // Autostart watchdog
225
+ if (node.autoStart && hasHealthCheckTarget) node.StartWatchDogTimer() // Autostart watchdog
220
226
  }
221
227
  }
222
228
  }
@@ -11,7 +11,7 @@ Er ersetzt die unveröffentlichten getrennten Matter-Controller-Nodes und behäl
11
11
 
12
12
  |Feld|Beschreibung|
13
13
  |--|--|
14
- | KNX GW | KNX-Gateway zum Schreiben und Beantworten der konfigurierten Gruppenadressen. Kann leer bleiben, wenn nur der Node-RED-Ausgang benötigt wird. |
14
+ | KNX GW | KNX-Gateway zum Schreiben und Beantworten der konfigurierten Gruppenadressen. Kann leer bleiben, wenn nur der Node-RED-Ausgang benötigt wird. Das gespeicherte Gateway bleibt während der Initialisierung des Editors ausgewählt und ändert sich erst nach einer ausdrücklichen Benutzerauswahl. |
15
15
  | Matter controller | Matter-Controller-Konfigurationsknoten, in dem das Gerät gekoppelt wurde. |
16
16
  | Matter device | Matter-Endpunkt aus den gekoppelten Geräten. Die UI wird aus den echten Fähigkeiten neu aufgebaut. |
17
17
  | Switch / Steckdose / Licht On-Off | On/Off-Befehls- und Status-Gruppenadressen, normalerweise DPT `1.001`. |
@@ -26,6 +26,7 @@ Ideal zum Signalisieren von Fehlern/Verbindungsproblemen (E-Mail, automatisches
26
26
  | Gruppenadresse monitor | GA, an die gelesen wird und von der eine Antwort erwartet wird. DPT muss 1.x (Boolean) sein. |
27
27
  | Name | Node-Name. |
28
28
  | Watchdog-Timer automatisch starten | Timer beim Deploy/Start automatisch starten. |
29
+ | Fehler von KNX-Ultimate-Nodes überwachen | Standardmäßig aktiviert. Gibt eine `NodeError`-Nachricht aus, wenn ein KNX-Ultimate-Node am gewählten Gateway, einschließlich KNX Device, einen roten Fehlerstatus meldet. Bei Deaktivierung werden nur diese `NodeError`-Nachrichten unterdrückt; die eigenen Busprüfungen und Steuernachrichten des WatchDog bleiben aktiv. |
29
30
  | Check level (siehe wiki) | Siehe oben. |
30
31
 
31
32
  **Check level**
@@ -47,7 +48,7 @@ Ideal zum Signalisieren von Fehlern/Verbindungsproblemen (E-Mail, automatisches
47
48
 
48
49
  # Ausgaben des WatchDog
49
50
 
50
- Der Node gibt Nachrichten aus, wenn eigene Prüfungen Fehler melden oder wenn ein KNX-Ultimate-Node im Flow einen Fehlerstatus meldet.
51
+ Der WatchDog gibt seine eigenen Busprüfungs- und Steuernachrichten immer aus. Wenn **Fehler von KNX-Ultimate-Nodes überwachen** aktiviert ist, gibt er zusätzlich Fehler von KNX-Ultimate-Nodes, einschließlich KNX Device, am gewählten Gateway aus.
51
52
 
52
53
  **Bei WatchDog-eigenem Verbindungsproblem**
53
54
 
@@ -64,7 +65,7 @@ msg = {
64
65
  }
65
66
  ```
66
67
 
67
- **Wenn einer deiner KNX-Ultimate-Nodes Probleme hat**
68
+ **Wenn die Fehlerüberwachung aktiviert ist und ein KNX-Ultimate-Node ein Problem meldet**
68
69
 
69
70
  ```javascript
70
71
 
@@ -164,4 +165,4 @@ msg.connectGateway = true; return msg;
164
165
  ## Siehe auch
165
166
 
166
167
  [Sample WatchDog](https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/-Sample---WatchDog)
167
- </script>
168
+ </script>
@@ -8,6 +8,7 @@
8
8
  "node-input-topic": "Gruppenadresse monitor",
9
9
  "node-input-name": "Name",
10
10
  "node-input-autoStart": "Watchdog-Timer automatisch starten",
11
+ "node-input-listenToKnxUltimateNodeErrors": "Fehler von KNX-Ultimate-Nodes überwachen",
11
12
  "advancedOptionsAccordion": "Erweiterte Optionen",
12
13
  "node-input-retryInterval": "Wiederholungsintervall (in Sekunden)",
13
14
  "node-input-maxRetry": "Anzahl der Wiederholungen, bevor ein Fehler ausgegeben wird"
@@ -11,7 +11,7 @@ It replaces the unpublished per-device Matter controller nodes and keeps the ful
11
11
 
12
12
  |Field|Description|
13
13
  |--|--|
14
- | KNX GW | KNX gateway used to write and answer the configured group addresses. It can be left empty when only Node-RED output is needed. |
14
+ | KNX GW | KNX gateway used to write and answer the configured group addresses. It can be left empty when only Node-RED output is needed. The saved gateway remains selected while the editor initializes and changes only after an explicit user selection. |
15
15
  | Matter controller | Matter controller configuration node where the device has been commissioned. |
16
16
  | Matter device | Matter endpoint selected from commissioned devices. The UI is rebuilt from its real capabilities. |
17
17
  | Switch / Plug / Light On-Off | On/Off command and status group addresses, usually DPT `1.001`. |
@@ -29,6 +29,7 @@ You can send an Email to the KNX installer responsible to your Building, or you
29
29
  | Group Address to monitor | The node will send a telegram to this address and monitors the message flowing through the KNX BUS. The Datapoint must be DPT 1.x (boolean).|
30
30
  | Node Name | Node Name |
31
31
  | Auto start the watchdog timer | The watchdog timer starts automatically on deploy or on node-red start. |
32
+ | Listen to KNX-Ultimate node errors | Enabled by default. Outputs a `NodeError` when a KNX-Ultimate node associated with the selected gateway, including KNX Device, reports a red error status. Disabling it suppresses only those `NodeError` messages; the WatchDog's own bus checks and control messages remain active. |
32
33
  | Check level (please see the wiki) | See below |
33
34
 
34
35
  **Check level** > _**Ethernet**_: Checks the connection between knx-ultimate Gateway in unicast mode and your KNX IP Interface.<br />
@@ -56,7 +57,7 @@ Twisted Pair connection is up and running.
56
57
 
57
58
  # MESSAGE OUTPUT FROM THE WATCHDOG
58
59
 
59
- The WatchDog node outs a message whenever it receives an error from one of your knx-ultimate node in your flows, or whenever the internal Watchdog intercepts a KNX Bus communication error.<br />
60
+ The WatchDog always outputs its own bus-check and control messages. When **Listen to KNX-Ultimate node errors** is enabled, it also outputs errors reported by KNX-Ultimate nodes, including KNX Device, associated with the selected gateway.<br />
60
61
 
61
62
  **In case of Watchdog self connection problem**
62
63
 
@@ -77,7 +78,7 @@ description: // (whatever error description)
77
78
 
78
79
  <br />
79
80
 
80
- **In case of one of your KNX-Ultimate nodes is in trouble**
81
+ **When KNX-Ultimate node error listening is enabled and one of your nodes is in trouble**
81
82
 
82
83
  ```javascript
83
84
 
@@ -9,6 +9,7 @@
9
9
  "node-input-topic": "Group Address to monitor",
10
10
  "node-input-name": "Node Name",
11
11
  "node-input-autoStart": "Auto start the watchdog timer",
12
+ "node-input-listenToKnxUltimateNodeErrors": "Listen to KNX-Ultimate node errors",
12
13
  "advancedOptionsAccordion": "Advanced Options",
13
14
  "node-input-retryInterval": "Retry interval (in seconds)",
14
15
  "node-input-maxRetry": "Number of retry before giving an error"
@@ -11,7 +11,7 @@ Sustituye a los nodos Matter separados no publicados y conserva toda la UI de lu
11
11
 
12
12
  |Campo|Descripción|
13
13
  |--|--|
14
- | KNX GW | Gateway KNX usado para escribir y responder las direcciones de grupo configuradas. Puede quedar vacío si solo se necesita la salida Node-RED. |
14
+ | KNX GW | Gateway KNX usado para escribir y responder las direcciones de grupo configuradas. Puede quedar vacío si solo se necesita la salida Node-RED. El gateway guardado permanece seleccionado durante la inicialización del editor y solo cambia tras una selección explícita del usuario. |
15
15
  | Matter controller | Nodo de configuración Matter Controller donde el dispositivo fue emparejado. |
16
16
  | Dispositivo Matter | Endpoint Matter seleccionado entre los dispositivos emparejados. La UI se reconstruye a partir de sus capacidades reales. |
17
17
  | Switch / Enchufe / Luz On-Off | Direcciones de grupo de comando y estado On/Off, normalmente DPT `1.001`. |
@@ -29,6 +29,7 @@ Puede enviar un correo electrónico al instalador KNX responsable de su edificio
29
29
  |Dirección de grupo para monitorear |El nodo enviará un telegrama a esta dirección y monitorea el mensaje que fluye a través del bus KNX.El punto de datos debe ser dpt 1.x (boolean). |
30
30
  |Nombre de nodo |Nombre del nodo |
31
31
  |Auto Iniciar el temporizador de vigilancia |El temporizador Watchdog comienza automáticamente en implementación o en el inicio de Node-RED.|
32
+ |Escuchar errores de los nodos KNX-Ultimate |Activado de forma predeterminada. Emite un mensaje `NodeError` cuando un nodo KNX-Ultimate asociado a la puerta de enlace seleccionada, incluido KNX Device, informa de un estado de error rojo. Al desactivarlo solo se suprimen esos mensajes `NodeError`; las comprobaciones del bus y los mensajes de control del WatchDog siguen activos.|
32
33
  |Verificar el nivel (consulte el wiki) |Ver a continuación |
33
34
 
34
35
  **COMPROBAR NIVEL ** > _**Ethernet** _: \*checkks la conexión entre la puerta de enlace de ultimate KNX en modo unicast y su interfaz IP KNX. <Br />
@@ -56,7 +57,7 @@ width = "90%"> <Br />
56
57
 
57
58
  # Salida de mensajes del Watchdog
58
59
 
59
- El nodo Watchdog sale un mensaje cada vez que recibe un error de uno de su nodo ultimal KNX en sus flujos, o cuando el vigilante interno intercepta un error de comunicación de bus KNX. <Br /> ** En caso de problema de autoexpresión de vigilancia** <a href = "https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/WatchDog-Configuration"
60
+ El WatchDog siempre emite sus propios mensajes de comprobación del bus y de control. Cuando **Escuchar errores de los nodos KNX-Ultimate** está activado, también emite los errores informados por los nodos KNX-Ultimate, incluido KNX Device, asociados a la puerta de enlace seleccionada. <Br /> ** En caso de problema de autoexpresión de vigilancia** <a href = "https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/WatchDog-Configuration"
60
61
  Target = "_ en blanco"> Consulte aquí. </a>
61
62
 
62
63
  ```javascript
@@ -71,7 +72,7 @@ description: // (whatever error description)
71
72
 
72
73
  ```
73
74
 
74
- <Br /> ** En caso de que uno de sus nodos ultimados KNX esté en problemas**
75
+ <Br /> **Cuando la escucha está activada y un nodo KNX-Ultimate informa de un error**
75
76
 
76
77
  ```javascript
77
78
 
@@ -216,4 +217,4 @@ return msg;
216
217
  ## Ver también
217
218
 
218
219
  [Muestra de vigilancia](https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/-Sample---WatchDog)
219
- </script>
220
+ </script>
@@ -8,6 +8,7 @@
8
8
  "node-input-topic": "Dirección de grupo para monitorear",
9
9
  "node-input-name": "Nombre de nodo",
10
10
  "node-input-autoStart": "Auto Iniciar el temporizador de vigilancia",
11
+ "node-input-listenToKnxUltimateNodeErrors": "Escuchar errores de los nodos KNX-Ultimate",
11
12
  "advancedOptionsAccordion": "Opciones avanzadas",
12
13
  "node-input-retryInterval": "Vuelva a intentar el intervalo (en segundos)",
13
14
  "node-input-maxRetry": "Número de reintento antes de dar un error"
@@ -11,7 +11,7 @@ Il remplace les nœuds Matter séparés non publiés et conserve toute l'UI lumi
11
11
 
12
12
  |Champ|Description|
13
13
  |--|--|
14
- | KNX GW | Passerelle KNX utilisée pour écrire et répondre sur les adresses de groupe configurées. Elle peut rester vide si seule la sortie Node-RED est utilisée. |
14
+ | KNX GW | Passerelle KNX utilisée pour écrire et répondre sur les adresses de groupe configurées. Elle peut rester vide si seule la sortie Node-RED est utilisée. La passerelle enregistrée reste sélectionnée pendant l'initialisation de l'éditeur et ne change qu'après une sélection explicite de l'utilisateur. |
15
15
  | Matter controller | Nœud de configuration Matter Controller dans lequel le périphérique a été appairé. |
16
16
  | Appareil Matter | Endpoint Matter choisi parmi les appareils appairés. L'UI est reconstruite à partir de ses capacités réelles. |
17
17
  | Switch / Prise / Lumière On-Off | Adresses de groupe commande et état On/Off, généralement DPT `1.001`. |
@@ -29,6 +29,7 @@ Vous pouvez envoyer un e-mail au programme d'installation KNX responsable de vot
29
29
  |Adresse du groupe à surveiller |Le nœud enverra un télégramme à cette adresse et surveille le message qui traverse le bus KNX.Le point de données doit être dpt 1.x (booléen). |
30
30
  |Nom de nœud |Nom du nœud |
31
31
  |Démarrer automatiquement la minuterie de chien de garde |Le temporisateur de surveillance commence automatiquement sur le déploiement ou au démarrage de Node-RED.|
32
+ |Écouter les erreurs des nœuds KNX-Ultimate |Activé par défaut. Émet un message `NodeError` lorsqu'un nœud KNX-Ultimate associé à la passerelle sélectionnée, y compris KNX Device, signale un état d'erreur rouge. La désactivation supprime uniquement ces messages `NodeError`; les contrôles du bus et les messages de commande du WatchDog restent actifs.|
32
33
  |Vérifier le niveau (veuillez consulter le wiki) |Voir ci-dessous |
33
34
 
34
35
  **Vérifier le niveau ** > _**Ethernet** _: \* Chechks la connexion entre la passerelle KNX-ultimate en mode unicast et votre interface IP KNX. <Br />
@@ -54,7 +55,7 @@ width = "90%"> <br />
54
55
 
55
56
  # Sortie du message du chien de garde
56
57
 
57
- Le nœud de surveillance ouvre un message chaque fois qu'il reçoit une erreur de l'un de votre nœud KNX-ultime dans vos flux, ou chaque fois que le chien de garde interne intercepte une erreur de communication de bus KNX. <Br /> ** En cas de problème de connexion auto à surveillance** <a href = "https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/WatchDog-Configuration"
58
+ Le WatchDog émet toujours ses propres messages de contrôle du bus et de commande. Lorsque **Écouter les erreurs des nœuds KNX-Ultimate** est activé, il émet aussi les erreurs signalées par les nœuds KNX-Ultimate, y compris KNX Device, associés à la passerelle sélectionnée. <Br /> ** En cas de problème de connexion auto à surveillance** <a href = "https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/WatchDog-Configuration"
58
59
  Target = "_ Blank"> Veuillez voir ici. </a>
59
60
 
60
61
  ```javascript
@@ -69,7 +70,7 @@ description: // (whatever error description)
69
70
 
70
71
  ```
71
72
 
72
- <br /> ** Dans le cas de l'un de vos nœuds ultimes KNX est en difficulté**
73
+ <br /> **Lorsque l'écoute est activée et qu'un nœud KNX-Ultimate signale une erreur**
73
74
 
74
75
  ```javascript
75
76
 
@@ -214,4 +215,4 @@ return msg;
214
215
  ## Voir aussi
215
216
 
216
217
  [Exemple de chien de garde](https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/-Sample---WatchDog)
217
- </script>
218
+ </script>
@@ -8,6 +8,7 @@
8
8
  "node-input-topic": "Adresse du groupe à surveiller",
9
9
  "node-input-name": "Nom de nœud",
10
10
  "node-input-autoStart": "Démarrer automatiquement la minuterie de chien de garde",
11
+ "node-input-listenToKnxUltimateNodeErrors": "Écouter les erreurs des nœuds KNX-Ultimate",
11
12
  "advancedOptionsAccordion": "Options avancées",
12
13
  "node-input-retryInterval": "Réessier l'intervalle (en quelques secondes)",
13
14
  "node-input-maxRetry": "Nombre de réessayer avant de donner une erreur"
@@ -11,7 +11,7 @@ Sostituisce i nodi Matter separati non pubblicati e mantiene tutta la UI luce qu
11
11
 
12
12
  |Campo|Descrizione|
13
13
  |--|--|
14
- | KNX GW | Gateway KNX usato per scrivere e rispondere sugli indirizzi di gruppo configurati. Può restare vuoto se serve solo l'output Node-RED. |
14
+ | KNX GW | Gateway KNX usato per scrivere e rispondere sugli indirizzi di gruppo configurati. Può restare vuoto se serve solo l'output Node-RED. Il gateway salvato rimane selezionato durante l'inizializzazione dell'editor e cambia soltanto dopo una selezione esplicita dell'utente. |
15
15
  | Matter controller | Nodo di configurazione Matter Controller in cui il dispositivo è stato associato. |
16
16
  | Dispositivo Matter | Endpoint Matter selezionato tra i dispositivi abbinati. La UI viene ricostruita in base alle capability reali. |
17
17
  | Switch / Presa / Luce On-Off | Indirizzi di gruppo di comando e stato On/Off, di solito DPT `1.001`. |
@@ -26,6 +26,7 @@ Il WatchDog è molto utile per notificare errori e problemi di connessione: puoi
26
26
  | Group Address da monitorare | GA a cui inviare il telegramma e da cui attendere risposta sul BUS KNX. Il Datapoint deve essere DPT 1.x (boolean). |
27
27
  | Nome nodo | Nome del nodo. |
28
28
  | Avvia il watchdog automaticamente | Avvio automatico del timer al deploy o all'avvio di Node-RED. |
29
+ | Ascolta gli errori dei nodi KNX-Ultimate | Attiva per impostazione predefinita. Emette un `NodeError` quando un nodo KNX-Ultimate associato al gateway selezionato, incluso KNX Device, segnala uno stato di errore rosso. Disattivandola vengono soppressi solo questi messaggi `NodeError`; i controlli BUS e i messaggi di comando del WatchDog restano attivi. |
29
30
  | Livello controllo (vedi Wiki) | Vedi sotto. |
30
31
 
31
32
  **Check level**
@@ -47,7 +48,7 @@ Il WatchDog è molto utile per notificare errori e problemi di connessione: puoi
47
48
 
48
49
  # Messaggi in uscita dal WatchDog
49
50
 
50
- Il nodo emette un messaggio quando riceve un errore da un qualsiasi nodo KNX-Ultimate nel flow, oppure quando il watchdog interno intercetta un errore di comunicazione sul BUS KNX.
51
+ Il WatchDog emette sempre i propri messaggi di controllo del BUS e di comando. Quando **Ascolta gli errori dei nodi KNX-Ultimate** è attiva, emette anche gli errori segnalati dai nodi KNX-Ultimate, incluso KNX Device, associati al gateway selezionato.
51
52
 
52
53
  **In caso di problema di connessione rilevato dal WatchDog**
53
54
 
@@ -64,7 +65,7 @@ msg = {
64
65
  }
65
66
  ```
66
67
 
67
- **In caso di errore di un tuo nodo KNX-Ultimate**
68
+ **Quando l'ascolto è attivo e uno dei nodi KNX-Ultimate segnala un errore**
68
69
 
69
70
  ```javascript
70
71
 
@@ -180,4 +181,4 @@ return msg;
180
181
  ## Vedi anche
181
182
 
182
183
  [Sample WatchDog](https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/-Sample---WatchDog)
183
- </script>
184
+ </script>
@@ -9,6 +9,7 @@
9
9
  "node-input-topic": "Group Address da monitorare",
10
10
  "node-input-name": "Nome nodo",
11
11
  "node-input-autoStart": "Avvia il watchdog automaticamente",
12
+ "node-input-listenToKnxUltimateNodeErrors": "Ascolta gli errori dei nodi KNX-Ultimate",
12
13
  "advancedOptionsAccordion": "Opzioni avanzate",
13
14
  "node-input-retryInterval": "Riprova ogni (in secondi)",
14
15
  "node-input-maxRetry": "Dopo questo numero di tentativi, segnala l'errore"
@@ -11,7 +11,7 @@
11
11
 
12
12
  |字段|说明|
13
13
  |--|--|
14
- | KNX GW | 用于写入并响应已配置组地址的 KNX 网关。如果只需要 Node-RED 输出,可以留空。 |
14
+ | KNX GW | 用于写入并响应已配置组地址的 KNX 网关。如果只需要 Node-RED 输出,可以留空。编辑器初始化期间会保留已保存的网关,只有用户明确选择后才会更改。 |
15
15
  | Matter controller | 设备已在其中配网的 Matter Controller 配置节点。 |
16
16
  | Matter device | 从已配对设备中选择的 Matter endpoint。UI 会根据真实能力重新构建。 |
17
17
  | Switch / 插座 / 灯 On-Off | On/Off 命令和状态组地址,通常使用 DPT `1.001`。 |
@@ -26,6 +26,7 @@ WatchDog 提供两级检测:
26
26
  | 需要监控的组地址 | 用于发送与监测的组地址;DPT 必须为 1.x(布尔)。|
27
27
  | 节点名称 | 节点名称。|
28
28
  | 自动启动看门狗定时器 | 在部署/启动时自动启动定时器。|
29
+ | 监听 KNX-Ultimate 节点错误 | 默认启用。当与所选网关关联的 KNX-Ultimate 节点(包括 KNX Device)报告红色错误状态时,输出 `NodeError` 消息。禁用后只抑制这些 `NodeError` 消息;WatchDog 自身的总线检测和控制消息仍保持启用。|
29
30
  | 检查等级 (请查阅wiki) | 见上。|
30
31
 
31
32
  **Check level**
@@ -47,7 +48,7 @@ WatchDog 提供两级检测:
47
48
 
48
49
  # WatchDog 的输出
49
50
 
50
- 当内部检测发现故障,或某个 KNX-Ultimate 节点在流程中上报错误时,WatchDog 会输出消息。
51
+ WatchDog 始终输出自身的总线检测和控制消息。启用 **监听 KNX-Ultimate 节点错误** 后,它还会输出与所选网关关联的 KNX-Ultimate 节点(包括 KNX Device)所报告的错误。
51
52
 
52
53
  **WatchDog 自身连接问题**
53
54
 
@@ -64,7 +65,7 @@ msg = {
64
65
  }
65
66
  ```
66
67
 
67
- **你的某个 KNX-Ultimate 节点出现异常**
68
+ **启用错误监听且某个 KNX-Ultimate 节点报告错误时**
68
69
 
69
70
  ```javascript
70
71
 
@@ -164,4 +165,4 @@ msg.connectGateway = true; return msg;
164
165
  ## 参见
165
166
 
166
167
  [Sample WatchDog](https://supergiovane.github.io/node-red-contrib-knx-ultimate/wiki/-Sample---WatchDog)
167
- </script>
168
+ </script>
@@ -9,6 +9,7 @@
9
9
  "node-input-topic": "需要监控的组地址",
10
10
  "node-input-name": "节点名称",
11
11
  "node-input-autoStart": "自动启动看门狗定时器",
12
+ "node-input-listenToKnxUltimateNodeErrors": "监听 KNX-Ultimate 节点错误",
12
13
  "advancedOptionsAccordion": "高级选项",
13
14
  "node-input-retryInterval": "重试间隔 (秒)",
14
15
  "node-input-maxRetry": "出错前的重试次数"
@@ -0,0 +1,19 @@
1
+ module.exports = function dispatchWatchDogNodeError (configNode, nodeError) {
2
+ const clients = Array.isArray(configNode && configNode.nodeClients) ? configNode.nodeClients : []
3
+
4
+ clients
5
+ .filter(client => client && client.isWatchDog === true && client.listenToKnxUltimateNodeErrors !== false && client.listenToKnxUltimateNodeErrors !== 'false')
6
+ .forEach(client => {
7
+ try {
8
+ if (typeof client.signalNodeErrorCalledByConfigNode === 'function') {
9
+ client.signalNodeErrorCalledByConfigNode(nodeError)
10
+ }
11
+ } catch (error) {
12
+ try {
13
+ configNode.sysLogger?.error(`Unable to report KNX-Ultimate node error to Watchdog ${client.id}: ${error.message || error}`)
14
+ } catch {
15
+ // Error reporting must not prevent delivery to the remaining Watchdogs.
16
+ }
17
+ }
18
+ })
19
+ }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=20.18.1"
5
5
  },
6
- "version": "6.3.9",
6
+ "version": "6.3.11",
7
7
  "description": "KNX Ultimate is the most advanced KNX integration for Node-RED, providing secure KNX/IP communication, routing, ETS project import, Philips Hue, Matter Controller and Matter Bridge (control matter device via KNX and expose KNX GA via Matter), MQTT, diagnostics with AI, virtual devices, and powerful automation nodes. Build professional, reliable, and scalable smart home and building automation projects with minimal effort.",
8
8
  "files": [
9
9
  "nodes/",
@@ -0,0 +1,32 @@
1
+ (function (root, factory) {
2
+ const api = factory()
3
+ if (typeof module === 'object' && module.exports) module.exports = api
4
+ if (root) root.KNXUltimateConfigNodeEditorSelection = api
5
+ }(typeof window !== 'undefined' ? window : globalThis, function () {
6
+ const DEFAULT_EMPTY_VALUES = new Set(['', 'none', '_add_', '__none__'])
7
+
8
+ function normalizeSelection (value, emptyValues = DEFAULT_EMPTY_VALUES) {
9
+ const normalized = value === undefined || value === null ? '' : String(value).trim()
10
+ const normalizedEmptyValues = emptyValues instanceof Set
11
+ ? emptyValues
12
+ : new Set(Array.isArray(emptyValues) ? emptyValues : DEFAULT_EMPTY_VALUES)
13
+ return normalizedEmptyValues.has(normalized.toLowerCase()) ? '' : normalized
14
+ }
15
+
16
+ function shouldPreserveSelection (event, nextValue, currentValue, emptyValues = DEFAULT_EMPTY_VALUES) {
17
+ const programmaticChange = !event || !event.originalEvent
18
+ return programmaticChange &&
19
+ normalizeSelection(nextValue, emptyValues) === '' &&
20
+ normalizeSelection(currentValue, emptyValues) !== ''
21
+ }
22
+
23
+ function resolveSelectedOrStoredSelection (selectedValue, storedValue, emptyValues = DEFAULT_EMPTY_VALUES) {
24
+ return normalizeSelection(selectedValue, emptyValues) || normalizeSelection(storedValue, emptyValues)
25
+ }
26
+
27
+ return {
28
+ normalizeSelection,
29
+ resolveSelectedOrStoredSelection,
30
+ shouldPreserveSelection
31
+ }
32
+ }))