homebridge 2.0.0-beta.30 → 2.0.0-beta.31

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 (88) hide show
  1. package/dist/api.d.ts +267 -3
  2. package/dist/api.d.ts.map +1 -1
  3. package/dist/api.js +92 -0
  4. package/dist/api.js.map +1 -1
  5. package/dist/bridgeService.d.ts +4 -2
  6. package/dist/bridgeService.d.ts.map +1 -1
  7. package/dist/bridgeService.js +1 -3
  8. package/dist/bridgeService.js.map +1 -1
  9. package/dist/childBridgeFork.d.ts +29 -2
  10. package/dist/childBridgeFork.d.ts.map +1 -1
  11. package/dist/childBridgeFork.js +294 -4
  12. package/dist/childBridgeFork.js.map +1 -1
  13. package/dist/childBridgeService.d.ts +19 -0
  14. package/dist/childBridgeService.d.ts.map +1 -1
  15. package/dist/childBridgeService.js +38 -3
  16. package/dist/childBridgeService.js.map +1 -1
  17. package/dist/externalPortService.d.ts +27 -6
  18. package/dist/externalPortService.d.ts.map +1 -1
  19. package/dist/externalPortService.js +73 -7
  20. package/dist/externalPortService.js.map +1 -1
  21. package/dist/index.d.ts +47 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +15 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/ipcService.d.ts +20 -0
  26. package/dist/ipcService.d.ts.map +1 -1
  27. package/dist/ipcService.js.map +1 -1
  28. package/dist/logger.d.ts +6 -0
  29. package/dist/logger.d.ts.map +1 -1
  30. package/dist/logger.js +8 -0
  31. package/dist/logger.js.map +1 -1
  32. package/dist/matter/index.d.ts +123 -0
  33. package/dist/matter/index.d.ts.map +1 -0
  34. package/dist/matter/index.js +19 -0
  35. package/dist/matter/index.js.map +1 -0
  36. package/dist/matter/matterAccessoryCache.d.ts +96 -0
  37. package/dist/matter/matterAccessoryCache.d.ts.map +1 -0
  38. package/dist/matter/matterAccessoryCache.js +192 -0
  39. package/dist/matter/matterAccessoryCache.js.map +1 -0
  40. package/dist/matter/matterBehaviors.d.ts +194 -0
  41. package/dist/matter/matterBehaviors.d.ts.map +1 -0
  42. package/dist/matter/matterBehaviors.js +665 -0
  43. package/dist/matter/matterBehaviors.js.map +1 -0
  44. package/dist/matter/matterConfigValidator.d.ts +81 -0
  45. package/dist/matter/matterConfigValidator.d.ts.map +1 -0
  46. package/dist/matter/matterConfigValidator.js +240 -0
  47. package/dist/matter/matterConfigValidator.js.map +1 -0
  48. package/dist/matter/matterErrorHandler.d.ts +106 -0
  49. package/dist/matter/matterErrorHandler.d.ts.map +1 -0
  50. package/dist/matter/matterErrorHandler.js +495 -0
  51. package/dist/matter/matterErrorHandler.js.map +1 -0
  52. package/dist/matter/matterLogFormatter.d.ts +19 -0
  53. package/dist/matter/matterLogFormatter.d.ts.map +1 -0
  54. package/dist/matter/matterLogFormatter.js +144 -0
  55. package/dist/matter/matterLogFormatter.js.map +1 -0
  56. package/dist/matter/matterNetworkMonitor.d.ts +68 -0
  57. package/dist/matter/matterNetworkMonitor.d.ts.map +1 -0
  58. package/dist/matter/matterNetworkMonitor.js +249 -0
  59. package/dist/matter/matterNetworkMonitor.js.map +1 -0
  60. package/dist/matter/matterServer.d.ts +656 -0
  61. package/dist/matter/matterServer.d.ts.map +1 -0
  62. package/dist/matter/matterServer.js +1690 -0
  63. package/dist/matter/matterServer.js.map +1 -0
  64. package/dist/matter/matterServerHelpers.d.ts +81 -0
  65. package/dist/matter/matterServerHelpers.d.ts.map +1 -0
  66. package/dist/matter/matterServerHelpers.js +323 -0
  67. package/dist/matter/matterServerHelpers.js.map +1 -0
  68. package/dist/matter/matterSharedTypes.d.ts +170 -0
  69. package/dist/matter/matterSharedTypes.d.ts.map +1 -0
  70. package/dist/matter/matterSharedTypes.js +52 -0
  71. package/dist/matter/matterSharedTypes.js.map +1 -0
  72. package/dist/matter/matterStorage.d.ts +128 -0
  73. package/dist/matter/matterStorage.d.ts.map +1 -0
  74. package/dist/matter/matterStorage.js +415 -0
  75. package/dist/matter/matterStorage.js.map +1 -0
  76. package/dist/matter/matterTypes.d.ts +745 -0
  77. package/dist/matter/matterTypes.d.ts.map +1 -0
  78. package/dist/matter/matterTypes.js +174 -0
  79. package/dist/matter/matterTypes.js.map +1 -0
  80. package/dist/server.d.ts +23 -1
  81. package/dist/server.d.ts.map +1 -1
  82. package/dist/server.js +385 -7
  83. package/dist/server.js.map +1 -1
  84. package/dist/user.d.ts +1 -0
  85. package/dist/user.d.ts.map +1 -1
  86. package/dist/user.js +3 -0
  87. package/dist/user.js.map +1 -1
  88. package/package.json +16 -15
