node-red-contrib-knx-ultimate 6.3.14 → 6.3.16
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 +11 -0
- package/examples/KNX AI - Telegrambot Direct Chat.json +0 -1
- package/nodes/knxUltimateAI.html +100 -7
- package/nodes/knxUltimateAI.js +995 -53
- package/nodes/locales/de/knxUltimateAI.html +11 -6
- package/nodes/locales/de/knxUltimateAI.json +8 -3
- package/nodes/locales/en/knxUltimateAI.html +11 -6
- package/nodes/locales/en/knxUltimateAI.json +8 -3
- package/nodes/locales/es/knxUltimateAI.html +11 -6
- package/nodes/locales/es/knxUltimateAI.json +8 -3
- package/nodes/locales/fr/knxUltimateAI.html +11 -6
- package/nodes/locales/fr/knxUltimateAI.json +8 -3
- package/nodes/locales/it/knxUltimateAI.html +11 -6
- package/nodes/locales/it/knxUltimateAI.json +8 -3
- package/nodes/locales/zh-CN/knxUltimateAI.html +11 -6
- package/nodes/locales/zh-CN/knxUltimateAI.json +8 -3
- package/nodes/utils/knxAiCamera.js +302 -0
- package/nodes/utils/knxAiChatContext.js +357 -0
- package/nodes/utils/knxAiHomeMemory.js +2 -2
- package/package.json +1 -1
- package/resources/KNXAIChatAdapterMappings.js +152 -0
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
# CHANGELOG
|
|
8
8
|
|
|
9
|
+
**Version 6.3.16** - August 2026<br/>
|
|
10
|
+
|
|
11
|
+
- **KNX AI — automatically detected camera adapters**: installed camera suites can now register vendor-neutral camera catalogs, connectivity state, snapshots and smart events directly in the KNX AI chat runtime, without selectors or camera-node wiring. The “Conversations & home” editor section shows every detected adapter together with its registered controllers and cameras. `node-red-contrib-unifi-ultimate` is the first provider: users can request or visually analyze a current Protect snapshot and create persistent Telegram/RedBot notifications for motion, smart line crossings and intrusion/loiter zones. Generic smart-detection rules now correctly distinguish classified people, animals, vehicles, faces, license plates and packages from unclassified motion, and match classifications across Protect smart zones, lines and loiter zones. Chat snapshots no longer force full-HD; the provider chooses a supported quality and retries only transient failures at standard quality. An offline camera is identified explicitly before Chat AI proposes an unavailable snapshot. Camera rules share `knxai-chat-context.md` and survive Node-RED restarts; Telegram adapters emit snapshots as native photos. Existing `node-red-contrib-telegrambot` presets saved before image support are upgraded at runtime for snapshot replies, including explicit JPEG filename and MIME metadata. The same registry contract is ready for packages such as `hikvision-ultimate`.<br/>
|
|
12
|
+
|
|
13
|
+
**Version 6.3.15** - August 2026<br/>
|
|
14
|
+
|
|
15
|
+
- **KNX AI — persistent shared CHAT context**: every Ask/chat session now reloads its bounded recent conversation and explicit long-term user instructions after Node-RED restarts. Requests such as “remember not to use the term unknown” are retained per session in the atomically written shared file `knxultimatestorage/knxai/memory/knxai-chat-context.md`, independently from home intelligence memory and even when KNX actuator control is disabled. All KNX AI nodes using the same storage share one live context; the file keeps up to 8 recent turns and 20 durable instructions per session, 50 sessions total, and a 512 KB hard limit. `clear_chat` removes only the selected shared session and `reset` clears the shared context.<br/>
|
|
16
|
+
- **KNX AI — unified memory files**: all KNX AI instances using the same storage now share `knxai-home-memory.md` and `knxai-chat-context.md`, without `node.id` in either filename. Per-node memory files from earlier builds are deliberately not migrated or read.<br/>
|
|
17
|
+
- **KNX AI — fixed 5 MB home memory**: the shared home-memory file now has a fixed 5 MB limit. The `homeMemoryMaxKb` editor option has been removed to simplify the UI, and saved values no longer affect runtime behavior.<br/>
|
|
18
|
+
- **KNX AI — RedBot Telegram chat adapter**: added a selectable `RedBot / node-red-contrib-chatbot (Telegram)` preset for direct `chatbot-telegram-receive → KNX AI → chatbot-telegram-send` wiring. It preserves RedBot conversation tracking, maps normalized inbound text and postbacks, and emits native `inline-buttons` confirmation actions.<br/>
|
|
19
|
+
|
|
9
20
|
**Version 6.3.14** - August 2026<br/>
|
|
10
21
|
|
|
11
22
|
- **Expose KNX to Matter — Room Air Conditioner and Door Lock**: added native Matter **Room Air Conditioner** (`0x0072`) and **Door Lock** (`0x000A`) profiles. A room AC combines On/Off, current temperature, heating/cooling setpoints and fan speed in one endpoint; a door lock maps separate Lock/Unlock command and Locked/Unlocked status GAs. Both profiles support KNX or flow-backed state updates without feedback loops, with editor help and documentation in EN/IT/DE/FR/ES/zh-CN.<br/>
|
|
@@ -114,7 +114,6 @@
|
|
|
114
114
|
"proactiveCooldownMinutes": "360",
|
|
115
115
|
"proactiveQuietStart": "23:00",
|
|
116
116
|
"proactiveQuietEnd": "07:00",
|
|
117
|
-
"homeMemoryMaxKb": "256",
|
|
118
117
|
"aiEducation": "Avvisami se una persiana, una finestra o una porta rimane aperta insolitamente a lungo. Non inviare notifiche durante le ore silenziose configurate.",
|
|
119
118
|
"x": 500,
|
|
120
119
|
"y": 210,
|
package/nodes/knxUltimateAI.html
CHANGED
|
@@ -99,6 +99,53 @@
|
|
|
99
99
|
display: block;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
+
#knx-ai-detected-adapters-panel {
|
|
103
|
+
margin: 0 0 18px;
|
|
104
|
+
padding: 12px 14px;
|
|
105
|
+
border: 1px solid var(--red-ui-form-input-border-color, #ccc);
|
|
106
|
+
border-radius: 4px;
|
|
107
|
+
background: var(--red-ui-secondary-background, #f7f7f7);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
#knx-ai-detected-adapters-panel>h4 {
|
|
111
|
+
margin: 0 0 9px;
|
|
112
|
+
font-size: 14px;
|
|
113
|
+
font-weight: 600;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.knx-ai-detected-adapter {
|
|
117
|
+
display: flex;
|
|
118
|
+
align-items: center;
|
|
119
|
+
gap: 8px;
|
|
120
|
+
padding: 7px 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.knx-ai-detected-adapter+.knx-ai-detected-adapter {
|
|
124
|
+
border-top: 1px solid var(--red-ui-form-input-border-color, #ddd);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.knx-ai-detected-adapter-main {
|
|
128
|
+
flex: 1 1 auto;
|
|
129
|
+
min-width: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.knx-ai-detected-adapter-package,
|
|
133
|
+
.knx-ai-detected-adapter-counts,
|
|
134
|
+
#knx-ai-detected-adapters-status {
|
|
135
|
+
color: var(--red-ui-secondary-text-color, #777);
|
|
136
|
+
font-size: 12px;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.knx-ai-detected-adapter-badge {
|
|
140
|
+
flex: 0 0 auto;
|
|
141
|
+
padding: 2px 7px;
|
|
142
|
+
border-radius: 10px;
|
|
143
|
+
color: #256029;
|
|
144
|
+
background: #dff0d8;
|
|
145
|
+
font-size: 11px;
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
}
|
|
148
|
+
|
|
102
149
|
@media (max-width: 900px) {
|
|
103
150
|
#knx-ai-ollama-install-row>label {
|
|
104
151
|
width: 100% !important;
|
|
@@ -147,7 +194,6 @@
|
|
|
147
194
|
proactiveCooldownMinutes: { value: 360 },
|
|
148
195
|
proactiveQuietStart: { value: "23:00" },
|
|
149
196
|
proactiveQuietEnd: { value: "07:00" },
|
|
150
|
-
homeMemoryMaxKb: { value: 256 },
|
|
151
197
|
aiEducation: { value: "" }
|
|
152
198
|
},
|
|
153
199
|
credentials: {
|
|
@@ -237,7 +283,6 @@
|
|
|
237
283
|
applyNumericFallback("#node-input-maxEvents", 50000);
|
|
238
284
|
applyNumericFallback("#node-input-proactiveOpenMinutes", 120);
|
|
239
285
|
applyNumericFallback("#node-input-proactiveCooldownMinutes", 360);
|
|
240
|
-
applyNumericFallback("#node-input-homeMemoryMaxKb", 256);
|
|
241
286
|
|
|
242
287
|
const nodeId = node.id;
|
|
243
288
|
const resolveAdminRoot = () => {
|
|
@@ -409,6 +454,53 @@
|
|
|
409
454
|
};
|
|
410
455
|
configureChatAdapterPicker.call(node);
|
|
411
456
|
|
|
457
|
+
const renderDetectedAdapters = (adapters) => {
|
|
458
|
+
const $list = $("#knx-ai-detected-adapters-list");
|
|
459
|
+
const $status = $("#knx-ai-detected-adapters-status");
|
|
460
|
+
if (!$list.length) return;
|
|
461
|
+
$list.empty();
|
|
462
|
+
const entries = Array.isArray(adapters) ? adapters : [];
|
|
463
|
+
if (!entries.length) {
|
|
464
|
+
$status.text(t("knxUltimateAI.messages.detectedAdaptersNone", "No automatic adapter detected.")).show();
|
|
465
|
+
return;
|
|
466
|
+
}
|
|
467
|
+
$status.hide();
|
|
468
|
+
entries.forEach(function (adapter) {
|
|
469
|
+
if (!adapter || !adapter.id) return;
|
|
470
|
+
const providerCount = Number(adapter.providerCount) || 0;
|
|
471
|
+
const cameraCount = Number(adapter.cameraCount) || 0;
|
|
472
|
+
const $row = $("<div></div>").addClass("knx-ai-detected-adapter");
|
|
473
|
+
const $main = $("<div></div>").addClass("knx-ai-detected-adapter-main");
|
|
474
|
+
$("<div></div>").text(adapter.title || adapter.id).appendTo($main);
|
|
475
|
+
if (adapter.packageName) {
|
|
476
|
+
$("<div></div>").addClass("knx-ai-detected-adapter-package").text(adapter.packageName).appendTo($main);
|
|
477
|
+
}
|
|
478
|
+
$("<div></div>")
|
|
479
|
+
.addClass("knx-ai-detected-adapter-counts")
|
|
480
|
+
.text(t("knxUltimateAI.messages.detectedAdapterControllers", "Controllers") + ": " + providerCount + " · " + t("knxUltimateAI.messages.detectedAdapterCameras", "Cameras") + ": " + cameraCount)
|
|
481
|
+
.appendTo($main);
|
|
482
|
+
$main.appendTo($row);
|
|
483
|
+
$("<span></span>")
|
|
484
|
+
.addClass("knx-ai-detected-adapter-badge")
|
|
485
|
+
.text(t("knxUltimateAI.messages.detectedAdapterDetected", "Detected"))
|
|
486
|
+
.appendTo($row);
|
|
487
|
+
$row.appendTo($list);
|
|
488
|
+
});
|
|
489
|
+
};
|
|
490
|
+
$.ajax({
|
|
491
|
+
url: "knxUltimateAI/adapters",
|
|
492
|
+
type: "GET",
|
|
493
|
+
data: nodeId ? { nodeId: nodeId } : {}
|
|
494
|
+
})
|
|
495
|
+
.done(function (data) {
|
|
496
|
+
renderDetectedAdapters(data && data.adapters);
|
|
497
|
+
})
|
|
498
|
+
.fail(function () {
|
|
499
|
+
$("#knx-ai-detected-adapters-status")
|
|
500
|
+
.text(t("knxUltimateAI.messages.detectedAdaptersUnavailable", "Automatic adapter detection is temporarily unavailable."))
|
|
501
|
+
.show();
|
|
502
|
+
});
|
|
503
|
+
|
|
412
504
|
const updateProactiveVisibility = () => {
|
|
413
505
|
const enabled = $("#node-input-proactiveEnabled").is(":checked");
|
|
414
506
|
$("#knx-ai-proactive-settings").toggle(enabled);
|
|
@@ -680,6 +772,11 @@
|
|
|
680
772
|
|
|
681
773
|
<h3><i class="fa fa-comments"></i> <span data-i18n="knxUltimateAI.sections.groupChatHome"></span></h3>
|
|
682
774
|
<div>
|
|
775
|
+
<div id="knx-ai-detected-adapters-panel">
|
|
776
|
+
<h4><i class="fa fa-puzzle-piece"></i> <span data-i18n="knxUltimateAI.sections.detectedAdapters"></span></h4>
|
|
777
|
+
<div id="knx-ai-detected-adapters-status" data-i18n="knxUltimateAI.messages.detectedAdaptersLoading"></div>
|
|
778
|
+
<div id="knx-ai-detected-adapters-list"></div>
|
|
779
|
+
</div>
|
|
683
780
|
<div class="knx-ai-accordion-subsection">
|
|
684
781
|
<h4><i class="fa fa-plug"></i> <span data-i18n="knxUltimateAI.sections.chatAdapter"></span></h4>
|
|
685
782
|
<div class="knx-ai-accordion-mount" id="knx-ai-mount-chat-adapter"></div>
|
|
@@ -826,10 +923,6 @@
|
|
|
826
923
|
<label style="width:290px" for="node-input-proactiveCooldownMinutes"><i class="fa fa-bell-slash-o"></i> <span data-i18n="knxUltimateAI.properties.proactiveCooldownMinutes"></span></label>
|
|
827
924
|
<input style="width:100px" type="number" min="5" max="10080" id="node-input-proactiveCooldownMinutes">
|
|
828
925
|
</div>
|
|
829
|
-
<div class="form-row">
|
|
830
|
-
<label style="width:290px" for="node-input-homeMemoryMaxKb"><i class="fa fa-hdd-o"></i> <span data-i18n="knxUltimateAI.properties.homeMemoryMaxKb"></span></label>
|
|
831
|
-
<input style="width:100px" type="number" min="64" max="1024" id="node-input-homeMemoryMaxKb">
|
|
832
|
-
</div>
|
|
833
926
|
</div>
|
|
834
927
|
</div>
|
|
835
928
|
</div>
|
|
@@ -875,4 +968,4 @@
|
|
|
875
968
|
</div>
|
|
876
969
|
</div>
|
|
877
970
|
</div>
|
|
878
|
-
</script>
|
|
971
|
+
</script>
|