@matterbridge/core 3.6.0-dev-20260302-e3a7eb0 → 3.6.0-dev-20260303-f33e36a
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/clusters/closure-control.d.ts +634 -0
- package/dist/clusters/closure-control.js +170 -0
- package/dist/clusters/closure-dimension.d.ts +830 -0
- package/dist/clusters/closure-dimension.js +202 -0
- package/dist/clusters/export.d.ts +3 -1
- package/dist/clusters/export.js +3 -1
- package/dist/clusters/soil-measurement.d.ts +34 -0
- package/dist/clusters/soil-measurement.js +19 -0
- package/dist/devices/closure.d.ts +165 -0
- package/dist/devices/closure.js +47 -0
- package/dist/devices/closurePanel.d.ts +204 -0
- package/dist/devices/closurePanel.js +55 -0
- package/dist/devices/customClusterSchema.d.ts +22 -0
- package/dist/devices/customClusterSchema.js +53 -0
- package/dist/devices/export.d.ts +4 -0
- package/dist/devices/export.js +4 -0
- package/dist/devices/irrigationSystem.d.ts +9 -0
- package/dist/devices/irrigationSystem.js +12 -0
- package/dist/devices/soilSensor.d.ts +14 -0
- package/dist/devices/soilSensor.js +30 -0
- package/dist/devices/solarPower.d.ts +2 -1
- package/dist/devices/solarPower.js +16 -2
- package/dist/matterbridgeDeviceTypes.d.ts +4 -0
- package/dist/matterbridgeDeviceTypes.js +37 -0
- package/dist/matterbridgeEndpointTypes.d.ts +2 -0
- package/package.json +5 -5
|
@@ -0,0 +1,170 @@
|
|
|
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);
|