matterbridge 2.2.7 → 3.0.0-edge.1

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 (148) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/README-DEV.md +24 -12
  3. package/dist/cli.js +2 -37
  4. package/dist/cluster/export.js +0 -2
  5. package/dist/defaultConfigSchema.js +0 -23
  6. package/dist/deviceManager.js +1 -94
  7. package/dist/frontend.js +19 -325
  8. package/dist/index.js +1 -28
  9. package/dist/logger/export.js +0 -1
  10. package/dist/matter/behaviors.js +0 -2
  11. package/dist/matter/clusters.js +0 -2
  12. package/dist/matter/devices.js +0 -2
  13. package/dist/matter/endpoints.js +0 -2
  14. package/dist/matter/export.js +0 -2
  15. package/dist/matter/types.js +0 -2
  16. package/dist/matterbridge.js +89 -760
  17. package/dist/matterbridgeAccessoryPlatform.js +0 -33
  18. package/dist/matterbridgeBehaviors.js +15 -41
  19. package/dist/matterbridgeDeviceTypes.js +151 -228
  20. package/dist/matterbridgeDynamicPlatform.js +0 -33
  21. package/dist/matterbridgeEndpoint.js +87 -732
  22. package/dist/matterbridgeEndpointHelpers.js +30 -136
  23. package/dist/matterbridgePlatform.js +7 -216
  24. package/dist/matterbridgeTypes.js +0 -24
  25. package/dist/pluginManager.js +36 -305
  26. package/dist/shelly.js +6 -146
  27. package/dist/storage/export.js +0 -1
  28. package/dist/update.js +0 -45
  29. package/dist/utils/colorUtils.js +2 -205
  30. package/dist/utils/copyDirectory.js +1 -37
  31. package/dist/utils/createZip.js +2 -42
  32. package/dist/utils/deepCopy.js +0 -40
  33. package/dist/utils/deepEqual.js +1 -65
  34. package/dist/utils/export.js +0 -1
  35. package/dist/utils/isvalid.js +0 -86
  36. package/dist/utils/network.js +5 -76
  37. package/dist/utils/parameter.js +0 -41
  38. package/dist/utils/wait.js +5 -48
  39. package/npm-shrinkwrap.json +44 -44
  40. package/package.json +2 -3
  41. package/dist/cli.d.ts +0 -29
  42. package/dist/cli.d.ts.map +0 -1
  43. package/dist/cli.js.map +0 -1
  44. package/dist/cluster/export.d.ts +0 -2
  45. package/dist/cluster/export.d.ts.map +0 -1
  46. package/dist/cluster/export.js.map +0 -1
  47. package/dist/defaultConfigSchema.d.ts +0 -27
  48. package/dist/defaultConfigSchema.d.ts.map +0 -1
  49. package/dist/defaultConfigSchema.js.map +0 -1
  50. package/dist/deviceManager.d.ts +0 -114
  51. package/dist/deviceManager.d.ts.map +0 -1
  52. package/dist/deviceManager.js.map +0 -1
  53. package/dist/frontend.d.ts +0 -221
  54. package/dist/frontend.d.ts.map +0 -1
  55. package/dist/frontend.js.map +0 -1
  56. package/dist/index.d.ts +0 -35
  57. package/dist/index.d.ts.map +0 -1
  58. package/dist/index.js.map +0 -1
  59. package/dist/logger/export.d.ts +0 -2
  60. package/dist/logger/export.d.ts.map +0 -1
  61. package/dist/logger/export.js.map +0 -1
  62. package/dist/matter/behaviors.d.ts +0 -2
  63. package/dist/matter/behaviors.d.ts.map +0 -1
  64. package/dist/matter/behaviors.js.map +0 -1
  65. package/dist/matter/clusters.d.ts +0 -2
  66. package/dist/matter/clusters.d.ts.map +0 -1
  67. package/dist/matter/clusters.js.map +0 -1
  68. package/dist/matter/devices.d.ts +0 -2
  69. package/dist/matter/devices.d.ts.map +0 -1
  70. package/dist/matter/devices.js.map +0 -1
  71. package/dist/matter/endpoints.d.ts +0 -2
  72. package/dist/matter/endpoints.d.ts.map +0 -1
  73. package/dist/matter/endpoints.js.map +0 -1
  74. package/dist/matter/export.d.ts +0 -5
  75. package/dist/matter/export.d.ts.map +0 -1
  76. package/dist/matter/export.js.map +0 -1
  77. package/dist/matter/types.d.ts +0 -3
  78. package/dist/matter/types.d.ts.map +0 -1
  79. package/dist/matter/types.js.map +0 -1
  80. package/dist/matterbridge.d.ts +0 -425
  81. package/dist/matterbridge.d.ts.map +0 -1
  82. package/dist/matterbridge.js.map +0 -1
  83. package/dist/matterbridgeAccessoryPlatform.d.ts +0 -39
  84. package/dist/matterbridgeAccessoryPlatform.d.ts.map +0 -1
  85. package/dist/matterbridgeAccessoryPlatform.js.map +0 -1
  86. package/dist/matterbridgeBehaviors.d.ts +0 -1056
  87. package/dist/matterbridgeBehaviors.d.ts.map +0 -1
  88. package/dist/matterbridgeBehaviors.js.map +0 -1
  89. package/dist/matterbridgeDeviceTypes.d.ts +0 -177
  90. package/dist/matterbridgeDeviceTypes.d.ts.map +0 -1
  91. package/dist/matterbridgeDeviceTypes.js.map +0 -1
  92. package/dist/matterbridgeDynamicPlatform.d.ts +0 -39
  93. package/dist/matterbridgeDynamicPlatform.d.ts.map +0 -1
  94. package/dist/matterbridgeDynamicPlatform.js.map +0 -1
  95. package/dist/matterbridgeEndpoint.d.ts +0 -852
  96. package/dist/matterbridgeEndpoint.d.ts.map +0 -1
  97. package/dist/matterbridgeEndpoint.js.map +0 -1
  98. package/dist/matterbridgeEndpointHelpers.d.ts +0 -2275
  99. package/dist/matterbridgeEndpointHelpers.d.ts.map +0 -1
  100. package/dist/matterbridgeEndpointHelpers.js.map +0 -1
  101. package/dist/matterbridgePlatform.d.ts +0 -285
  102. package/dist/matterbridgePlatform.d.ts.map +0 -1
  103. package/dist/matterbridgePlatform.js.map +0 -1
  104. package/dist/matterbridgeTypes.d.ts +0 -183
  105. package/dist/matterbridgeTypes.d.ts.map +0 -1
  106. package/dist/matterbridgeTypes.js.map +0 -1
  107. package/dist/pluginManager.d.ts +0 -271
  108. package/dist/pluginManager.d.ts.map +0 -1
  109. package/dist/pluginManager.js.map +0 -1
  110. package/dist/shelly.d.ts +0 -92
  111. package/dist/shelly.d.ts.map +0 -1
  112. package/dist/shelly.js.map +0 -1
  113. package/dist/storage/export.d.ts +0 -2
  114. package/dist/storage/export.d.ts.map +0 -1
  115. package/dist/storage/export.js.map +0 -1
  116. package/dist/update.d.ts +0 -32
  117. package/dist/update.d.ts.map +0 -1
  118. package/dist/update.js.map +0 -1
  119. package/dist/utils/colorUtils.d.ts +0 -61
  120. package/dist/utils/colorUtils.d.ts.map +0 -1
  121. package/dist/utils/colorUtils.js.map +0 -1
  122. package/dist/utils/copyDirectory.d.ts +0 -32
  123. package/dist/utils/copyDirectory.d.ts.map +0 -1
  124. package/dist/utils/copyDirectory.js.map +0 -1
  125. package/dist/utils/createZip.d.ts +0 -38
  126. package/dist/utils/createZip.d.ts.map +0 -1
  127. package/dist/utils/createZip.js.map +0 -1
  128. package/dist/utils/deepCopy.d.ts +0 -31
  129. package/dist/utils/deepCopy.d.ts.map +0 -1
  130. package/dist/utils/deepCopy.js.map +0 -1
  131. package/dist/utils/deepEqual.d.ts +0 -53
  132. package/dist/utils/deepEqual.d.ts.map +0 -1
  133. package/dist/utils/deepEqual.js.map +0 -1
  134. package/dist/utils/export.d.ts +0 -10
  135. package/dist/utils/export.d.ts.map +0 -1
  136. package/dist/utils/export.js.map +0 -1
  137. package/dist/utils/isvalid.d.ts +0 -87
  138. package/dist/utils/isvalid.d.ts.map +0 -1
  139. package/dist/utils/isvalid.js.map +0 -1
  140. package/dist/utils/network.d.ts +0 -69
  141. package/dist/utils/network.d.ts.map +0 -1
  142. package/dist/utils/network.js.map +0 -1
  143. package/dist/utils/parameter.d.ts +0 -44
  144. package/dist/utils/parameter.d.ts.map +0 -1
  145. package/dist/utils/parameter.js.map +0 -1
  146. package/dist/utils/wait.d.ts +0 -43
  147. package/dist/utils/wait.d.ts.map +0 -1
  148. package/dist/utils/wait.js.map +0 -1
