@matterbridge/core 3.10.3-dev-20260728-90e10eb → 3.10.3-dev-20260730-41cf6d2
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/matterNode.js +10 -1
- package/dist/matterbridge.js +10 -1
- package/package.json +5 -5
package/dist/matterNode.js
CHANGED
|
@@ -6,8 +6,10 @@ import { Crypto, Environment, LogFormat as MatterLogFormat, Logger, LogLevel as
|
|
|
6
6
|
import { Endpoint, ServerNode } from '@matter/node';
|
|
7
7
|
import { BasicInformationServer } from '@matter/node/behaviors/basic-information';
|
|
8
8
|
import { BridgedDeviceBasicInformationServer } from '@matter/node/behaviors/bridged-device-basic-information';
|
|
9
|
+
import { PowerSourceServer } from '@matter/node/behaviors/power-source';
|
|
9
10
|
import { AggregatorEndpoint } from '@matter/node/endpoints/aggregator';
|
|
10
11
|
import { MdnsService, PaseClient } from '@matter/protocol';
|
|
12
|
+
import { PowerSource } from '@matter/types/clusters/power-source';
|
|
11
13
|
import { DeviceTypeId, VendorId } from '@matter/types';
|
|
12
14
|
import { BroadcastServer } from '@matterbridge/thread/server';
|
|
13
15
|
import { dev, MATTER_LOGGER_FILE, MATTER_STORAGE_DIR, MATTERBRIDGE_LOGGER_FILE, NODE_STORAGE_DIR, plg } from '@matterbridge/types';
|
|
@@ -405,7 +407,7 @@ export class MatterNode extends EventEmitter {
|
|
|
405
407
|
this.log.warn(`Invalid discriminator ${discriminator} for server node ${storeId}. Discriminator must be between 0 and 4095 (0xFFF). Generating a random discriminator...`);
|
|
406
408
|
discriminator = PaseClient.generateRandomDiscriminator(this.environment.get(Crypto));
|
|
407
409
|
}
|
|
408
|
-
const serverNode = await ServerNode.create({
|
|
410
|
+
const serverNode = await ServerNode.create(ServerNode.RootEndpoint.with(PowerSourceServer.with(PowerSource.Feature.Wired)), {
|
|
409
411
|
id: storeId,
|
|
410
412
|
environment: this.environment,
|
|
411
413
|
network: {
|
|
@@ -445,6 +447,13 @@ export class MatterNode extends EventEmitter {
|
|
|
445
447
|
configurationVersion: await this.matterStorageContext.get('configurationVersion'),
|
|
446
448
|
reachable: true,
|
|
447
449
|
},
|
|
450
|
+
powerSource: {
|
|
451
|
+
status: PowerSource.PowerSourceStatus.Active,
|
|
452
|
+
order: 0,
|
|
453
|
+
description: 'AC Power',
|
|
454
|
+
endpointList: [],
|
|
455
|
+
wiredCurrentType: PowerSource.WiredCurrentType.Ac,
|
|
456
|
+
},
|
|
448
457
|
});
|
|
449
458
|
serverNode.lifecycle.commissioned.on(() => {
|
|
450
459
|
this.log.notice(`Server node for ${storeId} was initially commissioned successfully!`);
|
package/dist/matterbridge.js
CHANGED
|
@@ -8,8 +8,10 @@ import { inspect } from 'node:util';
|
|
|
8
8
|
import { Crypto, Environment, LogFormat as MatterLogFormat, Logger, LogLevel as MatterLogLevel, StorageService, UINT16_MAX, UINT32_MAX, } from '@matter/general';
|
|
9
9
|
import { Endpoint, ServerNode } from '@matter/node';
|
|
10
10
|
import { BasicInformationServer } from '@matter/node/behaviors/basic-information';
|
|
11
|
+
import { PowerSourceServer } from '@matter/node/behaviors/power-source';
|
|
11
12
|
import { AggregatorEndpoint } from '@matter/node/endpoints/aggregator';
|
|
12
13
|
import { PaseClient } from '@matter/protocol';
|
|
14
|
+
import { PowerSource } from '@matter/types/clusters/power-source';
|
|
13
15
|
import { DeviceTypeId, VendorId } from '@matter/types/datatype';
|
|
14
16
|
import { ManualPairingCodeCodec } from '@matter/types/schema';
|
|
15
17
|
import { BroadcastServer } from '@matterbridge/thread/server';
|
|
@@ -1873,7 +1875,7 @@ export class Matterbridge extends EventEmitter {
|
|
|
1873
1875
|
this.log.warn(`Invalid discriminator ${discriminator} for server node ${storeId}. Discriminator must be between 0 and 4095 (0xFFF). Generating a random discriminator...`);
|
|
1874
1876
|
discriminator = PaseClient.generateRandomDiscriminator(this.environment.get(Crypto));
|
|
1875
1877
|
}
|
|
1876
|
-
const serverNode = await ServerNode.create({
|
|
1878
|
+
const serverNode = await ServerNode.create(ServerNode.RootEndpoint.with(PowerSourceServer.with(PowerSource.Feature.Wired)), {
|
|
1877
1879
|
id: storeId,
|
|
1878
1880
|
environment: this.environment,
|
|
1879
1881
|
network: {
|
|
@@ -1911,6 +1913,13 @@ export class Matterbridge extends EventEmitter {
|
|
|
1911
1913
|
configurationVersion: await storageContext.get('configurationVersion'),
|
|
1912
1914
|
reachable: true,
|
|
1913
1915
|
},
|
|
1916
|
+
powerSource: {
|
|
1917
|
+
status: PowerSource.PowerSourceStatus.Active,
|
|
1918
|
+
order: 0,
|
|
1919
|
+
description: 'AC Power',
|
|
1920
|
+
endpointList: [],
|
|
1921
|
+
wiredCurrentType: PowerSource.WiredCurrentType.Ac,
|
|
1922
|
+
},
|
|
1914
1923
|
});
|
|
1915
1924
|
serverNode.lifecycle.commissioned.on(() => {
|
|
1916
1925
|
this.log.notice(`Server node for ${storeId} commissioned successfully!`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.10.3-dev-
|
|
3
|
+
"version": "3.10.3-dev-20260730-41cf6d2",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -132,10 +132,10 @@
|
|
|
132
132
|
},
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"@matter/main": "0.17.7",
|
|
135
|
-
"@matterbridge/dgram": "3.10.3-dev-
|
|
136
|
-
"@matterbridge/thread": "3.10.3-dev-
|
|
137
|
-
"@matterbridge/types": "3.10.3-dev-
|
|
138
|
-
"@matterbridge/utils": "3.10.3-dev-
|
|
135
|
+
"@matterbridge/dgram": "3.10.3-dev-20260730-41cf6d2",
|
|
136
|
+
"@matterbridge/thread": "3.10.3-dev-20260730-41cf6d2",
|
|
137
|
+
"@matterbridge/types": "3.10.3-dev-20260730-41cf6d2",
|
|
138
|
+
"@matterbridge/utils": "3.10.3-dev-20260730-41cf6d2",
|
|
139
139
|
"escape-html": "1.0.3",
|
|
140
140
|
"express": "5.2.1",
|
|
141
141
|
"express-rate-limit": "8.6.0",
|