@@ -0,0 +1,745 @@
1
+ /**
2
+ * Matter Types for Homebridge Plugin API
3
+ *
4
+ * This module provides types and interfaces for plugin developers
5
+ * to create Matter-compatible accessories.
6
+ */
7
+ import type { Endpoint, EndpointType } from '@matter/main';
8
+ import * as clusters from '@matter/main/clusters';
9
+ import * as devices from '@matter/main/devices';
10
+ export type { EndpointType };
11
+ /**
12
+ * Handler context information
13
+ * Provides information about which part of a composed device triggered the handler
14
+ */
15
+ export interface MatterHandlerContext {
16
+ /** Parent accessory UUID */
17
+ uuid: string;
18
+ /** Part ID if this handler was triggered from a part, undefined for main accessory */
19
+ partId?: string;
20
+ }
21
+ /**
22
+ * Matter command handler function type
23
+ *
24
+ * Handlers can be synchronous or asynchronous (returning a Promise).
25
+ * The args parameter contains the command arguments passed by Matter.js (optional).
26
+ * The context parameter provides information about which part triggered the handler (for composed devices).
27
+ */
28
+ export type MatterCommandHandler<TArgs = unknown> = (args?: TArgs, context?: MatterHandlerContext) => Promise<void> | void;
29
+ /**
30
+ * Matter cluster handlers interface
31
+ *
32
+ * Maps command names to their handler functions.
33
+ * Each command can have custom argument types.
34
+ */
35
+ export interface MatterClusterHandlers {
36
+ [commandName: string]: MatterCommandHandler<any>;
37
+ }
38
+ /**
39
+ * Matter Accessory Part - Sub-device in a composed accessory
40
+ *
41
+ * Represents a child endpoint in a composed device (e.g., individual outlets in a power strip).
42
+ * Parts are added as child endpoints to the main accessory.
43
+ */
44
+ export interface MatterAccessoryPart {
45
+ /** Unique identifier for this part within the accessory (e.g., 'outlet-1', 'light', 'shade') */
46
+ id: string;
47
+ /** Display name for this part (optional, defaults to parent's name + part id) */
48
+ displayName?: string;
49
+ /** Matter device type for this part */
50
+ deviceType: EndpointType;
51
+ /**
52
+ * Initial cluster states for this part
53
+ * Same format as `MatterAccessory.clusters`
54
+ */
55
+ clusters: {
56
+ [clusterName: string]: {
57
+ [attributeName: string]: unknown;
58
+ };
59
+ };
60
+ /**
61
+ * Handlers for this part's commands
62
+ * Handlers receive context.partId to identify which part was triggered
63
+ */
64
+ handlers?: {
65
+ [clusterName: string]: MatterClusterHandlers;
66
+ };
67
+ }
68
+ /**
69
+ * Matter Accessory - Plugin API Interface
70
+ *
71
+ * This is the main interface that plugin developers use to register
72
+ * Matter accessories with Homebridge.
73
+ *
74
+ * For composed devices (devices with multiple subcomponents), use the `parts` array
75
+ * to define child endpoints. Each part appears as a separate device in the Home app.
76
+ */
77
+ export interface MatterAccessory<T = Record<string, unknown>> {
78
+ /** Unique identifier for this accessory (must be unique across all accessories) */
79
+ uuid: string;
80
+ /** Display name for the accessory */
81
+ displayName: string;
82
+ /** Matter device type (e.g., OnOffLightDevice, DimmableLightDevice, etc.) */
83
+ deviceType: EndpointType;
84
+ /** Serial number for the device */
85
+ serialNumber: string;
86
+ /** Manufacturer name */
87
+ manufacturer: string;
88
+ /** Model name/identifier */
89
+ model: string;
90
+ /** Firmware revision (optional) */
91
+ firmwareRevision?: string;
92
+ /** Hardware revision (optional) */
93
+ hardwareRevision?: string;
94
+ /** Software version (optional) */
95
+ softwareVersion?: string;
96
+ /**
97
+ * Plugin developer storage - persists across restarts
98
+ * This is a way for plugin developers to store custom data with their accessory
99
+ * Similar to `PlatformAccessory.context` for HAP accessories
100
+ */
101
+ context?: T;
102
+ /**
103
+ * Initial cluster states
104
+ * Key is the cluster name, value is an object of attribute name -> value
105
+ *
106
+ * Example:
107
+ * {
108
+ * onOff: { onOff: true },
109
+ * levelControl: { currentLevel: 127, minLevel: 1, maxLevel: 254 }
110
+ * }
111
+ *
112
+ * Note: If using `parts`, this is optional (main accessory may only be a container)
113
+ */
114
+ clusters?: {
115
+ [clusterName: string]: {
116
+ [attributeName: string]: unknown;
117
+ };
118
+ };
119
+ /**
120
+ * Handlers for Matter commands (Home app → Device)
121
+ *
122
+ * These handlers are called when a user controls the accessory via the Home app.
123
+ * Use handlers to send commands to your actual device (cloud API, local network, etc.).
124
+ */
125
+ handlers?: {
126
+ [clusterName: string]: MatterClusterHandlers;
127
+ };
128
+ /**
129
+ * Optional: Get current state handler
130
+ * Called when a Matter controller reads an attribute
131
+ * If not provided, the last set value is returned
132
+ */
133
+ getState?: (cluster: string, attribute: string) => Promise<any> | any;
134
+ /**
135
+ * Optional: Array of child endpoints (parts) for composed devices
136
+ *
137
+ * Use this to create devices with multiple independent subcomponents, such as:
138
+ * - Power strip with multiple outlets
139
+ * - Window covering with shade + light
140
+ * - Multi-zone thermostat or speaker system
141
+ *
142
+ * Each part appears as a separate device in the Home app and can be controlled independently.
143
+ *
144
+ * Example:
145
+ * ```typescript
146
+ * parts: [
147
+ * {
148
+ * id: 'outlet-1',
149
+ * displayName: 'Outlet 1',
150
+ * deviceType: api.matter.deviceTypes.OnOffOutlet,
151
+ * clusters: { onOff: { onOff: false } },
152
+ * handlers: {
153
+ * onOff: {
154
+ * on: async (args, context) => {
155
+ * console.log(`Part ${context.partId} turned on`)
156
+ * await controlOutlet(1, true)
157
+ * }
158
+ * }
159
+ * }
160
+ * },
161
+ * // ... more outlets
162
+ * ]
163
+ * ```
164
+ */
165
+ parts?: MatterAccessoryPart[];
166
+ }
167
+ /**
168
+ * Matter Configuration (for bridge or child bridge)
169
+ */
170
+ export interface MatterConfig extends Record<string, unknown> {
171
+ /** Port for Matter server (optional, will auto-assign if not specified) */
172
+ port?: number;
173
+ /** Name for the Matter bridge (optional) */
174
+ name?: string;
175
+ }
176
+ /**
177
+ * Matter Fabric Information
178
+ * Represents a commissioned controller (fabric) on the Matter bridge
179
+ */
180
+ export interface MatterFabricInfo {
181
+ fabricIndex: number;
182
+ fabricId: string;
183
+ nodeId: string;
184
+ rootVendorId: number;
185
+ label?: string;
186
+ }
187
+ /**
188
+ * Matter Server Events
189
+ * Event types emitted by the Matter server for commissioning lifecycle
190
+ */
191
+ export interface MatterServerEvents {
192
+ /** Emitted when the bridge is commissioned for the first time */
193
+ 'commissioned': (fabricInfo: MatterFabricInfo) => void;
194
+ /** Emitted when the last fabric is removed (bridge becomes uncommissioned) */
195
+ 'decommissioned': () => void;
196
+ /** Emitted when a new fabric (controller) is added */
197
+ 'fabric-added': (fabricInfo: MatterFabricInfo) => void;
198
+ /** Emitted when a fabric (controller) is removed */
199
+ 'fabric-removed': (fabricInfo: MatterFabricInfo) => void;
200
+ /** Emitted whenever commissioning state changes (any fabric added/removed) */
201
+ 'commissioning-changed': (commissioned: boolean, fabricCount: number) => void;
202
+ /** Emitted when an accessory is registered */
203
+ 'accessory-registered': (accessory: MatterAccessory) => void;
204
+ /** Emitted when an accessory is unregistered */
205
+ 'accessory-unregistered': (uuid: string) => void;
206
+ }
207
+ /**
208
+ * Internal representation of a part endpoint
209
+ */
210
+ export interface InternalMatterAccessoryPart extends MatterAccessoryPart {
211
+ /** Matter.js endpoint instance for this part */
212
+ endpoint?: Endpoint;
213
+ }
214
+ /**
215
+ * Internal Matter accessory representation
216
+ * (Used internally by MatterServer)
217
+ */
218
+ export interface InternalMatterAccessory extends MatterAccessory {
219
+ /** Plugin identifier (set when registered) */
220
+ _associatedPlugin?: string;
221
+ /** Platform name (set when registered) */
222
+ _associatedPlatform?: string;
223
+ /** Matter.js endpoint instance */
224
+ endpoint?: Endpoint;
225
+ /** Whether this accessory is currently registered */
226
+ registered: boolean;
227
+ /** Internal part endpoints (if using parts) */
228
+ _parts?: InternalMatterAccessoryPart[];
229
+ }
230
+ /**
231
+ * Matter error type enum (for error handler categorization)
232
+ */
233
+ export declare enum MatterErrorType {
234
+ INITIALIZATION = "INITIALIZATION",
235
+ NETWORK = "NETWORK",
236
+ COMMISSIONING = "COMMISSIONING",
237
+ DEVICE_SYNC = "DEVICE_SYNC",
238
+ SERVER = "SERVER",
239
+ STORAGE = "STORAGE",
240
+ CONFIGURATION = "CONFIGURATION",
241
+ DEVICE_ERROR = "DEVICE_ERROR",
242
+ UNKNOWN = "UNKNOWN"
243
+ }
244
+ /**
245
+ * Matter error details interface
246
+ */
247
+ export interface MatterErrorDetails {
248
+ type?: MatterErrorType;
249
+ recoverable?: boolean;
250
+ code?: string;
251
+ context?: string;
252
+ originalError?: Error;
253
+ }
254
+ /**
255
+ * Matter error types
256
+ */
257
+ export declare class MatterError extends Error {
258
+ readonly code: string;
259
+ readonly details?: MatterErrorDetails | undefined;
260
+ readonly type: MatterErrorType;
261
+ readonly timestamp: Date;
262
+ readonly recoverable: boolean;
263
+ constructor(message: string, code: string, details?: MatterErrorDetails | undefined);
264
+ }
265
+ export declare class MatterCommissioningError extends MatterError {
266
+ constructor(message: string, details?: MatterErrorDetails);
267
+ }
268
+ export declare class MatterStorageError extends MatterError {
269
+ constructor(message: string, details?: MatterErrorDetails);
270
+ }
271
+ export declare class MatterDeviceError extends MatterError {
272
+ constructor(message: string, details?: MatterErrorDetails);
273
+ }
274
+ export declare class MatterNetworkError extends MatterError {
275
+ constructor(message: string, details?: MatterErrorDetails);
276
+ }
277
+ export { clusters };
278
+ export { devices };
279
+ /**
280
+ * Friendly device type names for the Plugin API
281
+ * Maps simplified names to actual Matter.js device types
282
+ */
283
+ export declare const deviceTypes: {
284
+ readonly OnOffLight: devices.OnOffLightDevice;
285
+ readonly DimmableLight: devices.DimmableLightDevice;
286
+ readonly ColorTemperatureLight: devices.ColorTemperatureLightDevice;
287
+ readonly ExtendedColorLight: devices.ExtendedColorLightDevice;
288
+ readonly OnOffSwitch: devices.OnOffLightSwitchDevice;
289
+ readonly OnOffOutlet: devices.OnOffPlugInUnitDevice;
290
+ readonly DimmableOutlet: devices.DimmablePlugInUnitDevice;
291
+ readonly TemperatureSensor: devices.TemperatureSensorDevice;
292
+ readonly HumiditySensor: devices.HumiditySensorDevice;
293
+ readonly LightSensor: devices.LightSensorDevice;
294
+ readonly MotionSensor: devices.OccupancySensorDevice;
295
+ readonly ContactSensor: devices.ContactSensorDevice;
296
+ readonly LeakSensor: devices.WaterLeakDetectorDevice;
297
+ readonly SmokeSensor: devices.SmokeCoAlarmDevice;
298
+ readonly Thermostat: import("@matter/main").MutableEndpoint.With<EndpointType.For<{
299
+ readonly name: "Thermostat";
300
+ readonly deviceType: 769;
301
+ readonly deviceRevision: 4;
302
+ readonly requirements: typeof devices.ThermostatRequirements;
303
+ readonly behaviors: {
304
+ readonly identify: typeof import("@matter/node/behaviors").IdentifyServer;
305
+ };
306
+ }>, import("@matter/main").SupportedBehaviors.With<{
307
+ readonly identify: typeof import("@matter/node/behaviors").IdentifyServer;
308
+ }, readonly [import("@matter/main").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
309
+ readonly id: 513;
310
+ readonly name: "Thermostat";
311
+ readonly revision: 8;
312
+ readonly features: {
313
+ readonly heating: import("@matter/types").BitFlag;
314
+ readonly cooling: import("@matter/types").BitFlag;
315
+ readonly occupancy: import("@matter/types").BitFlag;
316
+ readonly scheduleConfiguration: import("@matter/types").BitFlag;
317
+ readonly setback: import("@matter/types").BitFlag;
318
+ readonly autoMode: import("@matter/types").BitFlag;
319
+ readonly localTemperatureNotExposed: import("@matter/types").BitFlag;
320
+ readonly matterScheduleConfiguration: import("@matter/types").BitFlag;
321
+ readonly presets: import("@matter/types").BitFlag;
322
+ };
323
+ readonly attributes: {
324
+ readonly localTemperature: import("@matter/types").Attribute<number | null, any>;
325
+ readonly outdoorTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
326
+ readonly hvacSystemTypeConfiguration: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
327
+ coolingStage: import("@matter/types").BitField;
328
+ heatingStage: import("@matter/types").BitField;
329
+ heatingIsHeatPump: import("@matter/types").BitFlag;
330
+ heatingUsesFuel: import("@matter/types").BitFlag;
331
+ }>, any>;
332
+ readonly remoteSensing: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
333
+ localTemperature: import("@matter/types").BitFlag;
334
+ outdoorTemperature: import("@matter/types").BitFlag;
335
+ occupancy: import("@matter/types").BitFlag;
336
+ }>, any>;
337
+ readonly controlSequenceOfOperation: import("@matter/types").WritableAttribute<clusters.Thermostat.ControlSequenceOfOperation, any>;
338
+ readonly systemMode: import("@matter/types").WritableAttribute<clusters.Thermostat.SystemMode, any>;
339
+ readonly temperatureSetpointHold: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.TemperatureSetpointHold, any>;
340
+ readonly temperatureSetpointHoldDuration: import("@matter/types").OptionalWritableAttribute<number | null, any>;
341
+ readonly thermostatProgrammingOperationMode: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
342
+ scheduleActive: import("@matter/types").BitFlag;
343
+ autoRecovery: import("@matter/types").BitFlag;
344
+ economy: import("@matter/types").BitFlag;
345
+ }>, any>;
346
+ readonly thermostatRunningState: import("@matter/types").OptionalAttribute<import("@matter/types").TypeFromPartialBitSchema<{
347
+ heat: import("@matter/types").BitFlag;
348
+ cool: import("@matter/types").BitFlag;
349
+ fan: import("@matter/types").BitFlag;
350
+ heatStage2: import("@matter/types").BitFlag;
351
+ coolStage2: import("@matter/types").BitFlag;
352
+ fanStage2: import("@matter/types").BitFlag;
353
+ fanStage3: import("@matter/types").BitFlag;
354
+ }>, any>;
355
+ readonly setpointChangeSource: import("@matter/types").OptionalAttribute<clusters.Thermostat.SetpointChangeSource, any>;
356
+ readonly setpointChangeAmount: import("@matter/types").OptionalAttribute<number | null, any>;
357
+ readonly setpointChangeSourceTimestamp: import("@matter/types").OptionalAttribute<number, any>;
358
+ readonly emergencyHeatDelta: import("@matter/types").OptionalWritableAttribute<number, any>;
359
+ readonly acType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcType, any>;
360
+ readonly acCapacity: import("@matter/types").OptionalWritableAttribute<number, any>;
361
+ readonly acRefrigerantType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcRefrigerantType, any>;
362
+ readonly acCompressorType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcCompressorType, any>;
363
+ readonly acErrorCode: import("@matter/types").OptionalWritableAttribute<import("@matter/types").TypeFromPartialBitSchema<{
364
+ compressorFail: import("@matter/types").BitFlag;
365
+ roomSensorFail: import("@matter/types").BitFlag;
366
+ outdoorSensorFail: import("@matter/types").BitFlag;
367
+ coilSensorFail: import("@matter/types").BitFlag;
368
+ fanFail: import("@matter/types").BitFlag;
369
+ }>, any>;
370
+ readonly acLouverPosition: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcLouverPosition, any>;
371
+ readonly acCoilTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
372
+ readonly acCapacityFormat: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcCapacityFormat, any>;
373
+ readonly setpointHoldExpiryTimestamp: import("@matter/types").OptionalAttribute<number | null, any>;
374
+ };
375
+ readonly commands: {
376
+ readonly setpointRaiseLower: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
377
+ mode: import("@matter/types").FieldType<clusters.Thermostat.SetpointRaiseLowerMode>;
378
+ amount: import("@matter/types").FieldType<number>;
379
+ }>, void, any>;
380
+ };
381
+ readonly extensions: readonly [{
382
+ readonly flags: {
383
+ readonly occupancy: true;
384
+ };
385
+ readonly component: {
386
+ readonly attributes: {
387
+ readonly occupancy: import("@matter/types").Attribute<import("@matter/types").TypeFromPartialBitSchema<{
388
+ occupied: import("@matter/types").BitFlag;
389
+ }>, any>;
390
+ };
391
+ };
392
+ }, {
393
+ readonly flags: {
394
+ readonly heating: true;
395
+ };
396
+ readonly component: {
397
+ readonly attributes: {
398
+ readonly absMinHeatSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
399
+ readonly absMaxHeatSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
400
+ readonly piHeatingDemand: import("@matter/types").OptionalAttribute<number, any>;
401
+ readonly occupiedHeatingSetpoint: import("@matter/types").WritableAttribute<number, any>;
402
+ readonly minHeatSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
403
+ readonly maxHeatSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
404
+ };
405
+ };
406
+ }, {
407
+ readonly flags: {
408
+ readonly cooling: true;
409
+ };
410
+ readonly component: {
411
+ readonly attributes: {
412
+ readonly absMinCoolSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
413
+ readonly absMaxCoolSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
414
+ readonly piCoolingDemand: import("@matter/types").OptionalAttribute<number, any>;
415
+ readonly occupiedCoolingSetpoint: import("@matter/types").WritableAttribute<number, any>;
416
+ readonly minCoolSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
417
+ readonly maxCoolSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
418
+ };
419
+ };
420
+ }, {
421
+ readonly flags: {
422
+ readonly localTemperatureNotExposed: false;
423
+ };
424
+ readonly component: {
425
+ readonly attributes: {
426
+ readonly localTemperatureCalibration: import("@matter/types").OptionalWritableAttribute<number, any>;
427
+ };
428
+ };
429
+ }, {
430
+ readonly flags: {
431
+ readonly cooling: true;
432
+ readonly occupancy: true;
433
+ };
434
+ readonly component: {
435
+ readonly attributes: {
436
+ readonly unoccupiedCoolingSetpoint: import("@matter/types").WritableAttribute<number, any>;
437
+ };
438
+ };
439
+ }, {
440
+ readonly flags: {
441
+ readonly heating: true;
442
+ readonly occupancy: true;
443
+ };
444
+ readonly component: {
445
+ readonly attributes: {
446
+ readonly unoccupiedHeatingSetpoint: import("@matter/types").WritableAttribute<number, any>;
447
+ };
448
+ };
449
+ }, {
450
+ readonly flags: {
451
+ readonly autoMode: true;
452
+ };
453
+ readonly component: {
454
+ readonly attributes: {
455
+ readonly minSetpointDeadBand: import("@matter/types").WritableAttribute<number, any>;
456
+ readonly thermostatRunningMode: import("@matter/types").OptionalAttribute<clusters.Thermostat.ThermostatRunningMode, any>;
457
+ };
458
+ };
459
+ }, {
460
+ readonly flags: {
461
+ readonly scheduleConfiguration: true;
462
+ };
463
+ readonly component: {
464
+ readonly attributes: {
465
+ readonly startOfWeek: import("@matter/types").FixedAttribute<clusters.Thermostat.StartOfWeek, any>;
466
+ readonly numberOfWeeklyTransitions: import("@matter/types").FixedAttribute<number, any>;
467
+ readonly numberOfDailyTransitions: import("@matter/types").FixedAttribute<number, any>;
468
+ };
469
+ readonly commands: {
470
+ readonly setWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
471
+ numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
472
+ dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
473
+ sunday: import("@matter/types").BitFlag;
474
+ monday: import("@matter/types").BitFlag;
475
+ tuesday: import("@matter/types").BitFlag;
476
+ wednesday: import("@matter/types").BitFlag;
477
+ thursday: import("@matter/types").BitFlag;
478
+ friday: import("@matter/types").BitFlag;
479
+ saturday: import("@matter/types").BitFlag;
480
+ away: import("@matter/types").BitFlag;
481
+ }>>;
482
+ modeForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
483
+ heatSetpointPresent: import("@matter/types").BitFlag;
484
+ coolSetpointPresent: import("@matter/types").BitFlag;
485
+ }>>;
486
+ transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
487
+ transitionTime: import("@matter/types").FieldType<number>;
488
+ heatSetpoint: import("@matter/types").FieldType<number | null>;
489
+ coolSetpoint: import("@matter/types").FieldType<number | null>;
490
+ }>[]>;
491
+ }>, void, any>;
492
+ readonly getWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
493
+ daysToReturn: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
494
+ sunday: import("@matter/types").BitFlag;
495
+ monday: import("@matter/types").BitFlag;
496
+ tuesday: import("@matter/types").BitFlag;
497
+ wednesday: import("@matter/types").BitFlag;
498
+ thursday: import("@matter/types").BitFlag;
499
+ friday: import("@matter/types").BitFlag;
500
+ saturday: import("@matter/types").BitFlag;
501
+ away: import("@matter/types").BitFlag;
502
+ }>>;
503
+ modeToReturn: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
504
+ heatSetpointPresent: import("@matter/types").BitFlag;
505
+ coolSetpointPresent: import("@matter/types").BitFlag;
506
+ }>>;
507
+ }>, import("@matter/types").TypeFromFields<{
508
+ numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
509
+ dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
510
+ sunday: import("@matter/types").BitFlag;
511
+ monday: import("@matter/types").BitFlag;
512
+ tuesday: import("@matter/types").BitFlag;
513
+ wednesday: import("@matter/types").BitFlag;
514
+ thursday: import("@matter/types").BitFlag;
515
+ friday: import("@matter/types").BitFlag;
516
+ saturday: import("@matter/types").BitFlag;
517
+ away: import("@matter/types").BitFlag;
518
+ }>>;
519
+ modeForSequence: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
520
+ heatSetpointPresent: import("@matter/types").BitFlag;
521
+ coolSetpointPresent: import("@matter/types").BitFlag;
522
+ }>>;
523
+ transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
524
+ transitionTime: import("@matter/types").FieldType<number>;
525
+ heatSetpoint: import("@matter/types").FieldType<number | null>;
526
+ coolSetpoint: import("@matter/types").FieldType<number | null>;
527
+ }>[]>;
528
+ }>, any>;
529
+ readonly clearWeeklySchedule: import("@matter/types").Command<void, void, any>;
530
+ };
531
+ };
532
+ }, {
533
+ readonly flags: {
534
+ readonly setback: true;
535
+ };
536
+ readonly component: {
537
+ readonly attributes: {
538
+ readonly occupiedSetback: import("@matter/types").WritableAttribute<number | null, any>;
539
+ readonly occupiedSetbackMin: import("@matter/types").FixedAttribute<number | null, any>;
540
+ readonly occupiedSetbackMax: import("@matter/types").FixedAttribute<number | null, any>;
541
+ };
542
+ };
543
+ }, {
544
+ readonly flags: {
545
+ readonly setback: true;
546
+ readonly occupancy: true;
547
+ };
548
+ readonly component: {
549
+ readonly attributes: {
550
+ readonly unoccupiedSetback: import("@matter/types").WritableAttribute<number | null, any>;
551
+ readonly unoccupiedSetbackMin: import("@matter/types").FixedAttribute<number | null, any>;
552
+ readonly unoccupiedSetbackMax: import("@matter/types").FixedAttribute<number | null, any>;
553
+ };
554
+ };
555
+ }, {
556
+ readonly flags: {
557
+ readonly presets: true;
558
+ };
559
+ readonly component: {
560
+ readonly attributes: {
561
+ readonly presetTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
562
+ presetScenario: import("@matter/types").FieldType<clusters.Thermostat.PresetScenario>;
563
+ numberOfPresets: import("@matter/types").FieldType<number>;
564
+ presetTypeFeatures: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
565
+ automatic: import("@matter/types").BitFlag;
566
+ supportsNames: import("@matter/types").BitFlag;
567
+ }>>;
568
+ }>[], any>;
569
+ readonly numberOfPresets: import("@matter/types").FixedAttribute<number, any>;
570
+ readonly activePresetHandle: import("@matter/types").Attribute<AllowSharedBufferSource | null, any>;
571
+ readonly presets: import("@matter/types").WritableAttribute<import("@matter/types").TypeFromFields<{
572
+ presetHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
573
+ presetScenario: import("@matter/types").FieldType<clusters.Thermostat.PresetScenario>;
574
+ name: import("@matter/types").OptionalFieldType<string | null>;
575
+ coolingSetpoint: import("@matter/types").OptionalFieldType<number>;
576
+ heatingSetpoint: import("@matter/types").OptionalFieldType<number>;
577
+ builtIn: import("@matter/types").FieldType<boolean | null>;
578
+ }>[], any>;
579
+ };
580
+ readonly commands: {
581
+ readonly setActivePresetRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
582
+ presetHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
583
+ }>, void, any>;
584
+ };
585
+ };
586
+ }, {
587
+ readonly flags: {
588
+ readonly matterScheduleConfiguration: true;
589
+ };
590
+ readonly component: {
591
+ readonly attributes: {
592
+ readonly scheduleTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
593
+ systemMode: import("@matter/types").FieldType<clusters.Thermostat.SystemMode>;
594
+ numberOfSchedules: import("@matter/types").FieldType<number>;
595
+ scheduleTypeFeatures: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
596
+ supportsPresets: import("@matter/types").BitFlag;
597
+ supportsSetpoints: import("@matter/types").BitFlag;
598
+ supportsNames: import("@matter/types").BitFlag;
599
+ supportsOff: import("@matter/types").BitFlag;
600
+ }>>;
601
+ }>[], any>;
602
+ readonly numberOfSchedules: import("@matter/types").FixedAttribute<number, any>;
603
+ readonly numberOfScheduleTransitions: import("@matter/types").FixedAttribute<number, any>;
604
+ readonly numberOfScheduleTransitionPerDay: import("@matter/types").FixedAttribute<number | null, any>;
605
+ readonly activeScheduleHandle: import("@matter/types").Attribute<AllowSharedBufferSource | null, any>;
606
+ readonly schedules: import("@matter/types").WritableAttribute<import("@matter/types").TypeFromFields<{
607
+ scheduleHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
608
+ systemMode: import("@matter/types").FieldType<clusters.Thermostat.SystemMode>;
609
+ name: import("@matter/types").OptionalFieldType<string>;
610
+ presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
611
+ transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
612
+ dayOfWeek: import("@matter/types").FieldType<import("@matter/types").TypeFromPartialBitSchema<{
613
+ sunday: import("@matter/types").BitFlag;
614
+ monday: import("@matter/types").BitFlag;
615
+ tuesday: import("@matter/types").BitFlag;
616
+ wednesday: import("@matter/types").BitFlag;
617
+ thursday: import("@matter/types").BitFlag;
618
+ friday: import("@matter/types").BitFlag;
619
+ saturday: import("@matter/types").BitFlag;
620
+ away: import("@matter/types").BitFlag;
621
+ }>>;
622
+ transitionTime: import("@matter/types").FieldType<number>;
623
+ presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
624
+ systemMode: import("@matter/types").OptionalFieldType<clusters.Thermostat.SystemMode>;
625
+ coolingSetpoint: import("@matter/types").OptionalFieldType<number>;
626
+ heatingSetpoint: import("@matter/types").OptionalFieldType<number>;
627
+ }>[]>;
628
+ builtIn: import("@matter/types").FieldType<boolean | null>;
629
+ }>[], any>;
630
+ };
631
+ readonly commands: {
632
+ readonly setActiveScheduleRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
633
+ scheduleHandle: import("@matter/types").FieldType<AllowSharedBufferSource>;
634
+ }>, void, any>;
635
+ };
636
+ };
637
+ }, {
638
+ readonly flags: {
639
+ readonly autoMode: true;
640
+ readonly heating: false;
641
+ };
642
+ readonly component: false;
643
+ }, {
644
+ readonly flags: {
645
+ readonly autoMode: true;
646
+ readonly cooling: false;
647
+ };
648
+ readonly component: false;
649
+ }, {
650
+ readonly flags: {
651
+ readonly heating: false;
652
+ readonly cooling: false;
653
+ };
654
+ readonly component: false;
655
+ }];
656
+ }>, readonly ["Heating", "Cooling"]>, typeof import("@matter/node/behaviors").ThermostatServer, import("@matter/node/behaviors").ThermostatInterface>]>>;
657
+ readonly Fan: devices.FanDevice;
658
+ readonly DoorLock: devices.DoorLockDevice;
659
+ readonly WindowCovering: devices.WindowCoveringDevice;
660
+ readonly RoboticVacuumCleaner: devices.RoboticVacuumCleanerDevice;
661
+ readonly GenericSwitch: devices.GenericSwitchDevice;
662
+ readonly Pump: devices.PumpDevice;
663
+ readonly RoomAirConditioner: devices.RoomAirConditionerDevice;
664
+ };
665
+ /**
666
+ * Matter Cluster Names
667
+ * Commonly used cluster names for type safety and autocomplete
668
+ * Use these with api.updateMatterAccessoryState() and api.getAccessoryState()
669
+ *
670
+ * @example
671
+ * ```typescript
672
+ * // With autocomplete and type safety:
673
+ * api.updateMatterAccessoryState(uuid, api.matterClusterNames.OnOff, { onOff: true })
674
+ * api.getAccessoryState(uuid, api.matterClusterNames.LevelControl)
675
+ * ```
676
+ */
677
+ export declare const clusterNames: {
678
+ readonly OnOff: "onOff";
679
+ readonly LevelControl: "levelControl";
680
+ readonly ColorControl: "colorControl";
681
+ readonly DoorLock: "doorLock";
682
+ readonly WindowCovering: "windowCovering";
683
+ readonly Thermostat: "thermostat";
684
+ readonly FanControl: "fanControl";
685
+ readonly TemperatureMeasurement: "temperatureMeasurement";
686
+ readonly RelativeHumidityMeasurement: "relativeHumidityMeasurement";
687
+ readonly IlluminanceMeasurement: "illuminanceMeasurement";
688
+ readonly OccupancySensing: "occupancySensing";
689
+ readonly BooleanState: "booleanState";
690
+ readonly SmokeCoAlarm: "smokeCoAlarm";
691
+ readonly RvcRunMode: "rvcRunMode";
692
+ readonly RvcOperationalState: "rvcOperationalState";
693
+ readonly RvcCleanMode: "rvcCleanMode";
694
+ readonly ServiceArea: "serviceArea";
695
+ readonly PumpConfigurationAndControl: "pumpConfigurationAndControl";
696
+ readonly Identify: "identify";
697
+ readonly BasicInformation: "basicInformation";
698
+ readonly BridgedDeviceBasicInformation: "bridgedDeviceBasicInformation";
699
+ };
700
+ /**
701
+ * Type for Matter cluster names
702
+ * Provides type safety for cluster name strings
703
+ */
704
+ export type MatterClusterName = typeof clusterNames[keyof typeof clusterNames];
705
+ /**
706
+ * Type-safe accessory map for MatterServer
707
+ */
708
+ export type MatterAccessoryMap = Map<string, InternalMatterAccessory>;
709
+ /**
710
+ * Check if endpoint has state property (runtime check)
711
+ */
712
+ export declare function hasEndpointState(endpoint: Endpoint): boolean;
713
+ /**
714
+ * Safely update endpoint state
715
+ * Uses the Endpoint's set method to update cluster attributes
716
+ */
717
+ export declare function updateEndpointState(endpoint: Endpoint, cluster: string, attributes: Record<string, unknown>): Promise<void>;
718
+ /**
719
+ * Device type with behaviors (internal Matter.js structure)
720
+ */
721
+ export interface DeviceTypeWithBehaviors extends EndpointType {
722
+ with: (...behaviors: any[]) => DeviceTypeWithBehaviors;
723
+ }
724
+ /**
725
+ * WindowCovering cluster with dynamic attributes
726
+ */
727
+ export interface WindowCoveringCluster {
728
+ type?: number;
729
+ configStatus?: {
730
+ liftPositionAware?: boolean;
731
+ tiltPositionAware?: boolean;
732
+ liftEncoderControlled?: boolean;
733
+ tiltEncoderControlled?: boolean;
734
+ };
735
+ targetPositionLiftPercent100ths?: number;
736
+ currentPositionLiftPercent100ths?: number;
737
+ targetPositionTiltPercent100ths?: number;
738
+ currentPositionTiltPercent100ths?: number;
739
+ operationalStatus?: number;
740
+ }
741
+ /**
742
+ * Type-safe cluster access for WindowCovering
743
+ */
744
+ export declare function getWindowCoveringCluster(accessory: MatterAccessory): WindowCoveringCluster | undefined;
745
+ //# sourceMappingURL=matterTypes.d.ts.map