node-red-contrib-knx-ultimate 6.4.1 → 7.0.0

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +124 -121
  2. package/README.md +4 -0
  3. package/nodes/knxUltimateAI.html +9 -5
  4. package/nodes/knxUltimateAI.js +143 -143
  5. package/nodes/knxUltimateAIHomeAssistant.html +7 -5
  6. package/nodes/knxUltimateAIHomeAssistant.js +1 -1
  7. package/nodes/knxUltimateHueController.html +1 -1
  8. package/nodes/knxUltimateMatterBridge.html +2 -2
  9. package/nodes/knxUltimateMatterControllerDevice.html +12 -12
  10. package/nodes/locales/de/knxUltimateAI.html +4 -199
  11. package/nodes/locales/de/knxUltimateAI.json +6 -6
  12. package/nodes/locales/de/knxUltimateViewer.html +1 -1
  13. package/nodes/locales/en/knxUltimateAI.html +4 -211
  14. package/nodes/locales/en/knxUltimateAI.json +6 -6
  15. package/nodes/locales/en/knxUltimateViewer.html +1 -1
  16. package/nodes/locales/es/knxUltimateAI.html +4 -199
  17. package/nodes/locales/es/knxUltimateAI.json +6 -6
  18. package/nodes/locales/es/knxUltimateViewer.html +1 -1
  19. package/nodes/locales/fr/knxUltimateAI.html +4 -199
  20. package/nodes/locales/fr/knxUltimateAI.json +6 -6
  21. package/nodes/locales/fr/knxUltimateViewer.html +1 -1
  22. package/nodes/locales/it/knxUltimateAI.html +4 -211
  23. package/nodes/locales/it/knxUltimateAI.json +6 -6
  24. package/nodes/locales/it/knxUltimateViewer.html +1 -1
  25. package/nodes/locales/zh-CN/knxUltimateAI.html +4 -199
  26. package/nodes/locales/zh-CN/knxUltimateAI.json +6 -6
  27. package/nodes/locales/zh-CN/knxUltimateViewer.html +1 -1
  28. package/nodes/plugins/knxUltimateAI-vue/assets/app.css +1 -1
  29. package/nodes/plugins/knxUltimateAI-vue/assets/app.js +10 -10
  30. package/nodes/plugins/knxUltimateAI-vue/index.html +1 -1
  31. package/nodes/plugins/knxUltimateViewer-vue/assets/app.js +2 -2
  32. package/nodes/utils/knxAiChatContext.js +4 -4
  33. package/nodes/utils/knxAiHomeMemory.js +2 -2
  34. package/nodes/utils/knxAiScheduler.js +2 -2
  35. package/package.json +2 -2
  36. package/resources/KNXAIChatAdapterMappings.js +4 -4
  37. package/examples/KNX AI - Conversational Control with Confirmation.json +0 -395
  38. package/examples/KNX AI - Summary Anomalies and Ask.json +0 -226
  39. package/examples/KNX AI - Telegrambot Direct Chat.json +0 -198
