@matterbridge/core 3.10.3-dev-20260729-9727eeb → 3.10.3-dev-20260731-c56abb7
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
CHANGED
|
@@ -6,9 +6,11 @@ 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';
|
|
11
12
|
import { DeviceTypeId, VendorId } from '@matter/types';
|
|
13
|
+
import { PowerSource } from '@matter/types/clusters/power-source';
|
|
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';
|
|
14
16
|
import { getIntParameter, getParameter, hasParameter } from '@matterbridge/utils/cli';
|
|
@@ -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!`);
|
|
@@ -842,6 +842,7 @@ export function getDefaultPowerSourceBatteryClusterServer(batPercentRemaining =
|
|
|
842
842
|
batChargeLevel,
|
|
843
843
|
batReplacementNeeded: false,
|
|
844
844
|
batReplaceability,
|
|
845
|
+
activeBatFaults: [],
|
|
845
846
|
});
|
|
846
847
|
}
|
|
847
848
|
export function getDefaultPowerSourceReplaceableBatteryClusterServer(batPercentRemaining = 100, batChargeLevel = PowerSource.BatChargeLevel.Ok, batVoltage = 1500, batReplacementDescription = 'Battery type', batQuantity = 1, batReplaceability = PowerSource.BatReplaceability.UserReplaceable) {
|
|
@@ -855,7 +856,7 @@ export function getDefaultPowerSourceReplaceableBatteryClusterServer(batPercentR
|
|
|
855
856
|
batChargeLevel,
|
|
856
857
|
batReplacementNeeded: false,
|
|
857
858
|
batReplaceability,
|
|
858
|
-
activeBatFaults:
|
|
859
|
+
activeBatFaults: [],
|
|
859
860
|
batReplacementDescription,
|
|
860
861
|
batQuantity,
|
|
861
862
|
});
|
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-20260731-c56abb7",
|
|
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-20260731-c56abb7",
|
|
136
|
+
"@matterbridge/thread": "3.10.3-dev-20260731-c56abb7",
|
|
137
|
+
"@matterbridge/types": "3.10.3-dev-20260731-c56abb7",
|
|
138
|
+
"@matterbridge/utils": "3.10.3-dev-20260731-c56abb7",
|
|
139
139
|
"escape-html": "1.0.3",
|
|
140
140
|
"express": "5.2.1",
|
|
141
141
|
"express-rate-limit": "8.6.0",
|