node-red-contrib-knx-ultimate 6.3.2 → 6.3.4

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,10 @@
6
6
 
7
7
  # CHANGELOG
8
8
 
9
+ **Version 6.3.4** - August 2026<br/>
10
+
11
+ - **HUE Controller**: fixed missing Light mapping tabs and false-success Locate requests. Editor and Locate failures now show a red Node-RED message.<br/>
12
+
9
13
  **Version 6.3.2** - August 2026<br/>
10
14
 
11
15
  - Fixed stop issue in dimme-up.<br/>
@@ -103,22 +103,33 @@ module.exports = (RED) => {
103
103
  }
104
104
 
105
105
  session.runIdentify = async (label = 'interval') => {
106
- if (session.inFlight) return
107
- if (!node.hueManager || !node.hueManager.hueApiV2 || typeof node.hueManager.hueApiV2.put !== 'function') return
108
- if (node.linkStatus !== 'connected') return
106
+ if (session.inFlight) return { attempted: 0, succeeded: 0, lastError: null }
107
+ if (!node.hueManager || !node.hueManager.hueApiV2 || typeof node.hueManager.hueApiV2.put !== 'function') {
108
+ return { attempted: 0, succeeded: 0, lastError: new Error('Hue bridge not ready') }
109
+ }
110
+ if (node.linkStatus !== 'connected') {
111
+ return { attempted: 0, succeeded: 0, lastError: new Error('Hue bridge is not connected') }
112
+ }
109
113
  session.inFlight = true
114
+ let attempted = 0
115
+ let succeeded = 0
116
+ let lastError = null
110
117
  try {
111
118
  for (const target of session.targets) {
112
119
  if (!target || !target.id || !target.type) continue
120
+ attempted += 1
113
121
  try {
114
122
  await node.hueManager.hueApiV2.put(`/resource/${target.type}/${target.id}`, { identify: { action: 'identify' } })
123
+ succeeded += 1
115
124
  } catch (error) {
125
+ lastError = error
116
126
  node.sysLogger?.warn(`Hue identify ${target.type}:${target.id} failed (${label}): ${error.message}`)
117
127
  }
118
128
  }
119
129
  } finally {
120
130
  session.inFlight = false
121
131
  }
132
+ return { attempted, succeeded, lastError }
122
133
  }
123
134
 
124
135
  session.intervalHandle = setInterval(() => {
@@ -129,7 +140,12 @@ module.exports = (RED) => {
129
140
  }, resolvedDuration)
130
141
 
131
142
  node.activeHueIdentifySessions.set(sessionKey, session)
132
- await session.runIdentify('initial')
143
+ const initialResult = await session.runIdentify('initial')
144
+ if (!initialResult || initialResult.succeeded === 0) {
145
+ node.stopHueIdentifySession(sessionKey, 'initial-error')
146
+ if (initialResult?.lastError) throw initialResult.lastError
147
+ return false
148
+ }
133
149
  return true
134
150
  }
135
151
 
@@ -617,12 +617,19 @@
617
617
 
618
618
  const updateControllerKnxVisibility = () => {
619
619
  // Node-RED has used several sentinel values for an empty config-node
620
- // selector. Normalize them before deciding whether KNX rows exist.
620
+ // selector. During editor bootstrap the DOM can temporarily expose
621
+ // one of them even though the node has a persisted gateway, so use
622
+ // the stored reference as a fallback before hiding the Light tabs.
621
623
  const serverValue = $('#node-input-server').val();
622
624
  const normalizedServerValue = serverValue === undefined || serverValue === null
623
625
  ? ''
624
626
  : String(serverValue).trim().toLowerCase();
625
- const knxDisabled = KNX_EMPTY_SERVER_VALUES.has(normalizedServerValue);
627
+ const storedServerValue = controllerNode.server === undefined || controllerNode.server === null
628
+ ? ''
629
+ : String(controllerNode.server).trim().toLowerCase();
630
+ const hasDomServer = !KNX_EMPTY_SERVER_VALUES.has(normalizedServerValue);
631
+ const hasStoredServer = !KNX_EMPTY_SERVER_VALUES.has(storedServerValue);
632
+ const knxDisabled = !hasDomServer && !hasStoredServer;
626
633
  $container.toggleClass('hue-controller-no-knx', knxDisabled);
627
634
  };