@@ -1,395 +0,0 @@
1
- [
2
- {
3
- "id": "tab_knx_ai_control",
4
- "type": "tab",
5
- "label": "KNX AI - Conversational control",
6
- "disabled": false,
7
- "info": "Example of fresh KNX state reads, conversational multi-step routines and actuator control with a mandatory confirmation step for writes."
8
- },
9
- {
10
- "id": "cmt_knx_ai_control_setup",
11
- "type": "comment",
12
- "z": "tab_knx_ai_control",
13
- "name": "1. Configure the KNX gateway, import the ETS CSV and configure the LLM/API key in KNX AI",
14
- "info": "The AI only uses exact group addresses and DPTs found in the ETS catalog imported by the KNX gateway configuration node. Any exact object may be read; only command objects may be written.",
15
- "x": 490,
16
- "y": 40,
17
- "wires": []
18
- },
19
- {
20
- "id": "cmt_knx_ai_control_warning",
21
- "type": "comment",
22
- "z": "tab_knx_ai_control",
23
- "name": "WARNING: reads are immediate; after CONFERMA output 4 writes validated commands to the real KNX bus",
24
- "info": "Test with safe group addresses. Fresh reads need no confirmation. A pending write plan expires after five minutes and belongs only to the same chatId.",
25
- "x": 470,
26
- "y": 80,
27
- "wires": []
28
- },
29
- {
30
- "id": "cmt_knx_ai_control_input",
31
- "type": "comment",
32
- "z": "tab_knx_ai_control",
33
- "name": "Telegram receiver or the demo buttons",
34
- "info": "A Telegram receiver can be connected directly when its message contains the text and chat identifier. The demo inject nodes use chatId=demo-chat-1.",
35
- "x": 190,
36
- "y": 140,
37
- "wires": []
38
- },
39
- {
40
- "id": "inj_knx_ai_control_ask",
41
- "type": "inject",
42
- "z": "tab_knx_ai_control",
43
- "name": "1. Richiesta: accendi la luce",
44
- "props": [
45
- {
46
- "p": "payload",
47
- "v": "Accendi la luce del soggiorno",
48
- "vt": "str"
49
- },
50
- {
51
- "p": "topic",
52
- "v": "ask",
53
- "vt": "str"
54
- },
55
- {
56
- "p": "chatId",
57
- "v": "demo-chat-1",
58
- "vt": "str"
59
- },
60
- {
61
- "p": "language",
62
- "v": "it",
63
- "vt": "str"
64
- }
65
- ],
66
- "repeat": "",
67
- "crontab": "",
68
- "once": false,
69
- "onceDelay": 0.1,
70
- "x": 190,
71
- "y": 180,
72
- "wires": [
73
- [
74
- "node_knx_ai_control"
75
- ]
76
- ]
77
- },
78
- {
79
- "id": "inj_knx_ai_control_confirm",
80
- "type": "inject",
81
- "z": "tab_knx_ai_control",
82
- "name": "2. CONFERMA (stessa chat)",
83
- "props": [
84
- {
85
- "p": "payload",
86
- "v": "CONFERMA",
87
- "vt": "str"
88
- },
89
- {
90
- "p": "topic",
91
- "v": "ask",
92
- "vt": "str"
93
- },
94
- {
95
- "p": "chatId",
96
- "v": "demo-chat-1",
97
- "vt": "str"
98
- },
99
- {
100
- "p": "language",
101
- "v": "it",
102
- "vt": "str"
103
- }
104
- ],
105
- "repeat": "",
106
- "crontab": "",
107
- "once": false,
108
- "onceDelay": 0.1,
109
- "x": 180,
110
- "y": 220,
111
- "wires": [
112
- [
113
- "node_knx_ai_control"
114
- ]
115
- ]
116
- },
117
- {
118
- "id": "inj_knx_ai_control_read",
119
- "type": "inject",
120
- "z": "tab_knx_ai_control",
121
- "name": "Lettura: temperatura attuale dal bus",
122
- "props": [
123
- {
124
- "p": "payload",
125
- "v": "Richiedi al bus KNX la temperatura attuale del soggiorno e dimmi il valore",
126
- "vt": "str"
127
- },
128
- {
129
- "p": "topic",
130
- "v": "ask",
131
- "vt": "str"
132
- },
133
- {
134
- "p": "chatId",
135
- "v": "demo-chat-1",
136
- "vt": "str"
137
- },
138
- {
139
- "p": "language",
140
- "v": "it",
141
- "vt": "str"
142
- }
143
- ],
144
- "repeat": "",
145
- "crontab": "",
146
- "once": false,
147
- "onceDelay": 0.1,
148
- "x": 200,
149
- "y": 300,
150
- "wires": [
151
- [
152
- "node_knx_ai_control"
153
- ]
154
- ]
155
- },
156
- {
157
- "id": "inj_knx_ai_control_cancel",
158
- "type": "inject",
159
- "z": "tab_knx_ai_control",
160
- "name": "Oppure ANNULLA (stessa chat)",
161
- "props": [
162
- {
163
- "p": "payload",
164
- "v": "ANNULLA",
165
- "vt": "str"
166
- },
167
- {
168
- "p": "topic",
169
- "v": "ask",
170
- "vt": "str"
171
- },
172
- {
173
- "p": "chatId",
174
- "v": "demo-chat-1",
175
- "vt": "str"
176
- },
177
- {
178
- "p": "language",
179
- "v": "it",
180
- "vt": "str"
181
- }
182
- ],
183
- "repeat": "",
184
- "crontab": "",
185
- "once": false,
186
- "onceDelay": 0.1,
187
- "x": 190,
188
- "y": 260,
189
- "wires": [
190
- [
191
- "node_knx_ai_control"
192
- ]
193
- ]
194
- },
195
- {
196
- "id": "inj_knx_ai_control_routine",
197
- "type": "inject",
198
- "z": "tab_knx_ai_control",
199
- "name": "Routine: sto uscendo",
200
- "props": [
201
- {
202
- "p": "payload",
203
- "v": "Sto uscendo: controlla gli stati aggiornati della casa e prepara una routine sicura per spegnere le luci, abbassare le tapparelle e ridurre il clima. Segnalami porte o finestre aperte.",
204
- "vt": "str"
205
- },
206
- {
207
- "p": "topic",
208
- "v": "ask",
209
- "vt": "str"
210
- },
211
- {
212
- "p": "chatId",
213
- "v": "demo-chat-1",
214
- "vt": "str"
215
- },
216
- {
217
- "p": "language",
218
- "v": "it",
219
- "vt": "str"
220
- }
221
- ],
222
- "repeat": "",
223
- "crontab": "",
224
- "once": false,
225
- "onceDelay": 0.1,
226
- "x": 170,
227
- "y": 340,
228
- "wires": [
229
- [
230
- "node_knx_ai_control"
231
- ]
232
- ]
233
- },
234
- {
235
- "id": "node_knx_ai_control",
236
- "type": "knxUltimateAI",
237
- "z": "tab_knx_ai_control",
238
- "server": "cfg_knx_ai_control",
239
- "name": "KNX AI with confirmation",
240
- "topic": "knx-ai",
241
- "llmEnabled": true,
242
- "llmProvider": "openai_compat",
243
- "llmBaseUrl": "https://api.openai.com/v1/chat/completions",
244
- "llmModel": "gpt-5.4",
245
- "llmSystemPrompt": "Sei un assistente per un impianto KNX. Rispondi in italiano e proponi solo comandi necessari e coerenti con la richiesta.",
246
- "llmIncludeRaw": false,
247
- "llmIncludeDocsSnippets": true,
248
- "llmAllowKnxCommands": true,
249
- "llmRequireCommandConfirmation": true,
250
- "x": 520,
251
- "y": 220,
252
- "wires": [
253
- [
254
- "dbg_knx_ai_control_summary"
255
- ],
256
- [
257
- "dbg_knx_ai_control_anomalies"
258
- ],
259
- [
260
- "dbg_knx_ai_control_reply"
261
- ],
262
- [
263
- "dbg_knx_ai_control_command",
264
- "node_knx_ai_control_universal"
265
- ],
266
- [
267
- ]
268
- ]
269
- },
270
- {
271
- "id": "dbg_knx_ai_control_summary",
272
- "type": "debug",
273
- "z": "tab_knx_ai_control",
274
- "name": "1 - Summary",
275
- "active": false,
276
- "tosidebar": true,
277
- "console": false,
278
- "tostatus": false,
279
- "complete": "payload",
280
- "targetType": "msg",
281
- "x": 760,
282
- "y": 140,
283
- "wires": []
284
- },
285
- {
286
- "id": "dbg_knx_ai_control_anomalies",
287
- "type": "debug",
288
- "z": "tab_knx_ai_control",
289
- "name": "2 - Anomalies",
290
- "active": false,
291
- "tosidebar": true,
292
- "console": false,
293
- "tostatus": false,
294
- "complete": "payload",
295
- "targetType": "msg",
296
- "x": 770,
297
- "y": 180,
298
- "wires": []
299
- },
300
- {
301
- "id": "dbg_knx_ai_control_reply",
302
- "type": "debug",
303
- "z": "tab_knx_ai_control",
304
- "name": "3 - Risposta/anteprima per Telegram",
305
- "active": true,
306
- "tosidebar": true,
307
- "console": false,
308
- "tostatus": true,
309
- "complete": "true",
310
- "targetType": "full",
311
- "x": 840,
312
- "y": 220,
313
- "wires": []
314
- },
315
- {
316
- "id": "dbg_knx_ai_control_command",
317
- "type": "debug",
318
- "z": "tab_knx_ai_control",
319
- "name": "4 - Operazione KNX (lettura/scrittura)",
320
- "active": true,
321
- "tosidebar": true,
322
- "console": false,
323
- "tostatus": true,
324
- "complete": "true",
325
- "targetType": "full",
326
- "x": 820,
327
- "y": 260,
328
- "wires": []
329
- },
330
- {
331
- "id": "node_knx_ai_control_universal",
332
- "type": "knxUltimate",
333
- "z": "tab_knx_ai_control",
334
- "server": "cfg_knx_ai_control",
335
- "topic": "0/0/0",
336
- "dpt": "1.001",
337
- "initialread": false,
338
- "notifyreadrequest": false,
339
- "notifyresponse": true,
340
- "notifywrite": true,
341
- "notifyreadrequestalsorespondtobus": false,
342
- "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "",
343
- "listenallga": true,
344
- "setTopicType": "listenAllGA",
345
- "name": "KNX Ultimate - Universal Mode",
346
- "outputtype": "write",
347
- "outputRBE": false,
348
- "inputRBE": false,
349
- "x": 820,
350
- "y": 340,
351
- "wires": [
352
- [
353
- "dbg_knx_ai_control_bus"
354
- ]
355
- ]
356
- },
357
- {
358
- "id": "dbg_knx_ai_control_bus",
359
- "type": "debug",
360
- "z": "tab_knx_ai_control",
361
- "name": "Telegrammi KNX ricevuti",
362
- "active": true,
363
- "tosidebar": true,
364
- "console": false,
365
- "tostatus": false,
366
- "complete": "true",
367
- "targetType": "full",
368
- "x": 1070,
369
- "y": 340,
370
- "wires": []
371
- },
372
- {
373
- "id": "cmt_knx_ai_control_output",
374
- "type": "comment",
375
- "z": "tab_knx_ai_control",
376
- "name": "Replace Debug 3 with Telegram; optionally wire output 5 to TTS Ultimate",
377
- "info": "The third output carries the text in msg.payload. Fresh reads are returned after KNX feedback and detailed in msg.knxAi.readResults. When a write confirmation is pending, msg.knxAi.confirmationRequest contains localized button labels, callbackData values and ready-to-send confirm/cancel messages. Every message on outputs 3 and 4 also preserves the triggering input in msg.inputMessage. Output 5 is deliberately unwired in this example: connect it to one or more ttsultimate nodes (or use Link Out/Link In across tabs) to receive model-selected announcements with msg.topic=knx_ai_announcement.",
378
- "x": 850,
379
- "y": 100,
380
- "wires": []
381
- },
382
- {
383
- "id": "cfg_knx_ai_control",
384
- "type": "knxUltimate-config",
385
- "z": "",
386
- "host": "224.0.23.12",
387
- "port": "3671",
388
- "physAddr": "15.15.202",
389
- "suppressACKRequest": false,
390
- "csv": "",
391
- "KNXEthInterface": "Auto",
392
- "KNXEthInterfaceManuallyInput": "",
393
- "autoReconnect": "yes"
394
- }
395
- ]
@@ -1,226 +0,0 @@
1
- [
2
- {
3
- "id": "tab_knx_ai_sample",
4
- "type": "tab",
5
- "label": "KNX AI sample",
6
- "disabled": false,
7
- "info": ""
8
- },
9
- {
10
- "id": "cmt_knx_ai_1",
11
- "type": "comment",
12
- "z": "tab_knx_ai_sample",
13
- "name": "Edit the KNX gateway config node at the bottom of this flow.",
14
- "info": "",
15
- "x": 330,
16
- "y": 40,
17
- "wires": []
18
- },
19
- {
20
- "id": "inj_knx_ai_summary",
21
- "type": "inject",
22
- "z": "tab_knx_ai_sample",
23
- "name": "Summary now",
24
- "props": [
25
- {
26
- "p": "topic",
27
- "vt": "str"
28
- }
29
- ],
30
- "topic": "summary",
31
- "once": false,
32
- "onceDelay": 0.1,
33
- "x": 140,
34
- "y": 140,
35
- "wires": [
36
- [
37
- "node_knx_ai"
38
- ]
39
- ]
40
- },
41
- {
42
- "id": "inj_knx_ai_summary_auto",
43
- "type": "inject",
44
- "z": "tab_knx_ai_sample",
45
- "name": "Summary every 60s",
46
- "props": [
47
- {
48
- "p": "topic",
49
- "vt": "str"
50
- }
51
- ],
52
- "topic": "summary",
53
- "repeat": "60",
54
- "crontab": "",
55
- "once": false,
56
- "onceDelay": 0.1,
57
- "x": 150,
58
- "y": 180,
59
- "wires": [
60
- [
61
- "node_knx_ai"
62
- ]
63
- ]
64
- },
65
- {
66
- "id": "inj_knx_ai_reset",
67
- "type": "inject",
68
- "z": "tab_knx_ai_sample",
69
- "name": "Reset history",
70
- "props": [
71
- {
72
- "p": "topic",
73
- "vt": "str"
74
- }
75
- ],
76
- "topic": "reset",
77
- "once": false,
78
- "onceDelay": 0.1,
79
- "x": 140,
80
- "y": 220,
81
- "wires": [
82
- [
83
- "node_knx_ai"
84
- ]
85
- ]
86
- },
87
- {
88
- "id": "inj_knx_ai_ask",
89
- "type": "inject",
90
- "z": "tab_knx_ai_sample",
91
- "name": "Ask (payload=question)",
92
- "props": [
93
- {
94
- "p": "payload",
95
- "vt": "str"
96
- },
97
- {
98
- "p": "topic",
99
- "vt": "str"
100
- }
101
- ],
102
- "topic": "ask",
103
- "payload": "Quali sono i GA più attivi? Ci sono anomalie evidenti?",
104
- "payloadType": "str",
105
- "once": false,
106
- "onceDelay": 0.1,
107
- "x": 170,
108
- "y": 260,
109
- "wires": [
110
- [
111
- "fn_knx_ai_prompt"
112
- ]
113
- ]
114
- },
115
- {
116
- "id": "fn_knx_ai_prompt",
117
- "type": "function",
118
- "z": "tab_knx_ai_sample",
119
- "name": "Set msg.prompt",
120
- "func": "msg.prompt = (typeof msg.payload === 'string') ? msg.payload : JSON.stringify(msg.payload);\nreturn msg;",
121
- "outputs": 1,
122
- "noerr": 0,
123
- "initialize": "",
124
- "finalize": "",
125
- "x": 360,
126
- "y": 260,
127
- "wires": [
128
- [
129
- "node_knx_ai"
130
- ]
131
- ]
132
- },
133
- {
134
- "id": "node_knx_ai",
135
- "type": "knxUltimateAI",
136
- "z": "tab_knx_ai_sample",
137
- "server": "cfg_knx_ai_1",
138
- "name": "KNX AI",
139
- "topic": "knx-ai",
140
- "llmEnabled": false,
141
- "llmProvider": "openai_compat",
142
- "llmBaseUrl": "https://api.openai.com/v1/chat/completions",
143
- "llmModel": "gpt-4o-mini",
144
- "llmSystemPrompt": "You are a KNX building automation assistant. Analyze KNX bus traffic and provide actionable insights.",
145
- "llmTemperature": "0.2",
146
- "llmMaxTokens": "600",
147
- "llmTimeoutMs": "1800000",
148
- "llmMaxEventsInPrompt": "600",
149
- "llmIncludeRaw": false,
150
- "x": 560,
151
- "y": 200,
152
- "wires": [
153
- [
154
- "dbg_knx_ai_summary"
155
- ],
156
- [
157
- "dbg_knx_ai_anom"
158
- ],
159
- [
160
- "dbg_knx_ai_answer"
161
- ],
162
- [
163
- ],
164
- [
165
- ]
166
- ]
167
- },
168
- {
169
- "id": "dbg_knx_ai_summary",
170
- "type": "debug",
171
- "z": "tab_knx_ai_sample",
172
- "name": "Summary/Stats",
173
- "active": true,
174
- "tosidebar": true,
175
- "console": false,
176
- "tostatus": false,
177
- "complete": "payload",
178
- "targetType": "msg",
179
- "x": 760,
180
- "y": 160,
181
- "wires": []
182
- },
183
- {
184
- "id": "dbg_knx_ai_anom",
185
- "type": "debug",
186
- "z": "tab_knx_ai_sample",
187
- "name": "Anomalies",
188
- "active": true,
189
- "tosidebar": true,
190
- "console": false,
191
- "tostatus": false,
192
- "complete": "payload",
193
- "targetType": "msg",
194
- "x": 750,
195
- "y": 200,
196
- "wires": []
197
- },
198
- {
199
- "id": "dbg_knx_ai_answer",
200
- "type": "debug",
201
- "z": "tab_knx_ai_sample",
202
- "name": "AI answer",
203
- "active": true,
204
- "tosidebar": true,
205
- "console": false,
206
- "tostatus": false,
207
- "complete": "payload",
208
- "targetType": "msg",
209
- "x": 750,
210
- "y": 240,
211
- "wires": []
212
- },
213
- {
214
- "id": "cfg_knx_ai_1",
215
- "type": "knxUltimate-config",
216
- "z": "",
217
- "host": "224.0.23.12",
218
- "port": "3671",
219
- "physAddr": "15.15.200",
220
- "suppressACKRequest": false,
221
- "csv": "",
222
- "KNXEthInterface": "Auto",
223
- "KNXEthInterfaceManuallyInput": "",
224
- "autoReconnect": "yes"
225
- }
226
- ]