@matterbridge/core 3.7.10 → 3.8.0-dev-20260524-92c5fdd

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.
Files changed (50) hide show
  1. package/dist/behaviors/activatedCarbonFilterMonitoringServer.d.ts +5 -2
  2. package/dist/behaviors/bindingServer.js +0 -2
  3. package/dist/behaviors/booleanStateConfigurationServer.d.ts +6 -1
  4. package/dist/behaviors/colorControlServer.d.ts +20 -774
  5. package/dist/behaviors/deviceEnergyManagementServer.d.ts +9 -299
  6. package/dist/behaviors/doorLockServer.d.ts +29 -47
  7. package/dist/behaviors/doorLockServer.js +11 -299
  8. package/dist/behaviors/fanControlServer.d.ts +8 -1
  9. package/dist/behaviors/hepaFilterMonitoringServer.d.ts +5 -2
  10. package/dist/behaviors/smokeCoAlarmServer.d.ts +4 -77
  11. package/dist/behaviors/thermostatServer.d.ts +20 -722
  12. package/dist/behaviors/valveConfigurationAndControlServer.d.ts +4 -1
  13. package/dist/behaviors/windowCoveringServer.d.ts +28 -564
  14. package/dist/clusters/closure-control.d.ts +130 -620
  15. package/dist/clusters/closure-control.js +15 -170
  16. package/dist/clusters/closure-dimension.d.ts +148 -814
  17. package/dist/clusters/closure-dimension.js +15 -202
  18. package/dist/clusters/export.d.ts +1 -3
  19. package/dist/clusters/export.js +1 -3
  20. package/dist/clusters/soil-measurement.d.ts +31 -31
  21. package/dist/clusters/soil-measurement.js +29 -19
  22. package/dist/devices/closure.d.ts +14 -291
  23. package/dist/devices/closure.js +6 -13
  24. package/dist/devices/closurePanel.d.ts +13 -370
  25. package/dist/devices/closurePanel.js +9 -15
  26. package/dist/devices/evse.d.ts +7 -1
  27. package/dist/devices/heatPump.js +5 -5
  28. package/dist/devices/irrigationSystem.js +2 -2
  29. package/dist/devices/microwaveOven.d.ts +5 -76
  30. package/dist/devices/roboticVacuumCleaner.js +5 -5
  31. package/dist/devices/soilSensor.d.ts +0 -15
  32. package/dist/devices/soilSensor.js +4 -20
  33. package/dist/devices/temperatureControl.d.ts +10 -130
  34. package/dist/helpers.js +0 -8
  35. package/dist/jestutils/jestBroadcastServerSpy.d.ts +2 -2
  36. package/dist/jestutils/jestMatterTest.js +4 -4
  37. package/dist/jestutils/jestMatterbridgeEndpointSpy.d.ts +34 -37
  38. package/dist/jestutils/jestMatterbridgePlatformSpy.d.ts +4 -4
  39. package/dist/jestutils/jestMatterbridgeTest.js +1 -1
  40. package/dist/matter/export.d.ts +11 -0
  41. package/dist/matter/export.js +11 -0
  42. package/dist/matterbridge.js +3 -1
  43. package/dist/matterbridgeDeviceTypes.d.ts +15 -0
  44. package/dist/matterbridgeDeviceTypes.js +305 -162
  45. package/dist/matterbridgeEndpoint.d.ts +35 -25
  46. package/dist/matterbridgeEndpoint.js +6 -7
  47. package/dist/matterbridgeEndpointCommandHandler.d.ts +3 -59
  48. package/dist/matterbridgeEndpointHelpers.d.ts +83 -1382
  49. package/dist/matterbridgeEndpointHelpers.js +20 -5
  50. package/package.json +6 -6