628
635
  updateControllerKnxVisibility();
@@ -821,6 +828,8 @@ For a single light, the **Dim**, **Tunable White**, **RGB/HSV**, and native-effe
821
828
 
822
829
  While the Hue Bridge is still loading its resources, the Light editor displays a spinning hourglass and polls readiness every 500 ms. The wait is bounded: after about 10 seconds the editor is released, the mapping tabs remain hidden, and a localized error asks you to check the bridge configuration, deploy, and retry. Closing, saving, or changing function always cancels the pending timer.
823
830
 
831
+ Locate and the Light mapping container initialize before optional Effects and tab widgets. A saved KNX gateway remains valid if Node-RED temporarily exposes an empty selector while the editor starts. Browser-side failures and a rejected initial Locate command produce a fixed red Node-RED error with the technical detail instead of leaving the editor silent.
832
+
824
833
  Changing the selected **Hue device** automatically changes the detected **Device type**, visible editor and node pin layout. After saving, reopen the node to verify the selected resource and mappings.
825
834
 
826
835
  KNX mapping rows keep GA, DPT and Name on one line. DPT selectors use a compact fixed range, while Name fields are shorter and may contract further on a narrow editor tray without changing their stored text. Saved DPT values are retained while selector options load asynchronously.
@@ -9,6 +9,7 @@
9
9
  <p>Wenn kein <strong>KNX-Gateway</strong> ausgewählt ist (einschließlich <code>none</code> und <em>Neu hinzufügen...</em>), werden die KNX-Zuordnungsfelder ausgeblendet; die Auswahl der Hue-Ressource und reine Flow-Optionen bleiben verfügbar.</p>
10
10
  <p>Bei einer einzelnen Leuchte richten sich die Bereiche <strong>Dimmen</strong>, <strong>Abstimmbares Weiß</strong>, <strong>RGB/HSV</strong> und native Effekte nach den Live-Fähigkeiten der ausgewählten Hue-API-v2-Ressource. Die zugehörigen KNX-Zuordnungen erscheinen automatisch, wenn die Leuchte <code>dimming</code>, <code>color_temperature</code> oder <code>color</code> bereitstellt.</p>
11
11
  <p>Während die Hue Bridge ihre Ressourcen lädt, zeigt der Leuchteneditor eine animierte Sanduhr und prüft die Bereitschaft alle 500 ms. Nach etwa 10 Sekunden wird der Editor freigegeben, die Zuordnungsregister bleiben verborgen und ein lokalisierter Fehler wird angezeigt. Speichern, Schließen oder ein Funktionswechsel beendet die ausstehende Wartezeit.</p>
12
+ <p>Locate und der Leuchten-Zuordnungsbereich werden vor den optionalen Effekt- und Register-Widgets initialisiert. Ein gespeichertes KNX-Gateway bleibt gültig, wenn Node-RED beim Start des Editors vorübergehend einen leeren Selektor anzeigt. Browserseitige Fehler und ein abgewiesener erster Locate-Befehl erzeugen eine feste rote Node-RED-Fehlermeldung mit dem technischen Detail, statt den Editor still zu lassen.</p>
12
13
  <p>Wenn ein Gateway ausgewählt ist, akzeptieren die Zuordnungsfelder eine KNX-Gruppenadresse oder einen importierten ETS-Namen; passende Datenpunkte werden von diesem Gateway geladen.</p>
13
14
  <p>Der Migrationsbutton wird nur angezeigt, wenn der Node-RED-Editor mindestens einen Legacy-HUE-Knoten in den aktuellen Flows erkennt. Derselbe kontrastreiche orange Button mit weißer Beschriftung steht unter dem Deprecated-Hinweis in jedem Legacy-HUE-Editor bereit.</p>
14
15
  <p><strong>Legacy-HUE-Knoten konvertieren</strong> führt die gesamte Konvertierung im Browser aus und sendet keinerlei Flow- oder Knotendaten. Nach erfolgreicher lokaler Konvertierung öffnet der Browser nur einen bearbeitbaren E-Mail-Entwurf an den Autor, ohne Node-RED zu verlassen. Der Entwurf enthält nur die Anzahl konvertierter Knoten und Platz für optionale Hinweise und wird niemals automatisch gesendet. Die abschließende Node-RED-Meldung bietet eine optionale Unterstützungsschaltfläche; die Spendenseite öffnet sich nur nach einem Klick darauf.</p>
