node-red-contrib-knx-ultimate 4.1.18 → 4.1.21
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 +14 -2
- package/examples/KNX Multi Routing - KNXIP Server.json +133 -0
- package/nodes/knxUltimateAI.js +131 -85
- package/nodes/knxUltimateMultiRouting.html +75 -3
- package/nodes/knxUltimateMultiRouting.js +390 -28
- package/nodes/knxUltimateRouterFilter.html +1 -1
- package/nodes/knxUltimateRouterFilter.js +215 -9
- package/nodes/locales/de/knxUltimateMultiRouting.html +16 -0
- package/nodes/locales/de/knxUltimateMultiRouting.json +15 -1
- package/nodes/locales/de/knxUltimateRouterFilter.html +39 -1
- package/nodes/locales/en/knxUltimateMultiRouting.html +16 -0
- package/nodes/locales/en/knxUltimateMultiRouting.json +15 -1
- package/nodes/locales/en/knxUltimateRouterFilter.html +39 -1
- package/nodes/locales/es/knxUltimateMultiRouting.html +16 -0
- package/nodes/locales/es/knxUltimateMultiRouting.json +15 -1
- package/nodes/locales/es/knxUltimateRouterFilter.html +39 -1
- package/nodes/locales/fr/knxUltimateMultiRouting.html +16 -0
- package/nodes/locales/fr/knxUltimateMultiRouting.json +15 -1
- package/nodes/locales/fr/knxUltimateRouterFilter.html +39 -1
- package/nodes/locales/it/knxUltimateMultiRouting.html +16 -0
- package/nodes/locales/it/knxUltimateMultiRouting.json +15 -1
- package/nodes/locales/it/knxUltimateRouterFilter.html +39 -1
- package/nodes/locales/zh-CN/knxUltimateMultiRouting.html +16 -0
- package/nodes/locales/zh-CN/knxUltimateMultiRouting.json +15 -1
- package/nodes/locales/zh-CN/knxUltimateRouterFilter.html +39 -1
- package/package.json +2 -2
|
@@ -2,10 +2,24 @@
|
|
|
2
2
|
"knxUltimateMultiRouting": {
|
|
3
3
|
"title": "KNX Multi Routing",
|
|
4
4
|
"properties": {
|
|
5
|
+
"mode": "Mode",
|
|
6
|
+
"modeGateway": "Gateway / Routing",
|
|
7
|
+
"modeServer": "Server KNX/IP",
|
|
5
8
|
"server": "Gateway",
|
|
6
9
|
"name": "Name",
|
|
7
10
|
"outputtopic": "Output topic",
|
|
8
|
-
"dropIfSameGateway": "Drop messages already tagged for this gateway"
|
|
11
|
+
"dropIfSameGateway": "Drop messages already tagged for this gateway",
|
|
12
|
+
"respectRoutingCounter": "Respect routing counter (drop if 0)",
|
|
13
|
+
"decrementRoutingCounter": "Decrement routing counter when routing",
|
|
14
|
+
"tunnelTitle": "KNX/IP Server",
|
|
15
|
+
"tunnelListenHost": "Listen host",
|
|
16
|
+
"tunnelListenPort": "Listen port",
|
|
17
|
+
"tunnelAdvertiseHost": "Advertise host",
|
|
18
|
+
"tunnelAdvertiseHostPlaceholder": "(optional) Host/IP to advertise to clients",
|
|
19
|
+
"tunnelAssignedIndividualAddress": "Assigned individual address",
|
|
20
|
+
"tunnelGatewayId": "Gateway id (tag)",
|
|
21
|
+
"tunnelGatewayIdPlaceholder": "(auto) Used as knxMultiRouting.gateway.id",
|
|
22
|
+
"tunnelMaxSessions": "Max sessions"
|
|
9
23
|
},
|
|
10
24
|
"outputs": {
|
|
11
25
|
"raw": "RAW telegrams"
|
|
@@ -24,6 +24,8 @@ Vous pouvez réécrire (optionnellement) :
|
|
|
24
24
|
- destination (adresse de groupe) `knx.destination`
|
|
25
25
|
- source (adresse physique) `knx.source`
|
|
26
26
|
|
|
27
|
+
Lors d’une réécriture, le nœud met aussi à jour `knx.cemi.hex` pour refléter les valeurs réécrites de `knx.source`/`knx.destination` (lorsque `knx.cemi.hex` est présent).
|
|
28
|
+
|
|
27
29
|
Les règles sont évaluées de haut en bas (première correspondance gagnante).
|
|
28
30
|
|
|
29
31
|
Exemples :
|
|
@@ -33,5 +35,41 @@ Exemples :
|
|
|
33
35
|
## Métadonnées
|
|
34
36
|
Le nœud ajoute `msg.payload.knxRouterFilter` :
|
|
35
37
|
- rejetés : `{ dropped: true, reason: 'event'|'ga'|'source', ... }`
|
|
36
|
-
- passés : `{ dropped: false, rewritten: <bool>, rewrite: { ... }, original: { ... } }`
|
|
38
|
+
- passés : `{ dropped: false, rewritten: <bool>, cemiSynced: <bool>, rewrite: { ... }, original: { ... } }`
|
|
39
|
+
|
|
40
|
+
## msg.setConfig
|
|
41
|
+
Vous pouvez modifier la configuration du nœud à l’exécution en envoyant un objet `msg.setConfig` à l’entrée.
|
|
42
|
+
Clés prises en charge : `allowWrite`, `allowResponse`, `allowRead`, `gaMode`, `gaPatterns`, `srcMode`, `srcPatterns`, `rewriteGA`, `gaRewriteRules`, `rewriteSource`, `srcRewriteRules`.
|
|
43
|
+
La configuration est conservée jusqu’au prochain `msg.setConfig` ou jusqu’à un redeploy/redémarrage. Les messages de configuration ne sont pas transmis.
|
|
44
|
+
|
|
45
|
+
Signification des propriétés :
|
|
46
|
+
- `allowWrite` : autorise les télégrammes `GroupValue_Write`.
|
|
47
|
+
- `allowResponse` : autorise les télégrammes `GroupValue_Response`.
|
|
48
|
+
- `allowRead` : autorise les télégrammes `GroupValue_Read`.
|
|
49
|
+
- `gaMode` : mode de filtre GA de destination (`off` = pas de filtre, `allow` = autoriser uniquement les correspondances, `block` = bloquer les correspondances).
|
|
50
|
+
- `gaPatterns` : motifs GA de destination utilisés par `gaMode` (un par ligne, supporte `*` et `re:<regex>`).
|
|
51
|
+
- `srcMode` : mode de filtre Source (adresse physique) (`off`/`allow`/`block`).
|
|
52
|
+
- `srcPatterns` : motifs Source utilisés par `srcMode` (un par ligne, supporte `*` et `re:<regex>`).
|
|
53
|
+
- `rewriteGA` : active la réécriture de `knx.destination` sur les télégrammes passés.
|
|
54
|
+
- `gaRewriteRules` : règles de réécriture GA (`de => vers`, première correspondance gagnante ; supporte `*` et `re:<regex>`).
|
|
55
|
+
- `rewriteSource` : active la réécriture de `knx.source` sur les télégrammes passés.
|
|
56
|
+
- `srcRewriteRules` : règles de réécriture Source (`de => vers`, première correspondance gagnante ; supporte `*` et `re:<regex>`).
|
|
57
|
+
|
|
58
|
+
Exemple :
|
|
59
|
+
```js
|
|
60
|
+
msg.setConfig = {
|
|
61
|
+
allowWrite: true,
|
|
62
|
+
allowResponse: true,
|
|
63
|
+
allowRead: true,
|
|
64
|
+
gaMode: "allow",
|
|
65
|
+
gaPatterns: "1/1/*\n1/2/3",
|
|
66
|
+
srcMode: "off",
|
|
67
|
+
srcPatterns: "",
|
|
68
|
+
rewriteGA: true,
|
|
69
|
+
gaRewriteRules: "5/5/1 => 1/1/1",
|
|
70
|
+
rewriteSource: true,
|
|
71
|
+
srcRewriteRules: "15.*.* => 1.1.254"
|
|
72
|
+
};
|
|
73
|
+
return msg;
|
|
74
|
+
```
|
|
37
75
|
</script>
|
|
@@ -4,6 +4,12 @@ Questo nodo serve per **collegare tra loro più gateway KNX Ultimate** (più `kn
|
|
|
4
4
|
In output emette un oggetto con le informazioni **RAW** del telegramma (APDU + cEMI hex + indirizzi) per ogni telegramma ricevuto dal BUS KNX del gateway selezionato.
|
|
5
5
|
In input può ricevere gli stessi oggetti RAW e inoltrarli sul BUS KNX del gateway selezionato.
|
|
6
6
|
|
|
7
|
+
## Modalità Server KNX/IP
|
|
8
|
+
Imposta **Modalità** su **Server KNX/IP** per avviare un server KNXnet/IP tunneling (UDP). I telegrammi ricevuti dai client vengono emessi nello stesso formato RAW usato dal MultiRouting.
|
|
9
|
+
Il nodo accetta anche in input gli oggetti RAW e li inietta verso i client tunneling connessi.
|
|
10
|
+
|
|
11
|
+
**Importante (Host annunciato):** i client KNXnet/IP inviano i dati all’IP annunciato dal server nella CONNECT_RESPONSE. Se il client risulta *connesso* ma il server non riceve telegrammi, imposta **Host annunciato** con l’IP LAN del server raggiungibile dal client (soprattutto se Node-RED gira in Docker/VM o se il PC ha più schede di rete).
|
|
12
|
+
|
|
7
13
|
## Formato messaggio in output
|
|
8
14
|
`msg.payload` contiene:
|
|
9
15
|
- `knx.event`: `GroupValue_Write` / `GroupValue_Response` / `GroupValue_Read`
|
|
@@ -15,6 +21,16 @@ In input può ricevere gli stessi oggetti RAW e inoltrarli sul BUS KNX del gatew
|
|
|
15
21
|
- `knx.echoed`: `true` se telegramma echoed dal gateway
|
|
16
22
|
- `knxMultiRouting.gateway`: info gateway (`id`, `name`, `physAddr`)
|
|
17
23
|
|
|
24
|
+
## Routing counter (hop count)
|
|
25
|
+
MultiRouting può usare il routing counter (hop count) presente in `knx.cemi.hex` per prevenire loop di telegrammi.
|
|
26
|
+
- **Rispetta routing counter (scarta se 0)**: i telegrammi con routing counter `0` non vengono inoltrati.
|
|
27
|
+
- **Decrementa routing counter durante l'inoltro**: il nodo decrementa il routing counter durante l'inoltro. Quando arriva a `0`, il telegramma viene scartato.
|
|
28
|
+
|
|
29
|
+
Il valore corrente è disponibile come `knx.routingCounter` (e come `knx.cemi.hopCount` quando `knx.cemi` è un oggetto).
|
|
30
|
+
|
|
31
|
+
## Riscrittura telegrammi
|
|
32
|
+
Se nel flow riscrivi `knx.source` / `knx.destination`, devi mantenere coerente anche `knx.cemi.hex`. Consigliato: inserisci **KNX Router Filter** tra i nodi MultiRouting: manterrà automaticamente coerente `knx.cemi.hex` durante il rewrite.
|
|
33
|
+
|
|
18
34
|
## Nota
|
|
19
35
|
Quando inoltri su un altro gateway, l’**indirizzo fisico sorgente cambia** (diventa l’indirizzo fisico del gateway che invia). Usa `knx.source` e/o `knxMultiRouting.gateway` per filtrare i loop.
|
|
20
36
|
L’opzione **Scarta messaggi già marcati per questo gateway** aiuta a prevenire loop semplici quando colleghi più router tra loro.
|
|
@@ -2,10 +2,24 @@
|
|
|
2
2
|
"knxUltimateMultiRouting": {
|
|
3
3
|
"title": "KNX Multi Routing",
|
|
4
4
|
"properties": {
|
|
5
|
+
"mode": "Modalità",
|
|
6
|
+
"modeGateway": "Gateway / Routing",
|
|
7
|
+
"modeServer": "Server KNX/IP",
|
|
5
8
|
"server": "Gateway",
|
|
6
9
|
"name": "Nome",
|
|
7
10
|
"outputtopic": "Topic output",
|
|
8
|
-
"dropIfSameGateway": "Scarta messaggi già marcati per questo gateway"
|
|
11
|
+
"dropIfSameGateway": "Scarta messaggi già marcati per questo gateway",
|
|
12
|
+
"respectRoutingCounter": "Rispetta routing counter (scarta se 0)",
|
|
13
|
+
"decrementRoutingCounter": "Decrementa routing counter durante l'inoltro",
|
|
14
|
+
"tunnelTitle": "Server KNX/IP",
|
|
15
|
+
"tunnelListenHost": "Host in ascolto",
|
|
16
|
+
"tunnelListenPort": "Porta in ascolto",
|
|
17
|
+
"tunnelAdvertiseHost": "Host annunciato",
|
|
18
|
+
"tunnelAdvertiseHostPlaceholder": "(opzionale) Host/IP da annunciare ai client",
|
|
19
|
+
"tunnelAssignedIndividualAddress": "Indirizzo individuale assegnato",
|
|
20
|
+
"tunnelGatewayId": "Gateway id (tag)",
|
|
21
|
+
"tunnelGatewayIdPlaceholder": "(auto) Usato come knxMultiRouting.gateway.id",
|
|
22
|
+
"tunnelMaxSessions": "Sessioni max"
|
|
9
23
|
},
|
|
10
24
|
"outputs": {
|
|
11
25
|
"raw": "Telegrammi RAW"
|
|
@@ -24,6 +24,8 @@ Puoi (opzionalmente) riscrivere:
|
|
|
24
24
|
- destination Group Address (`knx.destination`)
|
|
25
25
|
- source indirizzo fisico (`knx.source`)
|
|
26
26
|
|
|
27
|
+
Durante il rewrite, il nodo aggiorna anche `knx.cemi.hex` per riflettere i valori riscritti di `knx.source`/`knx.destination` (quando `knx.cemi.hex` è presente).
|
|
28
|
+
|
|
27
29
|
Le regole sono valutate dall’alto verso il basso: la prima che matcha vince.
|
|
28
30
|
|
|
29
31
|
Esempi sintassi:
|
|
@@ -33,5 +35,41 @@ Esempi sintassi:
|
|
|
33
35
|
## Metadati
|
|
34
36
|
Il nodo aggiunge `msg.payload.knxRouterFilter`:
|
|
35
37
|
- messaggi scartati: `{ dropped: true, reason: 'event'|'ga'|'source', ... }`
|
|
36
|
-
- messaggi passati: `{ dropped: false, rewritten: <bool>, rewrite: { ... }, original: { ... } }`
|
|
38
|
+
- messaggi passati: `{ dropped: false, rewritten: <bool>, cemiSynced: <bool>, rewrite: { ... }, original: { ... } }`
|
|
39
|
+
|
|
40
|
+
## msg.setConfig
|
|
41
|
+
Puoi cambiare la configurazione del nodo a runtime inviando un oggetto `msg.setConfig` all’ingresso.
|
|
42
|
+
Chiavi supportate: `allowWrite`, `allowResponse`, `allowRead`, `gaMode`, `gaPatterns`, `srcMode`, `srcPatterns`, `rewriteGA`, `gaRewriteRules`, `rewriteSource`, `srcRewriteRules`.
|
|
43
|
+
La nuova configurazione viene mantenuta fino al prossimo `msg.setConfig` o fino a redeploy/riavvio. I messaggi di configurazione non vengono inoltrati.
|
|
44
|
+
|
|
45
|
+
Significato delle proprietà:
|
|
46
|
+
- `allowWrite`: consente i telegrammi `GroupValue_Write`.
|
|
47
|
+
- `allowResponse`: consente i telegrammi `GroupValue_Response`.
|
|
48
|
+
- `allowRead`: consente i telegrammi `GroupValue_Read`.
|
|
49
|
+
- `gaMode`: modalità filtro per la GA di destinazione (`off` = nessun filtro, `allow` = consenti solo i match, `block` = scarta i match).
|
|
50
|
+
- `gaPatterns`: pattern GA di destinazione usati da `gaMode` (uno per riga, supporta `*` e `re:<regex>`).
|
|
51
|
+
- `srcMode`: modalità filtro per la source (indirizzo fisico) (`off`/`allow`/`block`).
|
|
52
|
+
- `srcPatterns`: pattern source usati da `srcMode` (uno per riga, supporta `*` e `re:<regex>`).
|
|
53
|
+
- `rewriteGA`: abilita la riscrittura di `knx.destination` sui telegrammi passati.
|
|
54
|
+
- `gaRewriteRules`: regole di riscrittura GA (`da => a`, prima regola che matcha vince; supporta `*` e `re:<regex>`).
|
|
55
|
+
- `rewriteSource`: abilita la riscrittura di `knx.source` sui telegrammi passati.
|
|
56
|
+
- `srcRewriteRules`: regole di riscrittura source (`da => a`, prima regola che matcha vince; supporta `*` e `re:<regex>`).
|
|
57
|
+
|
|
58
|
+
Esempio:
|
|
59
|
+
```js
|
|
60
|
+
msg.setConfig = {
|
|
61
|
+
allowWrite: true,
|
|
62
|
+
allowResponse: true,
|
|
63
|
+
allowRead: true,
|
|
64
|
+
gaMode: "allow",
|
|
65
|
+
gaPatterns: "1/1/*\n1/2/3",
|
|
66
|
+
srcMode: "off",
|
|
67
|
+
srcPatterns: "",
|
|
68
|
+
rewriteGA: true,
|
|
69
|
+
gaRewriteRules: "5/5/1 => 1/1/1",
|
|
70
|
+
rewriteSource: true,
|
|
71
|
+
srcRewriteRules: "15.*.* => 1.1.254"
|
|
72
|
+
};
|
|
73
|
+
return msg;
|
|
74
|
+
```
|
|
37
75
|
</script>
|
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
它会为所选网关的 KNX 总线上收到的每个电报输出一条包含**RAW 电报信息**(APDU + cEMI 十六进制 + 地址)的消息。
|
|
5
5
|
同时它也可以在输入端接收相同格式的 RAW 对象,并将其转发到所选网关的 KNX 总线。
|
|
6
6
|
|
|
7
|
+
## KNX/IP 服务器模式
|
|
8
|
+
将 **Mode** 设置为 **Server KNX/IP** 可启动一个内置的 KNXnet/IP tunneling(UDP)服务器。来自 tunneling 客户端的电报会以相同的 RAW 格式输出。
|
|
9
|
+
该节点也会在输入端接收 RAW 对象,并将其注入到已连接的 tunneling 客户端。
|
|
10
|
+
|
|
11
|
+
**重要(Advertise host):** KNXnet/IP 客户端会把数据发送到服务器在 CONNECT_RESPONSE 中通告的 IP。如果客户端显示 *已连接* 但服务器收不到电报,请将 **Advertise host** 设为客户端可达的服务器 LAN IP(尤其是在 Docker/VM 中运行 Node-RED 或主机有多网卡时)。
|
|
12
|
+
|
|
7
13
|
## 输出消息格式
|
|
8
14
|
`msg.payload` 包含:
|
|
9
15
|
- `knx.event`:`GroupValue_Write` / `GroupValue_Response` / `GroupValue_Read`
|
|
@@ -15,6 +21,16 @@
|
|
|
15
21
|
- `knx.echoed`:若被网关回显则为 `true`
|
|
16
22
|
- `knxMultiRouting.gateway`:网关元信息(`id`, `name`, `physAddr`)
|
|
17
23
|
|
|
24
|
+
## Routing counter (hop count)
|
|
25
|
+
MultiRouting 可使用 `knx.cemi.hex` 中的 KNX routing counter(hop count)来避免电报环路。
|
|
26
|
+
- **Respect routing counter (drop if 0)**:routing counter 为 `0` 的电报不会被转发。
|
|
27
|
+
- **Decrement routing counter when routing**:转发时递减 routing counter;若递减后到达 `0`,电报将被丢弃。
|
|
28
|
+
|
|
29
|
+
当前值会暴露为 `knx.routingCounter`(当 `knx.cemi` 为对象时,也会作为 `knx.cemi.hopCount` 提供)。
|
|
30
|
+
|
|
31
|
+
## 重写电报
|
|
32
|
+
如果你在 flow 中重写 `knx.source` / `knx.destination`,也必须保持 `knx.cemi.hex` 的一致性。建议:在 MultiRouting 节点之间放置 **KNX Router Filter**;它会在重写时自动同步 `knx.cemi.hex`。
|
|
33
|
+
|
|
18
34
|
## 注意
|
|
19
35
|
- 转发到其它网关时,**源物理地址会改变**(变为发送网关的物理地址)。可使用 `knx.source` 和/或 `knxMultiRouting.gateway` 来过滤环路。
|
|
20
36
|
- 选项 **“Drop messages already tagged for this gateway”** 可帮助在互联多个路由节点时避免简单环路。
|
|
@@ -2,10 +2,24 @@
|
|
|
2
2
|
"knxUltimateMultiRouting": {
|
|
3
3
|
"title": "KNX Multi Routing",
|
|
4
4
|
"properties": {
|
|
5
|
+
"mode": "Mode",
|
|
6
|
+
"modeGateway": "Gateway / Routing",
|
|
7
|
+
"modeServer": "Server KNX/IP",
|
|
5
8
|
"server": "Gateway",
|
|
6
9
|
"name": "Name",
|
|
7
10
|
"outputtopic": "Output topic",
|
|
8
|
-
"dropIfSameGateway": "Drop messages already tagged for this gateway"
|
|
11
|
+
"dropIfSameGateway": "Drop messages already tagged for this gateway",
|
|
12
|
+
"respectRoutingCounter": "Respect routing counter (drop if 0)",
|
|
13
|
+
"decrementRoutingCounter": "Decrement routing counter when routing",
|
|
14
|
+
"tunnelTitle": "KNX/IP Server",
|
|
15
|
+
"tunnelListenHost": "Listen host",
|
|
16
|
+
"tunnelListenPort": "Listen port",
|
|
17
|
+
"tunnelAdvertiseHost": "Advertise host",
|
|
18
|
+
"tunnelAdvertiseHostPlaceholder": "(optional) Host/IP to advertise to clients",
|
|
19
|
+
"tunnelAssignedIndividualAddress": "Assigned individual address",
|
|
20
|
+
"tunnelGatewayId": "Gateway id (tag)",
|
|
21
|
+
"tunnelGatewayIdPlaceholder": "(auto) Used as knxMultiRouting.gateway.id",
|
|
22
|
+
"tunnelMaxSessions": "Max sessions"
|
|
9
23
|
},
|
|
10
24
|
"outputs": {
|
|
11
25
|
"raw": "RAW telegrams"
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
- 目的组地址 `knx.destination`
|
|
25
25
|
- 源物理地址 `knx.source`
|
|
26
26
|
|
|
27
|
+
在重写时,节点也会更新 `knx.cemi.hex` 以匹配重写后的 `knx.source`/`knx.destination`(当 `knx.cemi.hex` 存在时)。
|
|
28
|
+
|
|
27
29
|
规则自上而下匹配(先匹配先执行)。
|
|
28
30
|
|
|
29
31
|
示例:
|
|
@@ -33,5 +35,41 @@
|
|
|
33
35
|
## 元数据
|
|
34
36
|
节点会在输出中添加 `msg.payload.knxRouterFilter`:
|
|
35
37
|
- 丢弃:`{ dropped: true, reason: 'event'|'ga'|'source', ... }`
|
|
36
|
-
- 通过:`{ dropped: false, rewritten: <bool>, rewrite: { ... }, original: { ... } }`
|
|
38
|
+
- 通过:`{ dropped: false, rewritten: <bool>, cemiSynced: <bool>, rewrite: { ... }, original: { ... } }`
|
|
39
|
+
|
|
40
|
+
## msg.setConfig
|
|
41
|
+
你可以通过向输入端发送 `msg.setConfig` 对象来在运行时修改节点配置。
|
|
42
|
+
支持的键:`allowWrite`, `allowResponse`, `allowRead`, `gaMode`, `gaPatterns`, `srcMode`, `srcPatterns`, `rewriteGA`, `gaRewriteRules`, `rewriteSource`, `srcRewriteRules`。
|
|
43
|
+
新配置会保持到下一次 `msg.setConfig` 或 redeploy/重启。配置消息不会被转发。
|
|
44
|
+
|
|
45
|
+
各属性含义:
|
|
46
|
+
- `allowWrite`:允许 `GroupValue_Write` 电报。
|
|
47
|
+
- `allowResponse`:允许 `GroupValue_Response` 电报。
|
|
48
|
+
- `allowRead`:允许 `GroupValue_Read` 电报。
|
|
49
|
+
- `gaMode`:目的组地址过滤模式(`off`=不启用过滤,`allow`=仅放行匹配项,`block`=丢弃匹配项)。
|
|
50
|
+
- `gaPatterns`:`gaMode` 使用的目的 GA pattern(每行一个,支持 `*` 和 `re:<regex>`)。
|
|
51
|
+
- `srcMode`:源物理地址过滤模式(`off`/`allow`/`block`)。
|
|
52
|
+
- `srcPatterns`:`srcMode` 使用的 source pattern(每行一个,支持 `*` 和 `re:<regex>`)。
|
|
53
|
+
- `rewriteGA`:对通过的电报启用 `knx.destination` 重写。
|
|
54
|
+
- `gaRewriteRules`:目的 GA 重写规则(`from => to`,先匹配先执行;支持 `*` 和 `re:<regex>`)。
|
|
55
|
+
- `rewriteSource`:对通过的电报启用 `knx.source` 重写。
|
|
56
|
+
- `srcRewriteRules`:源 PA 重写规则(`from => to`,先匹配先执行;支持 `*` 和 `re:<regex>`)。
|
|
57
|
+
|
|
58
|
+
示例:
|
|
59
|
+
```js
|
|
60
|
+
msg.setConfig = {
|
|
61
|
+
allowWrite: true,
|
|
62
|
+
allowResponse: true,
|
|
63
|
+
allowRead: true,
|
|
64
|
+
gaMode: "allow",
|
|
65
|
+
gaPatterns: "1/1/*\n1/2/3",
|
|
66
|
+
srcMode: "off",
|
|
67
|
+
srcPatterns: "",
|
|
68
|
+
rewriteGA: true,
|
|
69
|
+
gaRewriteRules: "5/5/1 => 1/1/1",
|
|
70
|
+
rewriteSource: true,
|
|
71
|
+
srcRewriteRules: "15.*.* => 1.1.254"
|
|
72
|
+
};
|
|
73
|
+
return msg;
|
|
74
|
+
```
|
|
37
75
|
</script>
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=20.18.1"
|
|
5
5
|
},
|
|
6
|
-
"version": "4.1.
|
|
6
|
+
"version": "4.1.21",
|
|
7
7
|
"description": "Control your KNX and KNX Secure intallation via Node-Red! A bunch of KNX nodes, with integrated Philips HUE control, ETS group address importer, and KNX routing between interfaces. Easy to use and highly configurable.",
|
|
8
8
|
"files": [
|
|
9
9
|
"nodes/",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"crypto-js": "4.2.0",
|
|
21
21
|
"dns-sync": "0.2.1",
|
|
22
22
|
"js-yaml": "4.1.1",
|
|
23
|
-
"knxultimate": "5.2.
|
|
23
|
+
"knxultimate": "5.2.7",
|
|
24
24
|
"lodash": "4.17.21",
|
|
25
25
|
"mkdirp": "3.0.1",
|
|
26
26
|
"node-color-log": "12.0.1",
|