@@ -1,28 +1,4 @@
1
- /**
2
- * This file contains the class MatterbridgeDevice.
3
- *
4
- * @file matterbridgeDeviceTypes.ts
5
- * @author Luca Liguori
6
- * @date 2024-11-08
7
- * @version 1.0.0
8
- *
9
- * Copyright 2024, 2025, 2026 Luca Liguori.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License. *
22
- */
23
- // @matter
24
1
  import { DeviceTypeId } from '@matter/main';
25
- // @matter clusters
26
2
  import { BooleanState } from '@matter/main/clusters/boolean-state';
27
3
  import { BooleanStateConfiguration } from '@matter/main/clusters/boolean-state-configuration';
28
4
  import { BridgedDeviceBasicInformation } from '@matter/main/clusters/bridged-device-basic-information';
@@ -34,7 +10,6 @@ import { DoorLock } from '@matter/main/clusters/door-lock';
34
10
  import { ElectricalEnergyMeasurement } from '@matter/main/clusters/electrical-energy-measurement';
35
11
  import { ElectricalPowerMeasurement } from '@matter/main/clusters/electrical-power-measurement';
36
12
  import { FanControl } from '@matter/main/clusters/fan-control';
37
- import { FixedLabel } from '@matter/main/clusters/fixed-label';
38
13
  import { FlowMeasurement } from '@matter/main/clusters/flow-measurement';
