@matterbridge/core 3.8.0-dev-20260524-92c5fdd → 3.8.0-dev-20260524-eed6b4a
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/dist/frontend.js +9 -9
- package/dist/matterbridge.d.ts +3 -0
- package/dist/matterbridge.js +7 -3
- package/package.json +7 -7
package/dist/frontend.js
CHANGED
|
@@ -896,9 +896,9 @@ export class Frontend extends EventEmitter {
|
|
|
896
896
|
matterMdnsInterface: this.matterbridge.mdnsInterface,
|
|
897
897
|
matterIpv4Address: this.matterbridge.ipv4Address,
|
|
898
898
|
matterIpv6Address: this.matterbridge.ipv6Address,
|
|
899
|
-
matterPort: this.matterbridge.
|
|
900
|
-
matterDiscriminator: this.matterbridge.
|
|
901
|
-
matterPasscode: this.matterbridge.
|
|
899
|
+
matterPort: this.matterbridge.initialPort || 5540,
|
|
900
|
+
matterDiscriminator: this.matterbridge.initialDiscriminator,
|
|
901
|
+
matterPasscode: this.matterbridge.initialPasscode,
|
|
902
902
|
readOnly: this.readOnly,
|
|
903
903
|
shellyBoard: this.shellyBoard,
|
|
904
904
|
shellySysUpdate: this.shellySysUpdate,
|
|
@@ -1826,7 +1826,7 @@ export class Frontend extends EventEmitter {
|
|
|
1826
1826
|
const port = isValidString(data.params.value) ? parseInt(data.params.value) : 0;
|
|
1827
1827
|
if (isValidNumber(port, 5540, 5600)) {
|
|
1828
1828
|
this.log.debug(`Set matter commissioning port to ${CYAN}${port}${db}`);
|
|
1829
|
-
this.matterbridge.port = port;
|
|
1829
|
+
this.matterbridge.port = this.matterbridge.initialPort = port;
|
|
1830
1830
|
await this.matterbridge.nodeContext?.set('matterport', port);
|
|
1831
1831
|
this.wssSendRestartRequired();
|
|
1832
1832
|
sendResponse({ id: data.id, method: data.method, src: 'Matterbridge', dst: data.src, success: true });
|
|
@@ -1834,7 +1834,7 @@ export class Frontend extends EventEmitter {
|
|
|
1834
1834
|
}
|
|
1835
1835
|
else {
|
|
1836
1836
|
this.log.debug(`Reset matter commissioning port to ${CYAN}5540${db}`);
|
|
1837
|
-
this.matterbridge.port = 5540;
|
|
1837
|
+
this.matterbridge.port = this.matterbridge.initialPort = 5540;
|
|
1838
1838
|
await this.matterbridge.nodeContext?.set('matterport', 5540);
|
|
1839
1839
|
this.wssSendRestartRequired();
|
|
1840
1840
|
sendResponse({ id: data.id, method: data.method, src: 'Matterbridge', dst: data.src, error: 'Invalid value: reset matter commissioning port to default 5540' });
|
|
@@ -1845,7 +1845,7 @@ export class Frontend extends EventEmitter {
|
|
|
1845
1845
|
const discriminator = isValidString(data.params.value) ? parseInt(data.params.value) : 0;
|
|
1846
1846
|
if (isValidNumber(discriminator, 0, 4095)) {
|
|
1847
1847
|
this.log.debug(`Set matter commissioning discriminator to ${CYAN}${discriminator}${db}`);
|
|
1848
|
-
this.matterbridge.discriminator = discriminator;
|
|
1848
|
+
this.matterbridge.discriminator = this.matterbridge.initialDiscriminator = discriminator;
|
|
1849
1849
|
await this.matterbridge.nodeContext?.set('matterdiscriminator', discriminator);
|
|
1850
1850
|
this.wssSendRestartRequired();
|
|
1851
1851
|
sendResponse({ id: data.id, method: data.method, src: 'Matterbridge', dst: data.src, success: true });
|
|
@@ -1853,7 +1853,7 @@ export class Frontend extends EventEmitter {
|
|
|
1853
1853
|
}
|
|
1854
1854
|
else {
|
|
1855
1855
|
this.log.debug(`Reset matter commissioning discriminator to ${CYAN}undefined${db}`);
|
|
1856
|
-
this.matterbridge.discriminator = undefined;
|
|
1856
|
+
this.matterbridge.discriminator = this.matterbridge.initialDiscriminator = undefined;
|
|
1857
1857
|
await this.matterbridge.nodeContext?.remove('matterdiscriminator');
|
|
1858
1858
|
this.wssSendRestartRequired();
|
|
1859
1859
|
sendResponse({
|
|
@@ -1869,7 +1869,7 @@ export class Frontend extends EventEmitter {
|
|
|
1869
1869
|
case 'setmatterpasscode':
|
|
1870
1870
|
const passcode = isValidString(data.params.value) ? parseInt(data.params.value) : 0;
|
|
1871
1871
|
if (isValidNumber(passcode, 1, 99999998) && CommissioningOptions.FORBIDDEN_PASSCODES.includes(passcode) === false) {
|
|
1872
|
-
this.matterbridge.passcode = passcode;
|
|
1872
|
+
this.matterbridge.passcode = this.matterbridge.initialPasscode = passcode;
|
|
1873
1873
|
this.log.debug(`Set matter commissioning passcode to ${CYAN}${passcode}${db}`);
|
|
1874
1874
|
await this.matterbridge.nodeContext?.set('matterpasscode', passcode);
|
|
1875
1875
|
this.wssSendRestartRequired();
|
|
@@ -1878,7 +1878,7 @@ export class Frontend extends EventEmitter {
|
|
|
1878
1878
|
}
|
|
1879
1879
|
else {
|
|
1880
1880
|
this.log.debug(`Reset matter commissioning passcode to ${CYAN}undefined${db}`);
|
|
1881
|
-
this.matterbridge.passcode = undefined;
|
|
1881
|
+
this.matterbridge.passcode = this.matterbridge.initialPasscode = undefined;
|
|
1882
1882
|
await this.matterbridge.nodeContext?.remove('matterpasscode');
|
|
1883
1883
|
this.wssSendRestartRequired();
|
|
1884
1884
|
sendResponse({
|
package/dist/matterbridge.d.ts
CHANGED
|
@@ -90,8 +90,11 @@ export declare class Matterbridge extends EventEmitter<MatterbridgeEvents> {
|
|
|
90
90
|
ipv4Address: string | undefined;
|
|
91
91
|
ipv6Address: string | undefined;
|
|
92
92
|
port: number | undefined;
|
|
93
|
+
initialPort: number | undefined;
|
|
93
94
|
passcode: number | undefined;
|
|
95
|
+
initialPasscode: number | undefined;
|
|
94
96
|
discriminator: number | undefined;
|
|
97
|
+
initialDiscriminator: number | undefined;
|
|
95
98
|
certification: DeviceCertification.Configuration | undefined;
|
|
96
99
|
serverNode: ServerNode<ServerNode.RootEndpoint> | undefined;
|
|
97
100
|
aggregatorNode: Endpoint<AggregatorEndpoint> | undefined;
|
package/dist/matterbridge.js
CHANGED
|
@@ -122,8 +122,11 @@ export class Matterbridge extends EventEmitter {
|
|
|
122
122
|
ipv4Address;
|
|
123
123
|
ipv6Address;
|
|
124
124
|
port;
|
|
125
|
+
initialPort;
|
|
125
126
|
passcode;
|
|
127
|
+
initialPasscode;
|
|
126
128
|
discriminator;
|
|
129
|
+
initialDiscriminator;
|
|
127
130
|
certification;
|
|
128
131
|
serverNode;
|
|
129
132
|
aggregatorNode;
|
|
@@ -382,9 +385,10 @@ export class Matterbridge extends EventEmitter {
|
|
|
382
385
|
if (!this.nodeStorage || !this.nodeContext) {
|
|
383
386
|
throw new Error('Fatal error creating node storage manager and context for matterbridge');
|
|
384
387
|
}
|
|
385
|
-
this.port = getIntParameter('port') ?? (await this.nodeContext.get('matterport', 5540)) ?? 5540;
|
|
386
|
-
this.
|
|
387
|
-
|
|
388
|
+
this.initialPort = this.port = getIntParameter('port') ?? (await this.nodeContext.get('matterport', 5540)) ?? 5540;
|
|
389
|
+
this.initialPasscode = this.passcode =
|
|
390
|
+
getIntParameter('passcode') ?? (await this.nodeContext.get('matterpasscode')) ?? PaseClient.generateRandomPasscode(this.environment.get(Crypto));
|
|
391
|
+
this.initialDiscriminator = this.discriminator =
|
|
388
392
|
getIntParameter('discriminator') ?? (await this.nodeContext.get('matterdiscriminator')) ?? PaseClient.generateRandomDiscriminator(this.environment.get(Crypto));
|
|
389
393
|
const pairingFilePath = path.join(this.matterbridgeCertDirectory, 'pairing.json');
|
|
390
394
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.8.0-dev-20260524-
|
|
3
|
+
"version": "3.8.0-dev-20260524-eed6b4a",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -130,16 +130,16 @@
|
|
|
130
130
|
],
|
|
131
131
|
"dependencies": {
|
|
132
132
|
"@matter/main": "0.17.0",
|
|
133
|
-
"@matterbridge/dgram": "3.8.0-dev-20260524-
|
|
134
|
-
"@matterbridge/thread": "3.8.0-dev-20260524-
|
|
135
|
-
"@matterbridge/types": "3.8.0-dev-20260524-
|
|
136
|
-
"@matterbridge/utils": "3.8.0-dev-20260524-
|
|
133
|
+
"@matterbridge/dgram": "3.8.0-dev-20260524-eed6b4a",
|
|
134
|
+
"@matterbridge/thread": "3.8.0-dev-20260524-eed6b4a",
|
|
135
|
+
"@matterbridge/types": "3.8.0-dev-20260524-eed6b4a",
|
|
136
|
+
"@matterbridge/utils": "3.8.0-dev-20260524-eed6b4a",
|
|
137
137
|
"escape-html": "1.0.3",
|
|
138
138
|
"express": "5.2.1",
|
|
139
139
|
"express-rate-limit": "8.5.2",
|
|
140
140
|
"multer": "2.1.1",
|
|
141
|
-
"node-ansi-logger": "3.3.0-dev-
|
|
142
|
-
"node-persist-manager": "2.1.0-dev-
|
|
141
|
+
"node-ansi-logger": "3.3.0-dev-20260524-cac9dd5",
|
|
142
|
+
"node-persist-manager": "2.1.0-dev-20260524-6a6019a",
|
|
143
143
|
"ws": "8.20.1"
|
|
144
144
|
}
|
|
145
145
|
}
|