@matterbridge/core 3.9.5-dev-20260713-c2a2b1e → 3.9.5-dev-20260715-33298cd
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.
|
@@ -108,7 +108,6 @@ export declare class MatterbridgeEndpoint extends Endpoint {
|
|
|
108
108
|
triggerEvent<T extends Behavior.Type, E extends BehaviorEventName<T>>(cluster: T, event: E, payload: BehaviorEventPayload<T, E>, log?: AnsiLogger): Promise<boolean>;
|
|
109
109
|
triggerEvent<T extends ClusterType, E extends ClusterEventName<T>>(cluster: T, event: E, payload: ClusterEventPayload<T, E>, log?: AnsiLogger): Promise<boolean>;
|
|
110
110
|
triggerEvent(cluster: ClusterId | string, event: string, payload: Record<string, boolean | number | bigint | string | object | undefined | null>, log?: AnsiLogger): Promise<boolean>;
|
|
111
|
-
addClusterServers(serverList: ClusterId[]): this;
|
|
112
111
|
addFixedLabel(label: string, value: string): Promise<this>;
|
|
113
112
|
addUserLabel(label: string, value: string): Promise<this>;
|
|
114
113
|
addCommandHandler<C extends CommandHandlers>(command: C, handler: CommandHandlerFunction<C>): this;
|
|
@@ -122,6 +121,7 @@ export declare class MatterbridgeEndpoint extends Endpoint {
|
|
|
122
121
|
addOptionalClusterServers(): MatterbridgeEndpoint;
|
|
123
122
|
addRequiredClusterClients(): MatterbridgeEndpoint;
|
|
124
123
|
addOptionalClusterClients(): MatterbridgeEndpoint;
|
|
124
|
+
addClusterServers(serverList: ClusterId[]): this;
|
|
125
125
|
addClusterClients(clientList: ClusterId[]): MatterbridgeEndpoint;
|
|
126
126
|
getAllClusterServers(): Behavior.Type[];
|
|
127
127
|
getAllClusterServerNames(): string[];
|
|
@@ -256,10 +256,6 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
256
256
|
async triggerEvent(cluster, event, payload, log) {
|
|
257
257
|
return await triggerEvent(this, cluster, event, payload, log);
|
|
258
258
|
}
|
|
259
|
-
addClusterServers(serverList) {
|
|
260
|
-
addClusterServers(this, serverList);
|
|
261
|
-
return this;
|
|
262
|
-
}
|
|
263
259
|
async addFixedLabel(label, value) {
|
|
264
260
|
await addFixedLabel(this, label, value);
|
|
265
261
|
return this;
|
|
@@ -303,6 +299,10 @@ export class MatterbridgeEndpoint extends Endpoint {
|
|
|
303
299
|
addOptionalClusterClients(this);
|
|
304
300
|
return this;
|
|
305
301
|
}
|
|
302
|
+
addClusterServers(serverList) {
|
|
303
|
+
addClusterServers(this, serverList);
|
|
304
|
+
return this;
|
|
305
|
+
}
|
|
306
306
|
addClusterClients(clientList) {
|
|
307
307
|
addClusterClients(this, clientList);
|
|
308
308
|
return this;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { Lifecycle } from '@matter/general';
|
|
3
3
|
import { ClusterBehavior } from '@matter/node';
|
|
4
|
+
import { ActivatedCarbonFilterMonitoringServer } from '@matter/node/behaviors/activated-carbon-filter-monitoring';
|
|
4
5
|
import { AirQualityServer } from '@matter/node/behaviors/air-quality';
|
|
6
|
+
import { AmbientContextSensingClient } from '@matter/node/behaviors/ambient-context-sensing';
|
|
5
7
|
import { BasicInformationServer } from '@matter/node/behaviors/basic-information';
|
|
6
8
|
import { BooleanStateServer } from '@matter/node/behaviors/boolean-state';
|
|
7
9
|
import { BridgedDeviceBasicInformationServer } from '@matter/node/behaviors/bridged-device-basic-information';
|
|
8
10
|
import { CarbonDioxideConcentrationMeasurementServer } from '@matter/node/behaviors/carbon-dioxide-concentration-measurement';
|
|
9
11
|
import { CarbonMonoxideConcentrationMeasurementServer } from '@matter/node/behaviors/carbon-monoxide-concentration-measurement';
|
|
12
|
+
import { ClosureControlClient } from '@matter/node/behaviors/closure-control';
|
|
13
|
+
import { ClosureDimensionClient } from '@matter/node/behaviors/closure-dimension';
|
|
10
14
|
import { ColorControlClient } from '@matter/node/behaviors/color-control';
|
|
11
15
|
import { DoorLockClient } from '@matter/node/behaviors/door-lock';
|
|
12
16
|
import { ElectricalEnergyMeasurementServer } from '@matter/node/behaviors/electrical-energy-measurement';
|
|
@@ -17,6 +21,7 @@ import { FixedLabelServer } from '@matter/node/behaviors/fixed-label';
|
|
|
17
21
|
import { FlowMeasurementClient, FlowMeasurementServer } from '@matter/node/behaviors/flow-measurement';
|
|
18
22
|
import { FormaldehydeConcentrationMeasurementServer } from '@matter/node/behaviors/formaldehyde-concentration-measurement';
|
|
19
23
|
import { GroupsClient, GroupsServer } from '@matter/node/behaviors/groups';
|
|
24
|
+
import { HepaFilterMonitoringServer } from '@matter/node/behaviors/hepa-filter-monitoring';
|
|
20
25
|
import { IdentifyClient } from '@matter/node/behaviors/identify';
|
|
21
26
|
import { IlluminanceMeasurementClient, IlluminanceMeasurementServer } from '@matter/node/behaviors/illuminance-measurement';
|
|
22
27
|
import { LevelControlClient } from '@matter/node/behaviors/level-control';
|
|
@@ -40,17 +45,22 @@ import { SoilMeasurementServer } from '@matter/node/behaviors/soil-measurement';
|
|
|
40
45
|
import { SwitchServer } from '@matter/node/behaviors/switch';
|
|
41
46
|
import { TemperatureMeasurementClient, TemperatureMeasurementServer } from '@matter/node/behaviors/temperature-measurement';
|
|
42
47
|
import { ThermostatClient } from '@matter/node/behaviors/thermostat';
|
|
48
|
+
import { ThermostatUserInterfaceConfigurationServer } from '@matter/node/behaviors/thermostat-user-interface-configuration';
|
|
43
49
|
import { TotalVolatileOrganicCompoundsConcentrationMeasurementServer } from '@matter/node/behaviors/total-volatile-organic-compounds-concentration-measurement';
|
|
44
50
|
import { UserLabelServer } from '@matter/node/behaviors/user-label';
|
|
45
51
|
import { WindowCoveringClient } from '@matter/node/behaviors/window-covering';
|
|
46
52
|
import { getClusterNameById } from '@matter/types/cluster';
|
|
53
|
+
import { ActivatedCarbonFilterMonitoring } from '@matter/types/clusters/activated-carbon-filter-monitoring';
|
|
47
54
|
import { AirQuality } from '@matter/types/clusters/air-quality';
|
|
55
|
+
import { AmbientContextSensing } from '@matter/types/clusters/ambient-context-sensing';
|
|
48
56
|
import { BasicInformation } from '@matter/types/clusters/basic-information';
|
|
49
57
|
import { BooleanState } from '@matter/types/clusters/boolean-state';
|
|
50
58
|
import { BooleanStateConfiguration } from '@matter/types/clusters/boolean-state-configuration';
|
|
51
59
|
import { BridgedDeviceBasicInformation } from '@matter/types/clusters/bridged-device-basic-information';
|
|
52
60
|
import { CarbonDioxideConcentrationMeasurement } from '@matter/types/clusters/carbon-dioxide-concentration-measurement';
|
|
53
61
|
import { CarbonMonoxideConcentrationMeasurement } from '@matter/types/clusters/carbon-monoxide-concentration-measurement';
|
|
62
|
+
import { ClosureControl } from '@matter/types/clusters/closure-control';
|
|
63
|
+
import { ClosureDimension } from '@matter/types/clusters/closure-dimension';
|
|
54
64
|
import { ColorControl } from '@matter/types/clusters/color-control';
|
|
55
65
|
import { DeviceEnergyManagement } from '@matter/types/clusters/device-energy-management';
|
|
56
66
|
import { DeviceEnergyManagementMode } from '@matter/types/clusters/device-energy-management-mode';
|
|
@@ -63,6 +73,7 @@ import { FixedLabel } from '@matter/types/clusters/fixed-label';
|
|
|
63
73
|
import { FlowMeasurement } from '@matter/types/clusters/flow-measurement';
|
|
64
74
|
import { FormaldehydeConcentrationMeasurement } from '@matter/types/clusters/formaldehyde-concentration-measurement';
|
|
65
75
|
import { Groups } from '@matter/types/clusters/groups';
|
|
76
|
+
import { HepaFilterMonitoring } from '@matter/types/clusters/hepa-filter-monitoring';
|
|
66
77
|
import { Identify } from '@matter/types/clusters/identify';
|
|
67
78
|
import { IlluminanceMeasurement } from '@matter/types/clusters/illuminance-measurement';
|
|
68
79
|
import { LevelControl } from '@matter/types/clusters/level-control';
|
|
@@ -89,6 +100,7 @@ import { SoilMeasurement } from '@matter/types/clusters/soil-measurement';
|
|
|
89
100
|
import { Switch } from '@matter/types/clusters/switch';
|
|
90
101
|
import { TemperatureMeasurement } from '@matter/types/clusters/temperature-measurement';
|
|
91
102
|
import { Thermostat } from '@matter/types/clusters/thermostat';
|
|
103
|
+
import { ThermostatUserInterfaceConfiguration } from '@matter/types/clusters/thermostat-user-interface-configuration';
|
|
92
104
|
import { TotalVolatileOrganicCompoundsConcentrationMeasurement } from '@matter/types/clusters/total-volatile-organic-compounds-concentration-measurement';
|
|
93
105
|
import { UserLabel } from '@matter/types/clusters/user-label';
|
|
94
106
|
import { ValveConfigurationAndControl } from '@matter/types/clusters/valve-configuration-and-control';
|
|
@@ -269,6 +281,8 @@ export function getBehaviourTypeFromClusterServerId(clusterId) {
|
|
|
269
281
|
return MatterbridgeWindowCoveringServer.with('Lift', 'PositionAwareLift');
|
|
270
282
|
if (clusterId === Thermostat.id)
|
|
271
283
|
return MatterbridgeThermostatServer.with('AutoMode', 'Heating', 'Cooling');
|
|
284
|
+
if (clusterId === ThermostatUserInterfaceConfiguration.id)
|
|
285
|
+
return ThermostatUserInterfaceConfigurationServer;
|
|
272
286
|
if (clusterId === FanControl.id)
|
|
273
287
|
return MatterbridgeFanControlServer;
|
|
274
288
|
if (clusterId === DoorLock.id)
|
|
@@ -311,6 +325,10 @@ export function getBehaviourTypeFromClusterServerId(clusterId) {
|
|
|
311
325
|
return SoilMeasurementServer;
|
|
312
326
|
if (clusterId === AirQuality.id)
|
|
313
327
|
return AirQualityServer.with('Fair', 'Moderate', 'VeryPoor', 'ExtremelyPoor');
|
|
328
|
+
if (clusterId === HepaFilterMonitoring.id)
|
|
329
|
+
return HepaFilterMonitoringServer.with('Condition', 'Warning', 'ReplacementProductList');
|
|
330
|
+
if (clusterId === ActivatedCarbonFilterMonitoring.id)
|
|
331
|
+
return ActivatedCarbonFilterMonitoringServer.with('Condition', 'Warning', 'ReplacementProductList');
|
|
314
332
|
if (clusterId === CarbonMonoxideConcentrationMeasurement.id)
|
|
315
333
|
return CarbonMonoxideConcentrationMeasurementServer.with('NumericMeasurement');
|
|
316
334
|
if (clusterId === CarbonDioxideConcentrationMeasurement.id)
|
|
@@ -348,8 +366,14 @@ export function getBehaviourTypeFromClusterClientId(clusterId) {
|
|
|
348
366
|
return LevelControlClient;
|
|
349
367
|
if (clusterId === ColorControl.id)
|
|
350
368
|
return ColorControlClient;
|
|
369
|
+
if (clusterId === ClosureControl.id)
|
|
370
|
+
return ClosureControlClient;
|
|
371
|
+
if (clusterId === ClosureDimension.id)
|
|
372
|
+
return ClosureDimensionClient;
|
|
351
373
|
if (clusterId === OccupancySensing.id)
|
|
352
374
|
return OccupancySensingClient;
|
|
375
|
+
if (clusterId === AmbientContextSensing.id)
|
|
376
|
+
return AmbientContextSensingClient;
|
|
353
377
|
if (clusterId === ScenesManagement.id)
|
|
354
378
|
return ScenesManagementClient;
|
|
355
379
|
if (clusterId === DoorLock.id)
|
|
@@ -492,6 +516,8 @@ export function addClusterServers(endpoint, serverList) {
|
|
|
492
516
|
endpoint.createDefaultWindowCoveringClusterServer();
|
|
493
517
|
if (serverList.includes(Thermostat.id))
|
|
494
518
|
endpoint.createDefaultThermostatClusterServer();
|
|
519
|
+
if (serverList.includes(ThermostatUserInterfaceConfiguration.id))
|
|
520
|
+
endpoint.createDefaultThermostatUserInterfaceConfigurationClusterServer();
|
|
495
521
|
if (serverList.includes(FanControl.id))
|
|
496
522
|
endpoint.createDefaultFanControlClusterServer();
|
|
497
523
|
if (serverList.includes(DoorLock.id))
|
|
@@ -532,6 +558,10 @@ export function addClusterServers(endpoint, serverList) {
|
|
|
532
558
|
endpoint.createDefaultSoilMeasurementClusterServer();
|
|
533
559
|
if (serverList.includes(AirQuality.id))
|
|
534
560
|
endpoint.createDefaultAirQualityClusterServer();
|
|
561
|
+
if (serverList.includes(HepaFilterMonitoring.id))
|
|
562
|
+
endpoint.createDefaultHepaFilterMonitoringClusterServer();
|
|
563
|
+
if (serverList.includes(ActivatedCarbonFilterMonitoring.id))
|
|
564
|
+
endpoint.createDefaultActivatedCarbonFilterMonitoringClusterServer();
|
|
535
565
|
if (serverList.includes(CarbonMonoxideConcentrationMeasurement.id))
|
|
536
566
|
endpoint.createDefaultCarbonMonoxideConcentrationMeasurementClusterServer();
|
|
537
567
|
if (serverList.includes(CarbonDioxideConcentrationMeasurement.id))
|
|
@@ -571,12 +601,14 @@ export function addClusterClients(endpoint, clientList) {
|
|
|
571
601
|
for (const clusterId of clientList) {
|
|
572
602
|
const key = lowercaseFirstLetter(getClusterNameById(clusterId));
|
|
573
603
|
const value = getBehaviourTypeFromClusterClientId(clusterId);
|
|
574
|
-
if (!
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
604
|
+
if (!clientClusters[key]) {
|
|
605
|
+
if (value) {
|
|
606
|
+
clientClusters[key] = value;
|
|
607
|
+
endpoint.log.info(`addClusterClients: added client behavior for clusterId ${hk}0x${clusterId.toString(16).padStart(4, '0')}${nf}`);
|
|
608
|
+
}
|
|
609
|
+
else {
|
|
610
|
+
endpoint.log.warn(`addClusterClients: no client behavior found for clusterId ${hk}0x${clusterId.toString(16).padStart(4, '0')}${wr}`);
|
|
611
|
+
}
|
|
580
612
|
}
|
|
581
613
|
}
|
|
582
614
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@matterbridge/core",
|
|
3
|
-
"version": "3.9.5-dev-
|
|
3
|
+
"version": "3.9.5-dev-20260715-33298cd",
|
|
4
4
|
"description": "Matterbridge core library",
|
|
5
5
|
"author": "https://github.com/Luligu",
|
|
6
6
|
"homepage": "https://matterbridge.io/",
|
|
@@ -136,16 +136,16 @@
|
|
|
136
136
|
},
|
|
137
137
|
"dependencies": {
|
|
138
138
|
"@matter/main": "0.17.5",
|
|
139
|
-
"@matterbridge/dgram": "3.9.5-dev-
|
|
140
|
-
"@matterbridge/thread": "3.9.5-dev-
|
|
141
|
-
"@matterbridge/types": "3.9.5-dev-
|
|
142
|
-
"@matterbridge/utils": "3.9.5-dev-
|
|
139
|
+
"@matterbridge/dgram": "3.9.5-dev-20260715-33298cd",
|
|
140
|
+
"@matterbridge/thread": "3.9.5-dev-20260715-33298cd",
|
|
141
|
+
"@matterbridge/types": "3.9.5-dev-20260715-33298cd",
|
|
142
|
+
"@matterbridge/utils": "3.9.5-dev-20260715-33298cd",
|
|
143
143
|
"escape-html": "1.0.3",
|
|
144
144
|
"express": "5.2.1",
|
|
145
145
|
"express-rate-limit": "8.5.2",
|
|
146
146
|
"multer": "2.2.0",
|
|
147
147
|
"node-ansi-logger": "3.3.0",
|
|
148
148
|
"node-persist-manager": "2.1.0",
|
|
149
|
-
"ws": "8.21.
|
|
149
|
+
"ws": "8.21.1"
|
|
150
150
|
}
|
|
151
151
|
}
|