39
14
  import { FormaldehydeConcentrationMeasurement } from '@matter/main/clusters/formaldehyde-concentration-measurement';
40
15
  import { Groups } from '@matter/main/clusters/groups';
@@ -56,10 +31,9 @@ import { PumpConfigurationAndControl } from '@matter/main/clusters/pump-configur
56
31
  import { RadonConcentrationMeasurement } from '@matter/main/clusters/radon-concentration-measurement';
57
32
  import { RelativeHumidityMeasurement } from '@matter/main/clusters/relative-humidity-measurement';
58
33
  import { SmokeCoAlarm } from '@matter/main/clusters/smoke-co-alarm';
59
- import { SwitchCluster } from '@matter/main/clusters/switch';
34
+ import { Switch } from '@matter/main/clusters/switch';
60
35
  import { TemperatureMeasurement } from '@matter/main/clusters/temperature-measurement';
61
36
  import { Thermostat } from '@matter/main/clusters/thermostat';
62
- import { TimeSynchronization } from '@matter/main/clusters/time-synchronization';
63
37
  import { TotalVolatileOrganicCompoundsConcentrationMeasurement } from '@matter/main/clusters/total-volatile-organic-compounds-concentration-measurement';
64
38
  import { ValveConfigurationAndControl } from '@matter/main/clusters/valve-configuration-and-control';
65
39
  import { WindowCovering } from '@matter/main/clusters/window-covering';
@@ -74,48 +48,24 @@ import { ScenesManagement } from '@matter/main/clusters/scenes-management';
74
48
  import { HepaFilterMonitoring } from '@matter/main/clusters/hepa-filter-monitoring';
75
49
  import { ActivatedCarbonFilterMonitoring } from '@matter/main/clusters/activated-carbon-filter-monitoring';
76
50
  import { DeviceEnergyManagementMode } from '@matter/main/clusters/device-energy-management-mode';
51
+ import { AdministratorCommissioning } from '@matter/main/clusters/administrator-commissioning';
52
+ import { EcosystemInformation } from '@matter/main/clusters/ecosystem-information';
53
+ import { AccessControl } from '@matter/main/clusters/access-control';
54
+ import { CommissionerControl } from '@matter/main/clusters/commissioner-control';
55
+ import { ServiceArea } from '@matter/main/clusters';
77
56
  export var DeviceClasses;
78
57
  (function (DeviceClasses) {
79
- /** Node device type. */
80
58
  DeviceClasses["Node"] = "Node";
81
- /**
82
- * Utility device type.
83
- * A Utility device type supports configuration and settings.
84
- */
85
59
  DeviceClasses["Utility"] = "Utility";
86
- /**
87
- * Application device type.
88
- * Application devices types are typically the most datatype endpoints on a node and in the network.
89
- */
90
60
  DeviceClasses["App"] = "App";
91
- /**
92
- * Simple device type.
93
- * A Simple device type supports local control that is persistent, independent, and unsupervised.
94
- */
95
61
  DeviceClasses["Simple"] = "Simple";
96
- /**
97
- * Dynamic device type.
98
- * A Dynamic device type supports intelligent and supervisory services, such as commissioning,
99
- * monitoring, trend analysis, scheduling and central management. A dynamic device type is an
100
- * application device type.
101
- */
102
62
  DeviceClasses["Dynamic"] = "Dynamic";
103
- /** There exists a client application cluster on the endpoint. */
104
63
  DeviceClasses["Client"] = "Client";
105
- /** There exists a server application cluster on the endpoint. */
106
64
  DeviceClasses["Server"] = "Server";
107
- /** The device type is composed of 2 or more device types. */
108
65
  DeviceClasses["Composed"] = "Composed";
109
- /** Composed device type that is composed of 2 or more endpoints with the same device type. */
110
66
  DeviceClasses["Multiple"] = "Multiple";
111
- /** The endpoint is an Initiator for Zigbee EZ-Mode Finding & Binding. */
112
67
  DeviceClasses["EZInitiator"] = "EZ-Initiator";
113
- /** The endpoint is a Target for Zigbee EZ-Mode Finding & Binding. */
114
68
  DeviceClasses["EZTarget"] = "EZ-Target";
115
- /**
116
- * The endpoint represents a Bridged Device, for which information about the state of
117
- * its power source is available to the Bridge
118
- */
119
69
  DeviceClasses["BridgedPowerSourceInfo"] = "BridgedPowerSourceInfo";
120
70
  })(DeviceClasses || (DeviceClasses = {}));
