matterbridge 2.0.0-edge.2 → 2.0.0-edge.4
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 +8 -2
- package/dist/deviceManager.js +1 -1
- package/dist/frontend.js +1 -5
- package/dist/index.js +2 -3
- package/dist/matterbridge.js +19 -13
- package/dist/matterbridgeBehaviors.js +16 -3
- package/dist/matterbridgeDeviceTypes.js +79 -2
- package/dist/matterbridgeEndpoint.js +66 -10
- package/dist/matterbridgeEndpointDefault.js +87 -0
- package/dist/matterbridgePlatform.js +2 -6
- package/dist/pluginManager.js +4 -13
- package/frontend/build/asset-manifest.json +3 -3
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/js/{main.6204ae54.js → main.6df4ebe4.js} +3 -3
- package/frontend/build/static/js/main.6df4ebe4.js.map +1 -0
- package/npm-shrinkwrap.json +6 -3
- package/package.json +1 -2
- package/frontend/build/static/js/main.6204ae54.js.map +0 -1
- /package/frontend/build/static/js/{main.6204ae54.js.LICENSE.txt → main.6df4ebe4.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -21,7 +21,7 @@ The legacy old api have been completely removed.
|
|
|
21
21
|
The frontend has a new dark and light mode. The dark mode is now the default mode.
|
|
22
22
|
It is possible to change the mode (Classic, Dark or Light) in Settings, Matterbridge settings.
|
|
23
23
|
|
|
24
|
-
## [2.0.0-edge.
|
|
24
|
+
## [2.0.0-edge.4] - 2025-01-17
|
|
25
25
|
|
|
26
26
|
### Added
|
|
27
27
|
|
|
@@ -36,9 +36,15 @@ It is possible to change the mode (Classic, Dark or Light) in Settings, Matterbr
|
|
|
36
36
|
- [iconView]: Improved render for energySensor adding voltage, current and power.
|
|
37
37
|
- [iconView]: Improved render for PowerSource adding battery voltage.
|
|
38
38
|
- [jest]: Refactor all tests for edge.
|
|
39
|
-
- [frontend]: WebSocketProvider
|
|
39
|
+
- [frontend]: WebSocketProvider added a startTimeout of 300 sec. to start ping.
|
|
40
|
+
- [frontend]: WebSocketProvider changed pingIntervalSeconds to 60 sec. and offlineTimeoutSeconds to 50 sec.
|
|
41
|
+
- [frontend]: Search on select is no more case sensitive.
|
|
42
|
+
- [package]: Optimized all imports from matter.js.
|
|
40
43
|
- [package]: Update dependencies.
|
|
41
44
|
|
|
45
|
+
### Fixed
|
|
46
|
+
|
|
47
|
+
- [sessions]: Fixed the case when Active session was not reporting correctly.
|
|
42
48
|
|
|
43
49
|
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
44
50
|
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
package/dist/deviceManager.js
CHANGED
package/dist/frontend.js
CHANGED
|
@@ -6,7 +6,7 @@ import WebSocket, { WebSocketServer } from 'ws';
|
|
|
6
6
|
import os from 'os';
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { promises as fs } from 'fs';
|
|
9
|
-
import { AnsiLogger, CYAN, db, debugStringify, er, nf, rs, stringify, UNDERLINE, UNDERLINEOFF, wr, YELLOW } from '
|
|
9
|
+
import { AnsiLogger, CYAN, db, debugStringify, er, nf, rs, stringify, UNDERLINE, UNDERLINEOFF, wr, YELLOW } from './logger/export.js';
|
|
10
10
|
import { createZip, hasParameter, isValidNumber, isValidObject, isValidString } from './utils/utils.js';
|
|
11
11
|
import { plg } from './matterbridgeTypes.js';
|
|
12
12
|
import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
@@ -201,7 +201,6 @@ export class Frontend {
|
|
|
201
201
|
this.matterbridge.matterbridgeInformation.matterDiscriminator = await this.matterbridge.nodeContext?.get('matterdiscriminator');
|
|
202
202
|
this.matterbridge.matterbridgeInformation.matterPasscode = await this.matterbridge.nodeContext?.get('matterpasscode');
|
|
203
203
|
this.matterbridge.matterbridgeInformation.matterbridgePaired = this.matterbridge.matterbridgePaired;
|
|
204
|
-
this.matterbridge.matterbridgeInformation.matterbridgeConnected = this.matterbridge.matterbridgeConnected;
|
|
205
204
|
this.matterbridge.matterbridgeInformation.matterbridgeQrPairingCode = this.matterbridge.matterbridgeQrPairingCode;
|
|
206
205
|
this.matterbridge.matterbridgeInformation.matterbridgeManualPairingCode = this.matterbridge.matterbridgeManualPairingCode;
|
|
207
206
|
this.matterbridge.matterbridgeInformation.matterbridgeFabricInformations = this.matterbridge.matterbridgeFabricInformations;
|
|
@@ -680,7 +679,6 @@ export class Frontend {
|
|
|
680
679
|
plugin.loaded = undefined;
|
|
681
680
|
plugin.started = undefined;
|
|
682
681
|
plugin.configured = undefined;
|
|
683
|
-
plugin.connected = undefined;
|
|
684
682
|
plugin.platform = undefined;
|
|
685
683
|
plugin.registeredDevices = undefined;
|
|
686
684
|
plugin.addedDevices = undefined;
|
|
@@ -880,7 +878,6 @@ export class Frontend {
|
|
|
880
878
|
started: plugin.started,
|
|
881
879
|
configured: plugin.configured,
|
|
882
880
|
paired: plugin.paired,
|
|
883
|
-
connected: plugin.connected,
|
|
884
881
|
fabricInformations: plugin.fabricInformations,
|
|
885
882
|
sessionInformations: plugin.sessionInformations,
|
|
886
883
|
registeredDevices: plugin.registeredDevices,
|
|
@@ -975,7 +972,6 @@ export class Frontend {
|
|
|
975
972
|
this.matterbridge.matterbridgeInformation.matterDiscriminator = await this.matterbridge.nodeContext?.get('matterdiscriminator');
|
|
976
973
|
this.matterbridge.matterbridgeInformation.matterPasscode = await this.matterbridge.nodeContext?.get('matterpasscode');
|
|
977
974
|
this.matterbridge.matterbridgeInformation.matterbridgePaired = this.matterbridge.matterbridgePaired;
|
|
978
|
-
this.matterbridge.matterbridgeInformation.matterbridgeConnected = this.matterbridge.matterbridgeConnected;
|
|
979
975
|
this.matterbridge.matterbridgeInformation.matterbridgeQrPairingCode = this.matterbridge.matterbridgeQrPairingCode;
|
|
980
976
|
this.matterbridge.matterbridgeInformation.matterbridgeManualPairingCode = this.matterbridge.matterbridgeManualPairingCode;
|
|
981
977
|
this.matterbridge.matterbridgeInformation.matterbridgeFabricInformations = this.matterbridge.matterbridgeFabricInformations;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Matterbridge } from './matterbridge.js';
|
|
2
|
+
export { SemanticNamespace, ClosureTag, CompassDirectionTag, CompassLocationTag, DirectionTag, ElectricalMeasurementTag, LaundryTag, LevelTag, LocationTag, NumberTag, PositionTag, PowerSourceTag, RefrigeratorTag, RoomAirConditionerTag, SwitchesTag, } from '@matter/main';
|
|
2
3
|
export * from '@matter/main/clusters';
|
|
3
4
|
export * from '@matter/main/types';
|
|
4
|
-
export {
|
|
5
|
-
export * from '@project-chip/matter.js/device';
|
|
6
|
-
export * from '@project-chip/matter.js/cluster';
|
|
5
|
+
export { ClusterServer, ClusterClient } from '@project-chip/matter.js/cluster';
|
|
7
6
|
export * from './matterbridge.js';
|
|
8
7
|
export * from './matterbridgeTypes.js';
|
|
9
8
|
export * from './matterbridgeEndpoint.js';
|
package/dist/matterbridge.js
CHANGED
|
@@ -5,17 +5,17 @@ import EventEmitter from 'events';
|
|
|
5
5
|
import os from 'os';
|
|
6
6
|
import path from 'path';
|
|
7
7
|
import { randomBytes } from 'crypto';
|
|
8
|
-
import { NodeStorageManager } from '
|
|
9
|
-
import { AnsiLogger, UNDERLINE, UNDERLINEOFF, YELLOW, db, debugStringify, BRIGHT, RESET, er, nf, rs, wr, RED, GREEN, zb, CYAN, nt } from '
|
|
8
|
+
import { NodeStorageManager } from './storage/export.js';
|
|
9
|
+
import { AnsiLogger, UNDERLINE, UNDERLINEOFF, YELLOW, db, debugStringify, BRIGHT, RESET, er, nf, rs, wr, RED, GREEN, zb, CYAN, nt } from './logger/export.js';
|
|
10
10
|
import { logInterfaces, wait, waiter, copyDirectory, getParameter, getIntParameter, hasParameter } from './utils/utils.js';
|
|
11
11
|
import { PluginManager } from './pluginManager.js';
|
|
12
12
|
import { DeviceManager } from './deviceManager.js';
|
|
13
13
|
import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
14
14
|
import { bridge } from './matterbridgeDeviceTypes.js';
|
|
15
|
+
import { Frontend } from './frontend.js';
|
|
15
16
|
import { DeviceTypeId, Endpoint as EndpointNode, Logger, LogLevel as MatterLogLevel, LogFormat as MatterLogFormat, VendorId, StorageService, Environment, ServerNode } from '@matter/main';
|
|
16
17
|
import { FabricAction, PaseClient } from '@matter/main/protocol';
|
|
17
18
|
import { AggregatorEndpoint } from '@matter/main/endpoints';
|
|
18
|
-
import { Frontend } from './frontend.js';
|
|
19
19
|
const plg = '\u001B[38;5;33m';
|
|
20
20
|
const dev = '\u001B[38;5;79m';
|
|
21
21
|
const typ = '\u001B[38;5;207m';
|
|
@@ -49,7 +49,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
49
49
|
matterbridgeFabricInformations: [],
|
|
50
50
|
matterbridgeSessionInformations: [],
|
|
51
51
|
matterbridgePaired: false,
|
|
52
|
-
matterbridgeConnected: false,
|
|
53
52
|
bridgeMode: '',
|
|
54
53
|
restartMode: '',
|
|
55
54
|
readOnly: hasParameter('readonly'),
|
|
@@ -79,7 +78,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
79
78
|
matterbridgeFabricInformations = [];
|
|
80
79
|
matterbridgeSessionInformations = [];
|
|
81
80
|
matterbridgePaired = false;
|
|
82
|
-
matterbridgeConnected = false;
|
|
83
81
|
bridgeMode = '';
|
|
84
82
|
restartMode = '';
|
|
85
83
|
profile = getParameter('profile');
|
|
@@ -557,7 +555,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
557
555
|
plugin.loaded = false;
|
|
558
556
|
plugin.started = false;
|
|
559
557
|
plugin.configured = false;
|
|
560
|
-
plugin.connected = undefined;
|
|
561
558
|
plugin.registeredDevices = undefined;
|
|
562
559
|
plugin.addedDevices = undefined;
|
|
563
560
|
plugin.qrPairingCode = undefined;
|
|
@@ -1358,19 +1355,21 @@ export class Matterbridge extends EventEmitter {
|
|
|
1358
1355
|
hardwareVersionString: await storageContext.get('hardwareVersionString'),
|
|
1359
1356
|
},
|
|
1360
1357
|
});
|
|
1361
|
-
const sanitizeFabrics = (fabrics) => {
|
|
1358
|
+
const sanitizeFabrics = (fabrics, resetSessions = false) => {
|
|
1362
1359
|
const sanitizedFabrics = this.sanitizeFabricInformations(Array.from(Object.values(fabrics)));
|
|
1363
1360
|
this.log.info(`Fabrics: ${debugStringify(sanitizedFabrics)}`);
|
|
1364
1361
|
if (this.bridgeMode === 'bridge') {
|
|
1365
1362
|
this.matterbridgeFabricInformations = sanitizedFabrics;
|
|
1366
|
-
|
|
1363
|
+
if (resetSessions)
|
|
1364
|
+
this.matterbridgeSessionInformations = [];
|
|
1367
1365
|
this.matterbridgePaired = true;
|
|
1368
1366
|
}
|
|
1369
1367
|
if (this.bridgeMode === 'childbridge') {
|
|
1370
1368
|
const plugin = this.plugins.get(storeId);
|
|
1371
1369
|
if (plugin) {
|
|
1372
1370
|
plugin.fabricInformations = sanitizedFabrics;
|
|
1373
|
-
|
|
1371
|
+
if (resetSessions)
|
|
1372
|
+
plugin.sessionInformations = [];
|
|
1374
1373
|
plugin.paired = true;
|
|
1375
1374
|
}
|
|
1376
1375
|
}
|
|
@@ -1388,7 +1387,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
1388
1387
|
this.matterbridgeFabricInformations = [];
|
|
1389
1388
|
this.matterbridgeSessionInformations = [];
|
|
1390
1389
|
this.matterbridgePaired = false;
|
|
1391
|
-
this.matterbridgeConnected = false;
|
|
1392
1390
|
this.log.notice(`QR Code URL: https://project-chip.github.io/connectedhomeip/qrcode.html?data=${qrPairingCode}`);
|
|
1393
1391
|
this.log.notice(`Manual pairing code: ${manualPairingCode}`);
|
|
1394
1392
|
}
|
|
@@ -1400,7 +1398,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
1400
1398
|
plugin.fabricInformations = [];
|
|
1401
1399
|
plugin.sessionInformations = [];
|
|
1402
1400
|
plugin.paired = false;
|
|
1403
|
-
plugin.connected = false;
|
|
1404
1401
|
this.log.notice(`QR Code URL: https://project-chip.github.io/connectedhomeip/qrcode.html?data=${qrPairingCode}`);
|
|
1405
1402
|
this.log.notice(`Manual pairing code: ${manualPairingCode}`);
|
|
1406
1403
|
}
|
|
@@ -1408,7 +1405,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1408
1405
|
}
|
|
1409
1406
|
else {
|
|
1410
1407
|
this.log.notice(`Server node for ${storeId} is already commissioned. Waiting for controllers to connect ...`);
|
|
1411
|
-
sanitizeFabrics(serverNode.state.commissioning.fabrics);
|
|
1408
|
+
sanitizeFabrics(serverNode.state.commissioning.fabrics, true);
|
|
1412
1409
|
}
|
|
1413
1410
|
this.frontend.wssSendRefreshRequired();
|
|
1414
1411
|
});
|
|
@@ -1420,7 +1417,16 @@ export class Matterbridge extends EventEmitter {
|
|
|
1420
1417
|
this.matterbridgeFabricInformations = [];
|
|
1421
1418
|
this.matterbridgeSessionInformations = [];
|
|
1422
1419
|
this.matterbridgePaired = false;
|
|
1423
|
-
|
|
1420
|
+
}
|
|
1421
|
+
if (this.bridgeMode === 'childbridge') {
|
|
1422
|
+
const plugin = this.plugins.get(storeId);
|
|
1423
|
+
if (plugin) {
|
|
1424
|
+
plugin.qrPairingCode = undefined;
|
|
1425
|
+
plugin.manualPairingCode = undefined;
|
|
1426
|
+
plugin.fabricInformations = [];
|
|
1427
|
+
plugin.sessionInformations = [];
|
|
1428
|
+
plugin.paired = false;
|
|
1429
|
+
}
|
|
1424
1430
|
}
|
|
1425
1431
|
this.frontend.wssSendRefreshRequired();
|
|
1426
1432
|
});
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { Behavior } from '@matter/main';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { IdentifyServer } from '@matter/main/behaviors/identify';
|
|
3
|
+
import { OnOffServer } from '@matter/main/behaviors/on-off';
|
|
4
|
+
import { LevelControlServer } from '@matter/main/behaviors/level-control';
|
|
5
|
+
import { ColorControlServer } from '@matter/main/behaviors/color-control';
|
|
6
|
+
import { WindowCoveringServer } from '@matter/main/behaviors/window-covering';
|
|
7
|
+
import { DoorLockServer } from '@matter/main/behaviors/door-lock';
|
|
8
|
+
import { FanControlServer } from '@matter/main/behaviors/fan-control';
|
|
9
|
+
import { ThermostatServer } from '@matter/main/behaviors/thermostat';
|
|
10
|
+
import { ValveConfigurationAndControlServer } from '@matter/main/behaviors/valve-configuration-and-control';
|
|
11
|
+
import { BooleanStateConfigurationServer } from '@matter/main/behaviors/boolean-state-configuration';
|
|
12
|
+
import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
|
|
13
|
+
import { ColorControl } from '@matter/main/clusters/color-control';
|
|
14
|
+
import { FanControl } from '@matter/main/clusters/fan-control';
|
|
15
|
+
import { Thermostat } from '@matter/main/clusters/thermostat';
|
|
16
|
+
import { ValveConfigurationAndControl } from '@matter/main/clusters/valve-configuration-and-control';
|
|
17
|
+
import { WindowCovering } from '@matter/main/clusters/window-covering';
|
|
5
18
|
export class MatterbridgeBehaviorDevice {
|
|
6
19
|
log;
|
|
7
20
|
commandHandler;
|
|
@@ -1,5 +1,82 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { DeviceTypeId } from '@matter/main';
|
|
2
|
+
import { BooleanState } from '@matter/main/clusters/boolean-state';
|
|
3
|
+
import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
|
|
4
|
+
import { BridgedDeviceBasicInformation } from '@matter/main/clusters/bridged-device-basic-information';
|
|
5
|
+
import { CarbonDioxideConcentrationMeasurement } from '@matter/main/clusters/carbon-dioxide-concentration-measurement';
|
|
6
|
+
import { CarbonMonoxideConcentrationMeasurement } from '@matter/main/clusters/carbon-monoxide-concentration-measurement';
|
|
7
|
+
import { ColorControl } from '@matter/main/clusters/color-control';
|
|
8
|
+
import { DeviceEnergyManagement } from '@matter/main/clusters/device-energy-management';
|
|
9
|
+
import { DoorLock } from '@matter/main/clusters/door-lock';
|
|
10
|
+
import { ElectricalEnergyMeasurement } from '@matter/main/clusters/electrical-energy-measurement';
|
|
11
|
+
import { ElectricalPowerMeasurement } from '@matter/main/clusters/electrical-power-measurement';
|
|
12
|
+
import { FanControl } from '@matter/main/clusters/fan-control';
|
|
13
|
+
import { FixedLabel } from '@matter/main/clusters/fixed-label';
|
|
14
|
+
import { FlowMeasurement } from '@matter/main/clusters/flow-measurement';
|
|
15
|
+
import { FormaldehydeConcentrationMeasurement } from '@matter/main/clusters/formaldehyde-concentration-measurement';
|
|
16
|
+
import { Groups } from '@matter/main/clusters/groups';
|
|
17
|
+
import { Identify } from '@matter/main/clusters/identify';
|
|
18
|
+
import { IlluminanceMeasurement } from '@matter/main/clusters/illuminance-measurement';
|
|
19
|
+
import { LevelControl } from '@matter/main/clusters/level-control';
|
|
20
|
+
import { ModeSelect } from '@matter/main/clusters/mode-select';
|
|
21
|
+
import { NitrogenDioxideConcentrationMeasurement } from '@matter/main/clusters/nitrogen-dioxide-concentration-measurement';
|
|
22
|
+
import { OccupancySensing } from '@matter/main/clusters/occupancy-sensing';
|
|
23
|
+
import { OnOff } from '@matter/main/clusters/on-off';
|
|
24
|
+
import { OzoneConcentrationMeasurement } from '@matter/main/clusters/ozone-concentration-measurement';
|
|
25
|
+
import { Pm10ConcentrationMeasurement } from '@matter/main/clusters/pm10-concentration-measurement';
|
|
26
|
+
import { Pm1ConcentrationMeasurement } from '@matter/main/clusters/pm1-concentration-measurement';
|
|
27
|
+
import { Pm25ConcentrationMeasurement } from '@matter/main/clusters/pm25-concentration-measurement';
|
|
28
|
+
import { PowerSource } from '@matter/main/clusters/power-source';
|
|
29
|
+
import { PowerTopology } from '@matter/main/clusters/power-topology';
|
|
30
|
+
import { PressureMeasurement } from '@matter/main/clusters/pressure-measurement';
|
|
31
|
+
import { PumpConfigurationAndControl } from '@matter/main/clusters/pump-configuration-and-control';
|
|
32
|
+
import { RadonConcentrationMeasurement } from '@matter/main/clusters/radon-concentration-measurement';
|
|
33
|
+
import { RelativeHumidityMeasurement } from '@matter/main/clusters/relative-humidity-measurement';
|
|
34
|
+
import { SmokeCoAlarm } from '@matter/main/clusters/smoke-co-alarm';
|
|
35
|
+
import { SwitchCluster } from '@matter/main/clusters/switch';
|
|
36
|
+
import { TemperatureMeasurement } from '@matter/main/clusters/temperature-measurement';
|
|
37
|
+
import { Thermostat } from '@matter/main/clusters/thermostat';
|
|
38
|
+
import { TimeSynchronization } from '@matter/main/clusters/time-synchronization';
|
|
39
|
+
import { TotalVolatileOrganicCompoundsConcentrationMeasurement } from '@matter/main/clusters/total-volatile-organic-compounds-concentration-measurement';
|
|
40
|
+
import { ValveConfigurationAndControl } from '@matter/main/clusters/valve-configuration-and-control';
|
|
41
|
+
import { WindowCovering } from '@matter/main/clusters/window-covering';
|
|
42
|
+
import { AirQuality } from '@matter/main/clusters/air-quality';
|
|
43
|
+
import { Actions } from '@matter/main/clusters/actions';
|
|
44
|
+
import { ThermostatUserInterfaceConfiguration } from '@matter/main/clusters/thermostat-user-interface-configuration';
|
|
45
|
+
import { EnergyPreference } from '@matter/main/clusters/energy-preference';
|
|
46
|
+
import { RvcRunMode } from '@matter/main/clusters/rvc-run-mode';
|
|
47
|
+
import { RvcOperationalState } from '@matter/main/clusters/rvc-operational-state';
|
|
48
|
+
import { RvcCleanMode } from '@matter/main/clusters/rvc-clean-mode';
|
|
49
|
+
import { ScenesManagement } from '@matter/main/clusters/scenes-management';
|
|
50
|
+
import { HepaFilterMonitoring } from '@matter/main/clusters/hepa-filter-monitoring';
|
|
51
|
+
import { ActivatedCarbonFilterMonitoring } from '@matter/main/clusters/activated-carbon-filter-monitoring';
|
|
52
|
+
import { DeviceEnergyManagementMode } from '@matter/main/clusters/device-energy-management-mode';
|
|
53
|
+
export var DeviceClasses;
|
|
54
|
+
(function (DeviceClasses) {
|
|
55
|
+
DeviceClasses["Node"] = "Node";
|
|
56
|
+
DeviceClasses["Utility"] = "Utility";
|
|
57
|
+
DeviceClasses["App"] = "App";
|
|
58
|
+
DeviceClasses["Simple"] = "Simple";
|
|
59
|
+
DeviceClasses["Dynamic"] = "Dynamic";
|
|
60
|
+
DeviceClasses["Client"] = "Client";
|
|
61
|
+
DeviceClasses["Server"] = "Server";
|
|
62
|
+
DeviceClasses["Composed"] = "Composed";
|
|
63
|
+
DeviceClasses["Multiple"] = "Multiple";
|
|
64
|
+
DeviceClasses["EZInitiator"] = "EZ-Initiator";
|
|
65
|
+
DeviceClasses["EZTarget"] = "EZ-Target";
|
|
66
|
+
DeviceClasses["BridgedPowerSourceInfo"] = "BridgedPowerSourceInfo";
|
|
67
|
+
})(DeviceClasses || (DeviceClasses = {}));
|
|
68
|
+
export const DeviceTypeDefinition = ({ name, code, deviceClass, superSet, revision, requiredServerClusters = [], optionalServerClusters = [], requiredClientClusters = [], optionalClientClusters = [], unknown = false, }) => ({
|
|
69
|
+
name,
|
|
70
|
+
code: DeviceTypeId(code),
|
|
71
|
+
deviceClass,
|
|
72
|
+
superSet,
|
|
73
|
+
revision,
|
|
74
|
+
requiredServerClusters,
|
|
75
|
+
optionalServerClusters,
|
|
76
|
+
requiredClientClusters,
|
|
77
|
+
optionalClientClusters,
|
|
78
|
+
unknown,
|
|
79
|
+
});
|
|
3
80
|
export const bridge = DeviceTypeDefinition({
|
|
4
81
|
name: 'MA-aggregator',
|
|
5
82
|
code: 0x000e,
|
|
@@ -1,13 +1,54 @@
|
|
|
1
1
|
import { createHash } from 'crypto';
|
|
2
|
-
import { AnsiLogger, BLUE, CYAN, YELLOW, db, debugStringify, er, hk, or, rs, zb } from '
|
|
2
|
+
import { AnsiLogger, BLUE, CYAN, YELLOW, db, debugStringify, er, hk, or, rs, zb } from './logger/export.js';
|
|
3
3
|
import { MatterbridgeBehavior, MatterbridgeBehaviorDevice, MatterbridgeBooleanStateConfigurationServer, MatterbridgeColorControlServer, MatterbridgeDoorLockServer, MatterbridgeFanControlServer, MatterbridgeIdentifyServer, MatterbridgeLevelControlServer, MatterbridgeOnOffServer, MatterbridgeThermostatServer, MatterbridgeValveConfigurationAndControlServer, MatterbridgeWindowCoveringServer, } from './matterbridgeBehaviors.js';
|
|
4
4
|
import { bridgedNode } from './matterbridgeDeviceTypes.js';
|
|
5
5
|
import { deepCopy, isValidNumber } from './utils/utils.js';
|
|
6
|
-
import { Endpoint, MutableEndpoint, SupportedBehaviors, NamedHandler, Lifecycle } from '@matter/main';
|
|
7
|
-
import { EndpointNumber, VendorId } from '@matter/main';
|
|
8
|
-
import { AirQuality, AirQualityCluster, BasicInformation, BasicInformationCluster, BooleanState, BooleanStateCluster, BooleanStateConfiguration, BooleanStateConfigurationCluster, BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster, CarbonDioxideConcentrationMeasurement, CarbonDioxideConcentrationMeasurementCluster, CarbonMonoxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurementCluster, ColorControl, ColorControlCluster, ConcentrationMeasurement, Descriptor, DoorLock, DoorLockCluster, ElectricalEnergyMeasurement, ElectricalEnergyMeasurementCluster, ElectricalPowerMeasurement, ElectricalPowerMeasurementCluster, FanControl, FanControlCluster, FixedLabel, FixedLabelCluster, FlowMeasurement, FlowMeasurementCluster, FormaldehydeConcentrationMeasurement, FormaldehydeConcentrationMeasurementCluster, Groups, GroupsCluster, Identify, IdentifyCluster, IlluminanceMeasurement, IlluminanceMeasurementCluster, LevelControl, LevelControlCluster, ModeSelect, ModeSelectCluster, NitrogenDioxideConcentrationMeasurement, NitrogenDioxideConcentrationMeasurementCluster, OccupancySensing, OccupancySensingCluster, OnOff, OnOffCluster, OzoneConcentrationMeasurement, OzoneConcentrationMeasurementCluster, Pm10ConcentrationMeasurement, Pm10ConcentrationMeasurementCluster, Pm1ConcentrationMeasurement, Pm1ConcentrationMeasurementCluster, Pm25ConcentrationMeasurement, Pm25ConcentrationMeasurementCluster, PowerSource, PowerSourceCluster, PowerSourceConfigurationCluster, PowerTopology, PowerTopologyCluster, PressureMeasurement, PressureMeasurementCluster, PumpConfigurationAndControl, PumpConfigurationAndControlCluster, RadonConcentrationMeasurement, RadonConcentrationMeasurementCluster, RelativeHumidityMeasurement, RelativeHumidityMeasurementCluster, SmokeCoAlarm, SmokeCoAlarmCluster, Switch, SwitchCluster, TemperatureMeasurement, TemperatureMeasurementCluster, Thermostat, ThermostatCluster, TotalVolatileOrganicCompoundsConcentrationMeasurement, TotalVolatileOrganicCompoundsConcentrationMeasurementCluster, UserLabel, UserLabelCluster, ValveConfigurationAndControl, ValveConfigurationAndControlCluster, WindowCovering, WindowCoveringCluster, } from '@matter/main/clusters';
|
|
6
|
+
import { Endpoint, MutableEndpoint, SupportedBehaviors, NamedHandler, Lifecycle, VendorId } from '@matter/main';
|
|
9
7
|
import { MeasurementType, getClusterNameById } from '@matter/main/types';
|
|
10
8
|
import { Specification } from '@matter/main/model';
|
|
9
|
+
import { BasicInformation, BasicInformationCluster } from '@matter/main/clusters/basic-information';
|
|
10
|
+
import { BooleanState, BooleanStateCluster } from '@matter/main/clusters/boolean-state';
|
|
11
|
+
import { BooleanStateConfiguration, BooleanStateConfigurationCluster } from '@matter/main/clusters/boolean-state-configuration';
|
|
12
|
+
import { BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster } from '@matter/main/clusters/bridged-device-basic-information';
|
|
13
|
+
import { CarbonDioxideConcentrationMeasurement, CarbonDioxideConcentrationMeasurementCluster } from '@matter/main/clusters/carbon-dioxide-concentration-measurement';
|
|
14
|
+
import { CarbonMonoxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurementCluster } from '@matter/main/clusters/carbon-monoxide-concentration-measurement';
|
|
15
|
+
import { ColorControl, ColorControlCluster } from '@matter/main/clusters/color-control';
|
|
16
|
+
import { ConcentrationMeasurement } from '@matter/main/clusters/concentration-measurement';
|
|
17
|
+
import { Descriptor } from '@matter/main/clusters/descriptor';
|
|
18
|
+
import { DoorLock, DoorLockCluster } from '@matter/main/clusters/door-lock';
|
|
19
|
+
import { ElectricalEnergyMeasurement, ElectricalEnergyMeasurementCluster } from '@matter/main/clusters/electrical-energy-measurement';
|
|
20
|
+
import { ElectricalPowerMeasurement, ElectricalPowerMeasurementCluster } from '@matter/main/clusters/electrical-power-measurement';
|
|
21
|
+
import { FanControl, FanControlCluster } from '@matter/main/clusters/fan-control';
|
|
22
|
+
import { FixedLabel, FixedLabelCluster } from '@matter/main/clusters/fixed-label';
|
|
23
|
+
import { FlowMeasurement, FlowMeasurementCluster } from '@matter/main/clusters/flow-measurement';
|
|
24
|
+
import { FormaldehydeConcentrationMeasurement, FormaldehydeConcentrationMeasurementCluster } from '@matter/main/clusters/formaldehyde-concentration-measurement';
|
|
25
|
+
import { Groups, GroupsCluster } from '@matter/main/clusters/groups';
|
|
26
|
+
import { Identify, IdentifyCluster } from '@matter/main/clusters/identify';
|
|
27
|
+
import { IlluminanceMeasurement, IlluminanceMeasurementCluster } from '@matter/main/clusters/illuminance-measurement';
|
|
28
|
+
import { LevelControl, LevelControlCluster } from '@matter/main/clusters/level-control';
|
|
29
|
+
import { ModeSelect, ModeSelectCluster } from '@matter/main/clusters/mode-select';
|
|
30
|
+
import { NitrogenDioxideConcentrationMeasurement, NitrogenDioxideConcentrationMeasurementCluster } from '@matter/main/clusters/nitrogen-dioxide-concentration-measurement';
|
|
31
|
+
import { OccupancySensing, OccupancySensingCluster } from '@matter/main/clusters/occupancy-sensing';
|
|
32
|
+
import { OnOff, OnOffCluster } from '@matter/main/clusters/on-off';
|
|
33
|
+
import { OzoneConcentrationMeasurement, OzoneConcentrationMeasurementCluster } from '@matter/main/clusters/ozone-concentration-measurement';
|
|
34
|
+
import { Pm10ConcentrationMeasurement, Pm10ConcentrationMeasurementCluster } from '@matter/main/clusters/pm10-concentration-measurement';
|
|
35
|
+
import { Pm1ConcentrationMeasurement, Pm1ConcentrationMeasurementCluster } from '@matter/main/clusters/pm1-concentration-measurement';
|
|
36
|
+
import { Pm25ConcentrationMeasurement, Pm25ConcentrationMeasurementCluster } from '@matter/main/clusters/pm25-concentration-measurement';
|
|
37
|
+
import { PowerSource, PowerSourceCluster } from '@matter/main/clusters/power-source';
|
|
38
|
+
import { PowerTopology, PowerTopologyCluster } from '@matter/main/clusters/power-topology';
|
|
39
|
+
import { PressureMeasurement, PressureMeasurementCluster } from '@matter/main/clusters/pressure-measurement';
|
|
40
|
+
import { PumpConfigurationAndControl, PumpConfigurationAndControlCluster } from '@matter/main/clusters/pump-configuration-and-control';
|
|
41
|
+
import { RadonConcentrationMeasurement, RadonConcentrationMeasurementCluster } from '@matter/main/clusters/radon-concentration-measurement';
|
|
42
|
+
import { RelativeHumidityMeasurement, RelativeHumidityMeasurementCluster } from '@matter/main/clusters/relative-humidity-measurement';
|
|
43
|
+
import { SmokeCoAlarm, SmokeCoAlarmCluster } from '@matter/main/clusters/smoke-co-alarm';
|
|
44
|
+
import { Switch, SwitchCluster } from '@matter/main/clusters/switch';
|
|
45
|
+
import { TemperatureMeasurement, TemperatureMeasurementCluster } from '@matter/main/clusters/temperature-measurement';
|
|
46
|
+
import { Thermostat, ThermostatCluster } from '@matter/main/clusters/thermostat';
|
|
47
|
+
import { TotalVolatileOrganicCompoundsConcentrationMeasurement, TotalVolatileOrganicCompoundsConcentrationMeasurementCluster } from '@matter/main/clusters/total-volatile-organic-compounds-concentration-measurement';
|
|
48
|
+
import { UserLabel, UserLabelCluster } from '@matter/main/clusters/user-label';
|
|
49
|
+
import { ValveConfigurationAndControl, ValveConfigurationAndControlCluster } from '@matter/main/clusters/valve-configuration-and-control';
|
|
50
|
+
import { WindowCovering, WindowCoveringCluster } from '@matter/main/clusters/window-covering';
|
|
51
|
+
import { AirQuality, AirQualityCluster } from '@matter/main/clusters/air-quality';
|
|
11
52
|
import { DescriptorServer } from '@matter/node/behaviors/descriptor';
|
|
12
53
|
import { IdentifyBehavior } from '@matter/node/behaviors/identify';
|
|
13
54
|
import { GroupsServer } from '@matter/node/behaviors/groups';
|
|
@@ -19,7 +60,27 @@ import { FlowMeasurementServer } from '@matter/node/behaviors/flow-measurement';
|
|
|
19
60
|
import { IlluminanceMeasurementServer } from '@matter/node/behaviors/illuminance-measurement';
|
|
20
61
|
import { BooleanStateServer } from '@matter/node/behaviors/boolean-state';
|
|
21
62
|
import { OccupancySensingServer } from '@matter/node/behaviors/occupancy-sensing';
|
|
22
|
-
import { AirQualityServer
|
|
63
|
+
import { AirQualityServer } from '@matter/main/behaviors/air-quality';
|
|
64
|
+
import { BasicInformationServer } from '@matter/main/behaviors/basic-information';
|
|
65
|
+
import { CarbonDioxideConcentrationMeasurementServer } from '@matter/main/behaviors/carbon-dioxide-concentration-measurement';
|
|
66
|
+
import { CarbonMonoxideConcentrationMeasurementServer } from '@matter/main/behaviors/carbon-monoxide-concentration-measurement';
|
|
67
|
+
import { ElectricalEnergyMeasurementServer } from '@matter/main/behaviors/electrical-energy-measurement';
|
|
68
|
+
import { ElectricalPowerMeasurementServer } from '@matter/main/behaviors/electrical-power-measurement';
|
|
69
|
+
import { FixedLabelServer } from '@matter/main/behaviors/fixed-label';
|
|
70
|
+
import { FormaldehydeConcentrationMeasurementServer } from '@matter/main/behaviors/formaldehyde-concentration-measurement';
|
|
71
|
+
import { ModeSelectServer } from '@matter/main/behaviors/mode-select';
|
|
72
|
+
import { NitrogenDioxideConcentrationMeasurementServer } from '@matter/main/behaviors/nitrogen-dioxide-concentration-measurement';
|
|
73
|
+
import { OzoneConcentrationMeasurementServer } from '@matter/main/behaviors/ozone-concentration-measurement';
|
|
74
|
+
import { Pm10ConcentrationMeasurementServer } from '@matter/main/behaviors/pm10-concentration-measurement';
|
|
75
|
+
import { Pm1ConcentrationMeasurementServer } from '@matter/main/behaviors/pm1-concentration-measurement';
|
|
76
|
+
import { Pm25ConcentrationMeasurementServer } from '@matter/main/behaviors/pm25-concentration-measurement';
|
|
77
|
+
import { PowerSourceServer } from '@matter/main/behaviors/power-source';
|
|
78
|
+
import { PowerTopologyServer } from '@matter/main/behaviors/power-topology';
|
|
79
|
+
import { RadonConcentrationMeasurementServer } from '@matter/main/behaviors/radon-concentration-measurement';
|
|
80
|
+
import { SmokeCoAlarmServer } from '@matter/main/behaviors/smoke-co-alarm';
|
|
81
|
+
import { SwitchServer } from '@matter/main/behaviors/switch';
|
|
82
|
+
import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/main/behaviors/total-volatile-organic-compounds-concentration-measurement';
|
|
83
|
+
import { UserLabelServer } from '@matter/main/behaviors/user-label';
|
|
23
84
|
import { ClusterServer, GroupsClusterHandler } from '@project-chip/matter.js/cluster';
|
|
24
85
|
export class MatterbridgeEndpoint extends Endpoint {
|
|
25
86
|
static bridgeMode = '';
|
|
@@ -1514,11 +1575,6 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
1514
1575
|
createDefaultPowerSourceWiredClusterServer(wiredCurrentType = PowerSource.WiredCurrentType.Ac) {
|
|
1515
1576
|
this.addClusterServer(this.getDefaultPowerSourceWiredClusterServer(wiredCurrentType));
|
|
1516
1577
|
}
|
|
1517
|
-
createDefaultPowerSourceConfigurationClusterServer(endpointNumber) {
|
|
1518
|
-
this.addClusterServer(ClusterServer(PowerSourceConfigurationCluster, {
|
|
1519
|
-
sources: endpointNumber ? [EndpointNumber(endpointNumber)] : [],
|
|
1520
|
-
}, {}, {}));
|
|
1521
|
-
}
|
|
1522
1578
|
getDefaultAirQualityClusterServer(airQuality = AirQuality.AirQualityEnum.Unknown) {
|
|
1523
1579
|
return ClusterServer(AirQualityCluster.with(AirQuality.Feature.Fair, AirQuality.Feature.Moderate, AirQuality.Feature.VeryPoor, AirQuality.Feature.ExtremelyPoor), {
|
|
1524
1580
|
airQuality,
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Endpoint, MutableEndpoint, SupportedBehaviors } from '@matter/main';
|
|
2
|
+
import { Descriptor } from '@matter/main/clusters/descriptor';
|
|
3
|
+
import { Identify } from '@matter/main/clusters/identify';
|
|
4
|
+
import { OnOff } from '@matter/main/clusters/on-off';
|
|
5
|
+
import { DescriptorServer } from '@matter/node/behaviors/descriptor';
|
|
6
|
+
import { IdentifyServer } from '@matter/node/behaviors/identify';
|
|
7
|
+
import { GroupsServer } from '@matter/node/behaviors/groups';
|
|
8
|
+
import { ScenesManagementServer } from '@matter/node/behaviors/scenes-management';
|
|
9
|
+
import { OnOffServer } from '@matter/main/behaviors/on-off';
|
|
10
|
+
class MatterbridgeEndpoint extends Endpoint {
|
|
11
|
+
constructor(definition, options = {}, debug = false) {
|
|
12
|
+
let deviceTypeList = [];
|
|
13
|
+
let firstDefinition;
|
|
14
|
+
if (Array.isArray(definition)) {
|
|
15
|
+
firstDefinition = definition[0];
|
|
16
|
+
deviceTypeList = Array.from(definition.values()).map((dt) => ({
|
|
17
|
+
deviceType: dt.code,
|
|
18
|
+
revision: dt.revision,
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
firstDefinition = definition;
|
|
23
|
+
deviceTypeList = [{ deviceType: firstDefinition.code, revision: firstDefinition.revision }];
|
|
24
|
+
}
|
|
25
|
+
const deviceTypeDefinitionV8 = {
|
|
26
|
+
name: firstDefinition.name.replace('-', '_'),
|
|
27
|
+
deviceType: firstDefinition.code,
|
|
28
|
+
deviceRevision: firstDefinition.revision,
|
|
29
|
+
deviceClass: firstDefinition.deviceClass.toLowerCase(),
|
|
30
|
+
requirements: {
|
|
31
|
+
server: {
|
|
32
|
+
mandatory: {},
|
|
33
|
+
optional: {},
|
|
34
|
+
},
|
|
35
|
+
client: {
|
|
36
|
+
mandatory: {},
|
|
37
|
+
optional: {},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
behaviors: options.tagList ? SupportedBehaviors(DescriptorServer.with(Descriptor.Feature.TagList)) : {},
|
|
41
|
+
};
|
|
42
|
+
const endpointV8 = MutableEndpoint(deviceTypeDefinitionV8);
|
|
43
|
+
const optionsV8 = {
|
|
44
|
+
id: options.uniqueStorageKey?.replace(/[ .]/g, ''),
|
|
45
|
+
number: options.endpointId,
|
|
46
|
+
descriptor: options.tagList ? { tagList: options.tagList, deviceTypeList } : { deviceTypeList },
|
|
47
|
+
};
|
|
48
|
+
super(endpointV8, optionsV8);
|
|
49
|
+
}
|
|
50
|
+
createDefaultIdentifyClusterServer(identifyTime = 0, identifyType = Identify.IdentifyType.None) {
|
|
51
|
+
this.behaviors.require(IdentifyServer, {
|
|
52
|
+
identifyTime,
|
|
53
|
+
identifyType,
|
|
54
|
+
});
|
|
55
|
+
return this;
|
|
56
|
+
}
|
|
57
|
+
createDefaultGroupsClusterServer() {
|
|
58
|
+
this.behaviors.require(GroupsServer);
|
|
59
|
+
return this;
|
|
60
|
+
}
|
|
61
|
+
createDefaultScenesClusterServer() {
|
|
62
|
+
this.behaviors.require(ScenesManagementServer);
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
createDefaultOnOffClusterServer(onOff = false, globalSceneControl = false, onTime = 0, offWaitTime = 0, startUpOnOff = null) {
|
|
66
|
+
this.behaviors.require(OnOffServer.with(OnOff.Feature.Lighting), {
|
|
67
|
+
onOff,
|
|
68
|
+
globalSceneControl,
|
|
69
|
+
onTime,
|
|
70
|
+
offWaitTime,
|
|
71
|
+
startUpOnOff,
|
|
72
|
+
});
|
|
73
|
+
return this;
|
|
74
|
+
}
|
|
75
|
+
createOnOffClusterServer(onOff = false) {
|
|
76
|
+
this.behaviors.require(OnOffServer, {
|
|
77
|
+
onOff,
|
|
78
|
+
});
|
|
79
|
+
return this;
|
|
80
|
+
}
|
|
81
|
+
createDeadFrontOnOffClusterServer(onOff = false) {
|
|
82
|
+
this.behaviors.require(OnOffServer.with(OnOff.Feature.DeadFrontBehavior), {
|
|
83
|
+
onOff,
|
|
84
|
+
});
|
|
85
|
+
return this;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { MatterbridgeEndpoint } from './matterbridgeEndpoint.js';
|
|
2
1
|
import { isValidArray, isValidObject, isValidString } from './utils/utils.js';
|
|
3
|
-
import { CYAN, db, nf, wr } from '
|
|
4
|
-
import { NodeStorageManager } from '
|
|
2
|
+
import { CYAN, db, nf, wr } from './logger/export.js';
|
|
3
|
+
import { NodeStorageManager } from './storage/export.js';
|
|
5
4
|
import path from 'path';
|
|
6
5
|
export class MatterbridgePlatform {
|
|
7
6
|
matterbridge;
|
|
@@ -175,7 +174,4 @@ export class MatterbridgePlatform {
|
|
|
175
174
|
this.log.debug('Endpoint numbers check completed.');
|
|
176
175
|
return endpointMap.size;
|
|
177
176
|
}
|
|
178
|
-
async _createMutableDevice(definition, options = {}, debug = false) {
|
|
179
|
-
return new MatterbridgeEndpoint(definition, options, debug);
|
|
180
|
-
}
|
|
181
177
|
}
|
package/dist/pluginManager.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnsiLogger, BLUE, db, er, nf, nt, rs, UNDERLINE, UNDERLINEOFF, wr } from '
|
|
1
|
+
import { AnsiLogger, BLUE, db, er, nf, nt, rs, UNDERLINE, UNDERLINEOFF, wr } from './logger/export.js';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { promises as fs } from 'fs';
|
|
4
4
|
import { pathToFileURL } from 'url';
|
|
@@ -555,7 +555,6 @@ export class PluginManager {
|
|
|
555
555
|
plugin.loaded = undefined;
|
|
556
556
|
plugin.started = undefined;
|
|
557
557
|
plugin.configured = undefined;
|
|
558
|
-
plugin.connected = undefined;
|
|
559
558
|
plugin.platform = undefined;
|
|
560
559
|
if (removeAllDevices) {
|
|
561
560
|
this.log.info(`Removing all endpoints for plugin ${plg}${plugin.name}${nf}: ${reason}...`);
|
|
@@ -651,7 +650,7 @@ export class PluginManager {
|
|
|
651
650
|
}
|
|
652
651
|
}
|
|
653
652
|
async loadSchema(plugin) {
|
|
654
|
-
|
|
653
|
+
const schemaFile = plugin.path.replace('package.json', `${plugin.name}.schema.json`);
|
|
655
654
|
try {
|
|
656
655
|
await fs.access(schemaFile);
|
|
657
656
|
const data = await fs.readFile(schemaFile, 'utf8');
|
|
@@ -659,18 +658,10 @@ export class PluginManager {
|
|
|
659
658
|
schema.title = plugin.description;
|
|
660
659
|
schema.description = plugin.name + ' v. ' + plugin.version + ' by ' + plugin.author;
|
|
661
660
|
this.log.debug(`Loaded schema file ${schemaFile} for plugin ${plg}${plugin.name}${db}.`);
|
|
662
|
-
schemaFile = path.join(this.matterbridge.matterbridgeDirectory, `${plugin.name}.schema.json`);
|
|
663
|
-
try {
|
|
664
|
-
await fs.unlink(schemaFile);
|
|
665
|
-
this.log.debug(`Schema file ${schemaFile} deleted.`);
|
|
666
|
-
}
|
|
667
|
-
catch (err) {
|
|
668
|
-
this.log.debug(`Schema file ${schemaFile} to delete not found.`);
|
|
669
|
-
}
|
|
670
661
|
return schema;
|
|
671
662
|
}
|
|
672
|
-
catch (
|
|
673
|
-
this.log.debug(`Schema file ${schemaFile} for plugin ${plg}${plugin.name}${db} not found. Loading default schema
|
|
663
|
+
catch (error) {
|
|
664
|
+
this.log.debug(`Schema file ${schemaFile} for plugin ${plg}${plugin.name}${db} not found. Loading default schema. Error: ${error instanceof Error ? error.message : error}`);
|
|
674
665
|
return this.getDefaultSchema(plugin);
|
|
675
666
|
}
|
|
676
667
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"files": {
|
|
3
3
|
"main.css": "./static/css/main.cf25d33e.css",
|
|
4
|
-
"main.js": "./static/js/main.
|
|
4
|
+
"main.js": "./static/js/main.6df4ebe4.js",
|
|
5
5
|
"static/js/453.abd36b29.chunk.js": "./static/js/453.abd36b29.chunk.js",
|
|
6
6
|
"static/media/roboto-latin-700-normal.woff2": "./static/media/roboto-latin-700-normal.4535474e1cf8598695ad.woff2",
|
|
7
7
|
"static/media/roboto-latin-500-normal.woff2": "./static/media/roboto-latin-500-normal.7077203b1982951ecf76.woff2",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"static/media/roboto-greek-ext-400-normal.woff": "./static/media/roboto-greek-ext-400-normal.16eb83b4a3b1ea994243.woff",
|
|
62
62
|
"index.html": "./index.html",
|
|
63
63
|
"main.cf25d33e.css.map": "./static/css/main.cf25d33e.css.map",
|
|
64
|
-
"main.
|
|
64
|
+
"main.6df4ebe4.js.map": "./static/js/main.6df4ebe4.js.map",
|
|
65
65
|
"453.abd36b29.chunk.js.map": "./static/js/453.abd36b29.chunk.js.map"
|
|
66
66
|
},
|
|
67
67
|
"entrypoints": [
|
|
68
68
|
"static/css/main.cf25d33e.css",
|
|
69
|
-
"static/js/main.
|
|
69
|
+
"static/js/main.6df4ebe4.js"
|
|
70
70
|
]
|
|
71
71
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><base href="./"><link rel="icon" href="./matterbridge 32x32.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><title>Matterbridge</title><link rel="manifest" href="./manifest.json"/><script defer="defer" src="./static/js/main.6df4ebe4.js"></script><link href="./static/css/main.cf25d33e.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
|