@@ -9,6 +9,7 @@
9
9
  <p>When no <strong>KNX Gateway</strong> is selected (including <code>none</code> and <em>Add new...</em>), KNX mapping fields are hidden while Hue resource selection and flow-only options remain available.</p>
10
10
  <p>For a single light, the <strong>Dim</strong>, <strong>Tunable White</strong>, <strong>RGB/HSV</strong>, and native-effects sections follow the live capabilities reported by the selected Hue API v2 resource. The corresponding KNX mappings appear automatically when the light exposes <code>dimming</code>, <code>color_temperature</code>, or <code>color</code>.</p>
11
11
  <p>While the Hue Bridge is loading its resources, the Light editor shows a spinning hourglass and checks readiness every 500 ms. After about 10 seconds it releases the editor, keeps the mapping tabs hidden and reports a localized error. Saving, closing or changing function cancels the pending wait.</p>
12
+ <p>Locate and the Light mapping container initialize before optional Effects and tab widgets. A saved KNX gateway remains valid if Node-RED temporarily exposes an empty selector while the editor starts. Browser-side failures and a rejected initial Locate command produce a fixed red Node-RED error with the technical detail instead of leaving the editor silent.</p>
12
13
  <p>When a gateway is selected, mapping fields accept a KNX group address or an imported ETS name; matching datapoints are loaded from that gateway.</p>
13
14
  <p>The migration button is shown only when the Node-RED editor detects at least one legacy HUE node in the current flows. The same high-contrast orange button with white text is available below the deprecation notice in every legacy HUE editor.</p>
14
15
  <p><strong>Convert legacy HUE nodes</strong> performs the entire conversion in the browser and sends no flow or node data anywhere. After a successful local conversion, the browser opens only an editable email draft addressed to the author without navigating away from Node-RED. The draft contains only the number of converted nodes and space for optional notes, and is never sent automatically. The final Node-RED message offers an optional support button; the donation page opens only when that button is clicked.</p>
@@ -9,6 +9,7 @@
9
9
  <p>Cuando no hay ningún <strong>Gateway KNX</strong> seleccionado (incluidos <code>none</code> y <em>Añadir nuevo...</em>), se ocultan los campos de mapeo KNX; la selección del recurso Hue y las opciones exclusivas del flujo siguen disponibles.</p>
10
10
  <p>Para una luz individual, las secciones <strong>Regulación</strong>, <strong>Blanco regulable</strong>, <strong>RGB/HSV</strong> y efectos nativos siguen las capacidades en vivo declaradas por el recurso Hue API v2 seleccionado. Los mapeos KNX correspondientes aparecen automáticamente cuando la luz expone <code>dimming</code>, <code>color_temperature</code> o <code>color</code>.</p>
11
11
  <p>Mientras Hue Bridge carga sus recursos, el editor de Luz muestra un reloj de arena animado y comprueba su disponibilidad cada 500 ms. Después de unos 10 segundos libera el editor, mantiene ocultas las pestañas de mapeo y muestra un error localizado. Guardar, cerrar o cambiar de función cancela la espera pendiente.</p>
12
+ <p>Locate y el contenedor de mapeo de Luz se inicializan antes que los widgets opcionales de Efectos y pestañas. Un gateway KNX guardado sigue siendo válido si Node-RED muestra temporalmente un selector vacío al iniciar el editor. Los fallos del navegador y un primer comando Locate rechazado generan un error rojo fijo de Node-RED con el detalle técnico, en lugar de dejar el editor en silencio.</p>
12
13
  <p>Cuando hay un gateway seleccionado, los campos de mapeo aceptan una dirección de grupo KNX o un nombre importado de ETS; los datapoints compatibles se cargan desde ese gateway.</p>
13
14
  <p>El botón de migración solo aparece cuando el editor de Node-RED detecta al menos un nodo HUE legacy en los flujos actuales. El mismo botón naranja de alto contraste con texto blanco está disponible bajo el aviso de obsolescencia de cada editor HUE legacy.</p>