121
71
  export const DeviceTypeDefinition = ({ name, code, deviceClass, superSet, revision, requiredServerClusters = [], optionalServerClusters = [], requiredClientClusters = [], optionalClientClusters = [], unknown = false, }) => ({
@@ -130,21 +80,6 @@ export const DeviceTypeDefinition = ({ name, code, deviceClass, superSet, revisi
130
80
  optionalClientClusters,
131
81
  unknown,
132
82
  });
133
- // Matter 1.0 and 1.1 device types
134
- export const bridge = DeviceTypeDefinition({
135
- name: 'MA-aggregator',
136
- code: 0x000e,
137
- deviceClass: DeviceClasses.Dynamic,
138
- revision: 1,
139
- optionalServerClusters: [Identify.Cluster.id, Actions.Cluster.id],
140
- });
141
- export const aggregator = DeviceTypeDefinition({
142
- name: 'MA-aggregator',
143
- code: 0x000e,
144
- deviceClass: DeviceClasses.Dynamic,
145
- revision: 1,
146
- optionalServerClusters: [Identify.Cluster.id, Actions.Cluster.id],
147
- });
148
83
  export const powerSource = DeviceTypeDefinition({
149
84
  name: 'MA-powerSource',
150
85
  code: 0x0011,
@@ -153,60 +88,60 @@ export const powerSource = DeviceTypeDefinition({
153
88
  requiredServerClusters: [PowerSource.Cluster.id],
154
89
  optionalServerClusters: [],
155
90
  });
156
- /**
157
- 2.5.3. Conditions
158
- Please see the Base Device Type definition for conformance tags.
159
- This device type SHALL only be used for Nodes which have a device type of Bridge.
160
-
161
- 2.5.6. Endpoint Composition
162
- • A Bridged Node endpoint SHALL support one of the following composition patterns:
163
- ◦ Separate Endpoints: All application device types are supported on separate endpoints, and
164
- not on the Bridged Node endpoint. The Bridged Node endpoint’s Descriptor cluster PartsList
165
- attribute SHALL indicate a list of all endpoints representing the functionality of the bridged
166
- device, including the endpoints supporting the application device types, i.e. the full-family
167
- pattern defined in the System Model specification.
168
- ◦ One Endpoint: Both the Bridged Node and one or more application device types are sup
169
- ported on the same endpoint (following application device type rules). Endpoint composi
170
- tion SHALL conform to the application device type(s) definition
171
- */
172
91
  export const bridgedNode = DeviceTypeDefinition({
173
92
  name: 'MA-bridgedNode',
174
93
  code: 0x0013,
175
94
  deviceClass: DeviceClasses.Utility,
176
- revision: 2,
95
+ revision: 3,
177
96
  requiredServerClusters: [BridgedDeviceBasicInformation.Cluster.id],
178
- optionalServerClusters: [PowerSource.Cluster.id],
97
+ optionalServerClusters: [PowerSource.Cluster.id, EcosystemInformation.Cluster.id, AdministratorCommissioning.Cluster.id],
179
98
  });
180
- export const genericSwitch = DeviceTypeDefinition({
181
- name: 'MA-genericswitch',
182
- code: 0x000f,
183
- deviceClass: DeviceClasses.Simple,
99
+ export const electricalSensor = DeviceTypeDefinition({
100
+ name: 'MA-electricalSensor',
101
+ code: 0x0510,
102
+ deviceClass: DeviceClasses.Utility,
184
103
  revision: 1,
185
- requiredServerClusters: [Identify.Cluster.id, SwitchCluster.id],
186
- optionalServerClusters: [FixedLabel.Cluster.id],
104
+ requiredServerClusters: [PowerTopology.Cluster.id],
105
+ optionalServerClusters: [ElectricalPowerMeasurement.Cluster.id, ElectricalEnergyMeasurement.Cluster.id],
106
+ });
107
+ export const deviceEnergyManagement = DeviceTypeDefinition({
108
+ name: 'MA-deviceEnergyManagement',
109
+ code: 0x050d,
110
+ deviceClass: DeviceClasses.Utility,
111
+ revision: 2,
112
+ requiredServerClusters: [DeviceEnergyManagement.Cluster.id, DeviceEnergyManagementMode.Cluster.id],
113
+ optionalServerClusters: [],
187
114
  });
188
115
  export const onOffLight = DeviceTypeDefinition({
189
116
  name: 'MA-onofflight',
190
117
  code: 0x0100,
191
118
  deviceClass: DeviceClasses.Simple,
192
119
  revision: 3,
193
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id],
194
- optionalServerClusters: [LevelControl.Cluster.id, ColorControl.Cluster.id],
120
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
121
+ optionalServerClusters: [LevelControl.Cluster.id],
195
122
  });
196
123
  export const dimmableLight = DeviceTypeDefinition({
197
124
  name: 'MA-dimmablelight',
198
125
  code: 0x0101,
199
126
  deviceClass: DeviceClasses.Simple,
200
127
  revision: 3,
201
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id, LevelControl.Cluster.id],
202
- optionalServerClusters: [ColorControl.Cluster.id],
128
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
129
+ optionalServerClusters: [],
203
130
  });
204
131
  export const colorTemperatureLight = DeviceTypeDefinition({
205
132
  name: 'MA-colortemperaturelight',
206
133
  code: 0x010c,
207
134
  deviceClass: DeviceClasses.Simple,
208
135
  revision: 4,
209
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
136
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
137
+ optionalServerClusters: [],
138
+ });
139
+ export const extendedColorLight = DeviceTypeDefinition({
140
+ name: 'MA-extendedcolorlight',
141
+ code: 0x010d,
142
+ deviceClass: DeviceClasses.Simple,
143
+ revision: 4,
144
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
210
145
  optionalServerClusters: [],
211
146
  });
212
147
  export const onOffOutlet = DeviceTypeDefinition({
@@ -214,53 +149,80 @@ export const onOffOutlet = DeviceTypeDefinition({
214
149
  code: 0x010a,
215
150
  deviceClass: DeviceClasses.Simple,
216
151
  revision: 3,
217
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id],
152
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
218
153
  optionalServerClusters: [LevelControl.Cluster.id],
219
154
  });
220
155
  export const dimmableOutlet = DeviceTypeDefinition({
221
156
  name: 'MA-dimmablepluginunit',
222
157
  code: 0x010b,
223
158
  deviceClass: DeviceClasses.Simple,
224
- revision: 3,
225
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id, LevelControl.Cluster.id],
159
+ revision: 4,
160
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
226
161
  optionalServerClusters: [],
227
162
  });
228
- export const doorLockDevice = DeviceTypeDefinition({
229
- name: 'MA-doorLock',
230
- code: 0xa,
163
+ export const onOffMountedSwitch = DeviceTypeDefinition({
164
+ name: 'MA-onoffswitch',
165
+ code: 0x010f,
166
+ deviceClass: DeviceClasses.Simple,
167
+ revision: 1,
168
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id],
169
+ optionalServerClusters: [LevelControl.Cluster.id],
170
+ });
171
+ export const dimmableMountedSwitch = DeviceTypeDefinition({
172
+ name: 'MA-dimmableswitch',
173
+ code: 0x0110,
174
+ deviceClass: DeviceClasses.Simple,
175
+ revision: 1,
176
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
177
+ optionalServerClusters: [],
178
+ });
179
+ export const pumpDevice = DeviceTypeDefinition({
180
+ name: 'MA-pump',
181
+ code: 0x303,
231
182
  deviceClass: DeviceClasses.Simple,
232
183
  revision: 3,
233
- requiredServerClusters: [Identify.Cluster.id, DoorLock.Cluster.id],
234
- optionalServerClusters: [Groups.Cluster.id /* , Scenes.Cluster.id,*/],
184
+ requiredServerClusters: [OnOff.Cluster.id, PumpConfigurationAndControl.Cluster.id, Identify.Cluster.id],
185
+ optionalServerClusters: [LevelControl.Cluster.id, Groups.Cluster.id, ScenesManagement.Cluster.id, TemperatureMeasurement.Cluster.id, PressureMeasurement.Cluster.id, FlowMeasurement.Cluster.id],
235
186
  });
236
- export const coverDevice = DeviceTypeDefinition({
237
- name: 'MA-windowCovering',
238
- code: 0x202,
187
+ export const waterValve = DeviceTypeDefinition({
188
+ name: 'MA-waterValve',
189
+ code: 0x42,
190
+ deviceClass: DeviceClasses.Simple,
191
+ revision: 1,
192
+ requiredServerClusters: [Identify.Cluster.id, ValveConfigurationAndControl.Cluster.id],
193
+ optionalServerClusters: [FlowMeasurement.Cluster.id],
194
+ });
195
+ export const onOffSwitch = DeviceTypeDefinition({
196
+ name: 'MA-onoffswitch',
197
+ code: 0x0103,
239
198
  deviceClass: DeviceClasses.Simple,
240
199
  revision: 3,
241
- requiredServerClusters: [Identify.Cluster.id, WindowCovering.Cluster.id],
242
- optionalServerClusters: [Groups.Cluster.id /* , Scenes.Cluster.id,*/],
200
+ requiredServerClusters: [Identify.Cluster.id, OnOff.Cluster.id],
201
+ optionalServerClusters: [Groups.Cluster.id, ScenesManagement.Cluster.id],
243
202
  });
244
- /**
245
- * Remark: it may have a thermostat device type.
246
- * Additional device types MAY also be included in device compositions.
247
- * The FanControl cluster must have the FanModeSequence attribute.
248
- */
249
- export const fanDevice = DeviceTypeDefinition({
250
- name: 'MA-fan',
251
- code: 0x2b,
203
+ export const dimmableSwitch = DeviceTypeDefinition({
204
+ name: 'MA-dimmableswitch',
205
+ code: 0x0104,
252
206
  deviceClass: DeviceClasses.Simple,
253
- revision: 2,
254
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, FanControl.Cluster.id],
255
- optionalServerClusters: [],
207
+ revision: 3,
208
+ requiredServerClusters: [Identify.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id],
209
+ optionalServerClusters: [Groups.Cluster.id, ScenesManagement.Cluster.id],
256
210
  });
257
- export const thermostatDevice = DeviceTypeDefinition({
258
- name: 'MA-thermostat',
259
- code: 0x301,
211
+ export const colorTemperatureSwitch = DeviceTypeDefinition({
212
+ name: 'MA-colortemperatureswitch',
213
+ code: 0x0105,
260
214
  deviceClass: DeviceClasses.Simple,
261
215
  revision: 3,
262
- requiredServerClusters: [Identify.Cluster.id, Thermostat.Cluster.id],
263
- optionalServerClusters: [Groups.Cluster.id /* , Scenes.Cluster.id,*/, ThermostatUserInterfaceConfiguration.Cluster.id, EnergyPreference.Cluster.id, TimeSynchronization.Cluster.id],
216
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
217
+ optionalServerClusters: [Groups.Cluster.id, ScenesManagement.Cluster.id],
218
+ });
219
+ export const genericSwitch = DeviceTypeDefinition({
220
+ name: 'MA-genericswitch',
221
+ code: 0x000f,
222
+ deviceClass: DeviceClasses.Simple,
223
+ revision: 3,
224
+ requiredServerClusters: [Identify.Cluster.id, Switch.Cluster.id],
225
+ optionalServerClusters: [],
264
226
  });
265
227
  export const contactSensor = DeviceTypeDefinition({
266
228
  name: 'MA-contactsensor',
@@ -268,6 +230,7 @@ export const contactSensor = DeviceTypeDefinition({
268
230
  deviceClass: DeviceClasses.Simple,
269
231
  revision: 2,
270
232
  requiredServerClusters: [Identify.Cluster.id, BooleanState.Cluster.id],
233
+ optionalServerClusters: [BooleanStateConfiguration.Cluster.id],
271
234
  });
272
235
  export const lightSensor = DeviceTypeDefinition({
273
236
  name: 'MA-lightsensor',
@@ -280,8 +243,9 @@ export const occupancySensor = DeviceTypeDefinition({
280
243
  name: 'MA-occupancysensor',
281
244
  code: 0x0107,
282
245
  deviceClass: DeviceClasses.Simple,
283
- revision: 3,
246
+ revision: 4,
284
247
  requiredServerClusters: [Identify.Cluster.id, OccupancySensing.Cluster.id],
248
+ optionalServerClusters: [BooleanStateConfiguration.Cluster.id],
285
249
  });
286
250
  export const temperatureSensor = DeviceTypeDefinition({
287
251
  name: 'MA-tempsensor',
@@ -311,49 +275,14 @@ export const humiditySensor = DeviceTypeDefinition({
311
275
  revision: 2,
312
276
  requiredServerClusters: [Identify.Cluster.id, RelativeHumidityMeasurement.Cluster.id],
313
277
  });
314
- export const modeSelect = DeviceTypeDefinition({
315
- name: 'MA-modeselect',
316
- code: 0x27,
278
+ export const smokeCoAlarm = DeviceTypeDefinition({
279
+ name: 'MA-smokeCoAlarm',
280
+ code: 0x0076,
317
281
  deviceClass: DeviceClasses.Simple,
318
282
  revision: 1,
319
- requiredServerClusters: [ModeSelect.Cluster.id],
320
- });
321
- export const roboticVacuumCleaner = DeviceTypeDefinition({
322
- name: 'MA-roboticvacuumcleaner',
323
- code: 0x74,
324
- deviceClass: DeviceClasses.Simple,
325
- revision: 2,
326
- requiredServerClusters: [Identify.Cluster.id, RvcRunMode.Cluster.id, RvcOperationalState.Cluster.id],
327
- optionalServerClusters: [RvcCleanMode.Cluster.id],
328
- });
329
- // Custom device types without client clusters (not working in Alexa)
330
- export const onOffSwitch = DeviceTypeDefinition({
331
- name: 'MA-onoffswitch',
332
- code: 0x0103,
333
- deviceClass: DeviceClasses.Simple,
334
- revision: 3,
335
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id],
336
- optionalServerClusters: [LevelControl.Cluster.id, ColorControl.Cluster.id],
337
- });
338
- // Custom device types without client clusters (not working in Alexa)
339
- export const dimmableSwitch = DeviceTypeDefinition({
340
- name: 'MA-dimmableswitch',
341
- code: 0x0104,
342
- deviceClass: DeviceClasses.Simple,
343
- revision: 3,
344
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id, LevelControl.Cluster.id],
345
- optionalServerClusters: [ColorControl.Cluster.id],
346
- });
347
- // Custom device types without client clusters (not working in Alexa)
348
- export const colorTemperatureSwitch = DeviceTypeDefinition({
349
- name: 'MA-colortemperatureswitch',
350
- code: 0x0105,
351
- deviceClass: DeviceClasses.Simple,
352
- revision: 3,
353
- requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, /* Scenes.Cluster.id,*/ OnOff.Cluster.id, LevelControl.Cluster.id, ColorControl.Cluster.id],
354
- optionalServerClusters: [],
283
+ requiredServerClusters: [Identify.Cluster.id, SmokeCoAlarm.Cluster.id],
284
+ optionalServerClusters: [Groups.Cluster.id, TemperatureMeasurement.Cluster.id, RelativeHumidityMeasurement.Cluster.id, CarbonMonoxideConcentrationMeasurement.Cluster.id],
355
285
  });
356
- // Matter 1.2 and 1.3 device types
357
286
  export const airQualitySensor = DeviceTypeDefinition({
358
287
  name: 'MA-airQualitySensor',
359
288
  code: 0x002c,
@@ -399,59 +328,70 @@ export const rainSensor = DeviceTypeDefinition({
399
328
  requiredServerClusters: [Identify.Cluster.id, BooleanState.Cluster.id],
400
329
  optionalServerClusters: [BooleanStateConfiguration.Cluster.id],
401
330
  });
402
- // Remark: A Smoke CO Alarm device type SHALL support an instance of a Power Source device type on some endpoint.
403
- export const smokeCoAlarm = DeviceTypeDefinition({
404
- name: 'MA-smokeCoAlarm',
405
- code: 0x0076,
331
+ export const doorLockDevice = DeviceTypeDefinition({
332
+ name: 'MA-doorLock',
333
+ code: 0xa,
406
334
  deviceClass: DeviceClasses.Simple,
407
- revision: 1,
408
- requiredServerClusters: [Identify.Cluster.id, SmokeCoAlarm.Cluster.id],
409
- optionalServerClusters: [Groups.Cluster.id, TemperatureMeasurement.Cluster.id, RelativeHumidityMeasurement.Cluster.id, CarbonMonoxideConcentrationMeasurement.Cluster.id],
335
+ revision: 3,
336
+ requiredServerClusters: [Identify.Cluster.id, DoorLock.Cluster.id, AccessControl.Cluster.id],
337
+ optionalServerClusters: [],
410
338
  });
411
- /**
412
- * Remark: LevelControl cluster:
413
- * 0 N/A Pump is stopped,
414
- * 1–200 Level / 2 (0.5–100.0%) Pump setpoint in percent
415
- * 201–255 100.0% Pump setpoint is 100.0%
416
- */
417
- export const pumpDevice = DeviceTypeDefinition({
418
- name: 'MA-pump',
419
- code: 0x303,
339
+ export const coverDevice = DeviceTypeDefinition({
340
+ name: 'MA-windowCovering',
341
+ code: 0x202,
420
342
  deviceClass: DeviceClasses.Simple,
421
343
  revision: 3,
422
- requiredServerClusters: [OnOff.Cluster.id, PumpConfigurationAndControl.Cluster.id, Identify.Cluster.id],
423
- optionalServerClusters: [LevelControl.Cluster.id, Groups.Cluster.id, ScenesManagement.Cluster.id, TemperatureMeasurement.Cluster.id, PressureMeasurement.Cluster.id, FlowMeasurement.Cluster.id],
344
+ requiredServerClusters: [Identify.Cluster.id, WindowCovering.Cluster.id],
345
+ optionalServerClusters: [Groups.Cluster.id],
424
346
  });
425
- export const waterValve = DeviceTypeDefinition({
426
- name: 'MA-waterValve',
427
- code: 0x42,
347
+ export const thermostatDevice = DeviceTypeDefinition({
348
+ name: 'MA-thermostat',
349
+ code: 0x301,
428
350
  deviceClass: DeviceClasses.Simple,
429
- revision: 1,
430
- requiredServerClusters: [Identify.Cluster.id, ValveConfigurationAndControl.Cluster.id],
431
- optionalServerClusters: [FlowMeasurement.Cluster.id],
351
+ revision: 4,
352
+ requiredServerClusters: [Identify.Cluster.id, Thermostat.Cluster.id],
353
+ optionalServerClusters: [Groups.Cluster.id, ThermostatUserInterfaceConfiguration.Cluster.id, EnergyPreference.Cluster.id],
354
+ });
355
+ export const fanDevice = DeviceTypeDefinition({
356
+ name: 'MA-fan',
357
+ code: 0x2b,
358
+ deviceClass: DeviceClasses.Simple,
359
+ revision: 3,
360
+ requiredServerClusters: [Identify.Cluster.id, Groups.Cluster.id, FanControl.Cluster.id],
361
+ optionalServerClusters: [OnOff.Cluster.id],
432
362
  });
433
- /**
434
- * Remark: it may have a Thermostat, Temperature Sensor, Humidity Sensor and an Air Quality Sensor device type.
435
- * Additional device types MAY also be included in device compositions.
436
- */
437
363
  export const airPurifier = DeviceTypeDefinition({
438
364
  name: 'MA-airPurifier',
439
365
  code: 0x2d,
440
366
  deviceClass: DeviceClasses.Simple,
441
- revision: 1,
367
+ revision: 2,
442
368
  requiredServerClusters: [Identify.Cluster.id, FanControl.Cluster.id],
443
- optionalServerClusters: [Groups.Cluster.id, HepaFilterMonitoring.Cluster.id, ActivatedCarbonFilterMonitoring.Cluster.id],
444
- });
445
- /**
446
- * Remark: it may have a temperature sensor and a humidity sensor device.
447
- * Additional device types MAY also be included in device compositions.
448
- * The DF (Dead Front) feature is required for the On/Off cluster in this device type:
449
- * - Thermostat LocalTemperature null
450
- * - Temperature Measurement MeasuredValue null
451
- * - Relative Humidity Measurement MeasuredValue null
452
- * - Fan Control SpeedSetting null
453
- * - Fan Control PercentSetting null
454
- */
369
+ optionalServerClusters: [Groups.Cluster.id, OnOff.Cluster.id, HepaFilterMonitoring.Cluster.id, ActivatedCarbonFilterMonitoring.Cluster.id],
370
+ });
371
+ export const modeSelect = DeviceTypeDefinition({
372
+ name: 'MA-modeselect',
373
+ code: 0x27,
374
+ deviceClass: DeviceClasses.Simple,
375
+ revision: 1,
376
+ requiredServerClusters: [ModeSelect.Cluster.id],
377
+ });
378
+ export const bridge = DeviceTypeDefinition({
379
+ name: 'MA-aggregator',
380
+ code: 0x000e,
381
+ deviceClass: DeviceClasses.Dynamic,
382
+ revision: 2,
383
+ requiredServerClusters: [],
384
+ optionalServerClusters: [Actions.Cluster.id, Identify.Cluster.id, CommissionerControl.Cluster.id],
385
+ });
386
+ export const aggregator = bridge;
387
+ export const roboticVacuumCleaner = DeviceTypeDefinition({
388
+ name: 'MA-roboticvacuumcleaner',
389
+ code: 0x74,
390
+ deviceClass: DeviceClasses.Simple,
391
+ revision: 3,
392
+ requiredServerClusters: [Identify.Cluster.id, RvcRunMode.Cluster.id, RvcOperationalState.Cluster.id],
393
+ optionalServerClusters: [RvcCleanMode.Cluster.id, ServiceArea.Cluster.id],
394
+ });
455
395
  export const airConditioner = DeviceTypeDefinition({
456
396
  name: 'MA-airConditioner',
457
397
  code: 0x72,
@@ -460,20 +400,3 @@ export const airConditioner = DeviceTypeDefinition({
460
400
  requiredServerClusters: [Identify.Cluster.id, OnOff.Cluster.id, Thermostat.Cluster.id],
461
401
  optionalServerClusters: [Groups.Cluster.id, ScenesManagement.Cluster.id, FanControl.Cluster.id, ThermostatUserInterfaceConfiguration.Cluster.id, TemperatureMeasurement.Cluster.id, RelativeHumidityMeasurement.Cluster.id],
462
402
  });
463
- export const electricalSensor = DeviceTypeDefinition({
464
- name: 'MA-electricalSensor',
465
- code: 0x0510,
466
- deviceClass: DeviceClasses.Utility,
467
- revision: 1,
468
- requiredServerClusters: [PowerTopology.Cluster.id],
469
- optionalServerClusters: [ElectricalPowerMeasurement.Cluster.id, ElectricalEnergyMeasurement.Cluster.id],
470
- });
471
- export const deviceEnergyManagement = DeviceTypeDefinition({
472
- name: 'MA-deviceEnergyManagement',
473
- code: 0x050d,
474
- deviceClass: DeviceClasses.Utility,
475
- revision: 1,
476
- requiredServerClusters: [DeviceEnergyManagement.Cluster.id, DeviceEnergyManagementMode.Cluster.id],
477
- optionalServerClusters: [],
478
- });
479
- //# sourceMappingURL=matterbridgeDeviceTypes.js.map
@@ -1,37 +1,5 @@
1
- /**
2
- * This file contains the class MatterbridgeDynamicPlatform.
3
- *
4
- * @file matterbridgeDynamicPlatform.ts
5
- * @author Luca Liguori
6
- * @date 2023-12-29
7
- * @version 1.0.5
8
- *
9
- * Copyright 2023, 2024, 2025 Luca Liguori.
10
- *
11
- * Licensed under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License.
13
- * You may obtain a copy of the License at
14
- *
15
- * http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software
18
- * distributed under the License is distributed on an "AS IS" BASIS,
19
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
- * See the License for the specific language governing permissions and
21
- * limitations under the License. *
22
- */
23
1
  import { MatterbridgePlatform } from './matterbridgePlatform.js';
24
- /**
25
- * Represents a dynamic platform for Matterbridge.
26
- *
27
- */
28
2
  export class MatterbridgeDynamicPlatform extends MatterbridgePlatform {
29
- /**
30
- * Creates an instance of MatterbridgeDynamicPlatform.
31
- * @param {Matterbridge} matterbridge - The Matterbridge instance.
32
- * @param {AnsiLogger} log - The logger instance.
33
- * @param {PlatformConfig} config - The platform configuration.
34
- */
35
3
  constructor(matterbridge, log, config) {
36
4
  super(matterbridge, log, config);
37
5
  this.type = 'DynamicPlatform';
@@ -39,4 +7,3 @@ export class MatterbridgeDynamicPlatform extends MatterbridgePlatform {
39
7
  this.log.debug(`Matterbridge${this.type} loaded`);
40
8
  }
41
9
  }
42
- //# sourceMappingURL=matterbridgeDynamicPlatform.js.map