@matterbridge/core 3.9.1-dev-20260614-89d7aeb → 3.9.1-dev-20260617-b1e1b99
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/README.md +5 -3
- package/dist/backend.js +17 -6
- package/dist/backendExpress.d.ts +1 -1
- package/dist/backendExpress.js +12 -12
- package/dist/backendWsServer.d.ts +1 -1
- package/dist/backendWsServer.js +3 -3
- package/dist/behaviors/activatedCarbonFilterMonitoringServer.d.ts +2 -2
- package/dist/behaviors/bindingServer.d.ts +4 -4
- package/dist/behaviors/bindingServer.js +2 -2
- package/dist/behaviors/booleanStateConfigurationServer.d.ts +2 -2
- package/dist/behaviors/booleanStateConfigurationServer.js +2 -1
- package/dist/behaviors/colorControlServer.d.ts +9 -9
- package/dist/behaviors/deviceEnergyManagementServer.d.ts +4 -4
- package/dist/behaviors/doorLockServer.d.ts +18 -18
- package/dist/behaviors/doorLockServer.js +2 -2
- package/dist/behaviors/fanControlServer.d.ts +2 -2
- package/dist/behaviors/hepaFilterMonitoringServer.d.ts +2 -2
- package/dist/behaviors/identifyServer.d.ts +1 -1
- package/dist/behaviors/levelControlServer.d.ts +1 -1
- package/dist/behaviors/matterbridgeServer.d.ts +2 -2
- package/dist/behaviors/modeSelectServer.d.ts +1 -1
- package/dist/behaviors/operationalStateServer.d.ts +1 -1
- package/dist/behaviors/serviceAreaServer.d.ts +1 -1
- package/dist/behaviors/smokeCoAlarmServer.d.ts +1 -1
- package/dist/behaviors/thermostatServer.d.ts +10 -10
- package/dist/behaviors/valveConfigurationAndControlServer.d.ts +1 -1
- package/dist/behaviors/windowCoveringServer.d.ts +7 -7
- package/dist/behaviors/windowCoveringServer.js +3 -3
- package/dist/cli.js +9 -9
- package/dist/cliEmitter.js +2 -2
- package/dist/cliHistory.js +2 -2
- package/dist/clusters/closure-control.d.ts +1 -1
- package/dist/clusters/closure-dimension.d.ts +1 -1
- package/dist/clusters/export.d.ts +1 -1
- package/dist/clusters/export.js +1 -1
- package/dist/clusters/soil-measurement.d.ts +1 -1
- package/dist/deviceManager.d.ts +1 -1
- package/dist/deviceManager.js +3 -4
- package/dist/devices/batteryStorage.js +2 -1
- package/dist/devices/closure.d.ts +6 -6
- package/dist/devices/closurePanel.d.ts +6 -6
- package/dist/devices/cooktop.d.ts +1 -1
- package/dist/devices/cooktop.js +2 -1
- package/dist/devices/dishwasher.d.ts +1 -1
- package/dist/devices/evse.d.ts +3 -3
- package/dist/devices/evse.js +4 -2
- package/dist/devices/extractorHood.js +2 -1
- package/dist/devices/heatPump.js +7 -8
- package/dist/devices/irrigationSystem.d.ts +1 -1
- package/dist/devices/laundryDryer.d.ts +1 -1
- package/dist/devices/laundryWasher.d.ts +1 -1
- package/dist/devices/oven.d.ts +2 -2
- package/dist/devices/oven.js +4 -3
- package/dist/devices/refrigerator.d.ts +2 -2
- package/dist/devices/refrigerator.js +2 -1
- package/dist/devices/solarPower.d.ts +1 -1
- package/dist/devices/solarPower.js +2 -1
- package/dist/devices/temperatureControl.d.ts +3 -3
- package/dist/devices/waterHeater.js +2 -1
- package/dist/export.js +2 -2
- package/dist/frontend.js +39 -39
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.js +6 -14
- package/dist/jestutils/jestBroadcastServerSpy.d.ts +13 -12
- package/dist/jestutils/jestBroadcastServerSpy.js +1 -1
- package/dist/jestutils/jestDeviceManagerSpy.d.ts +14 -13
- package/dist/jestutils/jestDeviceManagerSpy.js +1 -1
- package/dist/jestutils/jestFrontendSpy.d.ts +7 -9
- package/dist/jestutils/jestFrontendSpy.js +1 -1
- package/dist/jestutils/jestMatterTest.js +1 -1
- package/dist/jestutils/jestMatterbridgeEndpointSpy.d.ts +6 -54
- package/dist/jestutils/jestMatterbridgeEndpointSpy.js +1 -1
- package/dist/jestutils/jestMatterbridgePlatformSpy.d.ts +43 -60
- package/dist/jestutils/jestMatterbridgePlatformSpy.js +1 -1
- package/dist/jestutils/jestMatterbridgeSpy.d.ts +5 -4
- package/dist/jestutils/jestMatterbridgeSpy.js +1 -1
- package/dist/jestutils/jestMatterbridgeTest.d.ts +2 -2
- package/dist/jestutils/jestMatterbridgeTest.js +1 -1
- package/dist/jestutils/jestPluginManagerSpy.d.ts +40 -47
- package/dist/jestutils/jestPluginManagerSpy.js +1 -1
- package/dist/jestutils/jestSetupTest.d.ts +0 -1
- package/dist/jestutils/jestSetupTest.js +13 -12
- package/dist/jestutils/matterRequest.d.ts +1 -1
- package/dist/matterNode.js +8 -6
- package/dist/matterbridge.js +11 -21
- package/dist/matterbridgeAccessoryPlatform.d.ts +1 -1
- package/dist/matterbridgeAccessoryPlatform.js +2 -2
- package/dist/matterbridgeDeviceTypes.js +2 -2
- package/dist/matterbridgeDynamicPlatform.d.ts +1 -1
- package/dist/matterbridgeDynamicPlatform.js +2 -2
- package/dist/matterbridgeEndpoint.d.ts +9 -9
- package/dist/matterbridgeEndpoint.js +9 -8
- package/dist/matterbridgeEndpointCommandHandler.d.ts +40 -40
- package/dist/matterbridgeEndpointCommandHandler.js +2 -2
- package/dist/matterbridgeEndpointHelpers.d.ts +23 -23
- package/dist/matterbridgeEndpointHelpers.js +3 -4
- package/dist/matterbridgeEndpointTypes.js +2 -3
- package/dist/matterbridgeFactory.d.ts +1 -1
- package/dist/matterbridgeFactory.js +2 -2
- package/dist/matterbridgePlatform.d.ts +1 -1
- package/dist/matterbridgePlatform.js +2 -2
- package/dist/mb_coap.js +3 -1
- package/dist/mb_health.js +3 -1
- package/dist/mb_mdns.js +10 -7
- package/dist/pluginManager.d.ts +1 -1
- package/dist/pluginManager.js +11 -6
- package/package.json +7 -7
|
@@ -1,60 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
export declare const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
icon?: string;
|
|
45
|
-
}[];
|
|
46
|
-
} | undefined>;
|
|
47
|
-
export declare const setSelectDeviceEntityMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<(serial: string, entityName: string, entityDescription: string, entityIcon?: string) => void>;
|
|
48
|
-
export declare const getSelectDevicesMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<() => import("@matterbridge/types").ApiSelectDevice[]>;
|
|
49
|
-
export declare const setSelectEntityMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<(name: string, description: string, icon?: string) => void>;
|
|
50
|
-
export declare const getSelectEntityMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<(name: string) => {
|
|
51
|
-
name: string;
|
|
52
|
-
description: string;
|
|
53
|
-
icon?: string | undefined;
|
|
54
|
-
} | undefined>;
|
|
55
|
-
export declare const getSelectEntitiesMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<() => import("@matterbridge/types").ApiSelectEntity[]>;
|
|
56
|
-
export declare const verifyMatterbridgeVersionMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<(requiredVersion: string, destroy?: boolean) => boolean>;
|
|
57
|
-
export declare const validateDeviceMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<(device: string | string[], log?: boolean) => boolean>;
|
|
58
|
-
export declare const validateEntityMatterbridgePlatformSpy: import("jest-mock").SpiedFunction<(device: string, entity: string, log?: boolean) => boolean>;
|
|
59
|
-
export declare const clearEndpointNumbersMatterbridgePlatformSpy: import("jest-mock").SpiedGetter<string | boolean | import("node-ansi-logger").AnsiLogger | import("node-persist-manager").NodeStorage | import("../matterbridgePlatform.js").PlatformMatterbridge | Promise<void> | import("../matterbridgePlatform.js").PlatformConfig> | import("jest-mock").SpiedSetter<string | boolean | import("node-ansi-logger").AnsiLogger | import("node-persist-manager").NodeStorage | import("../matterbridgePlatform.js").PlatformMatterbridge | Promise<void> | import("../matterbridgePlatform.js").PlatformConfig>;
|
|
60
|
-
export declare const checkEndpointNumbersMatterbridgePlatformSpy: import("jest-mock").SpiedGetter<string | boolean | import("node-ansi-logger").AnsiLogger | import("node-persist-manager").NodeStorage | import("../matterbridgePlatform.js").PlatformMatterbridge | Promise<void> | import("../matterbridgePlatform.js").PlatformConfig> | import("jest-mock").SpiedSetter<string | boolean | import("node-ansi-logger").AnsiLogger | import("node-persist-manager").NodeStorage | import("../matterbridgePlatform.js").PlatformMatterbridge | Promise<void> | import("../matterbridgePlatform.js").PlatformConfig>;
|
|
1
|
+
import { MatterbridgePlatform } from '../matterbridgePlatform.js';
|
|
2
|
+
export declare const destroyMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.destroy>;
|
|
3
|
+
export declare const onStartMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.onStart>;
|
|
4
|
+
export declare const onConfigureMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.onConfigure>;
|
|
5
|
+
export declare const onShutdownMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.onShutdown>;
|
|
6
|
+
export declare const onChangeLoggerLevelMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.onChangeLoggerLevel>;
|
|
7
|
+
export declare const onActionMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.onAction>;
|
|
8
|
+
export declare const onConfigChangedMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.onConfigChanged>;
|
|
9
|
+
export declare const saveConfigMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.saveConfig>;
|
|
10
|
+
export declare const getSchemaMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getSchema>;
|
|
11
|
+
export declare const setSchemaMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.setSchema>;
|
|
12
|
+
export declare const wssSendRestartRequiredMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.wssSendRestartRequired>;
|
|
13
|
+
export declare const wssSendSnackbarMessageMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.wssSendSnackbarMessage>;
|
|
14
|
+
export declare const sizeMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.size>;
|
|
15
|
+
export declare const getDevicesMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getDevices>;
|
|
16
|
+
export declare const getDeviceByNameMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getDeviceByName>;
|
|
17
|
+
export declare const getDeviceByUniqueIdMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getDeviceByUniqueId>;
|
|
18
|
+
export declare const getDeviceBySerialNumberMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getDeviceBySerialNumber>;
|
|
19
|
+
export declare const getDeviceByIdMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getDeviceById>;
|
|
20
|
+
export declare const getDeviceByOriginalIdMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getDeviceByOriginalId>;
|
|
21
|
+
export declare const getDeviceByNumberMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getDeviceByNumber>;
|
|
22
|
+
export declare const hasDeviceNameMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.hasDeviceName>;
|
|
23
|
+
export declare const hasDeviceUniqueIdMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.hasDeviceUniqueId>;
|
|
24
|
+
export declare const registerVirtualDeviceMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.registerVirtualDevice>;
|
|
25
|
+
export declare const registerDeviceMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.registerDevice>;
|
|
26
|
+
export declare const unregisterDeviceMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.unregisterDevice>;
|
|
27
|
+
export declare const unregisterAllDevicesMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.unregisterAllDevices>;
|
|
28
|
+
export declare const saveSelectsMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.saveSelects>;
|
|
29
|
+
export declare const clearSelectMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.clearSelect>;
|
|
30
|
+
export declare const clearDeviceSelectMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.clearDeviceSelect>;
|
|
31
|
+
export declare const clearEntitySelectMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.clearEntitySelect>;
|
|
32
|
+
export declare const setSelectDeviceMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.setSelectDevice>;
|
|
33
|
+
export declare const getSelectDeviceMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getSelectDevice>;
|
|
34
|
+
export declare const setSelectDeviceEntityMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.setSelectDeviceEntity>;
|
|
35
|
+
export declare const getSelectDevicesMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getSelectDevices>;
|
|
36
|
+
export declare const setSelectEntityMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.setSelectEntity>;
|
|
37
|
+
export declare const getSelectEntityMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getSelectEntity>;
|
|
38
|
+
export declare const getSelectEntitiesMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.getSelectEntities>;
|
|
39
|
+
export declare const verifyMatterbridgeVersionMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.verifyMatterbridgeVersion>;
|
|
40
|
+
export declare const validateDeviceMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.validateDevice>;
|
|
41
|
+
export declare const validateEntityMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.validateEntity>;
|
|
42
|
+
export declare const clearEndpointNumbersMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.clearEndpointNumbers>;
|
|
43
|
+
export declare const checkEndpointNumbersMatterbridgePlatformSpy: jest.SpiedFunction<typeof MatterbridgePlatform.prototype.checkEndpointNumbers>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jest } from '@jest/globals';
|
|
2
1
|
import { MatterbridgePlatform } from '../matterbridgePlatform.js';
|
|
2
|
+
const { jest } = await import('@jest/globals');
|
|
3
3
|
export const destroyMatterbridgePlatformSpy = jest.spyOn(MatterbridgePlatform.prototype, 'destroy');
|
|
4
4
|
export const onStartMatterbridgePlatformSpy = jest.spyOn(MatterbridgePlatform.prototype, 'onStart');
|
|
5
5
|
export const onConfigureMatterbridgePlatformSpy = jest.spyOn(MatterbridgePlatform.prototype, 'onConfigure');
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
1
|
+
import { Matterbridge } from '../matterbridge.js';
|
|
2
|
+
export declare const addBridgedEndpointMatterbridgeSpy: jest.SpiedFunction<typeof Matterbridge.prototype.addBridgedEndpoint>;
|
|
3
|
+
export declare const removeBridgedEndpointMatterbridgeSpy: jest.SpiedFunction<typeof Matterbridge.prototype.removeBridgedEndpoint>;
|
|
4
|
+
export declare const removeAllBridgedEndpointsMatterbridgeSpy: jest.SpiedFunction<typeof Matterbridge.prototype.removeAllBridgedEndpoints>;
|
|
5
|
+
export declare const addVirtualEndpointMatterbridgeSpy: jest.SpiedFunction<typeof Matterbridge.prototype.addVirtualEndpoint>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jest } from '@jest/globals';
|
|
2
1
|
import { Matterbridge } from '../matterbridge.js';
|
|
2
|
+
const { jest } = await import('@jest/globals');
|
|
3
3
|
export const addBridgedEndpointMatterbridgeSpy = jest.spyOn(Matterbridge.prototype, 'addBridgedEndpoint');
|
|
4
4
|
export const removeBridgedEndpointMatterbridgeSpy = jest.spyOn(Matterbridge.prototype, 'removeBridgedEndpoint');
|
|
5
5
|
export const removeAllBridgedEndpointsMatterbridgeSpy = jest.spyOn(Matterbridge.prototype, 'removeAllBridgedEndpoints');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { Endpoint, ServerNode } from '@matter/node';
|
|
2
|
+
import type { AggregatorEndpoint } from '@matter/node/endpoints';
|
|
3
3
|
import type { DeviceManager } from '../deviceManager.js';
|
|
4
4
|
import type { Frontend } from '../frontend.js';
|
|
5
5
|
import { Matterbridge } from '../matterbridge.js';
|
|
@@ -156,7 +156,7 @@ export async function startMatterbridgeEnvironment(port = 5540, createOnly = fal
|
|
|
156
156
|
}
|
|
157
157
|
expect(server.lifecycle.isOnline).toBeFalsy();
|
|
158
158
|
await new Promise((resolve, reject) => {
|
|
159
|
-
server.lifecycle.online.on(
|
|
159
|
+
server.lifecycle.online.on(() => {
|
|
160
160
|
resolve();
|
|
161
161
|
});
|
|
162
162
|
server.start().catch((err) => reject(err));
|
|
@@ -1,47 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export declare const
|
|
12
|
-
export declare const
|
|
13
|
-
export declare const
|
|
14
|
-
export declare const
|
|
15
|
-
export declare const
|
|
16
|
-
export declare const
|
|
17
|
-
export declare const
|
|
18
|
-
export declare const
|
|
19
|
-
export declare const
|
|
20
|
-
export declare const
|
|
21
|
-
export declare const
|
|
22
|
-
export declare const
|
|
23
|
-
export declare const
|
|
24
|
-
export declare const
|
|
25
|
-
export declare const
|
|
26
|
-
export declare const
|
|
27
|
-
export declare const
|
|
28
|
-
export declare const
|
|
29
|
-
export declare const
|
|
30
|
-
export declare const
|
|
31
|
-
export declare const
|
|
32
|
-
export declare const
|
|
33
|
-
export declare const
|
|
34
|
-
export declare const
|
|
35
|
-
export declare const
|
|
36
|
-
export declare const
|
|
37
|
-
export declare const
|
|
38
|
-
export declare const
|
|
39
|
-
export declare const
|
|
40
|
-
export declare const
|
|
41
|
-
export declare const configurePluginSpy: import("jest-mock").SpiedFunction<(plugin: import("../pluginManager.js").Plugin | import("@matterbridge/types").PluginName) => Promise<import("../pluginManager.js").Plugin | undefined>>;
|
|
42
|
-
export declare const shutdownPluginSpy: import("jest-mock").SpiedFunction<(plugin: import("../pluginManager.js").Plugin | import("@matterbridge/types").PluginName, reason?: string, removeAllDevices?: boolean, force?: boolean) => Promise<import("../pluginManager.js").Plugin | undefined>>;
|
|
43
|
-
export declare const loadConfigPluginSpy: import("jest-mock").SpiedFunction<(plugin: import("../pluginManager.js").Plugin) => Promise<import("@matterbridge/types").PlatformConfig>>;
|
|
44
|
-
export declare const saveConfigFromPluginPluginSpy: import("jest-mock").SpiedFunction<(plugin: import("../pluginManager.js").Plugin, restartRequired?: boolean) => Promise<void>>;
|
|
45
|
-
export declare const saveConfigFromJsonPluginSpy: import("jest-mock").SpiedFunction<(plugin: import("../pluginManager.js").Plugin, config: import("@matterbridge/types").PlatformConfig, restartRequired?: boolean) => Promise<void>>;
|
|
46
|
-
export declare const loadSchemaPluginSpy: import("jest-mock").SpiedFunction<(plugin: import("../pluginManager.js").Plugin) => Promise<import("@matterbridge/types").PlatformSchema>>;
|
|
47
|
-
export declare const getDefaultSchemaPluginSpy: import("jest-mock").SpiedFunction<(plugin: import("../pluginManager.js").Plugin) => import("@matterbridge/types").PlatformSchema>;
|
|
1
|
+
import { PluginManager } from '../pluginManager.js';
|
|
2
|
+
export declare const destroyPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.destroy>;
|
|
3
|
+
export declare const checkDependenciesPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.checkDependencies>;
|
|
4
|
+
export declare const lengthPluginSpy: jest.SpiedGetter<typeof PluginManager.prototype.length>;
|
|
5
|
+
export declare const sizePluginSpy: jest.SpiedGetter<typeof PluginManager.prototype.size>;
|
|
6
|
+
export declare const hasPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.has>;
|
|
7
|
+
export declare const getPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.get>;
|
|
8
|
+
export declare const setPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.set>;
|
|
9
|
+
export declare const clearPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.clear>;
|
|
10
|
+
export declare const arrayPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.array>;
|
|
11
|
+
export declare const storagePluginArraySpy: jest.SpiedFunction<typeof PluginManager.prototype.storagePluginArray>;
|
|
12
|
+
export declare const apiPluginArraySpy: jest.SpiedFunction<typeof PluginManager.prototype.apiPluginArray>;
|
|
13
|
+
export declare const iteratorPluginSpy: jest.SpiedFunction<(typeof PluginManager.prototype)[typeof Symbol.iterator]>;
|
|
14
|
+
export declare const forEachPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.forEach>;
|
|
15
|
+
export declare const logLevelPluginSpy: jest.SpiedSetter<typeof PluginManager.prototype.logLevel>;
|
|
16
|
+
export declare const loadFromStoragePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.loadFromStorage>;
|
|
17
|
+
export declare const saveToStoragePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.saveToStorage>;
|
|
18
|
+
export declare const resolvePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.resolve>;
|
|
19
|
+
export declare const installPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.install>;
|
|
20
|
+
export declare const uninstallPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.uninstall>;
|
|
21
|
+
export declare const getAuthorPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.getAuthor>;
|
|
22
|
+
export declare const getDescriptionPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.getDescription>;
|
|
23
|
+
export declare const getHomepagePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.getHomepage>;
|
|
24
|
+
export declare const getHelpPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.getHelp>;
|
|
25
|
+
export declare const getChangelogPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.getChangelog>;
|
|
26
|
+
export declare const getFundingPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.getFunding>;
|
|
27
|
+
export declare const parsePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.parse>;
|
|
28
|
+
export declare const addPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.add>;
|
|
29
|
+
export declare const enablePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.enable>;
|
|
30
|
+
export declare const disablePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.disable>;
|
|
31
|
+
export declare const removePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.remove>;
|
|
32
|
+
export declare const loadPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.load>;
|
|
33
|
+
export declare const startPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.start>;
|
|
34
|
+
export declare const configurePluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.configure>;
|
|
35
|
+
export declare const shutdownPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.shutdown>;
|
|
36
|
+
export declare const loadConfigPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.loadConfig>;
|
|
37
|
+
export declare const saveConfigFromPluginPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.saveConfigFromPlugin>;
|
|
38
|
+
export declare const saveConfigFromJsonPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.saveConfigFromJson>;
|
|
39
|
+
export declare const loadSchemaPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.loadSchema>;
|
|
40
|
+
export declare const getDefaultSchemaPluginSpy: jest.SpiedFunction<typeof PluginManager.prototype.getDefaultSchema>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jest } from '@jest/globals';
|
|
2
1
|
import { PluginManager } from '../pluginManager.js';
|
|
2
|
+
const { jest } = await import('@jest/globals');
|
|
3
3
|
export const destroyPluginSpy = jest.spyOn(PluginManager.prototype, 'destroy');
|
|
4
4
|
export const checkDependenciesPluginSpy = jest.spyOn(PluginManager.prototype, 'checkDependencies');
|
|
5
5
|
export const lengthPluginSpy = jest.spyOn(PluginManager.prototype, 'length', 'get');
|
|
@@ -15,6 +15,7 @@ export let consoleDebugSpy;
|
|
|
15
15
|
export let consoleInfoSpy;
|
|
16
16
|
export let consoleWarnSpy;
|
|
17
17
|
export let consoleErrorSpy;
|
|
18
|
+
const noop = () => undefined;
|
|
18
19
|
export let NAME;
|
|
19
20
|
export let HOMEDIR;
|
|
20
21
|
export let log;
|
|
@@ -43,12 +44,12 @@ export async function setupTest(name, debug = false) {
|
|
|
43
44
|
consoleErrorSpy = jest.spyOn(console, 'error');
|
|
44
45
|
}
|
|
45
46
|
else {
|
|
46
|
-
loggerLogSpy = jest.spyOn(AnsiLogger.prototype, 'log').mockImplementation(
|
|
47
|
-
consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(
|
|
48
|
-
consoleDebugSpy = jest.spyOn(console, 'debug').mockImplementation(
|
|
49
|
-
consoleInfoSpy = jest.spyOn(console, 'info').mockImplementation(
|
|
50
|
-
consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(
|
|
51
|
-
consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(
|
|
47
|
+
loggerLogSpy = jest.spyOn(AnsiLogger.prototype, 'log').mockImplementation(noop);
|
|
48
|
+
consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(noop);
|
|
49
|
+
consoleDebugSpy = jest.spyOn(console, 'debug').mockImplementation(noop);
|
|
50
|
+
consoleInfoSpy = jest.spyOn(console, 'info').mockImplementation(noop);
|
|
51
|
+
consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(noop);
|
|
52
|
+
consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(noop);
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
export async function setDebug(debug) {
|
|
@@ -68,11 +69,11 @@ export async function setDebug(debug) {
|
|
|
68
69
|
consoleErrorSpy = jest.spyOn(console, 'error');
|
|
69
70
|
}
|
|
70
71
|
else {
|
|
71
|
-
loggerLogSpy = jest.spyOn(AnsiLogger.prototype, 'log').mockImplementation(
|
|
72
|
-
consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(
|
|
73
|
-
consoleDebugSpy = jest.spyOn(console, 'debug').mockImplementation(
|
|
74
|
-
consoleInfoSpy = jest.spyOn(console, 'info').mockImplementation(
|
|
75
|
-
consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(
|
|
76
|
-
consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(
|
|
72
|
+
loggerLogSpy = jest.spyOn(AnsiLogger.prototype, 'log').mockImplementation(noop);
|
|
73
|
+
consoleLogSpy = jest.spyOn(console, 'log').mockImplementation(noop);
|
|
74
|
+
consoleDebugSpy = jest.spyOn(console, 'debug').mockImplementation(noop);
|
|
75
|
+
consoleInfoSpy = jest.spyOn(console, 'info').mockImplementation(noop);
|
|
76
|
+
consoleWarnSpy = jest.spyOn(console, 'warn').mockImplementation(noop);
|
|
77
|
+
consoleErrorSpy = jest.spyOn(console, 'error').mockImplementation(noop);
|
|
77
78
|
}
|
|
78
79
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ColorControl } from '@matter/types/clusters/color-control';
|
|
2
|
-
import {
|
|
2
|
+
import type { LevelControl } from '@matter/types/clusters/level-control';
|
|
3
3
|
export declare function getMoveToLevelRequest(level: number, transitionTime: number, executeIfOff: boolean): LevelControl.MoveToLevelRequest;
|
|
4
4
|
export declare function getMoveToColorTemperatureRequest(colorTemperatureMireds: number, transitionTime: number, executeIfOff: boolean): ColorControl.MoveToColorTemperatureRequest;
|
|
5
5
|
export declare function getMoveToHueRequest(hue: number, transitionTime: number, executeIfOff: boolean): ColorControl.MoveToHueRequest;
|
package/dist/matterNode.js
CHANGED
|
@@ -14,6 +14,7 @@ import { dev, MATTER_LOGGER_FILE, MATTER_STORAGE_DIR, MATTERBRIDGE_LOGGER_FILE,
|
|
|
14
14
|
import { getIntParameter, getParameter, hasParameter } from '@matterbridge/utils/cli';
|
|
15
15
|
import { copyDirectory } from '@matterbridge/utils/copy-dir';
|
|
16
16
|
import { getErrorMessage, inspectError } from '@matterbridge/utils/error';
|
|
17
|
+
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
17
18
|
import { isValidNumber, isValidString, parseVersionString } from '@matterbridge/utils/validate';
|
|
18
19
|
import { wait, withTimeout } from '@matterbridge/utils/wait';
|
|
19
20
|
import { AnsiLogger, BLUE, CYAN, db, debugStringify, er, nf, or, zb } from 'node-ansi-logger';
|
|
@@ -22,6 +23,7 @@ import { toBaseDevice } from './deviceManager.js';
|
|
|
22
23
|
import { addVirtualDevice } from './helpers.js';
|
|
23
24
|
import { bridge } from './matterbridgeDeviceTypes.js';
|
|
24
25
|
import { PluginManager } from './pluginManager.js';
|
|
26
|
+
logModuleLoaded('MatterNode');
|
|
25
27
|
export class MatterNode extends EventEmitter {
|
|
26
28
|
matterbridge;
|
|
27
29
|
pluginName;
|
|
@@ -432,7 +434,7 @@ export class MatterNode extends EventEmitter {
|
|
|
432
434
|
this.server.request({ type: 'frontend_refreshrequired', src: 'matter', dst: 'frontend', params: { changed: 'matter', matter: { ...this.getServerNodeData(serverNode) } } });
|
|
433
435
|
this.server.request({ type: 'frontend_snackbarmessage', src: 'matter', dst: 'frontend', params: { message: `${storeId} is offline`, timeout: 5, severity: 'warning' } });
|
|
434
436
|
});
|
|
435
|
-
serverNode.lifecycle.online.on(
|
|
437
|
+
serverNode.lifecycle.online.on(() => {
|
|
436
438
|
this.log.notice(`Server node for ${storeId} is online`);
|
|
437
439
|
if (!serverNode.lifecycle.isCommissioned) {
|
|
438
440
|
this.log.notice(`Server node for ${storeId} is not commissioned. Pair to commission ...`);
|
|
@@ -634,7 +636,7 @@ export class MatterNode extends EventEmitter {
|
|
|
634
636
|
}
|
|
635
637
|
catch (error) {
|
|
636
638
|
inspectError(this.log, `Error creating MatterNode for device ${plg}${pluginName}${er}:${dev}${device.deviceName}${er} (${zb}${device.name}${er})`, error);
|
|
637
|
-
return;
|
|
639
|
+
return undefined;
|
|
638
640
|
}
|
|
639
641
|
}
|
|
640
642
|
else if (this.matterbridge.bridgeMode === 'bridge') {
|
|
@@ -647,7 +649,7 @@ export class MatterNode extends EventEmitter {
|
|
|
647
649
|
}
|
|
648
650
|
catch (error) {
|
|
649
651
|
inspectError(this.log, `Matter error adding matter endpoint ${plg}${pluginName}${er}:${dev}${device.deviceName}${er} (${zb}${device.name}${er})`, error);
|
|
650
|
-
return;
|
|
652
|
+
return undefined;
|
|
651
653
|
}
|
|
652
654
|
}
|
|
653
655
|
else {
|
|
@@ -659,7 +661,7 @@ export class MatterNode extends EventEmitter {
|
|
|
659
661
|
}
|
|
660
662
|
catch (error) {
|
|
661
663
|
inspectError(this.log, `Matter error adding bridged endpoint ${plg}${pluginName}${er}:${dev}${device.deviceName}${er} (${zb}${device.name}${er})`, error);
|
|
662
|
-
return;
|
|
664
|
+
return undefined;
|
|
663
665
|
}
|
|
664
666
|
}
|
|
665
667
|
}
|
|
@@ -676,7 +678,7 @@ export class MatterNode extends EventEmitter {
|
|
|
676
678
|
}
|
|
677
679
|
catch (error) {
|
|
678
680
|
inspectError(this.log, `Matter error adding accessory endpoint ${plg}${pluginName}${er}:${dev}${device.deviceName}${er} (${zb}${device.name}${er})`, error);
|
|
679
|
-
return;
|
|
681
|
+
return undefined;
|
|
680
682
|
}
|
|
681
683
|
}
|
|
682
684
|
if (plugin.type === 'DynamicPlatform') {
|
|
@@ -692,7 +694,7 @@ export class MatterNode extends EventEmitter {
|
|
|
692
694
|
}
|
|
693
695
|
catch (error) {
|
|
694
696
|
inspectError(this.log, `Matter error adding bridged endpoint ${plg}${pluginName}${er}:${dev}${device.deviceName}${er} (${zb}${device.name}${er})`, error);
|
|
695
|
-
return;
|
|
697
|
+
return undefined;
|
|
696
698
|
}
|
|
697
699
|
}
|
|
698
700
|
}
|
package/dist/matterbridge.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
if (process.argv.includes('--loader'))
|
|
2
|
-
console.log('\u001B[32m[' + new Date().toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit', fractionalSecondDigits: 3 }) + '] Matterbridge loaded.\u001B[40;0m');
|
|
3
1
|
import '@matter/nodejs';
|
|
4
2
|
import EventEmitter from 'node:events';
|
|
5
3
|
import fs, { unlinkSync } from 'node:fs';
|
|
@@ -19,8 +17,9 @@ import { dev, MATTER_LOGGER_FILE, MATTER_STORAGE_DIR, MATTERBRIDGE_LOGGER_FILE,
|
|
|
19
17
|
import { getIntParameter, getParameter, hasAnyParameter, hasParameter } from '@matterbridge/utils/cli';
|
|
20
18
|
import { copyDirectory } from '@matterbridge/utils/copy-dir';
|
|
21
19
|
import { createDirectory } from '@matterbridge/utils/create-dir';
|
|
22
|
-
import { inspectError } from '@matterbridge/utils/error';
|
|
20
|
+
import { inspectError, logError } from '@matterbridge/utils/error';
|
|
23
21
|
import { formatBytes, formatPercent, formatUptime } from '@matterbridge/utils/format';
|
|
22
|
+
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
24
23
|
import { excludedInterfaceNamePattern } from '@matterbridge/utils/network';
|
|
25
24
|
import { isValidNumber, isValidObject, isValidString, parseVersionString } from '@matterbridge/utils/validate';
|
|
26
25
|
import { fireAndForget, wait } from '@matterbridge/utils/wait';
|
|
@@ -32,6 +31,7 @@ import { addVirtualDevice, addVirtualDevices } from './helpers.js';
|
|
|
32
31
|
import { bridge } from './matterbridgeDeviceTypes.js';
|
|
33
32
|
import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
34
33
|
import { PluginManager } from './pluginManager.js';
|
|
34
|
+
logModuleLoaded('Matterbridge');
|
|
35
35
|
export class Matterbridge extends EventEmitter {
|
|
36
36
|
debug = hasParameter('debug') || hasParameter('verbose');
|
|
37
37
|
verbose = hasParameter('verbose');
|
|
@@ -372,7 +372,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
372
372
|
this.log.debug('Created node storage backup');
|
|
373
373
|
}
|
|
374
374
|
catch (error) {
|
|
375
|
-
this.log
|
|
375
|
+
logError(this.log, `Error creating node storage manager and context`, error);
|
|
376
376
|
if (hasParameter('norestore')) {
|
|
377
377
|
this.log.fatal(`The matterbridge storage is corrupted. Found -norestore parameter: exiting...`);
|
|
378
378
|
}
|
|
@@ -1022,7 +1022,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1022
1022
|
await this.nodeContext?.set('globalModulesDirectory', this.globalModulesDirectory);
|
|
1023
1023
|
}
|
|
1024
1024
|
catch (error) {
|
|
1025
|
-
this.log
|
|
1025
|
+
logError(this.log, `Error getting global node_modules directory`, error);
|
|
1026
1026
|
}
|
|
1027
1027
|
}
|
|
1028
1028
|
else {
|
|
@@ -1821,7 +1821,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1821
1821
|
this.log.info(`Closed ${matterServerNode.id} server node`);
|
|
1822
1822
|
}
|
|
1823
1823
|
catch (error) {
|
|
1824
|
-
this.log
|
|
1824
|
+
logError(this.log, `Failed to close ${matterServerNode.id} server node`, error);
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
1827
|
async createAggregatorNode(storageContext) {
|
|
@@ -1883,9 +1883,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1883
1883
|
await this.createDeviceServerNode(plugin, device);
|
|
1884
1884
|
}
|
|
1885
1885
|
catch (error) {
|
|
1886
|
-
|
|
1887
|
-
const errorInspect = inspect(error, { depth: 10 });
|
|
1888
|
-
this.log.error(`Error creating server node for device ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) of plugin ${plg}${pluginName}${er}: ${errorMessage}\nstack: ${errorInspect}`);
|
|
1886
|
+
inspectError(this.log, `Error creating server node for device ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) of plugin ${plg}${pluginName}${er}`, error);
|
|
1889
1887
|
return;
|
|
1890
1888
|
}
|
|
1891
1889
|
}
|
|
@@ -1900,9 +1898,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1900
1898
|
await this.serverNode.add(device);
|
|
1901
1899
|
}
|
|
1902
1900
|
catch (error) {
|
|
1903
|
-
|
|
1904
|
-
const errorInspect = inspect(error, { depth: 10 });
|
|
1905
|
-
this.log.error(`Error adding matter endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for plugin ${plg}${pluginName}${er}: ${errorMessage}\nstack: ${errorInspect}`);
|
|
1901
|
+
inspectError(this.log, `Error adding matter endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for plugin ${plg}${pluginName}${er}`, error);
|
|
1906
1902
|
return;
|
|
1907
1903
|
}
|
|
1908
1904
|
}
|
|
@@ -1916,9 +1912,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1916
1912
|
await this.aggregatorNode.add(device);
|
|
1917
1913
|
}
|
|
1918
1914
|
catch (error) {
|
|
1919
|
-
|
|
1920
|
-
const errorInspect = inspect(error, { depth: 10 });
|
|
1921
|
-
this.log.error(`Error adding bridged endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for plugin ${plg}${pluginName}${er}: ${errorMessage}\nstack: ${errorInspect}`);
|
|
1915
|
+
inspectError(this.log, `Error adding bridged endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for plugin ${plg}${pluginName}${er}`, error);
|
|
1922
1916
|
return;
|
|
1923
1917
|
}
|
|
1924
1918
|
}
|
|
@@ -1941,9 +1935,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1941
1935
|
}
|
|
1942
1936
|
}
|
|
1943
1937
|
catch (error) {
|
|
1944
|
-
|
|
1945
|
-
const errorInspect = inspect(error, { depth: 10 });
|
|
1946
|
-
this.log.error(`Error creating endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for AccessoryPlatform plugin ${plg}${pluginName}${er} server node: ${errorMessage}\nstack: ${errorInspect}`);
|
|
1938
|
+
inspectError(this.log, `Error creating endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for AccessoryPlatform plugin ${plg}${pluginName}${er} server node`, error);
|
|
1947
1939
|
return;
|
|
1948
1940
|
}
|
|
1949
1941
|
}
|
|
@@ -1962,9 +1954,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1962
1954
|
await plugin.aggregatorNode.add(device);
|
|
1963
1955
|
}
|
|
1964
1956
|
catch (error) {
|
|
1965
|
-
|
|
1966
|
-
const errorInspect = inspect(error, { depth: 10 });
|
|
1967
|
-
this.log.error(`Error adding bridged endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for DynamicPlatform plugin ${plg}${pluginName}${er} aggregator node: ${errorMessage}\nstack: ${errorInspect}`);
|
|
1957
|
+
inspectError(this.log, `Error adding bridged endpoint ${dev}${device.deviceName}${er} (${zb}${device.id}${er}) for DynamicPlatform plugin ${plg}${pluginName}${er} aggregator node`, error);
|
|
1968
1958
|
return;
|
|
1969
1959
|
}
|
|
1970
1960
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PlatformConfig, PlatformMatterbridge } from '@matterbridge/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { AnsiLogger } from 'node-ansi-logger';
|
|
3
3
|
import { MatterbridgePlatform } from './matterbridgePlatform.js';
|
|
4
4
|
export declare function isMatterbridgeAccessoryPlatform(value: unknown): value is MatterbridgeAccessoryPlatform;
|
|
5
5
|
export declare class MatterbridgeAccessoryPlatform extends MatterbridgePlatform {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
console.log('\u001B[32m[' + new Date().toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit', fractionalSecondDigits: 3 }) + '] MatterbridgeAccessoryPlatform loaded.\u001B[40;0m');
|
|
1
|
+
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
3
2
|
import { MatterbridgePlatform } from './matterbridgePlatform.js';
|
|
3
|
+
logModuleLoaded('MatterbridgeAccessoryPlatform');
|
|
4
4
|
const MATTERBRIDGE_ACCESSORY_PLATFORM_BRAND = Symbol('MatterbridgeAccessoryPlatform.brand');
|
|
5
5
|
export function isMatterbridgeAccessoryPlatform(value) {
|
|
6
6
|
if (!value || typeof value !== 'object')
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
if (process.argv.includes('--loader'))
|
|
2
|
-
console.log('\u001B[32m[' + new Date().toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit', fractionalSecondDigits: 3 }) + '] MatterbridgeDeviceTypes loaded.\u001B[40;0m');
|
|
3
1
|
import { AccountLogin } from '@matter/types/clusters/account-login';
|
|
4
2
|
import { Actions } from '@matter/types/clusters/actions';
|
|
5
3
|
import { ActivatedCarbonFilterMonitoring } from '@matter/types/clusters/activated-carbon-filter-monitoring';
|
|
@@ -109,6 +107,8 @@ import { WebRtcTransportRequestor } from '@matter/types/clusters/web-rtc-transpo
|
|
|
109
107
|
import { WindowCovering } from '@matter/types/clusters/window-covering';
|
|
110
108
|
import { ZoneManagement } from '@matter/types/clusters/zone-management';
|
|
111
109
|
import { DeviceTypeId } from '@matter/types/datatype';
|
|
110
|
+
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
111
|
+
logModuleLoaded('MatterbridgeDeviceTypes');
|
|
112
112
|
export var DeviceClasses;
|
|
113
113
|
(function (DeviceClasses) {
|
|
114
114
|
DeviceClasses["Node"] = "Node";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PlatformConfig, PlatformMatterbridge } from '@matterbridge/types';
|
|
2
|
-
import {
|
|
2
|
+
import type { AnsiLogger } from 'node-ansi-logger';
|
|
3
3
|
import { MatterbridgePlatform } from './matterbridgePlatform.js';
|
|
4
4
|
export declare function isMatterbridgeDynamicPlatform(value: unknown): value is MatterbridgeDynamicPlatform;
|
|
5
5
|
export declare class MatterbridgeDynamicPlatform extends MatterbridgePlatform {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
console.log('\u001B[32m[' + new Date().toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit', fractionalSecondDigits: 3 }) + '] MatterbridgeDynamicPlatform loaded.\u001B[40;0m');
|
|
1
|
+
import { logModuleLoaded } from '@matterbridge/utils/loader';
|
|
3
2
|
import { MatterbridgePlatform } from './matterbridgePlatform.js';
|
|
3
|
+
logModuleLoaded('MatterbridgeDynamicPlatform');
|
|
4
4
|
const MATTERBRIDGE_DYNAMIC_PLATFORM_BRAND = Symbol('MatterbridgeDynamicPlatform.brand');
|
|
5
5
|
export function isMatterbridgeDynamicPlatform(value) {
|
|
6
6
|
if (!value || typeof value !== 'object')
|