14
15
  <p><strong>Convertir nodos HUE legacy</strong> realiza toda la conversión en el navegador y no envía ningún dato del flujo ni de los nodos. Tras una conversión local correcta, el navegador solo abre un borrador de correo editable dirigido al autor sin abandonar Node-RED. El borrador contiene únicamente el número de nodos convertidos y espacio para notas opcionales y nunca se envía automáticamente. El mensaje final de Node-RED ofrece un botón de apoyo opcional; la página de donación solo se abre al pulsarlo.</p>
@@ -9,6 +9,7 @@
9
9
  <p>Lorsqu'aucune <strong>Passerelle KNX</strong> n'est sélectionnée (y compris <code>none</code> et <em>Ajouter...</em>), les champs de mappage KNX sont masqués ; la sélection de la ressource Hue et les options réservées au flow restent disponibles.</p>
10
10
  <p>Pour une lampe individuelle, les sections <strong>Variation</strong>, <strong>Blanc réglable</strong>, <strong>RGB/HSV</strong> et effets natifs suivent les capacités live déclarées par la ressource Hue API v2 sélectionnée. Les mappages KNX correspondants apparaissent automatiquement lorsque la lampe expose <code>dimming</code>, <code>color_temperature</code> ou <code>color</code>.</p>
11
11
  <p>Pendant que le Hue Bridge charge ses ressources, l'éditeur Lampe affiche un sablier animé et vérifie sa disponibilité toutes les 500 ms. Après environ 10 secondes, l'éditeur est libéré, les onglets de mappage restent masqués et une erreur localisée est affichée. L'enregistrement, la fermeture ou le changement de fonction annule l'attente en cours.</p>
12
+ <p>Locate et le conteneur de mappage Lampe sont initialisés avant les widgets facultatifs Effets et onglets. Une passerelle KNX enregistrée reste valide si Node-RED affiche temporairement un sélecteur vide au démarrage de l'éditeur. Les erreurs du navigateur et le rejet de la première commande Locate produisent une erreur Node-RED rouge et fixe avec le détail technique, au lieu de laisser l'éditeur silencieux.</p>
12
13
  <p>Lorsqu'une passerelle est sélectionnée, les champs de mappage acceptent une adresse de groupe KNX ou un nom importé d'ETS ; les datapoints compatibles sont chargés depuis cette passerelle.</p>
13
14
  <p>Le bouton de migration apparaît uniquement lorsque l'éditeur Node-RED détecte au moins un nœud HUE legacy dans les flows actuels. Le même bouton orange à contraste élevé avec texte blanc est disponible sous l'avis d'obsolescence de chaque éditeur HUE legacy.</p>
14
15
  <p><strong>Convertir les nœuds HUE legacy</strong> effectue toute la conversion dans le navigateur et n'envoie aucune donnée de flow ou de nœud. Après une conversion locale réussie, le navigateur ouvre uniquement un brouillon d'e-mail modifiable adressé à l'auteur sans quitter Node-RED. Le brouillon contient uniquement le nombre de nœuds convertis et un espace pour des notes facultatives et n'est jamais envoyé automatiquement. Le message Node-RED final propose un bouton de soutien facultatif ; la page de don ne s'ouvre qu'après un clic sur ce bouton.</p>
@@ -9,6 +9,7 @@
9
9
  <p>Quando non è selezionato alcun <strong>Gateway KNX</strong> (inclusi <code>none</code> e <em>Aggiungi nuovo...</em>), i campi di mappatura KNX vengono nascosti, mentre la selezione della risorsa Hue e le opzioni per il solo flow restano disponibili.</p>
10
10
  <p>Per una luce singola, le sezioni <strong>Dimmer</strong>, <strong>Bianco regolabile</strong>, <strong>RGB/HSV</strong> ed effetti nativi seguono le capacità live dichiarate dalla risorsa Hue API v2 selezionata. Le relative mappature KNX appaiono automaticamente quando la luce espone <code>dimming</code>, <code>color_temperature</code> o <code>color</code>.</p>
