matterbridge 1.3.10 → 1.3.12
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 +33 -0
- package/README.md +4 -4
- package/dist/history/export.d.ts +2 -0
- package/dist/history/export.d.ts.map +1 -0
- package/dist/history/export.js +2 -0
- package/dist/history/export.js.map +1 -0
- package/dist/matterbridge.d.ts +2 -2
- package/dist/matterbridge.d.ts.map +1 -1
- package/dist/matterbridge.js +79 -53
- package/dist/matterbridge.js.map +1 -1
- package/dist/matterbridgeDevice.d.ts +155 -15
- package/dist/matterbridgeDevice.d.ts.map +1 -1
- package/dist/matterbridgeDevice.js +243 -35
- package/dist/matterbridgeDevice.js.map +1 -1
- package/dist/matterbridgePlatform.js +1 -1
- package/dist/matterbridgePlatform.js.map +1 -1
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.js +5 -5
- package/dist/utils/utils.js.map +1 -1
- package/frontend/build/asset-manifest.json +6 -6
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/css/{main.8e9f022b.css → main.b4d28450.css} +2 -2
- package/frontend/build/static/css/main.b4d28450.css.map +1 -0
- package/frontend/build/static/js/{main.cf22e7af.js → main.3105733e.js} +3 -3
- package/frontend/build/static/js/{main.cf22e7af.js.map → main.3105733e.js.map} +1 -1
- package/package.json +14 -8
- package/frontend/build/static/css/main.8e9f022b.css.map +0 -1
- /package/frontend/build/static/js/{main.cf22e7af.js.LICENSE.txt → main.3105733e.js.LICENSE.txt} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,39 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
If you like this project and find it useful, please consider giving it a star on GitHub at https://github.com/Luligu/matterbridge and sponsoring it.
|
|
6
6
|
|
|
7
|
+
## [1.3.12] - 2024-07-10
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- [frontend]: The Logs in Home page has the same filter as the Logs page.
|
|
14
|
+
- [matterbridge]: The plugins debug is now indipendent from matterbridge debug and matter.js log level. It can be set from the plugin config.
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- [frontend]: Fix Home for mobile.
|
|
19
|
+
|
|
20
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
21
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
22
|
+
</a>
|
|
23
|
+
|
|
24
|
+
## [1.3.11] - 2024-07-08
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- [device]: Added addRequiredClusterServers and addOptionalClusterServers methods.
|
|
28
|
+
- [frontend]: Added separated settings for the two logging systems (Matterbridge and Matter.js).
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- [device]: Refactor contructor and loadInstance to accept DeviceTypeDefinition | AtLeastOne<DeviceTypeDefinition>.
|
|
33
|
+
- [frontend]: Update to 1.2.0 (initial optimization for mobile)
|
|
34
|
+
- [dependencies]: Update dependencies.
|
|
35
|
+
|
|
36
|
+
<a href="https://www.buymeacoffee.com/luligugithub">
|
|
37
|
+
<img src="./yellow-button.png" alt="Buy me a coffee" width="120">
|
|
38
|
+
</a>
|
|
39
|
+
|
|
7
40
|
## [1.3.10] - 2024-07-05
|
|
8
41
|
|
|
9
42
|
### Added
|
package/README.md
CHANGED
|
@@ -107,16 +107,16 @@ matterbridge -childbridge -frontend [port number]
|
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Home page:
|
|
110
|
-

|
|
110
|
+

|
|
111
111
|
|
|
112
112
|
Devices page:
|
|
113
|
-

|
|
113
|
+

|
|
114
114
|
|
|
115
115
|
Logs page:
|
|
116
|
-

|
|
116
|
+

|
|
117
117
|
|
|
118
118
|
Config editor:
|
|
119
|
-

|
|
119
|
+

