node-red-contrib-knx-ultimate 6.3.32 → 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.
- package/CHANGELOG.md +128 -116
- package/README.md +4 -0
- package/nodes/knxUltimateAI.html +29 -11
- package/nodes/knxUltimateAI.js +1567 -237
- package/nodes/knxUltimateAIHomeAssistant.html +40 -0
- package/nodes/knxUltimateAIHomeAssistant.js +152 -0
- package/nodes/knxUltimateHueController.html +1 -1
- package/nodes/knxUltimateMatterBridge.html +2 -2
- package/nodes/knxUltimateMatterControllerDevice.html +12 -12
- package/nodes/locales/de/knxUltimateAI.html +4 -199
- package/nodes/locales/de/knxUltimateAI.json +11 -8
- package/nodes/locales/de/knxUltimateViewer.html +1 -1
- package/nodes/locales/en/knxUltimateAI.html +4 -203
- package/nodes/locales/en/knxUltimateAI.json +11 -8
- package/nodes/locales/en/knxUltimateViewer.html +1 -1
- package/nodes/locales/es/knxUltimateAI.html +4 -199
- package/nodes/locales/es/knxUltimateAI.json +11 -8
- package/nodes/locales/es/knxUltimateViewer.html +1 -1
- package/nodes/locales/fr/knxUltimateAI.html +4 -199
- package/nodes/locales/fr/knxUltimateAI.json +11 -8
- package/nodes/locales/fr/knxUltimateViewer.html +1 -1
- package/nodes/locales/it/knxUltimateAI.html +4 -203
- package/nodes/locales/it/knxUltimateAI.json +11 -8
- package/nodes/locales/it/knxUltimateViewer.html +1 -1
- package/nodes/locales/zh-CN/knxUltimateAI.html +4 -199
- package/nodes/locales/zh-CN/knxUltimateAI.json +11 -8
- package/nodes/locales/zh-CN/knxUltimateViewer.html +1 -1
- package/nodes/plugins/knxUltimate-cerebrum-runtime-plugin.js +79 -0
- package/nodes/plugins/knxUltimateAI-vue/assets/app.css +1 -1
- package/nodes/plugins/knxUltimateAI-vue/assets/app.js +13 -4
- package/nodes/plugins/knxUltimateAI-vue/index.html +1 -1
- package/nodes/plugins/knxUltimateViewer-vue/assets/app.js +2 -2
- package/nodes/utils/knxAiCamera.js +4 -4
- package/nodes/utils/knxAiCerebrum.js +406 -0
- package/nodes/utils/knxAiChatContext.js +4 -4
- package/nodes/utils/knxAiHomeMemory.js +543 -9
- package/nodes/utils/knxAiScheduler.js +2 -2
- package/nodes/utils/knxAiSemanticContext.js +5 -5
- package/package.json +4 -2
- package/resources/KNXAIChatAdapterMappings.js +35 -9
- package/resources/hueControllerProfiles.js +7614 -7622
- package/examples/KNX AI - Conversational Control with Confirmation.json +0 -395
- package/examples/KNX AI - Summary Anomalies and Ask.json +0 -226
- package/examples/KNX AI - Telegrambot Direct Chat.json +0 -198
|
@@ -394,9 +394,9 @@ const buildKnxAiSchedulePromptContext = (store, { sessionId, maxChars = 12000, n
|
|
|
394
394
|
const buildKnxAiScheduleMarkdown = (store, { now = Date.now() } = {}) => {
|
|
395
395
|
const target = normalizeKnxAiScheduleStore(store, { now })
|
|
396
396
|
const lines = [
|
|
397
|
-
'#
|
|
397
|
+
'# Cerebrum Ultimate Plans and Reminders',
|
|
398
398
|
'',
|
|
399
|
-
'This file is generated by
|
|
399
|
+
'This file is generated by Cerebrum Ultimate. Manage these tasks in natural-language chat; the JSON file is the authoritative runtime state.',
|
|
400
400
|
'',
|
|
401
401
|
`Updated: ${target.updatedAt}`,
|
|
402
402
|
''
|
|
@@ -574,11 +574,11 @@ const packKnxAiSemanticContext = ({ catalog, byteBudget, detailReferences } = {}
|
|
|
574
574
|
const overflowDeclaration = complete
|
|
575
575
|
? ''
|
|
576
576
|
: pickOverflowDeclaration({
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
577
|
+
byteBudget: Math.max(0, maxBytes - buffer.usedBytes() - 1),
|
|
578
|
+
manifestBytes: packedManifestBytes,
|
|
579
|
+
recordCount: records.length,
|
|
580
|
+
includedCount
|
|
581
|
+
})
|
|
582
582
|
if (overflowDeclaration) buffer.appendAtomic(overflowDeclaration)
|
|
583
583
|
return {
|
|
584
584
|
lines: buffer.lines,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"engines": {
|
|
4
4
|
"node": ">=20.18.1"
|
|
5
5
|
},
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "7.0.0",
|
|
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 and Modbus adapters, 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/",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@project-chip/matter.js": "^0.17.9",
|
|
22
22
|
"google-translate-tts": "^0.3.0",
|
|
23
23
|
"js-yaml": "4.3.1",
|
|
24
|
-
"knxultimate": "6.0.
|
|
24
|
+
"knxultimate": "6.0.3",
|
|
25
25
|
"lodash": "4.18.1",
|
|
26
26
|
"mqtt": "^5.15.2",
|
|
27
27
|
"ping": "0.4.4",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"version": ">=3.1.1",
|
|
33
33
|
"plugins": {
|
|
34
34
|
"commonFunctions": "/nodes/commonFunctions.js",
|
|
35
|
+
"knxUltimateCerebrumRuntime": "/nodes/plugins/knxUltimate-cerebrum-runtime-plugin.js",
|
|
35
36
|
"knxUltimateFlowBubbles": "/nodes/plugins/knxUltimate-flow-bubbles-plugin.html"
|
|
36
37
|
},
|
|
37
38
|
"nodes": {
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"knxUltimateAlerter": "/nodes/knxUltimateAlerter.js",
|
|
47
48
|
"knxUltimateViewer": "/nodes/knxUltimateViewer.js",
|
|
48
49
|
"knxUltimateAI": "/nodes/knxUltimateAI.js",
|
|
50
|
+
"knxUltimateAIHomeAssistant": "/nodes/knxUltimateAIHomeAssistant.js",
|
|
49
51
|
"knxUltimateMultiRouting": "/nodes/knxUltimateMultiRouting.js",
|
|
50
52
|
"knxUltimateRouterFilter": "/nodes/knxUltimateRouterFilter.js",
|
|
51
53
|
"knxUltimateAutoResponder": "/nodes/knxUltimateAutoResponder.js",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
{
|
|
4
4
|
id: 'windkh-telegrambot',
|
|
5
5
|
title: 'windkh/node-red-contrib-telegrambot',
|
|
6
|
-
inputCode: `// Receiver/Event ->
|
|
6
|
+
inputCode: `// Receiver/Event -> Cerebrum Ultimate
|
|
7
7
|
// Supports normal "telegram receiver" messages, including the one-time
|
|
8
8
|
// reply-keyboard confirmation buttons, plus legacy callback_query events.
|
|
9
9
|
const telegram = msg.payload;
|
|
@@ -70,7 +70,7 @@ if (telegram.type !== 'message') return;
|
|
|
70
70
|
msg.topic = 'ask';
|
|
71
71
|
msg.prompt = content;
|
|
72
72
|
return msg;`,
|
|
73
|
-
outputCode: `//
|
|
73
|
+
outputCode: `// Cerebrum Ultimate chat output -> Telegram sender
|
|
74
74
|
// Converts the text reply and, when required, adds a one-time reply keyboard.
|
|
75
75
|
// A button click returns through the normal Telegram receiver, so no separate
|
|
76
76
|
// callback event node is required.
|
|
@@ -192,7 +192,7 @@ return msg;`
|
|
|
192
192
|
{
|
|
193
193
|
id: 'redbot-telegram',
|
|
194
194
|
title: 'RedBot / node-red-contrib-chatbot (Telegram)',
|
|
195
|
-
inputCode: `// RedBot Telegram Receiver ->
|
|
195
|
+
inputCode: `// RedBot Telegram Receiver -> Cerebrum Ultimate
|
|
196
196
|
// RedBot normalizes Telegram text, voice audio and inline-button postbacks in msg.payload.
|
|
197
197
|
const redbot = msg.payload;
|
|
198
198
|
if (!redbot || typeof redbot !== 'object') return;
|
|
@@ -252,7 +252,7 @@ if (action === 'confirm' || action === 'cancel') {
|
|
|
252
252
|
msg.topic = 'ask';
|
|
253
253
|
msg.prompt = content;
|
|
254
254
|
return msg;`,
|
|
255
|
-
outputCode: `//
|
|
255
|
+
outputCode: `// Cerebrum Ultimate chat output -> RedBot Telegram Sender
|
|
256
256
|
// Preserves RedBot conversation helpers and emits either a plain message
|
|
257
257
|
// or inline postback buttons for KNX confirmation/cancellation.
|
|
258
258
|
const source = msg.inputMessage && typeof msg.inputMessage === 'object'
|
|
@@ -290,12 +290,38 @@ if (sourcePayload.userId !== undefined && msg.originalMessage.userId === undefin
|
|
|
290
290
|
msg.originalMessage.userId = sourcePayload.userId;
|
|
291
291
|
}
|
|
292
292
|
if (typeof msg.chat !== 'function') {
|
|
293
|
+
const contextValues = {
|
|
294
|
+
chatId: chatId,
|
|
295
|
+
userId: sourcePayload.userId,
|
|
296
|
+
transport: sourcePayload.transport || 'telegram'
|
|
297
|
+
};
|
|
298
|
+
const syntheticContext = {
|
|
299
|
+
get: function () {
|
|
300
|
+
const keys = Array.prototype.slice.call(arguments);
|
|
301
|
+
if (keys.length === 0) return Object.assign({}, contextValues);
|
|
302
|
+
if (keys.length === 1) return contextValues[keys[0]];
|
|
303
|
+
return keys.reduce(function (result, key) {
|
|
304
|
+
result[key] = contextValues[key];
|
|
305
|
+
return result;
|
|
306
|
+
}, {});
|
|
307
|
+
},
|
|
308
|
+
set: function (key, value) {
|
|
309
|
+
if (key && typeof key === 'object') Object.assign(contextValues, key);
|
|
310
|
+
else if (key !== undefined) contextValues[key] = value;
|
|
311
|
+
return syntheticContext;
|
|
312
|
+
},
|
|
313
|
+
remove: function () {
|
|
314
|
+
Array.prototype.slice.call(arguments).forEach(function (key) { delete contextValues[key]; });
|
|
315
|
+
return syntheticContext;
|
|
316
|
+
},
|
|
317
|
+
clear: function () {
|
|
318
|
+
Object.keys(contextValues).forEach(function (key) { delete contextValues[key]; });
|
|
319
|
+
return syntheticContext;
|
|
320
|
+
},
|
|
321
|
+
all: function () { return Object.assign({}, contextValues); }
|
|
322
|
+
};
|
|
293
323
|
msg.chat = function () {
|
|
294
|
-
return
|
|
295
|
-
get: function () { return {}; },
|
|
296
|
-
set: function () { return undefined; },
|
|
297
|
-
remove: function () { return undefined; }
|
|
298
|
-
};
|
|
324
|
+
return syntheticContext;
|
|
299
325
|
};
|
|
300
326
|
}
|
|
301
327
|
if (typeof msg.get !== 'function') {
|