matterbridge 3.3.1-dev-20251011-c8b30f8 → 3.3.1
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 +3 -3
- package/dist/broadcastServer.d.ts +105 -0
- package/dist/broadcastServer.d.ts.map +1 -0
- package/dist/broadcastServer.js +86 -1
- package/dist/broadcastServer.js.map +1 -0
- package/dist/broadcastServerTypes.d.ts +717 -0
- package/dist/broadcastServerTypes.d.ts.map +1 -0
- package/dist/broadcastServerTypes.js +24 -0
- package/dist/broadcastServerTypes.js.map +1 -0
- package/dist/cli.d.ts +26 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +147 -6
- package/dist/cli.js.map +1 -0
- package/dist/cliEmitter.d.ts +50 -0
- package/dist/cliEmitter.d.ts.map +1 -0
- package/dist/cliEmitter.js +37 -0
- package/dist/cliEmitter.js.map +1 -0
- package/dist/cliHistory.d.ts +70 -0
- package/dist/cliHistory.d.ts.map +1 -0
- package/dist/cliHistory.js +89 -14
- package/dist/cliHistory.js.map +1 -0
- package/dist/clusters/export.d.ts +2 -0
- package/dist/clusters/export.d.ts.map +1 -0
- package/dist/clusters/export.js +2 -0
- package/dist/clusters/export.js.map +1 -0
- package/dist/defaultConfigSchema.d.ts +28 -0
- package/dist/defaultConfigSchema.d.ts.map +1 -0
- package/dist/defaultConfigSchema.js +24 -0
- package/dist/defaultConfigSchema.js.map +1 -0
- package/dist/deviceManager.d.ts +117 -0
- package/dist/deviceManager.d.ts.map +1 -0
- package/dist/deviceManager.js +124 -1
- package/dist/deviceManager.js.map +1 -0
- package/dist/devices/airConditioner.d.ts +98 -0
- package/dist/devices/airConditioner.d.ts.map +1 -0
- package/dist/devices/airConditioner.js +57 -0
- package/dist/devices/airConditioner.js.map +1 -0
- package/dist/devices/batteryStorage.d.ts +48 -0
- package/dist/devices/batteryStorage.d.ts.map +1 -0
- package/dist/devices/batteryStorage.js +48 -1
- package/dist/devices/batteryStorage.js.map +1 -0
- package/dist/devices/cooktop.d.ts +60 -0
- package/dist/devices/cooktop.d.ts.map +1 -0
- package/dist/devices/cooktop.js +55 -0
- package/dist/devices/cooktop.js.map +1 -0
- package/dist/devices/dishwasher.d.ts +71 -0
- package/dist/devices/dishwasher.d.ts.map +1 -0
- package/dist/devices/dishwasher.js +57 -0
- package/dist/devices/dishwasher.js.map +1 -0
- package/dist/devices/evse.d.ts +75 -0
- package/dist/devices/evse.d.ts.map +1 -0
- package/dist/devices/evse.js +74 -10
- package/dist/devices/evse.js.map +1 -0
- package/dist/devices/export.d.ts +17 -0
- package/dist/devices/export.d.ts.map +1 -0
- package/dist/devices/export.js +5 -0
- package/dist/devices/export.js.map +1 -0
- package/dist/devices/extractorHood.d.ts +46 -0
- package/dist/devices/extractorHood.d.ts.map +1 -0
- package/dist/devices/extractorHood.js +42 -0
- package/dist/devices/extractorHood.js.map +1 -0
- package/dist/devices/heatPump.d.ts +47 -0
- package/dist/devices/heatPump.d.ts.map +1 -0
- package/dist/devices/heatPump.js +50 -2
- package/dist/devices/heatPump.js.map +1 -0
- package/dist/devices/laundryDryer.d.ts +67 -0
- package/dist/devices/laundryDryer.d.ts.map +1 -0
- package/dist/devices/laundryDryer.js +62 -3
- package/dist/devices/laundryDryer.js.map +1 -0
- package/dist/devices/laundryWasher.d.ts +81 -0
- package/dist/devices/laundryWasher.d.ts.map +1 -0
- package/dist/devices/laundryWasher.js +70 -4
- package/dist/devices/laundryWasher.js.map +1 -0
- package/dist/devices/microwaveOven.d.ts +168 -0
- package/dist/devices/microwaveOven.d.ts.map +1 -0
- package/dist/devices/microwaveOven.js +88 -5
- package/dist/devices/microwaveOven.js.map +1 -0
- package/dist/devices/oven.d.ts +105 -0
- package/dist/devices/oven.d.ts.map +1 -0
- package/dist/devices/oven.js +85 -0
- package/dist/devices/oven.js.map +1 -0
- package/dist/devices/refrigerator.d.ts +118 -0
- package/dist/devices/refrigerator.d.ts.map +1 -0
- package/dist/devices/refrigerator.js +102 -0
- package/dist/devices/refrigerator.js.map +1 -0
- package/dist/devices/roboticVacuumCleaner.d.ts +112 -0
- package/dist/devices/roboticVacuumCleaner.d.ts.map +1 -0
- package/dist/devices/roboticVacuumCleaner.js +100 -9
- package/dist/devices/roboticVacuumCleaner.js.map +1 -0
- package/dist/devices/solarPower.d.ts +40 -0
- package/dist/devices/solarPower.d.ts.map +1 -0
- package/dist/devices/solarPower.js +38 -0
- package/dist/devices/solarPower.js.map +1 -0
- package/dist/devices/speaker.d.ts +87 -0
- package/dist/devices/speaker.d.ts.map +1 -0
- package/dist/devices/speaker.js +84 -0
- package/dist/devices/speaker.js.map +1 -0
- package/dist/devices/temperatureControl.d.ts +166 -0
- package/dist/devices/temperatureControl.d.ts.map +1 -0
- package/dist/devices/temperatureControl.js +25 -3
- package/dist/devices/temperatureControl.js.map +1 -0
- package/dist/devices/waterHeater.d.ts +111 -0
- package/dist/devices/waterHeater.d.ts.map +1 -0
- package/dist/devices/waterHeater.js +82 -2
- package/dist/devices/waterHeater.js.map +1 -0
- package/dist/dgram/coap.d.ts +205 -0
- package/dist/dgram/coap.d.ts.map +1 -0
- package/dist/dgram/coap.js +126 -13
- package/dist/dgram/coap.js.map +1 -0
- package/dist/dgram/dgram.d.ts +141 -0
- package/dist/dgram/dgram.d.ts.map +1 -0
- package/dist/dgram/dgram.js +114 -2
- package/dist/dgram/dgram.js.map +1 -0
- package/dist/dgram/mb_coap.d.ts +24 -0
- package/dist/dgram/mb_coap.d.ts.map +1 -0
- package/dist/dgram/mb_coap.js +41 -3
- package/dist/dgram/mb_coap.js.map +1 -0
- package/dist/dgram/mb_mdns.d.ts +24 -0
- package/dist/dgram/mb_mdns.d.ts.map +1 -0
- package/dist/dgram/mb_mdns.js +80 -15
- package/dist/dgram/mb_mdns.js.map +1 -0
- package/dist/dgram/mdns.d.ts +290 -0
- package/dist/dgram/mdns.d.ts.map +1 -0
- package/dist/dgram/mdns.js +299 -137
- package/dist/dgram/mdns.js.map +1 -0
- package/dist/dgram/multicast.d.ts +67 -0
- package/dist/dgram/multicast.d.ts.map +1 -0
- package/dist/dgram/multicast.js +62 -1
- package/dist/dgram/multicast.js.map +1 -0
- package/dist/dgram/unicast.d.ts +56 -0
- package/dist/dgram/unicast.d.ts.map +1 -0
- package/dist/dgram/unicast.js +54 -0
- package/dist/dgram/unicast.js.map +1 -0
- package/dist/frontend.d.ts +234 -0
- package/dist/frontend.d.ts.map +1 -0
- package/dist/frontend.js +402 -29
- package/dist/frontend.js.map +1 -0
- package/dist/frontendTypes.d.ts +522 -0
- package/dist/frontendTypes.d.ts.map +1 -0
- package/dist/frontendTypes.js +45 -0
- package/dist/frontendTypes.js.map +1 -0
- package/dist/helpers.d.ts +48 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/helpers.js +53 -0
- package/dist/helpers.js.map +1 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -0
- package/dist/logger/export.d.ts +2 -0
- package/dist/logger/export.d.ts.map +1 -0
- package/dist/logger/export.js +1 -0
- package/dist/logger/export.js.map +1 -0
- package/dist/matter/behaviors.d.ts +2 -0
- package/dist/matter/behaviors.d.ts.map +1 -0
- package/dist/matter/behaviors.js +2 -0
- package/dist/matter/behaviors.js.map +1 -0
- package/dist/matter/clusters.d.ts +2 -0
- package/dist/matter/clusters.d.ts.map +1 -0
- package/dist/matter/clusters.js +2 -0
- package/dist/matter/clusters.js.map +1 -0
- package/dist/matter/devices.d.ts +2 -0
- package/dist/matter/devices.d.ts.map +1 -0
- package/dist/matter/devices.js +2 -0
- package/dist/matter/devices.js.map +1 -0
- package/dist/matter/endpoints.d.ts +2 -0
- package/dist/matter/endpoints.d.ts.map +1 -0
- package/dist/matter/endpoints.js +2 -0
- package/dist/matter/endpoints.js.map +1 -0
- package/dist/matter/export.d.ts +5 -0
- package/dist/matter/export.d.ts.map +1 -0
- package/dist/matter/export.js +3 -0
- package/dist/matter/export.js.map +1 -0
- package/dist/matter/types.d.ts +3 -0
- package/dist/matter/types.d.ts.map +1 -0
- package/dist/matter/types.js +3 -0
- package/dist/matter/types.js.map +1 -0
- package/dist/matterbridge.d.ts +469 -0
- package/dist/matterbridge.d.ts.map +1 -0
- package/dist/matterbridge.js +795 -45
- package/dist/matterbridge.js.map +1 -0
- package/dist/matterbridgeAccessoryPlatform.d.ts +42 -0
- package/dist/matterbridgeAccessoryPlatform.d.ts.map +1 -0
- package/dist/matterbridgeAccessoryPlatform.js +36 -0
- package/dist/matterbridgeAccessoryPlatform.js.map +1 -0
- package/dist/matterbridgeBehaviors.d.ts +1747 -0
- package/dist/matterbridgeBehaviors.d.ts.map +1 -0
- package/dist/matterbridgeBehaviors.js +65 -5
- package/dist/matterbridgeBehaviors.js.map +1 -0
- package/dist/matterbridgeDeviceTypes.d.ts +761 -0
- package/dist/matterbridgeDeviceTypes.d.ts.map +1 -0
- package/dist/matterbridgeDeviceTypes.js +630 -17
- package/dist/matterbridgeDeviceTypes.js.map +1 -0
- package/dist/matterbridgeDynamicPlatform.d.ts +42 -0
- package/dist/matterbridgeDynamicPlatform.d.ts.map +1 -0
- package/dist/matterbridgeDynamicPlatform.js +36 -0
- package/dist/matterbridgeDynamicPlatform.js.map +1 -0
- package/dist/matterbridgeEndpoint.d.ts +1534 -0
- package/dist/matterbridgeEndpoint.d.ts.map +1 -0
- package/dist/matterbridgeEndpoint.js +1398 -58
- package/dist/matterbridgeEndpoint.js.map +1 -0
- package/dist/matterbridgeEndpointHelpers.d.ts +407 -0
- package/dist/matterbridgeEndpointHelpers.d.ts.map +1 -0
- package/dist/matterbridgeEndpointHelpers.js +345 -12
- package/dist/matterbridgeEndpointHelpers.js.map +1 -0
- package/dist/matterbridgePlatform.d.ts +402 -0
- package/dist/matterbridgePlatform.d.ts.map +1 -0
- package/dist/matterbridgePlatform.js +341 -1
- package/dist/matterbridgePlatform.js.map +1 -0
- package/dist/matterbridgeTypes.d.ts +209 -0
- package/dist/matterbridgeTypes.d.ts.map +1 -0
- package/dist/matterbridgeTypes.js +26 -0
- package/dist/matterbridgeTypes.js.map +1 -0
- package/dist/pluginManager.d.ts +353 -0
- package/dist/pluginManager.d.ts.map +1 -0
- package/dist/pluginManager.js +325 -3
- package/dist/pluginManager.js.map +1 -0
- package/dist/shelly.d.ts +174 -0
- package/dist/shelly.d.ts.map +1 -0
- package/dist/shelly.js +168 -7
- package/dist/shelly.js.map +1 -0
- package/dist/storage/export.d.ts +2 -0
- package/dist/storage/export.d.ts.map +1 -0
- package/dist/storage/export.js +1 -0
- package/dist/storage/export.js.map +1 -0
- package/dist/update.d.ts +75 -0
- package/dist/update.d.ts.map +1 -0
- package/dist/update.js +69 -0
- package/dist/update.js.map +1 -0
- package/dist/utils/colorUtils.d.ts +99 -0
- package/dist/utils/colorUtils.d.ts.map +1 -0
- package/dist/utils/colorUtils.js +97 -2
- package/dist/utils/colorUtils.js.map +1 -0
- package/dist/utils/commandLine.d.ts +59 -0
- package/dist/utils/commandLine.d.ts.map +1 -0
- package/dist/utils/commandLine.js +54 -0
- package/dist/utils/commandLine.js.map +1 -0
- package/dist/utils/copyDirectory.d.ts +33 -0
- package/dist/utils/copyDirectory.d.ts.map +1 -0
- package/dist/utils/copyDirectory.js +38 -1
- package/dist/utils/copyDirectory.js.map +1 -0
- package/dist/utils/createDirectory.d.ts +34 -0
- package/dist/utils/createDirectory.d.ts.map +1 -0
- package/dist/utils/createDirectory.js +33 -0
- package/dist/utils/createDirectory.js.map +1 -0
- package/dist/utils/createZip.d.ts +39 -0
- package/dist/utils/createZip.d.ts.map +1 -0
- package/dist/utils/createZip.js +47 -2
- package/dist/utils/createZip.js.map +1 -0
- package/dist/utils/deepCopy.d.ts +32 -0
- package/dist/utils/deepCopy.d.ts.map +1 -0
- package/dist/utils/deepCopy.js +39 -0
- package/dist/utils/deepCopy.js.map +1 -0
- package/dist/utils/deepEqual.d.ts +54 -0
- package/dist/utils/deepEqual.d.ts.map +1 -0
- package/dist/utils/deepEqual.js +72 -1
- package/dist/utils/deepEqual.js.map +1 -0
- package/dist/utils/error.d.ts +44 -0
- package/dist/utils/error.d.ts.map +1 -0
- package/dist/utils/error.js +41 -0
- package/dist/utils/error.js.map +1 -0
- package/dist/utils/export.d.ts +13 -0
- package/dist/utils/export.d.ts.map +1 -0
- package/dist/utils/export.js +1 -0
- package/dist/utils/export.js.map +1 -0
- package/dist/utils/hex.d.ts +89 -0
- package/dist/utils/hex.d.ts.map +1 -0
- package/dist/utils/hex.js +124 -0
- package/dist/utils/hex.js.map +1 -0
- package/dist/utils/isvalid.d.ts +103 -0
- package/dist/utils/isvalid.d.ts.map +1 -0
- package/dist/utils/isvalid.js +101 -0
- package/dist/utils/isvalid.js.map +1 -0
- package/dist/utils/jestHelpers.d.ts +137 -0
- package/dist/utils/jestHelpers.d.ts.map +1 -0
- package/dist/utils/jestHelpers.js +153 -3
- package/dist/utils/jestHelpers.js.map +1 -0
- package/dist/utils/network.d.ts +115 -0
- package/dist/utils/network.d.ts.map +1 -0
- package/dist/utils/network.js +108 -5
- package/dist/utils/network.js.map +1 -0
- package/dist/utils/spawn.d.ts +35 -0
- package/dist/utils/spawn.d.ts.map +1 -0
- package/dist/utils/spawn.js +71 -0
- package/dist/utils/spawn.js.map +1 -0
- package/dist/utils/wait.d.ts +54 -0
- package/dist/utils/wait.d.ts.map +1 -0
- package/dist/utils/wait.js +60 -8
- package/dist/utils/wait.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -1
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the CLI history page generator.
|
|
3
|
+
*
|
|
4
|
+
* @file cliHistory.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2025-10-09
|
|
7
|
+
* @version 1.0.0
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2025, 2026, 2027 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
export declare const historySize: number;
|
|
25
|
+
export declare let historyIndex: number;
|
|
26
|
+
/**
|
|
27
|
+
* Sets the history index.
|
|
28
|
+
*
|
|
29
|
+
* @param {number} index - The new history index.
|
|
30
|
+
*/
|
|
31
|
+
export declare function setHistoryIndex(index: number): void;
|
|
32
|
+
export type HistoryEntry = {
|
|
33
|
+
timestamp: number;
|
|
34
|
+
cpu: number;
|
|
35
|
+
peakCpu: number;
|
|
36
|
+
processCpu: number;
|
|
37
|
+
peakProcessCpu: number;
|
|
38
|
+
rss: number;
|
|
39
|
+
peakRss: number;
|
|
40
|
+
heapUsed: number;
|
|
41
|
+
peakHeapUsed: number;
|
|
42
|
+
heapTotal: number;
|
|
43
|
+
peakHeapTotal: number;
|
|
44
|
+
external: number;
|
|
45
|
+
peakExternal: number;
|
|
46
|
+
arrayBuffers: number;
|
|
47
|
+
peakArrayBuffers: number;
|
|
48
|
+
};
|
|
49
|
+
export declare const history: HistoryEntry[];
|
|
50
|
+
export type GenerateHistoryPageOptions = {
|
|
51
|
+
/**
|
|
52
|
+
* Full path (file name included) for the generated HTML file.
|
|
53
|
+
* Defaults to `<current working directory>/history.html`.
|
|
54
|
+
*/
|
|
55
|
+
outputPath?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Title shown in the generated page and browser tab.
|
|
58
|
+
* Defaults to `Matterbridge CPU & Memory History`.
|
|
59
|
+
*/
|
|
60
|
+
pageTitle?: string;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Generates a static HTML dashboard displaying CPU and memory history.
|
|
64
|
+
*
|
|
65
|
+
* @param {GenerateHistoryPageOptions} [options] - Optional configuration for output path, page title, and refresh interval.
|
|
66
|
+
*
|
|
67
|
+
* @returns {string | undefined} The absolute path to the generated HTML file, or undefined if no samples exist.
|
|
68
|
+
*/
|
|
69
|
+
export declare function generateHistoryPage(options?: GenerateHistoryPageOptions): string | undefined;
|
|
70
|
+
//# sourceMappingURL=cliHistory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cliHistory.d.ts","sourceRoot":"","sources":["../src/cliHistory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AASH,eAAO,MAAM,WAAW,EAAE,MAAa,CAAC;AAExC,eAAO,IAAI,YAAY,EAAE,MAAU,CAAC;AAEpC;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,QAQ5C;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,YAAY,EAgB/B,CAAC;AAEJ,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,GAAE,0BAA+B,GAAG,MAAM,GAAG,SAAS,CA4pBhG"}
|
package/dist/cliHistory.js
CHANGED
|
@@ -1,9 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the CLI history page generator.
|
|
3
|
+
*
|
|
4
|
+
* @file cliHistory.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2025-10-09
|
|
7
|
+
* @version 1.0.0
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2025, 2026, 2027 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
// eslint-disable-next-line no-console
|
|
1
25
|
if (process.argv.includes('--loader') || process.argv.includes('-loader'))
|
|
2
26
|
console.log('\u001B[32mCli history loaded.\u001B[40;0m');
|
|
3
27
|
import { writeFileSync } from 'node:fs';
|
|
4
28
|
import path from 'node:path';
|
|
5
|
-
|
|
29
|
+
// History for 12h at 1 sample each 10 seconds = 4320 entries
|
|
30
|
+
export const historySize = 4320;
|
|
6
31
|
export let historyIndex = 0;
|
|
32
|
+
/**
|
|
33
|
+
* Sets the history index.
|
|
34
|
+
*
|
|
35
|
+
* @param {number} index - The new history index.
|
|
36
|
+
*/
|
|
7
37
|
export function setHistoryIndex(index) {
|
|
8
38
|
if (!Number.isFinite(index) || !Number.isSafeInteger(index)) {
|
|
9
39
|
throw new TypeError('historyIndex must be a finite, safe integer.');
|
|
@@ -30,6 +60,13 @@ export const history = Array.from({ length: historySize }, () => ({
|
|
|
30
60
|
arrayBuffers: 0,
|
|
31
61
|
peakArrayBuffers: 0,
|
|
32
62
|
}));
|
|
63
|
+
/**
|
|
64
|
+
* Generates a static HTML dashboard displaying CPU and memory history.
|
|
65
|
+
*
|
|
66
|
+
* @param {GenerateHistoryPageOptions} [options] - Optional configuration for output path, page title, and refresh interval.
|
|
67
|
+
*
|
|
68
|
+
* @returns {string | undefined} The absolute path to the generated HTML file, or undefined if no samples exist.
|
|
69
|
+
*/
|
|
33
70
|
export function generateHistoryPage(options = {}) {
|
|
34
71
|
const pageTitle = options.pageTitle ?? 'Matterbridge CPU & Memory History';
|
|
35
72
|
const outputPath = path.resolve(options.outputPath ?? path.join(process.cwd(), 'history.html'));
|
|
@@ -54,9 +91,10 @@ export function generateHistoryPage(options = {}) {
|
|
|
54
91
|
const peakRss = Math.max(...normalizedHistory.map((entry) => entry.peakRss ?? entry.rss));
|
|
55
92
|
const peakHeapUsed = Math.max(...normalizedHistory.map((entry) => entry.peakHeapUsed ?? entry.heapUsed));
|
|
56
93
|
const peakHeapTotal = Math.max(...normalizedHistory.map((entry) => entry.peakHeapTotal ?? entry.heapTotal));
|
|
94
|
+
const peakExternal = Math.max(...normalizedHistory.map((entry) => entry.peakExternal ?? entry.external));
|
|
95
|
+
const peakArrayBuffers = Math.max(...normalizedHistory.map((entry) => entry.peakArrayBuffers ?? entry.arrayBuffers));
|
|
57
96
|
const firstTimestamp = normalizedHistory[0]?.timestamp ?? Date.now();
|
|
58
97
|
const lastTimestamp = normalizedHistory[normalizedHistory.length - 1]?.timestamp ?? Date.now();
|
|
59
|
-
const historySanitised = JSON.stringify(normalizedHistory).replace(/</g, '\\u003c').replace(/>/g, '\\u003e');
|
|
60
98
|
const summary = {
|
|
61
99
|
entries: normalizedHistory.length,
|
|
62
100
|
timeRange: `${new Date(firstTimestamp).toLocaleString()} → ${new Date(lastTimestamp).toLocaleString()}`,
|
|
@@ -65,8 +103,9 @@ export function generateHistoryPage(options = {}) {
|
|
|
65
103
|
peakRss,
|
|
66
104
|
peakHeapUsed,
|
|
67
105
|
peakHeapTotal,
|
|
106
|
+
peakExternal,
|
|
107
|
+
peakArrayBuffers,
|
|
68
108
|
};
|
|
69
|
-
const summarySanitised = JSON.stringify(summary).replace(/</g, '\\u003c').replace(/>/g, '\\u003e');
|
|
70
109
|
const html = `<!DOCTYPE html>
|
|
71
110
|
<html lang="en">
|
|
72
111
|
<head>
|
|
@@ -275,8 +314,8 @@ export function generateHistoryPage(options = {}) {
|
|
|
275
314
|
</div>
|
|
276
315
|
|
|
277
316
|
<script type="module">
|
|
278
|
-
const HISTORY_DATA = ${
|
|
279
|
-
const SUMMARY_DATA = ${
|
|
317
|
+
const HISTORY_DATA = ${JSON.stringify(normalizedHistory)};
|
|
318
|
+
const SUMMARY_DATA = ${JSON.stringify(summary)};
|
|
280
319
|
let cleanup = () => {};
|
|
281
320
|
|
|
282
321
|
const summaryContainer = document.getElementById('summary');
|
|
@@ -287,7 +326,9 @@ export function generateHistoryPage(options = {}) {
|
|
|
287
326
|
{ label: 'Process CPU Peak', value: SUMMARY_DATA.peakProcessCpu.toFixed(2) + ' %' },
|
|
288
327
|
{ label: 'RSS Peak', value: formatBytes(SUMMARY_DATA.peakRss) },
|
|
289
328
|
{ label: 'Heap Used Peak', value: formatBytes(SUMMARY_DATA.peakHeapUsed) },
|
|
290
|
-
{ label: 'Heap Total Peak', value: formatBytes(SUMMARY_DATA.peakHeapTotal) }
|
|
329
|
+
{ label: 'Heap Total Peak', value: formatBytes(SUMMARY_DATA.peakHeapTotal) },
|
|
330
|
+
{ label: 'External Peak', value: formatBytes(SUMMARY_DATA.peakExternal) },
|
|
331
|
+
{ label: 'Array Buffers Peak', value: formatBytes(SUMMARY_DATA.peakArrayBuffers) }
|
|
291
332
|
];
|
|
292
333
|
|
|
293
334
|
summaryEntries.forEach(function (itemData) {
|
|
@@ -330,7 +371,7 @@ export function generateHistoryPage(options = {}) {
|
|
|
330
371
|
const cpuPeakValue = HISTORY_DATA.reduce(function (acc, entry) {
|
|
331
372
|
return Math.max(acc, Number.isFinite(entry.peakCpu) ? entry.peakCpu : 0, Number.isFinite(entry.cpu) ? entry.cpu : 0);
|
|
332
373
|
}, 0);
|
|
333
|
-
const
|
|
374
|
+
const cpuMaxYAxis = cpuPeakValue > 0 ? cpuPeakValue * 1.05 : undefined;
|
|
334
375
|
|
|
335
376
|
const processCpuPeakValue = HISTORY_DATA.reduce(function (acc, entry) {
|
|
336
377
|
return Math.max(
|
|
@@ -339,11 +380,37 @@ export function generateHistoryPage(options = {}) {
|
|
|
339
380
|
Number.isFinite(entry.processCpu) ? entry.processCpu : 0
|
|
340
381
|
);
|
|
341
382
|
}, 0);
|
|
342
|
-
const
|
|
383
|
+
const processCpuMaxYAxis = processCpuPeakValue > 0 ? processCpuPeakValue * 1.05 : undefined;
|
|
384
|
+
const useProcessCpuDecimals = (processCpuMaxYAxis ?? 0) <= 3;
|
|
385
|
+
|
|
386
|
+
// Compute memory chart dynamic minimum Y as (min observed MB) - 10%
|
|
387
|
+
const memoryMinMb = HISTORY_DATA.reduce(function (acc, entry) {
|
|
388
|
+
const values = [entry.rss, entry.heapTotal, entry.heapUsed].map(bytesToMb);
|
|
389
|
+
const finiteValues = values.filter(function (v) { return Number.isFinite(v); });
|
|
390
|
+
const minEntry = finiteValues.length ? Math.min.apply(Math, finiteValues) : acc;
|
|
391
|
+
return Math.min(acc, minEntry);
|
|
392
|
+
}, Number.POSITIVE_INFINITY);
|
|
393
|
+
const memoryMinYAxis = Number.isFinite(memoryMinMb) && memoryMinMb > 0 ? Math.max(0, memoryMinMb - memoryMinMb * 0.1) : 0;
|
|
394
|
+
|
|
395
|
+
// Compute memory chart dynamic maximum Y as (max observed MB including peaks) + 5%
|
|
396
|
+
const memoryMaxMb = HISTORY_DATA.reduce(function (acc, entry) {
|
|
397
|
+
const values = [
|
|
398
|
+
entry.rss,
|
|
399
|
+
entry.heapTotal,
|
|
400
|
+
entry.heapUsed,
|
|
401
|
+
entry.peakRss,
|
|
402
|
+
entry.peakHeapTotal,
|
|
403
|
+
entry.peakHeapUsed
|
|
404
|
+
].map(bytesToMb);
|
|
405
|
+
const finiteValues = values.filter(function (v) { return Number.isFinite(v); });
|
|
406
|
+
const maxEntry = finiteValues.length ? Math.max.apply(Math, finiteValues) : acc;
|
|
407
|
+
return Math.max(acc, maxEntry);
|
|
408
|
+
}, 0);
|
|
409
|
+
const memoryMaxYAxis = Number.isFinite(memoryMaxMb) && memoryMaxMb > 0 ? memoryMaxMb * 1.05 : undefined;
|
|
343
410
|
|
|
344
|
-
|
|
411
|
+
renderCharts();
|
|
345
412
|
|
|
346
|
-
|
|
413
|
+
function renderCharts() {
|
|
347
414
|
cleanup();
|
|
348
415
|
|
|
349
416
|
function draw() {
|
|
@@ -368,7 +435,7 @@ export function generateHistoryPage(options = {}) {
|
|
|
368
435
|
}
|
|
369
436
|
],
|
|
370
437
|
minY: 0,
|
|
371
|
-
maxY:
|
|
438
|
+
maxY: cpuMaxYAxis,
|
|
372
439
|
yFormatter: function (value) {
|
|
373
440
|
return value.toFixed(0) + ' %';
|
|
374
441
|
}
|
|
@@ -401,9 +468,9 @@ export function generateHistoryPage(options = {}) {
|
|
|
401
468
|
}
|
|
402
469
|
],
|
|
403
470
|
minY: 0,
|
|
404
|
-
maxY:
|
|
471
|
+
maxY: processCpuMaxYAxis,
|
|
405
472
|
yFormatter: function (value) {
|
|
406
|
-
return value.toFixed(0) + ' %';
|
|
473
|
+
return value.toFixed(useProcessCpuDecimals ? 1 : 0) + ' %';
|
|
407
474
|
}
|
|
408
475
|
});
|
|
409
476
|
|
|
@@ -427,7 +494,8 @@ export function generateHistoryPage(options = {}) {
|
|
|
427
494
|
color: '#f472b6'
|
|
428
495
|
}
|
|
429
496
|
],
|
|
430
|
-
minY:
|
|
497
|
+
minY: memoryMinYAxis,
|
|
498
|
+
maxY: memoryMaxYAxis,
|
|
431
499
|
yFormatter: function (value) {
|
|
432
500
|
return value.toFixed(0) + ' MB';
|
|
433
501
|
}
|
|
@@ -658,6 +726,13 @@ export function generateHistoryPage(options = {}) {
|
|
|
658
726
|
writeFileSync(outputPath, html, { encoding: 'utf-8' });
|
|
659
727
|
return outputPath;
|
|
660
728
|
}
|
|
729
|
+
/**
|
|
730
|
+
* Escapes HTML special characters to prevent breaking embedded markup.
|
|
731
|
+
*
|
|
732
|
+
* @param {string} input - The string to escape.
|
|
733
|
+
* @returns {string} The escaped string safe for HTML contexts.
|
|
734
|
+
*/
|
|
661
735
|
function escapeHtml(input) {
|
|
662
736
|
return input.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''');
|
|
663
737
|
}
|
|
738
|
+
//# sourceMappingURL=cliHistory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cliHistory.js","sourceRoot":"","sources":["../src/cliHistory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,sCAAsC;AACtC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;IAAE,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;AAEpI,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,6DAA6D;AAC7D,MAAM,CAAC,MAAM,WAAW,GAAW,IAAI,CAAC;AAExC,MAAM,CAAC,IAAI,YAAY,GAAW,CAAC,CAAC;AAEpC;;;;GAIG;AAC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,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AACjI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/clusters/export.ts"],"names":[],"mappings":""}
|
package/dist/clusters/export.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/clusters/export.ts"],"names":[],"mappings":";AAAA,oGAAoG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the default config for the plugins.
|
|
3
|
+
*
|
|
4
|
+
* @file defaultConfigSchema.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2024-05-07
|
|
7
|
+
* @version 1.0.1
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
import { PlatformConfig } from './matterbridgePlatform.js';
|
|
25
|
+
export declare const zigbee2mqtt_config: PlatformConfig;
|
|
26
|
+
export declare const somfytahoma_config: PlatformConfig;
|
|
27
|
+
export declare const shelly_config: PlatformConfig;
|
|
28
|
+
//# sourceMappingURL=defaultConfigSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultConfigSchema.d.ts","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,eAAO,MAAM,kBAAkB,EAAE,cAkBhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAYhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,cA4B3B,CAAC"}
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the default config for the plugins.
|
|
3
|
+
*
|
|
4
|
+
* @file defaultConfigSchema.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2024-05-07
|
|
7
|
+
* @version 1.0.1
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
1
24
|
export const zigbee2mqtt_config = {
|
|
2
25
|
name: 'matterbridge-zigbee2mqtt',
|
|
3
26
|
type: 'DynamicPlatform',
|
|
@@ -59,3 +82,4 @@ export const shelly_config = {
|
|
|
59
82
|
debugWs: false,
|
|
60
83
|
unregisterOnShutdown: false,
|
|
61
84
|
};
|
|
85
|
+
//# sourceMappingURL=defaultConfigSchema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultConfigSchema.js","sourceRoot":"","sources":["../src/defaultConfigSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IAChD,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,WAAW;IACjB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,aAAa;IACpB,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;IACb,UAAU,EAAE,EAAE;IACd,gBAAgB,EAAE,EAAE;IACpB,sBAAsB,EAAE,EAAE;IAC1B,KAAK,EAAE,KAAK;IACZ,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAmB;IAChD,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,gBAAgB,EAAE,EAAE;IACpB,KAAK,EAAE,KAAK;IACZ,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,EAAE;IACZ,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,EAAE;IACd,SAAS,EAAE,EAAE;IACb,gBAAgB,EAAE,EAAE;IACpB,kBAAkB,EAAE,EAAE;IACtB,iBAAiB,EAAE,EAAE;IACrB,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,EAAE;IACb,eAAe,EAAE,EAAE;IACnB,qBAAqB,EAAE,EAAE;IACzB,WAAW,EAAE,EAAE;IACf,kBAAkB,EAAE,IAAI;IACxB,qBAAqB,EAAE,IAAI;IAC3B,oBAAoB,EAAE,KAAK;IAC3B,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,CAAC;IAChB,OAAO,EAAE,EAAE;IACX,UAAU,EAAE,KAAK;IACjB,KAAK,EAAE,KAAK;IACZ,SAAS,EAAE,KAAK;IAChB,SAAS,EAAE,KAAK;IAChB,OAAO,EAAE,KAAK;IACd,oBAAoB,EAAE,KAAK;CAC5B,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file contains the DeviceManager class.
|
|
3
|
+
*
|
|
4
|
+
* @file devices.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2024-07-26
|
|
7
|
+
* @version 1.0.11
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
import { LogLevel } from 'node-ansi-logger';
|
|
25
|
+
import type { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
26
|
+
/**
|
|
27
|
+
* Manages Matterbridge devices.
|
|
28
|
+
*/
|
|
29
|
+
export declare class DeviceManager {
|
|
30
|
+
private readonly _devices;
|
|
31
|
+
private readonly log;
|
|
32
|
+
private server;
|
|
33
|
+
/**
|
|
34
|
+
* Creates an instance of DeviceManager.
|
|
35
|
+
*/
|
|
36
|
+
constructor();
|
|
37
|
+
destroy(): void;
|
|
38
|
+
private msgHandler;
|
|
39
|
+
/**
|
|
40
|
+
* Gets the number of devices.
|
|
41
|
+
*
|
|
42
|
+
* @returns {number} The number of devices.
|
|
43
|
+
*/
|
|
44
|
+
get length(): number;
|
|
45
|
+
/**
|
|
46
|
+
* Gets the number of devices.
|
|
47
|
+
*
|
|
48
|
+
* @returns {number} The number of devices.
|
|
49
|
+
*/
|
|
50
|
+
get size(): number;
|
|
51
|
+
/**
|
|
52
|
+
* Checks if a device with the specified unique ID exists.
|
|
53
|
+
*
|
|
54
|
+
* @param {string} uniqueId - The unique ID of the device.
|
|
55
|
+
* @returns {boolean} True if the device exists, false otherwise.
|
|
56
|
+
*/
|
|
57
|
+
has(uniqueId: string): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Gets a device by its unique ID.
|
|
60
|
+
*
|
|
61
|
+
* @param {string} uniqueId - The unique ID of the device.
|
|
62
|
+
* @returns {MatterbridgeEndpoint | undefined} The device, or undefined if not found.
|
|
63
|
+
*/
|
|
64
|
+
get(uniqueId: string): MatterbridgeEndpoint | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Adds a device to the manager.
|
|
67
|
+
*
|
|
68
|
+
* @param {MatterbridgeEndpoint} device - The device to add.
|
|
69
|
+
* @returns {MatterbridgeEndpoint} The added device.
|
|
70
|
+
* @throws {Error} If the device does not have a unique ID.
|
|
71
|
+
*/
|
|
72
|
+
set(device: MatterbridgeEndpoint): MatterbridgeEndpoint;
|
|
73
|
+
/**
|
|
74
|
+
* Removes a device from the manager.
|
|
75
|
+
*
|
|
76
|
+
* @param {MatterbridgeEndpoint} device - The device to remove.
|
|
77
|
+
* @returns {boolean} True if the device was removed, false otherwise.
|
|
78
|
+
* @throws {Error} If the device does not have a unique ID.
|
|
79
|
+
*/
|
|
80
|
+
remove(device: MatterbridgeEndpoint): boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Clears all devices from the manager.
|
|
83
|
+
*/
|
|
84
|
+
clear(): void;
|
|
85
|
+
/**
|
|
86
|
+
* Gets an array of all devices.
|
|
87
|
+
*
|
|
88
|
+
* @returns {MatterbridgeEndpoint[]} An array of all devices.
|
|
89
|
+
*/
|
|
90
|
+
array(): MatterbridgeEndpoint[];
|
|
91
|
+
/**
|
|
92
|
+
* Gets an array of all devices suitable for serialization.
|
|
93
|
+
*
|
|
94
|
+
* @param {string} [pluginName] - Optional plugin name to filter devices (not used currently).
|
|
95
|
+
* @returns {ApiDevices[]} An array of all devices.
|
|
96
|
+
*/
|
|
97
|
+
/**
|
|
98
|
+
* Iterates over all devices.
|
|
99
|
+
*
|
|
100
|
+
* @returns {IterableIterator<MatterbridgeEndpoint>} An iterator for the devices.
|
|
101
|
+
*/
|
|
102
|
+
[Symbol.iterator](): MapIterator<MatterbridgeEndpoint>;
|
|
103
|
+
/**
|
|
104
|
+
* Asynchronously iterates over each device and calls the provided callback function.
|
|
105
|
+
*
|
|
106
|
+
* @param {(device: MatterbridgeEndpoint) => Promise<void>} callback - The callback function to call with each device.
|
|
107
|
+
* @returns {Promise<void>} A promise that resolves when all callbacks have been called.
|
|
108
|
+
*/
|
|
109
|
+
forEach(callback: (device: MatterbridgeEndpoint) => Promise<void>): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Sets the log level.
|
|
112
|
+
*
|
|
113
|
+
* @param {LogLevel} logLevel - The log level to set.
|
|
114
|
+
*/
|
|
115
|
+
set logLevel(logLevel: LogLevel);
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=deviceManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceManager.d.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
* This file contains the DeviceManager class.
|
|
3
|
+
*
|
|
4
|
+
* @file devices.ts
|
|
5
|
+
* @author Luca Liguori
|
|
6
|
+
* @created 2024-07-26
|
|
7
|
+
* @version 1.0.11
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*
|
|
10
|
+
* Copyright 2024, 2025, 2026 Luca Liguori.
|
|
11
|
+
*
|
|
12
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License.
|
|
14
|
+
* You may obtain a copy of the License at
|
|
15
|
+
*
|
|
16
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
+
*
|
|
18
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
19
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
20
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21
|
+
* See the License for the specific language governing permissions and
|
|
22
|
+
* limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
// AnsiLogger module
|
|
1
25
|
import { AnsiLogger, BLUE, CYAN, db, debugStringify, er, wr } from 'node-ansi-logger';
|
|
2
26
|
import { dev } from './matterbridgeTypes.js';
|
|
3
27
|
import { BroadcastServer } from './broadcastServer.js';
|
|
28
|
+
/**
|
|
29
|
+
* Manages Matterbridge devices.
|
|
30
|
+
*/
|
|
4
31
|
export class DeviceManager {
|
|
5
32
|
_devices = new Map();
|
|
6
33
|
log;
|
|
7
34
|
server;
|
|
35
|
+
/**
|
|
36
|
+
* Creates an instance of DeviceManager.
|
|
37
|
+
*/
|
|
8
38
|
constructor() {
|
|
9
|
-
this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4
|
|
39
|
+
this.log = new AnsiLogger({ logName: 'DeviceManager', logTimestampFormat: 4 /* TimestampFormat.TIME_MILLIS */, logLevel: "info" /* LogLevel.INFO */ });
|
|
10
40
|
this.log.debug('Matterbridge device manager starting...');
|
|
11
41
|
this.server = new BroadcastServer('devices', this.log);
|
|
12
42
|
this.server.on('broadcast_message', this.msgHandler.bind(this));
|
|
@@ -48,18 +78,47 @@ export class DeviceManager {
|
|
|
48
78
|
this.log.warn(`Unknown broadcast message ${CYAN}${msg.type}${wr} from ${CYAN}${msg.src}${wr}`);
|
|
49
79
|
}
|
|
50
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Gets the number of devices.
|
|
83
|
+
*
|
|
84
|
+
* @returns {number} The number of devices.
|
|
85
|
+
*/
|
|
51
86
|
get length() {
|
|
52
87
|
return this._devices.size;
|
|
53
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Gets the number of devices.
|
|
91
|
+
*
|
|
92
|
+
* @returns {number} The number of devices.
|
|
93
|
+
*/
|
|
54
94
|
get size() {
|
|
55
95
|
return this._devices.size;
|
|
56
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* Checks if a device with the specified unique ID exists.
|
|
99
|
+
*
|
|
100
|
+
* @param {string} uniqueId - The unique ID of the device.
|
|
101
|
+
* @returns {boolean} True if the device exists, false otherwise.
|
|
102
|
+
*/
|
|
57
103
|
has(uniqueId) {
|
|
58
104
|
return this._devices.has(uniqueId);
|
|
59
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* Gets a device by its unique ID.
|
|
108
|
+
*
|
|
109
|
+
* @param {string} uniqueId - The unique ID of the device.
|
|
110
|
+
* @returns {MatterbridgeEndpoint | undefined} The device, or undefined if not found.
|
|
111
|
+
*/
|
|
60
112
|
get(uniqueId) {
|
|
61
113
|
return this._devices.get(uniqueId);
|
|
62
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Adds a device to the manager.
|
|
117
|
+
*
|
|
118
|
+
* @param {MatterbridgeEndpoint} device - The device to add.
|
|
119
|
+
* @returns {MatterbridgeEndpoint} The added device.
|
|
120
|
+
* @throws {Error} If the device does not have a unique ID.
|
|
121
|
+
*/
|
|
63
122
|
set(device) {
|
|
64
123
|
if (!device.uniqueId)
|
|
65
124
|
throw new Error(`The device ${dev}${device.deviceName}${er} has not been initialized: uniqueId is required`);
|
|
@@ -68,6 +127,13 @@ export class DeviceManager {
|
|
|
68
127
|
this._devices.set(device.uniqueId, device);
|
|
69
128
|
return device;
|
|
70
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Removes a device from the manager.
|
|
132
|
+
*
|
|
133
|
+
* @param {MatterbridgeEndpoint} device - The device to remove.
|
|
134
|
+
* @returns {boolean} True if the device was removed, false otherwise.
|
|
135
|
+
* @throws {Error} If the device does not have a unique ID.
|
|
136
|
+
*/
|
|
71
137
|
remove(device) {
|
|
72
138
|
if (!device.uniqueId)
|
|
73
139
|
throw new Error(`The device ${dev}${device.deviceName}${er} has not been initialized: uniqueId is required`);
|
|
@@ -75,15 +141,66 @@ export class DeviceManager {
|
|
|
75
141
|
this.log.error(`The device ${dev}${device.deviceName}${er} with uniqueId ${BLUE}${device.uniqueId}${er} serialNumber ${BLUE}${device.serialNumber}${er} is not registered in the device manager`);
|
|
76
142
|
return this._devices.delete(device.uniqueId);
|
|
77
143
|
}
|
|
144
|
+
/**
|
|
145
|
+
* Clears all devices from the manager.
|
|
146
|
+
*/
|
|
78
147
|
clear() {
|
|
79
148
|
this._devices.clear();
|
|
80
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Gets an array of all devices.
|
|
152
|
+
*
|
|
153
|
+
* @returns {MatterbridgeEndpoint[]} An array of all devices.
|
|
154
|
+
*/
|
|
81
155
|
array() {
|
|
82
156
|
return Array.from(this._devices.values());
|
|
83
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Gets an array of all devices suitable for serialization.
|
|
160
|
+
*
|
|
161
|
+
* @param {string} [pluginName] - Optional plugin name to filter devices (not used currently).
|
|
162
|
+
* @returns {ApiDevices[]} An array of all devices.
|
|
163
|
+
*/
|
|
164
|
+
/*
|
|
165
|
+
baseArray(pluginName?: string): ApiDevices[] {
|
|
166
|
+
const devices: ApiDevices[] = [];
|
|
167
|
+
for (const device of this.matterbridge.devices.array()) {
|
|
168
|
+
// Filter by pluginName if provided
|
|
169
|
+
if (pluginName && pluginName !== device.plugin) continue;
|
|
170
|
+
// Check if the device has the required properties
|
|
171
|
+
if (!device.plugin || !device.deviceType || !device.name || !device.deviceName || !device.serialNumber || !device.uniqueId || !device.lifecycle.isReady) continue;
|
|
172
|
+
devices.push({
|
|
173
|
+
pluginName: device.plugin,
|
|
174
|
+
type: device.name + ' (0x' + device.deviceType.toString(16).padStart(4, '0') + ')',
|
|
175
|
+
endpoint: device.number,
|
|
176
|
+
name: device.deviceName,
|
|
177
|
+
serial: device.serialNumber,
|
|
178
|
+
productUrl: device.productUrl,
|
|
179
|
+
configUrl: device.configUrl,
|
|
180
|
+
uniqueId: device.uniqueId,
|
|
181
|
+
reachable: this.getReachability(device),
|
|
182
|
+
powerSource: this.getPowerSource(device),
|
|
183
|
+
matter: device.mode === 'server' && device.serverNode ? this.matterbridge.getServerNodeData(device.serverNode) : undefined,
|
|
184
|
+
cluster: this.getClusterTextFromDevice(device),
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
return devices;
|
|
188
|
+
}
|
|
189
|
+
*/
|
|
190
|
+
/**
|
|
191
|
+
* Iterates over all devices.
|
|
192
|
+
*
|
|
193
|
+
* @returns {IterableIterator<MatterbridgeEndpoint>} An iterator for the devices.
|
|
194
|
+
*/
|
|
84
195
|
[Symbol.iterator]() {
|
|
85
196
|
return this._devices.values();
|
|
86
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
* Asynchronously iterates over each device and calls the provided callback function.
|
|
200
|
+
*
|
|
201
|
+
* @param {(device: MatterbridgeEndpoint) => Promise<void>} callback - The callback function to call with each device.
|
|
202
|
+
* @returns {Promise<void>} A promise that resolves when all callbacks have been called.
|
|
203
|
+
*/
|
|
87
204
|
async forEach(callback) {
|
|
88
205
|
if (this.size === 0)
|
|
89
206
|
return;
|
|
@@ -97,7 +214,13 @@ export class DeviceManager {
|
|
|
97
214
|
});
|
|
98
215
|
await Promise.all(tasks);
|
|
99
216
|
}
|
|
217
|
+
/**
|
|
218
|
+
* Sets the log level.
|
|
219
|
+
*
|
|
220
|
+
* @param {LogLevel} logLevel - The log level to set.
|
|
221
|
+
*/
|
|
100
222
|
set logLevel(logLevel) {
|
|
101
223
|
this.log.logLevel = logLevel;
|
|
102
224
|
}
|
|
103
225
|
}
|
|
226
|
+
//# sourceMappingURL=deviceManager.js.map
|