|
|
120
120
|
|
|
121
121
|
## Plugins
|
|
122
122
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/history/export.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"export.js","sourceRoot":"","sources":["../../src/history/export.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
package/dist/matterbridge.d.ts
CHANGED
|
@@ -92,6 +92,7 @@ interface MatterbridgeInformation {
|
|
|
92
92
|
bridgeMode: string;
|
|
93
93
|
restartMode: string;
|
|
94
94
|
debugEnabled: boolean;
|
|
95
|
+
matterLoggerLevel: number;
|
|
95
96
|
}
|
|
96
97
|
interface SanitizedExposedFabricInformation {
|
|
97
98
|
fabricIndex: FabricIndex;
|
|
@@ -145,7 +146,6 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
145
146
|
private nodeStorage;
|
|
146
147
|
private nodeContext;
|
|
147
148
|
private expressApp;
|
|
148
|
-
private expressServer;
|
|
149
149
|
private httpServer;
|
|
150
150
|
private httpsServer;
|
|
151
151
|
private webSocketServer;
|
|
@@ -207,7 +207,7 @@ export declare class Matterbridge extends EventEmitter {
|
|
|
207
207
|
/**
|
|
208
208
|
* Parses the command line arguments and performs the corresponding actions.
|
|
209
209
|
* @private
|
|
210
|
-
* @returns {Promise<void>} A promise that resolves when the command line arguments have been processed.
|
|
210
|
+
* @returns {Promise<void>} A promise that resolves when the command line arguments have been processed, or the process exits.
|
|
211
211
|
*/
|
|
212
212
|
private parseCommandLine;
|
|
213
213
|
private savePluginsToStorage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matterbridge.d.ts","sourceRoot":"","sources":["../src/matterbridge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAsB,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAQvE,OAAO,YAAY,MAAM,QAAQ,CAAC;AAOlC,OAAO,EAAE,kBA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IACH,OAAO,CAAC,0BAA0B;IA0BlC;;;;;OAKG;IACH,OAAO,CAAC,UAAU;IASlB;;;;;OAKG;IACH,OAAO,CAAC,kCAAkC;IAM1C;;;;OAIG;IACH,OAAO,CAAC,yBAAyB;IAWjC;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,eAAe,CAoCrB;IAEF;;;;;;OAMG;YACW,wBAAwB;IAwJtC;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAmB1B;;;;OAIG;YACW,sBAAsB;IA2CpC;;OAEG;YACW,UAAU;IAcxB;;;;OAIG;YACW,gBAAgB;IAY9B;;;OAGG;YACW,oBAAoB;IAYlC;;OAEG;YACW,oBAAoB;IAmKlC;;;;OAIG;YACW,4BAA4B;IAiB1C;;;;;;;;;OASG;YACW,sBAAsB;IAcpC;;;;OAIG;YACW,wBAAwB;IAgCtC;;;;;OAKG;YACW,YAAY;IA0E1B;;;;;;OAMG;IACH,OAAO,CAAC,cAAc;IActB;;;;OAIG;IACG,kBAAkB,CAAC,IAAI,SAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA0gBpD;;;;OAIG;IACH,OAAO,CAAC,wBAAwB;CAkCjC"}
|
package/dist/matterbridge.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* limitations under the License. *
|
|
22
22
|
*/
|
|
23
23
|
import { NodeStorageManager } from 'node-persist-manager';
|
|
24
|
-
import { AnsiLogger, BRIGHT, RESET, UNDERLINE, UNDERLINEOFF, YELLOW, db, debugStringify, stringify, er, nf, rs, wr, RED, GREEN, zb } from 'node-ansi-logger';
|
|
24
|
+
import { AnsiLogger, BRIGHT, RESET, UNDERLINE, UNDERLINEOFF, YELLOW, db, debugStringify, stringify, er, nf, rs, wr, RED, GREEN, zb, hk, or, idn, BLUE } from 'node-ansi-logger';
|
|
25
25
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
26
26
|
import { promises as fs } from 'fs';
|
|
27
27
|
import { exec, spawn } from 'child_process';
|
|
@@ -39,7 +39,7 @@ import { BridgedDeviceBasicInformation, BridgedDeviceBasicInformationCluster } f
|
|
|
39
39
|
import { logInterfaces } from './utils/utils.js';
|
|
40
40
|
// @project-chip/matter-node.js
|
|
41
41
|
import { CommissioningController, CommissioningServer, MatterServer } from '@project-chip/matter-node.js';
|
|
42
|
-
import { BasicInformationCluster, ClusterServer, FixedLabelCluster, GeneralCommissioning, PowerSourceCluster, ThreadNetworkDiagnosticsCluster, getClusterNameById } from '@project-chip/matter-node.js/cluster';
|
|
42
|
+
import { BasicInformationCluster, ClusterServer, FixedLabelCluster, GeneralCommissioning, PowerSourceCluster, SwitchCluster, ThreadNetworkDiagnosticsCluster, getClusterNameById } from '@project-chip/matter-node.js/cluster';
|
|
43
43
|
import { DeviceTypeId, VendorId } from '@project-chip/matter-node.js/datatype';
|
|
44
44
|
import { Aggregator, DeviceTypes, NodeStateInformation } from '@project-chip/matter-node.js/device';
|
|
45
45
|
import { Format, Level, Logger } from '@project-chip/matter-node.js/log';
|
|
@@ -86,6 +86,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
86
86
|
bridgeMode: '',
|
|
87
87
|
restartMode: '',
|
|
88
88
|
debugEnabled: false,
|
|
89
|
+
matterLoggerLevel: Level.INFO,
|
|
89
90
|
};
|
|
90
91
|
homeDirectory = '';
|
|
91
92
|
rootDirectory = '';
|
|
@@ -102,7 +103,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
102
103
|
bridgeMode = '';
|
|
103
104
|
restartMode = '';
|
|
104
105
|
debugEnabled = false;
|
|
105
|
-
mdnsInterface; // matter server mdnsInterface: 'eth0' or 'wlan0' or 'WiFi'
|
|
106
|
+
mdnsInterface; // matter server mdnsInterface: e.g. 'eth0' or 'wlan0' or 'WiFi'
|
|
106
107
|
port = 5540; // first commissioning server port
|
|
107
108
|
passcode; // first commissioning server passcode
|
|
108
109
|
discriminator; // first commissioning server discriminator
|
|
@@ -115,7 +116,6 @@ export class Matterbridge extends EventEmitter {
|
|
|
115
116
|
nodeStorage;
|
|
116
117
|
nodeContext;
|
|
117
118
|
expressApp;
|
|
118
|
-
expressServer;
|
|
119
119
|
httpServer;
|
|
120
120
|
httpsServer;
|
|
121
121
|
webSocketServer;
|
|
@@ -300,11 +300,11 @@ export class Matterbridge extends EventEmitter {
|
|
|
300
300
|
}
|
|
301
301
|
// Set the interface to use for the matter server mdnsInterface
|
|
302
302
|
this.mdnsInterface = getParameter('mdnsinterface');
|
|
303
|
-
// Set the first port to use for the commissioning server
|
|
303
|
+
// Set the first port to use for the commissioning server (will be incremented in childbridge mode)
|
|
304
304
|
this.port = getIntParameter('port') ?? 5540;
|
|
305
|
-
// Set the first passcode to use for the commissioning server
|
|
305
|
+
// Set the first passcode to use for the commissioning server (will be incremented in childbridge mode)
|
|
306
306
|
this.passcode = getIntParameter('passcode');
|
|
307
|
-
// Set the first discriminator to use for the commissioning server
|
|
307
|
+
// Set the first discriminator to use for the commissioning server (will be incremented in childbridge mode)
|
|
308
308
|
this.discriminator = getIntParameter('discriminator');
|
|
309
309
|
// Set the restart mode
|
|
310
310
|
if (hasParameter('service'))
|
|
@@ -395,12 +395,12 @@ export class Matterbridge extends EventEmitter {
|
|
|
395
395
|
}
|
|
396
396
|
Logger.format = Format.ANSI;
|
|
397
397
|
// Parse command line
|
|
398
|
-
this.parseCommandLine();
|
|
398
|
+
await this.parseCommandLine();
|
|
399
399
|
}
|
|
400
400
|
/**
|
|
401
401
|
* Parses the command line arguments and performs the corresponding actions.
|
|
402
402
|
* @private
|
|
403
|
-
* @returns {Promise<void>} A promise that resolves when the command line arguments have been processed.
|
|
403
|
+
* @returns {Promise<void>} A promise that resolves when the command line arguments have been processed, or the process exits.
|
|
404
404
|
*/
|
|
405
405
|
async parseCommandLine() {
|
|
406
406
|
if (hasParameter('list')) {
|
|
@@ -520,7 +520,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
520
520
|
if (hasParameter('test')) {
|
|
521
521
|
this.bridgeMode = 'childbridge';
|
|
522
522
|
MatterbridgeDevice.bridgeMode = 'childbridge';
|
|
523
|
-
await this.testStartMatterBridge();
|
|
523
|
+
await this.testStartMatterBridge();
|
|
524
524
|
return;
|
|
525
525
|
}
|
|
526
526
|
if (hasParameter('controller')) {
|
|
@@ -791,6 +791,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
791
791
|
* When either of these signals are received, the cleanup method is called with an appropriate message.
|
|
792
792
|
*/
|
|
793
793
|
async registerSignalHandlers() {
|
|
794
|
+
this.log.debug(`Registering SIGINT and SIGTERM signal handlers...`);
|
|
794
795
|
process.once('SIGINT', async () => {
|
|
795
796
|
await this.cleanup('SIGINT received, cleaning up...');
|
|
796
797
|
});
|
|
@@ -803,21 +804,18 @@ export class Matterbridge extends EventEmitter {
|
|
|
803
804
|
*/
|
|
804
805
|
async updateProcess() {
|
|
805
806
|
await this.cleanup('updating...', false);
|
|
806
|
-
this.hasCleanupStarted = false;
|
|
807
807
|
}
|
|
808
808
|
/**
|
|
809
809
|
* Restarts the process by spawning a new process and exiting the current process.
|
|
810
810
|
*/
|
|
811
811
|
async restartProcess() {
|
|
812
812
|
await this.cleanup('restarting...', true);
|
|
813
|
-
this.hasCleanupStarted = false;
|
|
814
813
|
}
|
|
815
814
|
/**
|
|
816
815
|
* Shut down the process by exiting the current process.
|
|
817
816
|
*/
|
|
818
817
|
async shutdownProcess() {
|
|
819
818
|
await this.cleanup('shutting down...', false);
|
|
820
|
-
this.hasCleanupStarted = false;
|
|
821
819
|
}
|
|
822
820
|
/**
|
|
823
821
|
* Shut down the process and reset.
|
|
@@ -828,21 +826,18 @@ export class Matterbridge extends EventEmitter {
|
|
|
828
826
|
await this.removeAllBridgedDevices(plugin.name);
|
|
829
827
|
}
|
|
830
828
|
await this.cleanup('unregistered all devices and shutting down...', false);
|
|
831
|
-
this.hasCleanupStarted = false;
|
|
832
829
|
}
|
|
833
830
|
/**
|
|
834
831
|
* Shut down the process and reset.
|
|
835
832
|
*/
|
|
836
833
|
async shutdownProcessAndReset() {
|
|
837
834
|
await this.cleanup('shutting down with reset...', false);
|
|
838
|
-
this.hasCleanupStarted = false;
|
|
839
835
|
}
|
|
840
836
|
/**
|
|
841
837
|
* Shut down the process and factory reset.
|
|
842
838
|
*/
|
|
843
839
|
async shutdownProcessAndFactoryReset() {
|
|
844
840
|
await this.cleanup('shutting down with factory reset...', false);
|
|
845
|
-
this.hasCleanupStarted = false;
|
|
846
841
|
}
|
|
847
842
|
/**
|
|
848
843
|
* Cleans up the Matterbridge instance.
|
|
@@ -854,11 +849,14 @@ export class Matterbridge extends EventEmitter {
|
|
|
854
849
|
if (!this.hasCleanupStarted) {
|
|
855
850
|
this.hasCleanupStarted = true;
|
|
856
851
|
this.log.info(message);
|
|
857
|
-
process
|
|
858
|
-
process.removeAllListeners(
|
|
852
|
+
// Remove all listeners from the process
|
|
853
|
+
process.removeAllListeners();
|
|
859
854
|
this.log.debug('All listeners removed');
|
|
860
|
-
|
|
855
|
+
// Clear the update interval
|
|
856
|
+
if (this.checkUpdateInterval)
|
|
857
|
+
clearInterval(this.checkUpdateInterval);
|
|
861
858
|
this.checkUpdateInterval = undefined;
|
|
859
|
+
this.log.debug('Update interval cleared');
|
|
862
860
|
// Calling the shutdown method of each plugin
|
|
863
861
|
for (const plugin of this.registeredPlugins) {
|
|
864
862
|
if (!plugin.enabled || plugin.error)
|
|
@@ -874,7 +872,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
874
872
|
}
|
|
875
873
|
}
|
|
876
874
|
else {
|
|
877
|
-
this.log.
|
|
875
|
+
this.log.debug(`Plugin ${plg}${plugin.name}${db} platform not found`);
|
|
878
876
|
}
|
|
879
877
|
}
|
|
880
878
|
// Set reachability to false
|
|
@@ -916,12 +914,14 @@ export class Matterbridge extends EventEmitter {
|
|
|
916
914
|
}
|
|
917
915
|
*/
|
|
918
916
|
// Close the express server
|
|
917
|
+
/*
|
|
919
918
|
if (this.expressServer) {
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
919
|
+
this.expressServer.close();
|
|
920
|
+
this.expressServer.removeAllListeners();
|
|
921
|
+
this.expressServer = undefined;
|
|
922
|
+
this.log.debug('Express server closed successfully');
|
|
924
923
|
}
|
|
924
|
+
*/
|
|
925
925
|
// Close the http server
|
|
926
926
|
if (this.httpServer) {
|
|
927
927
|
this.httpServer.close();
|
|
@@ -960,7 +960,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
960
960
|
});
|
|
961
961
|
this.webSocketServer = undefined;
|
|
962
962
|
}
|
|
963
|
-
const
|
|
963
|
+
const cleanupTimeout1 = setTimeout(async () => {
|
|
964
964
|
// Closing matter
|
|
965
965
|
await this.stopMatter();
|
|
966
966
|
// Closing storage
|
|
@@ -991,7 +991,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
991
991
|
this.registeredPlugins = [];
|
|
992
992
|
this.registeredDevices = [];
|
|
993
993
|
this.log.info('Waiting for matter to deliver last messages...');
|
|
994
|
-
const
|
|
994
|
+
const cleanupTimeout2 = setTimeout(async () => {
|
|
995
995
|
if (restart) {
|
|
996
996
|
if (message === 'updating...') {
|
|
997
997
|
this.log.info('Cleanup completed. Updating...');
|
|
@@ -1024,10 +1024,11 @@ export class Matterbridge extends EventEmitter {
|
|
|
1024
1024
|
Matterbridge.instance = undefined;
|
|
1025
1025
|
this.emit('shutdown');
|
|
1026
1026
|
}
|
|
1027
|
+
this.hasCleanupStarted = false;
|
|
1027
1028
|
}, 2 * 1000);
|
|
1028
|
-
|
|
1029
|
+
cleanupTimeout2.unref();
|
|
1029
1030
|
}, 3 * 1000);
|
|
1030
|
-
|
|
1031
|
+
cleanupTimeout1.unref();
|
|
1031
1032
|
}
|
|
1032
1033
|
}
|
|
1033
1034
|
/**
|
|
@@ -1360,6 +1361,10 @@ export class Matterbridge extends EventEmitter {
|
|
|
1360
1361
|
/* The first time a plugin is added to the system, the config file is created with the plugin name and type "".*/
|
|
1361
1362
|
config.name = plugin.name;
|
|
1362
1363
|
config.type = plugin.type;
|
|
1364
|
+
if (config.debug === undefined)
|
|
1365
|
+
config.debug = false;
|
|
1366
|
+
if (config.unregisterOnShutdown === undefined)
|
|
1367
|
+
config.unregisterOnShutdown = false;
|
|
1363
1368
|
return config;
|
|
1364
1369
|
}
|
|
1365
1370
|
catch (err) {
|
|
@@ -1388,11 +1393,11 @@ export class Matterbridge extends EventEmitter {
|
|
|
1388
1393
|
}
|
|
1389
1394
|
else {
|
|
1390
1395
|
this.log.error(`Error accessing config file ${configFile}: ${err}`);
|
|
1391
|
-
return {};
|
|
1396
|
+
return { name: plugin.name, type: plugin.type, debug: false, unregisterOnShutdown: false };
|
|
1392
1397
|
}
|
|
1393
1398
|
}
|
|
1394
1399
|
this.log.error(`Error loading config file ${configFile}: ${err}`);
|
|
1395
|
-
return {};
|
|
1400
|
+
return { name: plugin.name, type: plugin.type, debug: false, unregisterOnShutdown: false };
|
|
1396
1401
|
}
|
|
1397
1402
|
}
|
|
1398
1403
|
/**
|
|
@@ -1558,7 +1563,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1558
1563
|
// Call the default export function of the plugin, passing this MatterBridge instance, the log and the config
|
|
1559
1564
|
if (pluginInstance.default) {
|
|
1560
1565
|
const config = await this.loadPluginConfig(plugin);
|
|
1561
|
-
const log = new AnsiLogger({ logName: plugin.description, logTimestampFormat: 4 /* TimestampFormat.TIME_MILLIS */, logDebug:
|
|
1566
|
+
const log = new AnsiLogger({ logName: plugin.description, logTimestampFormat: 4 /* TimestampFormat.TIME_MILLIS */, logDebug: config.debug ?? false });
|
|
1562
1567
|
const platform = pluginInstance.default(this, log, config);
|
|
1563
1568
|
platform.name = packageJson.name;
|
|
1564
1569
|
platform.config = config;
|
|
@@ -1684,6 +1689,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1684
1689
|
for (const nodeId of nodeIds) {
|
|
1685
1690
|
this.log.info(`***Connecting to commissioned node: ${nodeId}`);
|
|
1686
1691
|
const node = await this.commissioningController.connectNode(nodeId, {
|
|
1692
|
+
autoSubscribe: false,
|
|
1687
1693
|
attributeChangedCallback: (peerNodeId, { path: { nodeId, clusterId, endpointId, attributeName }, value }) => this.log.info(`***Commissioning controller attributeChangedCallback ${peerNodeId}: attribute ${nodeId}/${endpointId}/${clusterId}/${attributeName} changed to ${Logger.toJSON(value)}`),
|
|
1688
1694
|
eventTriggeredCallback: (peerNodeId, { path: { nodeId, clusterId, endpointId, eventName }, events }) => this.log.info(`***Commissioning controller eventTriggeredCallback ${peerNodeId}: Event ${nodeId}/${endpointId}/${clusterId}/${eventName} triggered with ${Logger.toJSON(events)}`),
|
|
1689
1695
|
stateInformationCallback: (peerNodeId, info) => {
|
|
@@ -1712,7 +1718,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1712
1718
|
}
|
|
1713
1719
|
},
|
|
1714
1720
|
});
|
|
1715
|
-
|
|
1721
|
+
node.logStructure();
|
|
1716
1722
|
// Get the interaction client
|
|
1717
1723
|
this.log.info('Getting the interaction client');
|
|
1718
1724
|
const interactionClient = await node.getInteractionClient();
|
|
@@ -1723,28 +1729,50 @@ export class Matterbridge extends EventEmitter {
|
|
|
1723
1729
|
attributes = await interactionClient.getMultipleAttributes({
|
|
1724
1730
|
attributes: [{ clusterId: cluster.id }],
|
|
1725
1731
|
});
|
|
1726
|
-
|
|
1732
|
+
if (attributes.length > 0)
|
|
1733
|
+
this.log.info(`Cluster: ${idn}${cluster.name}${rs}${nf} attributes:`);
|
|
1727
1734
|
attributes.forEach((attribute) => {
|
|
1728
|
-
this.log.info(`- endpoint ${attribute.path.endpointId} cluster ${getClusterNameById(attribute.path.clusterId)} (${attribute.path.clusterId}) attribute ${attribute.path.attributeName} (${attribute.path.attributeId}): ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
|
|
1735
|
+
this.log.info(`- endpoint ${or}${attribute.path.endpointId}${nf} cluster ${hk}${getClusterNameById(attribute.path.clusterId)}${nf} (${hk}0x${attribute.path.clusterId.toString(16)}${nf}) attribute ${zb}${attribute.path.attributeName}${nf} (${zb}0x${attribute.path.attributeId.toString(16)}${nf}): ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
|
|
1729
1736
|
});
|
|
1730
1737
|
// Log PowerSourceCluster
|
|
1731
1738
|
cluster = PowerSourceCluster;
|
|
1732
1739
|
attributes = await interactionClient.getMultipleAttributes({
|
|
1733
1740
|
attributes: [{ clusterId: cluster.id }],
|
|
1734
1741
|
});
|
|
1735
|
-
|
|
1742
|
+
if (attributes.length > 0)
|
|
1743
|
+
this.log.info(`Cluster: ${idn}${cluster.name}${rs}${nf} attributes:`);
|
|
1736
1744
|
attributes.forEach((attribute) => {
|
|
1737
|
-
this.log.info(`- endpoint ${attribute.path.endpointId} cluster ${getClusterNameById(attribute.path.clusterId)} (${attribute.path.clusterId}) attribute ${attribute.path.attributeName} (${attribute.path.attributeId}): ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
|
|
1745
|
+
this.log.info(`- endpoint ${or}${attribute.path.endpointId}${nf} cluster ${hk}${getClusterNameById(attribute.path.clusterId)}${nf} (${hk}0x${attribute.path.clusterId.toString(16)}${nf}) attribute ${zb}${attribute.path.attributeName}${nf} (${zb}0x${attribute.path.attributeId.toString(16)}${nf}): ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
|
|
1738
1746
|
});
|
|
1739
1747
|
// Log ThreadNetworkDiagnostics
|
|
1740
1748
|
cluster = ThreadNetworkDiagnosticsCluster;
|
|
1741
1749
|
attributes = await interactionClient.getMultipleAttributes({
|
|
1742
1750
|
attributes: [{ clusterId: cluster.id }],
|
|
1743
1751
|
});
|
|
1744
|
-
|
|
1752
|
+
if (attributes.length > 0)
|
|
1753
|
+
this.log.info(`Cluster: ${idn}${cluster.name}${rs}${nf} attributes:`);
|
|
1754
|
+
attributes.forEach((attribute) => {
|
|
1755
|
+
this.log.info(`- endpoint ${or}${attribute.path.endpointId}${nf} cluster ${hk}${getClusterNameById(attribute.path.clusterId)}${nf} (${hk}0x${attribute.path.clusterId.toString(16)}${nf}) attribute ${zb}${attribute.path.attributeName}${nf} (${zb}0x${attribute.path.attributeId.toString(16)}${nf}): ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
|
|
1756
|
+
});
|
|
1757
|
+
// Log SwitchCluster
|
|
1758
|
+
cluster = SwitchCluster;
|
|
1759
|
+
attributes = await interactionClient.getMultipleAttributes({
|
|
1760
|
+
attributes: [{ clusterId: cluster.id }],
|
|
1761
|
+
});
|
|
1762
|
+
if (attributes.length > 0)
|
|
1763
|
+
this.log.info(`Cluster: ${idn}${cluster.name}${rs}${nf} attributes:`);
|
|
1745
1764
|
attributes.forEach((attribute) => {
|
|
1746
|
-
this.log.info(`- endpoint ${attribute.path.endpointId} cluster ${getClusterNameById(attribute.path.clusterId)} (${attribute.path.clusterId}) attribute ${attribute.path.attributeName} (${attribute.path.attributeId}): ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
|
|
1765
|
+
this.log.info(`- endpoint ${or}${attribute.path.endpointId}${nf} cluster ${hk}${getClusterNameById(attribute.path.clusterId)}${nf} (${hk}0x${attribute.path.clusterId.toString(16)}${nf}) attribute ${zb}${attribute.path.attributeName}${nf} (${zb}0x${attribute.path.attributeId.toString(16)}${nf}): ${typeof attribute.value === 'object' ? stringify(attribute.value) : attribute.value}`);
|
|
1747
1766
|
});
|
|
1767
|
+
this.log.info('Subscribing to all attributes and events');
|
|
1768
|
+
await node.subscribeAllAttributesAndEvents({
|
|
1769
|
+
ignoreInitialTriggers: false,
|
|
1770
|
+
attributeChangedCallback: ({ path: { nodeId, clusterId, endpointId, attributeName }, version, value }) => this.log.info(`***${db}Commissioning controller attributeChangedCallback version ${version}: attribute ${BLUE}${nodeId}${db}/${or}${endpointId}${db}/${hk}${getClusterNameById(clusterId)}${db}/${zb}${attributeName}${db} changed to ${typeof value === 'object' ? debugStringify(value ?? { none: true }) : value}`),
|
|
1771
|
+
eventTriggeredCallback: ({ path: { nodeId, clusterId, endpointId, eventName }, events }) => {
|
|
1772
|
+
this.log.info(`***${db}Commissioning controller eventTriggeredCallback: event ${BLUE}${nodeId}${db}/${or}${endpointId}${db}/${hk}${getClusterNameById(clusterId)}${db}/${zb}${eventName}${db} triggered with ${debugStringify(events ?? { none: true })}`);
|
|
1773
|
+
},
|
|
1774
|
+
});
|
|
1775
|
+
this.log.info('Subscribed to all attributes and events');
|
|
1748
1776
|
}
|
|
1749
1777
|
}
|
|
1750
1778
|
/**
|
|
@@ -2969,6 +2997,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
2969
2997
|
this.matterbridgeInformation.bridgeMode = this.bridgeMode;
|
|
2970
2998
|
this.matterbridgeInformation.restartMode = this.restartMode;
|
|
2971
2999
|
this.matterbridgeInformation.debugEnabled = this.debugEnabled;
|
|
3000
|
+
this.matterbridgeInformation.matterLoggerLevel = Logger.defaultLogLevel;
|
|
2972
3001
|
this.matterbridgeInformation.matterbridgePaired = this.matterbridgePaired;
|
|
2973
3002
|
this.matterbridgeInformation.matterbridgeConnected = this.matterbridgeConnected;
|
|
2974
3003
|
this.matterbridgeInformation.matterbridgeFabricInformations = this.matterbridgeFabricInformations;
|
|
@@ -3103,42 +3132,39 @@ export class Matterbridge extends EventEmitter {
|
|
|
3103
3132
|
this.log.debug('setpassword', param, password);
|
|
3104
3133
|
await this.nodeContext?.set('password', password);
|
|
3105
3134
|
}
|
|
3106
|
-
// Handle the command
|
|
3107
|
-
if (command === '
|
|
3108
|
-
this.log.debug('
|
|
3135
|
+
// Handle the command setmbloglevel from Settings
|
|
3136
|
+
if (command === 'setmbloglevel') {
|
|
3137
|
+
this.log.debug('Matterbridge log level:', param);
|
|
3109
3138
|
if (param === 'Debug') {
|
|
3110
3139
|
this.log.setLogDebug(true);
|
|
3111
3140
|
this.debugEnabled = true;
|
|
3112
|
-
Logger.defaultLogLevel = Level.DEBUG;
|
|
3113
3141
|
}
|
|
3114
3142
|
else if (param === 'Info') {
|
|
3115
3143
|
this.log.setLogDebug(false);
|
|
3116
3144
|
this.debugEnabled = false;
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
// Handle the command setmbloglevel from Settings
|
|
3148
|
+
if (command === 'setmjloglevel') {
|
|
3149
|
+
this.log.debug('Matter.js log level::', param);
|
|
3150
|
+
if (param === 'Debug') {
|
|
3151
|
+
Logger.defaultLogLevel = Level.DEBUG;
|
|
3152
|
+
}
|
|
3153
|
+
else if (param === 'Info') {
|
|
3117
3154
|
Logger.defaultLogLevel = Level.INFO;
|
|
3118
3155
|
}
|
|
3119
3156
|
else if (param === 'Notice') {
|
|
3120
|
-
this.log.setLogDebug(false);
|
|
3121
|
-
this.debugEnabled = false;
|
|
3122
3157
|
Logger.defaultLogLevel = Level.NOTICE;
|
|
3123
3158
|
}
|
|
3124
3159
|
else if (param === 'Warn') {
|
|
3125
|
-
this.log.setLogDebug(false);
|
|
3126
|
-
this.debugEnabled = false;
|
|
3127
3160
|
Logger.defaultLogLevel = Level.WARN;
|
|
3128
3161
|
}
|
|
3129
3162
|
else if (param === 'Error') {
|
|
3130
|
-
this.log.setLogDebug(false);
|
|
3131
|
-
this.debugEnabled = false;
|
|
3132
3163
|
Logger.defaultLogLevel = Level.ERROR;
|
|
3133
3164
|
}
|
|
3134
3165
|
else if (param === 'Fatal') {
|
|
3135
|
-
this.log.setLogDebug(false);
|
|
3136
|
-
this.debugEnabled = false;
|
|
3137
3166
|
Logger.defaultLogLevel = Level.FATAL;
|
|
3138
3167
|
}
|
|
3139
|
-
this.registeredPlugins.forEach((plugin) => {
|
|
3140
|
-
plugin.platform?.log.setLogDebug(this.debugEnabled);
|
|
3141
|
-
});
|
|
3142
3168
|
}
|
|
3143
3169
|
// Handle the command unregister from Settings
|
|
3144
3170
|
if (command === 'unregister') {
|