11
11
  <p>Mentre Hue Bridge carica le proprie risorse, l'editor Luce mostra una clessidra animata e ne controlla la disponibilità ogni 500 ms. Dopo circa 10 secondi libera comunque l'editor, mantiene nascoste le schede di mappatura e segnala un errore localizzato. Salvataggio, chiusura o cambio funzione annullano l'attesa pendente.</p>
12
+ <p>Locate e il contenitore delle mappature Luce vengono inizializzati prima dei widget opzionali Effetti e schede. Un gateway KNX salvato resta valido se Node-RED mostra temporaneamente un selettore vuoto durante l'avvio dell'editor. Gli errori del browser e il rifiuto del primo comando Locate producono un errore Node-RED rosso e fisso con il dettaglio tecnico, invece di lasciare l'editor silenzioso.</p>
12
13
  <p>Quando è selezionato un gateway, nei campi di mappatura puoi digitare un indirizzo di gruppo KNX o un nome importato da ETS; i datapoint compatibili vengono caricati da quel gateway.</p>
13
14
  <p>Il pulsante di migrazione compare solo quando l'editor Node-RED rileva almeno un nodo HUE legacy nei flow correnti. Lo stesso pulsante arancione ad alto contrasto con testo bianco è disponibile sotto l'avviso di deprecazione in ogni editor HUE legacy.</p>
14
15
  <p><strong>Converti nodi HUE legacy</strong> esegue l'intera conversione nel browser e non invia alcun dato del flow o dei nodi. Dopo la conversione locale, il browser apre soltanto una bozza email modificabile indirizzata all'autore senza abbandonare Node-RED. La bozza contiene soltanto il numero dei nodi convertiti e uno spazio per note facoltative e non viene mai spedita automaticamente. Il messaggio finale di Node-RED propone un pulsante facoltativo per sostenere il progetto; la pagina per la donazione si apre solo premendo quel pulsante.</p>
@@ -9,6 +9,7 @@
9
9
  <p>未选择<strong>KNX 网关</strong>时(包括 <code>none</code> 和“新增...”),KNX 映射字段会隐藏,而 Hue 资源选择和仅用于流程的选项仍然可用。</p>
10
10
  <p>对于单灯,<strong>调光</strong>、<strong>可调白光</strong>、<strong>RGB/HSV</strong> 和原生效果部分会根据所选 Hue API v2 资源实时报告的能力显示。当灯具提供 <code>dimming</code>、<code>color_temperature</code> 或 <code>color</code> 时,相应的 KNX 映射会自动出现。</p>
11
11
  <p>Hue Bridge 加载资源期间,灯光编辑器会显示旋转的沙漏,并每 500 毫秒检查一次就绪状态。约 10 秒后编辑器会解除等待,映射选项卡保持隐藏,并显示本地化错误。保存、关闭或切换功能都会取消尚未结束的等待。</p>
12
+ <p>Locate 和灯光映射容器会先于可选的效果与选项卡控件初始化。如果编辑器启动时 Node-RED 暂时显示空的网关选择值,已保存的 KNX 网关仍保持有效。浏览器端错误或首次 Locate 命令被拒绝时,Node-RED 会显示固定的红色错误消息和技术详情,而不会让编辑器无提示地保持沉默。</p>
12
13
  <p>选择网关后,映射字段可输入 KNX 组地址或从 ETS 导入的名称;兼容的数据点会从该网关加载。</p>
13
14
  <p>仅当 Node-RED 编辑器在当前流程中检测到至少一个旧版 HUE 节点时,才会显示迁移按钮。每个旧版 HUE 编辑器的弃用提示下方也提供带白色文字的相同高对比度橙色按钮。</p>
14
15
  <p><strong>转换旧版 HUE 节点</strong>会完全在浏览器中完成转换,不会发送任何流程或节点数据。成功完成本地转换后,浏览器只会打开一封发给作者的可编辑邮件草稿,而不会离开 Node-RED。草稿只包含已转换节点数量和可选备注空间,绝不会自动发送。最终的 Node-RED 消息会提供一个可选的支持按钮;只有点击该按钮时才会打开捐赠页面。</p>
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "engines": {
4
4
  "node": ">=20.18.1"
5
5
  },
6
- "version": "6.3.2",
6
+ "version": "6.3.4",
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/",