@@ -1,170 +1,15 @@
1
- import { Attribute, ClusterRegistry, Command, Event, EventPriority, FixedAttribute, MutableCluster, TlvNoResponse } from '@matter/types/cluster';
2
- import { BitFlag } from '@matter/types/schema';
3
- import { TlvArray, TlvBitmap, TlvBoolean, TlvEnum, TlvField, TlvNoArguments, TlvNullable, TlvObject, TlvOptionalField, TlvUInt8, TlvUInt32, } from '@matter/types/tlv';
4
- export var ClosureControl;
5
- (function (ClosureControl) {
6
- let Feature;
7
- (function (Feature) {
8
- Feature["Positioning"] = "Positioning";
9
- Feature["MotionLatching"] = "MotionLatching";
10
- Feature["Instantaneous"] = "Instantaneous";
11
- Feature["Speed"] = "Speed";
12
- Feature["Ventilation"] = "Ventilation";
13
- Feature["Pedestrian"] = "Pedestrian";
14
- Feature["Calibration"] = "Calibration";
15
- Feature["Protection"] = "Protection";
16
- Feature["ManuallyOperable"] = "ManuallyOperable";
17
- })(Feature = ClosureControl.Feature || (ClosureControl.Feature = {}));
18
- let ClosureError;
19
- (function (ClosureError) {
20
- ClosureError[ClosureError["PhysicallyBlocked"] = 0] = "PhysicallyBlocked";
21
- ClosureError[ClosureError["BlockedBySensor"] = 1] = "BlockedBySensor";
22
- ClosureError[ClosureError["TemperatureLimited"] = 2] = "TemperatureLimited";
23
- ClosureError[ClosureError["MaintenanceRequired"] = 3] = "MaintenanceRequired";
24
- ClosureError[ClosureError["InternalInterference"] = 4] = "InternalInterference";
25
- })(ClosureError = ClosureControl.ClosureError || (ClosureControl.ClosureError = {}));
26
- let CurrentPosition;
27
- (function (CurrentPosition) {
28
- CurrentPosition[CurrentPosition["FullyClosed"] = 0] = "FullyClosed";
29
- CurrentPosition[CurrentPosition["FullyOpened"] = 1] = "FullyOpened";
30
- CurrentPosition[CurrentPosition["PartiallyOpened"] = 2] = "PartiallyOpened";
31
- CurrentPosition[CurrentPosition["OpenedForPedestrian"] = 3] = "OpenedForPedestrian";
32
- CurrentPosition[CurrentPosition["OpenedForVentilation"] = 4] = "OpenedForVentilation";
33
- CurrentPosition[CurrentPosition["OpenedAtSignature"] = 5] = "OpenedAtSignature";
34
- })(CurrentPosition = ClosureControl.CurrentPosition || (ClosureControl.CurrentPosition = {}));
35
- let MainState;
36
- (function (MainState) {
37
- MainState[MainState["Stopped"] = 0] = "Stopped";
38
- MainState[MainState["Moving"] = 1] = "Moving";
39
- MainState[MainState["WaitingForMotion"] = 2] = "WaitingForMotion";
40
- MainState[MainState["Error"] = 3] = "Error";
41
- MainState[MainState["Calibrating"] = 4] = "Calibrating";
42
- MainState[MainState["Protected"] = 5] = "Protected";
43
- MainState[MainState["Disengaged"] = 6] = "Disengaged";
44
- MainState[MainState["SetupRequired"] = 7] = "SetupRequired";
45
- })(MainState = ClosureControl.MainState || (ClosureControl.MainState = {}));
46
- let TargetPosition;
47
- (function (TargetPosition) {
48
- TargetPosition[TargetPosition["MoveToFullyClosed"] = 0] = "MoveToFullyClosed";
49
- TargetPosition[TargetPosition["MoveToFullyOpen"] = 1] = "MoveToFullyOpen";
50
- TargetPosition[TargetPosition["MoveToPedestrianPosition"] = 2] = "MoveToPedestrianPosition";
51
- TargetPosition[TargetPosition["MoveToVentilationPosition"] = 3] = "MoveToVentilationPosition";
52
- TargetPosition[TargetPosition["MoveToSignaturePosition"] = 4] = "MoveToSignaturePosition";
53
- })(TargetPosition = ClosureControl.TargetPosition || (ClosureControl.TargetPosition = {}));
54
- ClosureControl.LatchControlModes = {
55
- remoteLatching: BitFlag(0),
56
- remoteUnlatching: BitFlag(1),
57
- };
58
- ClosureControl.TlvOverallCurrentState = TlvObject({
59
- position: TlvOptionalField(0, TlvNullable(TlvEnum())),
60
- latch: TlvOptionalField(1, TlvNullable(TlvBoolean)),
61
- speed: TlvOptionalField(2, TlvEnum()),
62
- secureState: TlvOptionalField(3, TlvNullable(TlvBoolean)),
63
- });
64
- ClosureControl.TlvOverallTargetState = TlvObject({
65
- position: TlvOptionalField(0, TlvNullable(TlvEnum())),
66
- latch: TlvOptionalField(1, TlvNullable(TlvBoolean)),
67
- speed: TlvOptionalField(2, TlvEnum()),
68
- });
69
- ClosureControl.TlvMoveToRequest = TlvObject({
70
- position: TlvOptionalField(0, TlvEnum()),
71
- latch: TlvOptionalField(1, TlvBoolean),
72
- speed: TlvOptionalField(2, TlvEnum()),
73
- });
74
- ClosureControl.TlvOperationalErrorEvent = TlvObject({
75
- errorState: TlvField(0, TlvArray(TlvEnum(), { minLength: 1, maxLength: 10 })),
76
- });
77
- ClosureControl.TlvEngageStateChangedEvent = TlvObject({
78
- engageValue: TlvField(0, TlvBoolean),
79
- });
80
- ClosureControl.TlvSecureStateChangedEvent = TlvObject({
81
- secureValue: TlvField(0, TlvBoolean),
82
- });
83
- ClosureControl.CountdownTimeComponent = MutableCluster.Component({
84
- attributes: {
85
- countdownTime: Attribute(0x0, TlvNullable(TlvUInt32.bound({ max: 259200 })), { default: null }),
86
- },
87
- });
88
- ClosureControl.MotionLatchingComponent = MutableCluster.Component({
89
- attributes: {
90
- latchControlModes: FixedAttribute(0x5, TlvBitmap(TlvUInt8, ClosureControl.LatchControlModes)),
91
- },
92
- });
93
- ClosureControl.CalibrationComponent = MutableCluster.Component({
94
- commands: {
95
- calibrate: Command(0x2, TlvNoArguments, 0x2, TlvNoResponse, { timed: true }),
96
- },
97
- });
98
- ClosureControl.ManuallyOperableComponent = MutableCluster.Component({
99
- events: {
100
- engageStateChanged: Event(0x2, EventPriority.Info, ClosureControl.TlvEngageStateChangedEvent),
101
- },
102
- });
103
- ClosureControl.NonInstantaneousComponent = MutableCluster.Component({
104
- commands: {
105
- stop: Command(0x0, TlvNoArguments, 0x0, TlvNoResponse),
106
- },
107
- events: {
108
- movementCompleted: Event(0x1, EventPriority.Info, TlvNoArguments),
109
- },
110
- });
111
- ClosureControl.Base = MutableCluster.Component({
112
- id: 0x0104,
113
- name: 'ClosureControl',
114
- revision: 1,
115
- features: {
116
- positioning: BitFlag(0),
117
- motionLatching: BitFlag(1),
118
- instantaneous: BitFlag(2),
119
- speed: BitFlag(3),
120
- ventilation: BitFlag(4),
121
- pedestrian: BitFlag(5),
122
- calibration: BitFlag(6),
123
- protection: BitFlag(7),
124
- manuallyOperable: BitFlag(8),
125
- },
126
- attributes: {
127
- mainState: Attribute(0x1, TlvEnum()),
128
- currentErrorList: Attribute(0x2, TlvArray(TlvEnum(), { maxLength: 10 }), { default: [] }),
129
- overallCurrentState: Attribute(0x3, TlvNullable(ClosureControl.TlvOverallCurrentState), { default: null }),
130
- overallTargetState: Attribute(0x4, TlvNullable(ClosureControl.TlvOverallTargetState), { default: null }),
131
- },
132
- commands: {
133
- moveTo: Command(0x1, ClosureControl.TlvMoveToRequest, 0x1, TlvNoResponse, { timed: true }),
134
- },
135
- events: {
136
- operationalError: Event(0x0, EventPriority.Critical, ClosureControl.TlvOperationalErrorEvent),
137
- secureStateChanged: Event(0x3, EventPriority.Info, ClosureControl.TlvSecureStateChangedEvent),
138
- },
139
- extensions: MutableCluster.Extensions({ flags: { instantaneous: false }, component: ClosureControl.NonInstantaneousComponent }, { flags: { motionLatching: true }, component: ClosureControl.MotionLatchingComponent }, { flags: { calibration: true }, component: ClosureControl.CalibrationComponent }, { flags: { manuallyOperable: true }, component: ClosureControl.ManuallyOperableComponent }, { flags: { positioning: true, instantaneous: false }, component: ClosureControl.CountdownTimeComponent }, { flags: { positioning: false, motionLatching: false }, component: false }, { flags: { speed: true, positioning: false }, component: false }, { flags: { speed: true, instantaneous: true }, component: false }, { flags: { ventilation: true, positioning: false }, component: false }, { flags: { pedestrian: true, positioning: false }, component: false }, { flags: { calibration: true, positioning: false }, component: false }),
140
- });
141
- ClosureControl.Cluster = MutableCluster.ExtensibleOnly(ClosureControl.Base);
142
- const LT = { motionLatching: true };
143
- const CL = { calibration: true };
144
- const MO = { manuallyOperable: true };
145
- const PS_NOT_IS = { positioning: true, instantaneous: false };
146
- const NOT_IS = { instantaneous: false };
147
- ClosureControl.Complete = MutableCluster({
148
- id: ClosureControl.Base.id,
149
- name: ClosureControl.Base.name,
150
- revision: ClosureControl.Base.revision,
151
- features: ClosureControl.Base.features,
152
- attributes: {
153
- ...ClosureControl.Base.attributes,
154
- countdownTime: MutableCluster.AsConditional(ClosureControl.CountdownTimeComponent.attributes.countdownTime, { optionalIf: [PS_NOT_IS] }),
155
- latchControlModes: MutableCluster.AsConditional(ClosureControl.MotionLatchingComponent.attributes.latchControlModes, { mandatoryIf: [LT] }),
156
- },
157
- commands: {
158
- ...ClosureControl.Base.commands,
159
- stop: MutableCluster.AsConditional(ClosureControl.NonInstantaneousComponent.commands.stop, { mandatoryIf: [NOT_IS] }),
160
- calibrate: MutableCluster.AsConditional(ClosureControl.CalibrationComponent.commands.calibrate, { mandatoryIf: [CL] }),
161
- },
162
- events: {
163
- ...ClosureControl.Base.events,
164
- movementCompleted: MutableCluster.AsConditional(ClosureControl.NonInstantaneousComponent.events.movementCompleted, { mandatoryIf: [NOT_IS] }),
165
- engageStateChanged: MutableCluster.AsConditional(ClosureControl.ManuallyOperableComponent.events.engageStateChanged, { mandatoryIf: [MO] }),
166
- },
167
- });
168
- })(ClosureControl || (ClosureControl = {}));
169
- export const ClosureControlCluster = ClosureControl.Cluster;
170
- ClusterRegistry.register(ClosureControl.Complete);
1
+ import { AttributeElement, ClusterElement, ClusterModel, CommandElement, DatatypeElement, EventElement, FieldElement, Matter, MatterDefinition } from '@matter/main/model';
2
+ import { ClusterType } from '@matter/types/cluster';
3
+ export const ClosureControlDefinition = ClusterElement({
4
+ name: 'ClosureControl',
5
+ id: 0x0104,
6
+ classification: 'application',
7
+ }, AttributeElement({ name: 'ClusterRevision', id: 0xfffd, type: 'ClusterRevision', default: 1 }), AttributeElement({ name: 'FeatureMap', id: 0xfffc, type: 'FeatureMap' }, FieldElement({ name: 'PS', conformance: 'O.a+', constraint: '0', title: 'Positioning' }), FieldElement({ name: 'LT', conformance: 'O.a+', constraint: '1', title: 'MotionLatching' }), FieldElement({ name: 'IS', conformance: 'O', constraint: '2', title: 'Instantaneous' }), FieldElement({ name: 'SP', conformance: '[PS & !IS]', constraint: '3', title: 'Speed' }), FieldElement({ name: 'VT', conformance: '[PS]', constraint: '4', title: 'Ventilation' }), FieldElement({ name: 'PD', conformance: '[PS]', constraint: '5', title: 'Pedestrian' }), FieldElement({ name: 'CL', conformance: '[PS]', constraint: '6', title: 'Calibration' }), FieldElement({ name: 'PT', conformance: 'O', constraint: '7', title: 'Protection' }), FieldElement({ name: 'MO', conformance: 'O', constraint: '8', title: 'ManuallyOperable' })), AttributeElement({ name: 'CountdownTime', id: 0x0000, type: 'elapsed-s', access: 'R V', conformance: '[PS & !IS]', constraint: 'max 259200', default: null, quality: 'X Q' }), AttributeElement({ name: 'MainState', id: 0x0001, type: 'MainStateEnum', access: 'R V', conformance: 'M', constraint: 'desc' }), AttributeElement({ name: 'CurrentErrorList', id: 0x0002, type: 'list', access: 'R V', conformance: 'M', constraint: 'max 10[all]', default: [] }, FieldElement({ name: 'entry', type: 'ClosureErrorEnum' })), AttributeElement({ name: 'OverallCurrentState', id: 0x0003, type: 'OverallCurrentStateStruct', access: 'R V', conformance: 'M', default: null, quality: 'X' }), AttributeElement({ name: 'OverallTargetState', id: 0x0004, type: 'OverallTargetStateStruct', access: 'R V', conformance: 'M', default: null, quality: 'X' }), AttributeElement({ name: 'LatchControlModes', id: 0x0005, type: 'LatchControlModesBitmap', access: 'R V', conformance: 'LT', quality: 'F' }), CommandElement({ name: 'Stop', id: 0x0000, access: 'O', conformance: '!IS', direction: 'request', response: 'status' }), CommandElement({ name: 'MoveTo', id: 0x0001, access: 'O T', conformance: 'M', direction: 'request', response: 'status' }, FieldElement({ name: 'Position', id: 0x0, type: 'TargetPositionEnum', conformance: 'O.a+' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'O.a+' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'O.a+', default: 0 })), CommandElement({ name: 'Calibrate', id: 0x0002, access: 'M T', conformance: 'CL', direction: 'request', response: 'status' }), EventElement({ name: 'OperationalError', id: 0x0000, access: 'V', conformance: 'M', priority: 'critical' }, FieldElement({ name: 'ErrorState', id: 0x0, type: 'list', conformance: 'M', constraint: '1 to 10[all]' }, FieldElement({ name: 'entry', type: 'ClosureErrorEnum' }))), EventElement({ name: 'MovementCompleted', id: 0x0001, access: 'V', conformance: '!IS', priority: 'info' }), EventElement({ name: 'EngageStateChanged', id: 0x0002, access: 'V', conformance: 'MO', priority: 'info' }, FieldElement({ name: 'EngageValue', id: 0x0, type: 'bool', conformance: 'M' })), EventElement({ name: 'SecureStateChanged', id: 0x0003, access: 'V', conformance: 'M', priority: 'info' }, FieldElement({ name: 'SecureValue', id: 0x0, type: 'bool', conformance: 'M' })), DatatypeElement({ name: 'ClosureErrorEnum', type: 'enum8' }, FieldElement({ name: 'PhysicallyBlocked', id: 0x0, conformance: 'M' }), FieldElement({ name: 'BlockedBySensor', id: 0x1, conformance: 'M' }), FieldElement({ name: 'TemperatureLimited', id: 0x2, conformance: 'M' }), FieldElement({ name: 'MaintenanceRequired', id: 0x3, conformance: 'M' }), FieldElement({ name: 'InternalInterference', id: 0x4, conformance: 'M' })), DatatypeElement({ name: 'CurrentPositionEnum', type: 'enum8' }, FieldElement({ name: 'FullyClosed', id: 0x0, conformance: 'M' }), FieldElement({ name: 'FullyOpened', id: 0x1, conformance: 'M' }), FieldElement({ name: 'PartiallyOpened', id: 0x2, conformance: 'M' }), FieldElement({ name: 'OpenedForPedestrian', id: 0x3, conformance: 'PD' }), FieldElement({ name: 'OpenedForVentilation', id: 0x4, conformance: 'VT' }), FieldElement({ name: 'OpenedAtSignature', id: 0x5, conformance: 'M' })), DatatypeElement({ name: 'MainStateEnum', type: 'enum8' }, FieldElement({ name: 'Stopped', id: 0x0, conformance: 'M' }), FieldElement({ name: 'Moving', id: 0x1, conformance: 'M' }), FieldElement({ name: 'WaitingForMotion', id: 0x2, conformance: 'M' }), FieldElement({ name: 'Error', id: 0x3, conformance: 'M' }), FieldElement({ name: 'Calibrating', id: 0x4, conformance: 'CL' }), FieldElement({ name: 'Protected', id: 0x5, conformance: 'PT' }), FieldElement({ name: 'Disengaged', id: 0x6, conformance: 'MO' }), FieldElement({ name: 'SetupRequired', id: 0x7, conformance: 'M' })), DatatypeElement({ name: 'TargetPositionEnum', type: 'enum8' }, FieldElement({ name: 'MoveToFullyClosed', id: 0x0, conformance: 'M' }), FieldElement({ name: 'MoveToFullyOpen', id: 0x1, conformance: 'M' }), FieldElement({ name: 'MoveToPedestrianPosition', id: 0x2, conformance: 'PD' }), FieldElement({ name: 'MoveToVentilationPosition', id: 0x3, conformance: 'VT' }), FieldElement({ name: 'MoveToSignaturePosition', id: 0x4, conformance: 'M' })), DatatypeElement({ name: 'LatchControlModesBitmap', type: 'map8' }, FieldElement({ name: 'RemoteLatching', constraint: '0' }), FieldElement({ name: 'RemoteUnlatching', constraint: '1' })), DatatypeElement({ name: 'OverallCurrentStateStruct', type: 'struct' }, FieldElement({ name: 'Position', id: 0x0, type: 'CurrentPositionEnum', conformance: 'PS', default: null, quality: 'X' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'LT', default: null, quality: 'X' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'SP' }), FieldElement({ name: 'SecureState', id: 0x3, type: 'bool', conformance: 'M', default: null, quality: 'X' })), DatatypeElement({ name: 'OverallTargetStateStruct', type: 'struct' }, FieldElement({ name: 'Position', id: 0x0, type: 'TargetPositionEnum', conformance: 'PS', default: null, quality: 'X' }), FieldElement({ name: 'Latch', id: 0x1, type: 'bool', conformance: 'LT', default: null, quality: 'X' }), FieldElement({ name: 'Speed', id: 0x2, type: 'ThreeLevelAutoEnum', conformance: 'SP' })));
8
+ export const ClosureControlModel = new ClusterModel(ClosureControlDefinition);
9
+ if (!MatterDefinition.children.some((child) => child.id === ClosureControlDefinition.id)) {
10
+ MatterDefinition.children.push(ClosureControlDefinition);
11
+ }
12
+ if (Matter.clusters(ClosureControlModel.id) === undefined) {
13
+ Matter.children.push(ClosureControlModel);
14
+ }
15
+ export const ClosureControl = ClusterType(ClosureControlModel);