homebridge 2.0.0-beta.30 → 2.0.0-beta.32
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/api.d.ts +267 -3
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +92 -0
- package/dist/api.js.map +1 -1
- package/dist/bridgeService.d.ts +4 -2
- package/dist/bridgeService.d.ts.map +1 -1
- package/dist/bridgeService.js +1 -3
- package/dist/bridgeService.js.map +1 -1
- package/dist/childBridgeFork.d.ts +29 -2
- package/dist/childBridgeFork.d.ts.map +1 -1
- package/dist/childBridgeFork.js +294 -4
- package/dist/childBridgeFork.js.map +1 -1
- package/dist/childBridgeService.d.ts +19 -0
- package/dist/childBridgeService.d.ts.map +1 -1
- package/dist/childBridgeService.js +38 -3
- package/dist/childBridgeService.js.map +1 -1
- package/dist/externalPortService.d.ts +27 -6
- package/dist/externalPortService.d.ts.map +1 -1
- package/dist/externalPortService.js +73 -7
- package/dist/externalPortService.js.map +1 -1
- package/dist/index.d.ts +47 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/ipcService.d.ts +20 -0
- package/dist/ipcService.d.ts.map +1 -1
- package/dist/ipcService.js.map +1 -1
- package/dist/logger.d.ts +6 -0
- package/dist/logger.d.ts.map +1 -1
- package/dist/logger.js +8 -0
- package/dist/logger.js.map +1 -1
- package/dist/matter/index.d.ts +123 -0
- package/dist/matter/index.d.ts.map +1 -0
- package/dist/matter/index.js +19 -0
- package/dist/matter/index.js.map +1 -0
- package/dist/matter/matterAccessoryCache.d.ts +96 -0
- package/dist/matter/matterAccessoryCache.d.ts.map +1 -0
- package/dist/matter/matterAccessoryCache.js +192 -0
- package/dist/matter/matterAccessoryCache.js.map +1 -0
- package/dist/matter/matterBehaviors.d.ts +194 -0
- package/dist/matter/matterBehaviors.d.ts.map +1 -0
- package/dist/matter/matterBehaviors.js +665 -0
- package/dist/matter/matterBehaviors.js.map +1 -0
- package/dist/matter/matterConfigValidator.d.ts +81 -0
- package/dist/matter/matterConfigValidator.d.ts.map +1 -0
- package/dist/matter/matterConfigValidator.js +240 -0
- package/dist/matter/matterConfigValidator.js.map +1 -0
- package/dist/matter/matterErrorHandler.d.ts +106 -0
- package/dist/matter/matterErrorHandler.d.ts.map +1 -0
- package/dist/matter/matterErrorHandler.js +495 -0
- package/dist/matter/matterErrorHandler.js.map +1 -0
- package/dist/matter/matterLogFormatter.d.ts +19 -0
- package/dist/matter/matterLogFormatter.d.ts.map +1 -0
- package/dist/matter/matterLogFormatter.js +144 -0
- package/dist/matter/matterLogFormatter.js.map +1 -0
- package/dist/matter/matterNetworkMonitor.d.ts +68 -0
- package/dist/matter/matterNetworkMonitor.d.ts.map +1 -0
- package/dist/matter/matterNetworkMonitor.js +249 -0
- package/dist/matter/matterNetworkMonitor.js.map +1 -0
- package/dist/matter/matterServer.d.ts +656 -0
- package/dist/matter/matterServer.d.ts.map +1 -0
- package/dist/matter/matterServer.js +1692 -0
- package/dist/matter/matterServer.js.map +1 -0
- package/dist/matter/matterServerHelpers.d.ts +81 -0
- package/dist/matter/matterServerHelpers.d.ts.map +1 -0
- package/dist/matter/matterServerHelpers.js +323 -0
- package/dist/matter/matterServerHelpers.js.map +1 -0
- package/dist/matter/matterSharedTypes.d.ts +170 -0
- package/dist/matter/matterSharedTypes.d.ts.map +1 -0
- package/dist/matter/matterSharedTypes.js +52 -0
- package/dist/matter/matterSharedTypes.js.map +1 -0
- package/dist/matter/matterStorage.d.ts +128 -0
- package/dist/matter/matterStorage.d.ts.map +1 -0
- package/dist/matter/matterStorage.js +415 -0
- package/dist/matter/matterStorage.js.map +1 -0
- package/dist/matter/matterTypes.d.ts +843 -0
- package/dist/matter/matterTypes.d.ts.map +1 -0
- package/dist/matter/matterTypes.js +222 -0
- package/dist/matter/matterTypes.js.map +1 -0
- package/dist/server.d.ts +23 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +392 -7
- package/dist/server.js.map +1 -1
- package/dist/user.d.ts +1 -0
- package/dist/user.d.ts.map +1 -1
- package/dist/user.js +3 -0
- package/dist/user.js.map +1 -1
- package/package.json +16 -15
|
@@ -0,0 +1,656 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Matter.js Server Implementation for Homebridge Plugin API
|
|
3
|
+
*
|
|
4
|
+
* This provides a Matter bridge that plugins can use to register
|
|
5
|
+
* Matter accessories via the Homebridge API.
|
|
6
|
+
*/
|
|
7
|
+
import type { EndpointType } from '@matter/main';
|
|
8
|
+
import type { SerializedMatterAccessory } from './matterAccessoryCache.js';
|
|
9
|
+
import { EventEmitter } from 'node:events';
|
|
10
|
+
import * as clusters from '@matter/main/clusters';
|
|
11
|
+
import * as devices from '@matter/main/devices';
|
|
12
|
+
import { MatterServerConfig } from './matterSharedTypes.js';
|
|
13
|
+
import { MatterAccessory, MatterServerEvents } from './matterTypes.js';
|
|
14
|
+
export { MatterServerConfig } from './matterSharedTypes.js';
|
|
15
|
+
/**
|
|
16
|
+
* Matter Server for Homebridge Plugin API
|
|
17
|
+
* Allows plugins to register Matter accessories explicitly
|
|
18
|
+
*
|
|
19
|
+
* Extends EventEmitter to provide commissioning lifecycle events
|
|
20
|
+
*/
|
|
21
|
+
export declare class MatterServer extends EventEmitter {
|
|
22
|
+
on: <K extends keyof MatterServerEvents>(event: K, listener: MatterServerEvents[K]) => this;
|
|
23
|
+
emit: <K extends keyof MatterServerEvents>(event: K, ...args: Parameters<MatterServerEvents[K]>) => boolean;
|
|
24
|
+
removeListener: <K extends keyof MatterServerEvents>(event: K, listener: MatterServerEvents[K]) => this;
|
|
25
|
+
removeAllListeners: (event?: keyof MatterServerEvents) => this;
|
|
26
|
+
private readonly config;
|
|
27
|
+
private serverNode;
|
|
28
|
+
private aggregator;
|
|
29
|
+
private accessories;
|
|
30
|
+
private isRunning;
|
|
31
|
+
private readonly MAX_DEVICES;
|
|
32
|
+
private shutdownHandler;
|
|
33
|
+
private passcode;
|
|
34
|
+
private discriminator;
|
|
35
|
+
private readonly vendorId;
|
|
36
|
+
private readonly productId;
|
|
37
|
+
private commissioningInfo;
|
|
38
|
+
private serialNumber?;
|
|
39
|
+
private cleanupHandlers;
|
|
40
|
+
private storageManager;
|
|
41
|
+
private matterStoragePath?;
|
|
42
|
+
private accessoryCache;
|
|
43
|
+
private fabricMonitorInterval;
|
|
44
|
+
private previousFabrics;
|
|
45
|
+
constructor(config: MatterServerConfig);
|
|
46
|
+
/**
|
|
47
|
+
* Validate and sanitize Matter server configuration
|
|
48
|
+
* Throws descriptive errors if configuration is invalid
|
|
49
|
+
*/
|
|
50
|
+
private validateAndSanitizeConfig;
|
|
51
|
+
/**
|
|
52
|
+
* Generate a secure random passcode
|
|
53
|
+
* According to Matter spec, passcode must be:
|
|
54
|
+
* - 8 digits (00000001 to 99999998)
|
|
55
|
+
* - Not in the invalid list
|
|
56
|
+
* - Not sequential or repeating patterns
|
|
57
|
+
*/
|
|
58
|
+
private generateSecurePasscode;
|
|
59
|
+
/**
|
|
60
|
+
* Validate a passcode according to Matter specifications
|
|
61
|
+
*/
|
|
62
|
+
private isValidPasscode;
|
|
63
|
+
/**
|
|
64
|
+
* Generate a random discriminator
|
|
65
|
+
* According to Matter spec, discriminator must be:
|
|
66
|
+
* - 12 bits (0-4095)
|
|
67
|
+
* - Should be random for security
|
|
68
|
+
*/
|
|
69
|
+
private generateRandomDiscriminator;
|
|
70
|
+
/**
|
|
71
|
+
* Create ServerNode with automatic recovery from corrupted storage
|
|
72
|
+
*
|
|
73
|
+
* Matter.js can fail to start if fabric data is corrupted (common after
|
|
74
|
+
* hard shutdowns or disk errors). This method implements automatic recovery by:
|
|
75
|
+
*
|
|
76
|
+
* 1. Attempting normal ServerNode creation
|
|
77
|
+
* 2. If it fails with storage errors, identifying and removing corrupted files
|
|
78
|
+
* 3. Retrying ServerNode creation with fresh storage
|
|
79
|
+
*
|
|
80
|
+
* This prevents the need for manual intervention while preserving data
|
|
81
|
+
* safety by only removing storage on confirmed corruption errors.
|
|
82
|
+
*
|
|
83
|
+
* @param nodeOptions - Matter.js ServerNode configuration
|
|
84
|
+
* @param sanitizedId - Filesystem-safe bridge identifier
|
|
85
|
+
* @returns Initialized ServerNode instance
|
|
86
|
+
* @throws Error if recovery fails or error is not storage-related
|
|
87
|
+
*/
|
|
88
|
+
private createServerNodeWithRecovery;
|
|
89
|
+
/**
|
|
90
|
+
* Start the Matter server
|
|
91
|
+
*/
|
|
92
|
+
start(): Promise<void>;
|
|
93
|
+
/**
|
|
94
|
+
* Run the server after devices have been added (for external accessory mode)
|
|
95
|
+
* This must be called after registerPlatformAccessories() when using externalAccessory mode
|
|
96
|
+
*/
|
|
97
|
+
runServer(): Promise<void>;
|
|
98
|
+
/**
|
|
99
|
+
* Set up and validate storage
|
|
100
|
+
*/
|
|
101
|
+
private setupStorage;
|
|
102
|
+
/**
|
|
103
|
+
* Load or generate commissioning credentials (passcode and discriminator)
|
|
104
|
+
* These must be persistent across restarts to maintain the same QR code
|
|
105
|
+
*/
|
|
106
|
+
private loadOrGenerateCredentials;
|
|
107
|
+
/**
|
|
108
|
+
* Generate and display commissioning information
|
|
109
|
+
*/
|
|
110
|
+
private generateCommissioningInfo;
|
|
111
|
+
/**
|
|
112
|
+
* Wait for the server to be ready
|
|
113
|
+
*/
|
|
114
|
+
private waitForServerReady;
|
|
115
|
+
/**
|
|
116
|
+
* Start monitoring fabric changes to emit commissioning events
|
|
117
|
+
*/
|
|
118
|
+
private startFabricMonitoring;
|
|
119
|
+
/**
|
|
120
|
+
* Stop fabric monitoring
|
|
121
|
+
*/
|
|
122
|
+
private stopFabricMonitoring;
|
|
123
|
+
/**
|
|
124
|
+
* Check for fabric changes and emit appropriate events
|
|
125
|
+
*/
|
|
126
|
+
private checkFabricChanges;
|
|
127
|
+
/**
|
|
128
|
+
* Update commissioning info file when commissioning state changes
|
|
129
|
+
*/
|
|
130
|
+
private updateCommissioningFile;
|
|
131
|
+
/**
|
|
132
|
+
* Register Matter platform accessories (Plugin API - matches HAP pattern)
|
|
133
|
+
*/
|
|
134
|
+
registerPlatformAccessories(pluginIdentifier: string, platformName: string, accessories: MatterAccessory[]): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Unregister Matter platform accessories (Plugin API - matches HAP pattern)
|
|
137
|
+
*/
|
|
138
|
+
unregisterPlatformAccessories(pluginIdentifier: string, platformName: string, accessories: MatterAccessory[]): Promise<void>;
|
|
139
|
+
/**
|
|
140
|
+
* Register a single Matter accessory (internal method)
|
|
141
|
+
*/
|
|
142
|
+
private registerAccessory;
|
|
143
|
+
/**
|
|
144
|
+
* Unregister a Matter accessory (Plugin API)
|
|
145
|
+
*/
|
|
146
|
+
unregisterAccessory(uuid: string): Promise<void>;
|
|
147
|
+
/**
|
|
148
|
+
* Update a Matter accessory's state (Plugin API)
|
|
149
|
+
*
|
|
150
|
+
* This method can be called from anywhere, including from within handlers.
|
|
151
|
+
* State updates are automatically deferred to avoid transaction conflicts.
|
|
152
|
+
*
|
|
153
|
+
* @param uuid - The UUID of the accessory
|
|
154
|
+
* @param cluster - The cluster name
|
|
155
|
+
* @param attributes - The attributes to update
|
|
156
|
+
* @param partId - Optional: ID of the part to update (for composed devices)
|
|
157
|
+
*/
|
|
158
|
+
updateAccessoryState(uuid: string, cluster: string, attributes: Record<string, unknown>, partId?: string): Promise<void>;
|
|
159
|
+
/**
|
|
160
|
+
* Get a Matter accessory's current state (Plugin API)
|
|
161
|
+
*
|
|
162
|
+
* Returns the current cluster attribute values that are exposed to Matter controllers.
|
|
163
|
+
* This is useful for:
|
|
164
|
+
* - Reading state after plugin restart (when local variables are lost)
|
|
165
|
+
* - Verifying current state before making changes
|
|
166
|
+
* - Multiple parts of code that need to read state
|
|
167
|
+
* - Debugging and logging
|
|
168
|
+
*
|
|
169
|
+
* @param uuid - The UUID of the accessory
|
|
170
|
+
* @param cluster - The cluster name (e.g., 'onOff', 'levelControl')
|
|
171
|
+
* @param partId - Optional: ID of the part to get state from (for composed devices)
|
|
172
|
+
* @returns Current cluster attribute values, or undefined if cluster not found
|
|
173
|
+
*/
|
|
174
|
+
getAccessoryState(uuid: string, cluster: string, partId?: string): Record<string, unknown> | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* Get all cached accessories (Internal - for restore process)
|
|
177
|
+
* @internal
|
|
178
|
+
*/
|
|
179
|
+
getAllCachedAccessories(): SerializedMatterAccessory[];
|
|
180
|
+
/**
|
|
181
|
+
* Get all registered accessories (Plugin API)
|
|
182
|
+
*/
|
|
183
|
+
getAccessories(): MatterAccessory[];
|
|
184
|
+
/**
|
|
185
|
+
* Get a specific accessory by UUID (Plugin API)
|
|
186
|
+
*/
|
|
187
|
+
getAccessory(uuid: string): MatterAccessory | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* Stop the Matter server
|
|
190
|
+
*/
|
|
191
|
+
stop(): Promise<void>;
|
|
192
|
+
/**
|
|
193
|
+
* Cleanup resources
|
|
194
|
+
*/
|
|
195
|
+
private cleanup;
|
|
196
|
+
/**
|
|
197
|
+
* Get fabric information for commissioned controllers
|
|
198
|
+
*/
|
|
199
|
+
getFabricInfo(): Array<{
|
|
200
|
+
fabricIndex: number;
|
|
201
|
+
fabricId: string;
|
|
202
|
+
nodeId: string;
|
|
203
|
+
rootVendorId: number;
|
|
204
|
+
label?: string;
|
|
205
|
+
}>;
|
|
206
|
+
/**
|
|
207
|
+
* Check if the server is commissioned
|
|
208
|
+
*/
|
|
209
|
+
isCommissioned(): boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Get the number of commissioned fabrics
|
|
212
|
+
*/
|
|
213
|
+
getCommissionedFabricCount(): number;
|
|
214
|
+
/**
|
|
215
|
+
* Get server status information
|
|
216
|
+
*/
|
|
217
|
+
getServerInfo(): {
|
|
218
|
+
running: boolean;
|
|
219
|
+
port: number;
|
|
220
|
+
deviceCount: number;
|
|
221
|
+
commissioned: boolean;
|
|
222
|
+
fabricCount: number;
|
|
223
|
+
serialNumber?: string;
|
|
224
|
+
};
|
|
225
|
+
/**
|
|
226
|
+
* Get commissioning information
|
|
227
|
+
*/
|
|
228
|
+
getCommissioningInfo(): {
|
|
229
|
+
qrCode?: string;
|
|
230
|
+
manualPairingCode?: string;
|
|
231
|
+
serialNumber?: string;
|
|
232
|
+
passcode?: number;
|
|
233
|
+
discriminator?: number;
|
|
234
|
+
commissioned: boolean;
|
|
235
|
+
};
|
|
236
|
+
/**
|
|
237
|
+
* Get storage statistics
|
|
238
|
+
*/
|
|
239
|
+
getStorageStats(): Array<{
|
|
240
|
+
entries: number;
|
|
241
|
+
namespace: string;
|
|
242
|
+
path: string;
|
|
243
|
+
}> | null;
|
|
244
|
+
/**
|
|
245
|
+
* Check if server is running
|
|
246
|
+
*/
|
|
247
|
+
isServerRunning(): boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Get Matter device types available for plugin use
|
|
250
|
+
*/
|
|
251
|
+
getDeviceTypes(): {
|
|
252
|
+
readonly OnOffLight: devices.OnOffLightDevice;
|
|
253
|
+
readonly DimmableLight: devices.DimmableLightDevice;
|
|
254
|
+
readonly ColorTemperatureLight: devices.ColorTemperatureLightDevice;
|
|
255
|
+
readonly ExtendedColorLight: devices.ExtendedColorLightDevice;
|
|
256
|
+
readonly OnOffSwitch: devices.OnOffLightSwitchDevice;
|
|
257
|
+
readonly OnOffOutlet: devices.OnOffPlugInUnitDevice;
|
|
258
|
+
readonly DimmableOutlet: devices.DimmablePlugInUnitDevice;
|
|
259
|
+
readonly TemperatureSensor: devices.TemperatureSensorDevice;
|
|
260
|
+
readonly HumiditySensor: devices.HumiditySensorDevice;
|
|
261
|
+
readonly LightSensor: devices.LightSensorDevice;
|
|
262
|
+
readonly MotionSensor: devices.OccupancySensorDevice;
|
|
263
|
+
readonly ContactSensor: devices.ContactSensorDevice;
|
|
264
|
+
readonly LeakSensor: devices.WaterLeakDetectorDevice;
|
|
265
|
+
readonly SmokeSensor: devices.SmokeCoAlarmDevice;
|
|
266
|
+
readonly Thermostat: import("@matter/main").MutableEndpoint.With<EndpointType.For<{
|
|
267
|
+
readonly name: "Thermostat";
|
|
268
|
+
readonly deviceType: 769;
|
|
269
|
+
readonly deviceRevision: 4;
|
|
270
|
+
readonly requirements: typeof devices.ThermostatRequirements;
|
|
271
|
+
readonly behaviors: {
|
|
272
|
+
readonly identify: typeof import("@matter/main/behaviors").IdentifyServer;
|
|
273
|
+
};
|
|
274
|
+
}>, import("@matter/main").SupportedBehaviors.With<{
|
|
275
|
+
readonly identify: typeof import("@matter/main/behaviors").IdentifyServer;
|
|
276
|
+
}, readonly [import("@matter/main").ClusterBehavior.Type<import("@matter/types").ClusterComposer.WithFeatures<import("@matter/types").ClusterType.Of<{
|
|
277
|
+
readonly id: 513;
|
|
278
|
+
readonly name: "Thermostat";
|
|
279
|
+
readonly revision: 8;
|
|
280
|
+
readonly features: {
|
|
281
|
+
readonly heating: import("@matter/types/schema").BitFlag;
|
|
282
|
+
readonly cooling: import("@matter/types/schema").BitFlag;
|
|
283
|
+
readonly occupancy: import("@matter/types/schema").BitFlag;
|
|
284
|
+
readonly scheduleConfiguration: import("@matter/types/schema").BitFlag;
|
|
285
|
+
readonly setback: import("@matter/types/schema").BitFlag;
|
|
286
|
+
readonly autoMode: import("@matter/types/schema").BitFlag;
|
|
287
|
+
readonly localTemperatureNotExposed: import("@matter/types/schema").BitFlag;
|
|
288
|
+
readonly matterScheduleConfiguration: import("@matter/types/schema").BitFlag;
|
|
289
|
+
readonly presets: import("@matter/types/schema").BitFlag;
|
|
290
|
+
};
|
|
291
|
+
readonly attributes: {
|
|
292
|
+
readonly localTemperature: import("@matter/types").Attribute<number | null, any>;
|
|
293
|
+
readonly outdoorTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
|
|
294
|
+
readonly hvacSystemTypeConfiguration: import("@matter/types").OptionalWritableAttribute<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
295
|
+
coolingStage: import("@matter/types/schema").BitField;
|
|
296
|
+
heatingStage: import("@matter/types/schema").BitField;
|
|
297
|
+
heatingIsHeatPump: import("@matter/types/schema").BitFlag;
|
|
298
|
+
heatingUsesFuel: import("@matter/types/schema").BitFlag;
|
|
299
|
+
}>, any>;
|
|
300
|
+
readonly remoteSensing: import("@matter/types").OptionalWritableAttribute<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
301
|
+
localTemperature: import("@matter/types/schema").BitFlag;
|
|
302
|
+
outdoorTemperature: import("@matter/types/schema").BitFlag;
|
|
303
|
+
occupancy: import("@matter/types/schema").BitFlag;
|
|
304
|
+
}>, any>;
|
|
305
|
+
readonly controlSequenceOfOperation: import("@matter/types").WritableAttribute<clusters.Thermostat.ControlSequenceOfOperation, any>;
|
|
306
|
+
readonly systemMode: import("@matter/types").WritableAttribute<clusters.Thermostat.SystemMode, any>;
|
|
307
|
+
readonly temperatureSetpointHold: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.TemperatureSetpointHold, any>;
|
|
308
|
+
readonly temperatureSetpointHoldDuration: import("@matter/types").OptionalWritableAttribute<number | null, any>;
|
|
309
|
+
readonly thermostatProgrammingOperationMode: import("@matter/types").OptionalWritableAttribute<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
310
|
+
scheduleActive: import("@matter/types/schema").BitFlag;
|
|
311
|
+
autoRecovery: import("@matter/types/schema").BitFlag;
|
|
312
|
+
economy: import("@matter/types/schema").BitFlag;
|
|
313
|
+
}>, any>;
|
|
314
|
+
readonly thermostatRunningState: import("@matter/types").OptionalAttribute<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
315
|
+
heat: import("@matter/types/schema").BitFlag;
|
|
316
|
+
cool: import("@matter/types/schema").BitFlag;
|
|
317
|
+
fan: import("@matter/types/schema").BitFlag;
|
|
318
|
+
heatStage2: import("@matter/types/schema").BitFlag;
|
|
319
|
+
coolStage2: import("@matter/types/schema").BitFlag;
|
|
320
|
+
fanStage2: import("@matter/types/schema").BitFlag;
|
|
321
|
+
fanStage3: import("@matter/types/schema").BitFlag;
|
|
322
|
+
}>, any>;
|
|
323
|
+
readonly setpointChangeSource: import("@matter/types").OptionalAttribute<clusters.Thermostat.SetpointChangeSource, any>;
|
|
324
|
+
readonly setpointChangeAmount: import("@matter/types").OptionalAttribute<number | null, any>;
|
|
325
|
+
readonly setpointChangeSourceTimestamp: import("@matter/types").OptionalAttribute<number, any>;
|
|
326
|
+
readonly emergencyHeatDelta: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
327
|
+
readonly acType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcType, any>;
|
|
328
|
+
readonly acCapacity: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
329
|
+
readonly acRefrigerantType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcRefrigerantType, any>;
|
|
330
|
+
readonly acCompressorType: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcCompressorType, any>;
|
|
331
|
+
readonly acErrorCode: import("@matter/types").OptionalWritableAttribute<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
332
|
+
compressorFail: import("@matter/types/schema").BitFlag;
|
|
333
|
+
roomSensorFail: import("@matter/types/schema").BitFlag;
|
|
334
|
+
outdoorSensorFail: import("@matter/types/schema").BitFlag;
|
|
335
|
+
coilSensorFail: import("@matter/types/schema").BitFlag;
|
|
336
|
+
fanFail: import("@matter/types/schema").BitFlag;
|
|
337
|
+
}>, any>;
|
|
338
|
+
readonly acLouverPosition: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcLouverPosition, any>;
|
|
339
|
+
readonly acCoilTemperature: import("@matter/types").OptionalAttribute<number | null, any>;
|
|
340
|
+
readonly acCapacityFormat: import("@matter/types").OptionalWritableAttribute<clusters.Thermostat.AcCapacityFormat, any>;
|
|
341
|
+
readonly setpointHoldExpiryTimestamp: import("@matter/types").OptionalAttribute<number | null, any>;
|
|
342
|
+
};
|
|
343
|
+
readonly commands: {
|
|
344
|
+
readonly setpointRaiseLower: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
|
|
345
|
+
mode: import("@matter/types").FieldType<clusters.Thermostat.SetpointRaiseLowerMode>;
|
|
346
|
+
amount: import("@matter/types").FieldType<number>;
|
|
347
|
+
}>, void, any>;
|
|
348
|
+
};
|
|
349
|
+
readonly extensions: readonly [{
|
|
350
|
+
readonly flags: {
|
|
351
|
+
readonly occupancy: true;
|
|
352
|
+
};
|
|
353
|
+
readonly component: {
|
|
354
|
+
readonly attributes: {
|
|
355
|
+
readonly occupancy: import("@matter/types").Attribute<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
356
|
+
occupied: import("@matter/types/schema").BitFlag;
|
|
357
|
+
}>, any>;
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
}, {
|
|
361
|
+
readonly flags: {
|
|
362
|
+
readonly heating: true;
|
|
363
|
+
};
|
|
364
|
+
readonly component: {
|
|
365
|
+
readonly attributes: {
|
|
366
|
+
readonly absMinHeatSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
|
|
367
|
+
readonly absMaxHeatSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
|
|
368
|
+
readonly piHeatingDemand: import("@matter/types").OptionalAttribute<number, any>;
|
|
369
|
+
readonly occupiedHeatingSetpoint: import("@matter/types").WritableAttribute<number, any>;
|
|
370
|
+
readonly minHeatSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
371
|
+
readonly maxHeatSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
372
|
+
};
|
|
373
|
+
};
|
|
374
|
+
}, {
|
|
375
|
+
readonly flags: {
|
|
376
|
+
readonly cooling: true;
|
|
377
|
+
};
|
|
378
|
+
readonly component: {
|
|
379
|
+
readonly attributes: {
|
|
380
|
+
readonly absMinCoolSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
|
|
381
|
+
readonly absMaxCoolSetpointLimit: import("@matter/types").OptionalFixedAttribute<number, any>;
|
|
382
|
+
readonly piCoolingDemand: import("@matter/types").OptionalAttribute<number, any>;
|
|
383
|
+
readonly occupiedCoolingSetpoint: import("@matter/types").WritableAttribute<number, any>;
|
|
384
|
+
readonly minCoolSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
385
|
+
readonly maxCoolSetpointLimit: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
}, {
|
|
389
|
+
readonly flags: {
|
|
390
|
+
readonly localTemperatureNotExposed: false;
|
|
391
|
+
};
|
|
392
|
+
readonly component: {
|
|
393
|
+
readonly attributes: {
|
|
394
|
+
readonly localTemperatureCalibration: import("@matter/types").OptionalWritableAttribute<number, any>;
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
}, {
|
|
398
|
+
readonly flags: {
|
|
399
|
+
readonly cooling: true;
|
|
400
|
+
readonly occupancy: true;
|
|
401
|
+
};
|
|
402
|
+
readonly component: {
|
|
403
|
+
readonly attributes: {
|
|
404
|
+
readonly unoccupiedCoolingSetpoint: import("@matter/types").WritableAttribute<number, any>;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
}, {
|
|
408
|
+
readonly flags: {
|
|
409
|
+
readonly heating: true;
|
|
410
|
+
readonly occupancy: true;
|
|
411
|
+
};
|
|
412
|
+
readonly component: {
|
|
413
|
+
readonly attributes: {
|
|
414
|
+
readonly unoccupiedHeatingSetpoint: import("@matter/types").WritableAttribute<number, any>;
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
}, {
|
|
418
|
+
readonly flags: {
|
|
419
|
+
readonly autoMode: true;
|
|
420
|
+
};
|
|
421
|
+
readonly component: {
|
|
422
|
+
readonly attributes: {
|
|
423
|
+
readonly minSetpointDeadBand: import("@matter/types").WritableAttribute<number, any>;
|
|
424
|
+
readonly thermostatRunningMode: import("@matter/types").OptionalAttribute<clusters.Thermostat.ThermostatRunningMode, any>;
|
|
425
|
+
};
|
|
426
|
+
};
|
|
427
|
+
}, {
|
|
428
|
+
readonly flags: {
|
|
429
|
+
readonly scheduleConfiguration: true;
|
|
430
|
+
};
|
|
431
|
+
readonly component: {
|
|
432
|
+
readonly attributes: {
|
|
433
|
+
readonly startOfWeek: import("@matter/types").FixedAttribute<clusters.Thermostat.StartOfWeek, any>;
|
|
434
|
+
readonly numberOfWeeklyTransitions: import("@matter/types").FixedAttribute<number, any>;
|
|
435
|
+
readonly numberOfDailyTransitions: import("@matter/types").FixedAttribute<number, any>;
|
|
436
|
+
};
|
|
437
|
+
readonly commands: {
|
|
438
|
+
readonly setWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
|
|
439
|
+
numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
|
|
440
|
+
dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
441
|
+
sunday: import("@matter/types/schema").BitFlag;
|
|
442
|
+
monday: import("@matter/types/schema").BitFlag;
|
|
443
|
+
tuesday: import("@matter/types/schema").BitFlag;
|
|
444
|
+
wednesday: import("@matter/types/schema").BitFlag;
|
|
445
|
+
thursday: import("@matter/types/schema").BitFlag;
|
|
446
|
+
friday: import("@matter/types/schema").BitFlag;
|
|
447
|
+
saturday: import("@matter/types/schema").BitFlag;
|
|
448
|
+
away: import("@matter/types/schema").BitFlag;
|
|
449
|
+
}>>;
|
|
450
|
+
modeForSequence: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
451
|
+
heatSetpointPresent: import("@matter/types/schema").BitFlag;
|
|
452
|
+
coolSetpointPresent: import("@matter/types/schema").BitFlag;
|
|
453
|
+
}>>;
|
|
454
|
+
transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
|
|
455
|
+
transitionTime: import("@matter/types").FieldType<number>;
|
|
456
|
+
heatSetpoint: import("@matter/types").FieldType<number | null>;
|
|
457
|
+
coolSetpoint: import("@matter/types").FieldType<number | null>;
|
|
458
|
+
}>[]>;
|
|
459
|
+
}>, void, any>;
|
|
460
|
+
readonly getWeeklySchedule: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
|
|
461
|
+
daysToReturn: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
462
|
+
sunday: import("@matter/types/schema").BitFlag;
|
|
463
|
+
monday: import("@matter/types/schema").BitFlag;
|
|
464
|
+
tuesday: import("@matter/types/schema").BitFlag;
|
|
465
|
+
wednesday: import("@matter/types/schema").BitFlag;
|
|
466
|
+
thursday: import("@matter/types/schema").BitFlag;
|
|
467
|
+
friday: import("@matter/types/schema").BitFlag;
|
|
468
|
+
saturday: import("@matter/types/schema").BitFlag;
|
|
469
|
+
away: import("@matter/types/schema").BitFlag;
|
|
470
|
+
}>>;
|
|
471
|
+
modeToReturn: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
472
|
+
heatSetpointPresent: import("@matter/types/schema").BitFlag;
|
|
473
|
+
coolSetpointPresent: import("@matter/types/schema").BitFlag;
|
|
474
|
+
}>>;
|
|
475
|
+
}>, import("@matter/types").TypeFromFields<{
|
|
476
|
+
numberOfTransitionsForSequence: import("@matter/types").FieldType<number>;
|
|
477
|
+
dayOfWeekForSequence: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
478
|
+
sunday: import("@matter/types/schema").BitFlag;
|
|
479
|
+
monday: import("@matter/types/schema").BitFlag;
|
|
480
|
+
tuesday: import("@matter/types/schema").BitFlag;
|
|
481
|
+
wednesday: import("@matter/types/schema").BitFlag;
|
|
482
|
+
thursday: import("@matter/types/schema").BitFlag;
|
|
483
|
+
friday: import("@matter/types/schema").BitFlag;
|
|
484
|
+
saturday: import("@matter/types/schema").BitFlag;
|
|
485
|
+
away: import("@matter/types/schema").BitFlag;
|
|
486
|
+
}>>;
|
|
487
|
+
modeForSequence: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
488
|
+
heatSetpointPresent: import("@matter/types/schema").BitFlag;
|
|
489
|
+
coolSetpointPresent: import("@matter/types/schema").BitFlag;
|
|
490
|
+
}>>;
|
|
491
|
+
transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
|
|
492
|
+
transitionTime: import("@matter/types").FieldType<number>;
|
|
493
|
+
heatSetpoint: import("@matter/types").FieldType<number | null>;
|
|
494
|
+
coolSetpoint: import("@matter/types").FieldType<number | null>;
|
|
495
|
+
}>[]>;
|
|
496
|
+
}>, any>;
|
|
497
|
+
readonly clearWeeklySchedule: import("@matter/types").Command<void, void, any>;
|
|
498
|
+
};
|
|
499
|
+
};
|
|
500
|
+
}, {
|
|
501
|
+
readonly flags: {
|
|
502
|
+
readonly setback: true;
|
|
503
|
+
};
|
|
504
|
+
readonly component: {
|
|
505
|
+
readonly attributes: {
|
|
506
|
+
readonly occupiedSetback: import("@matter/types").WritableAttribute<number | null, any>;
|
|
507
|
+
readonly occupiedSetbackMin: import("@matter/types").FixedAttribute<number | null, any>;
|
|
508
|
+
readonly occupiedSetbackMax: import("@matter/types").FixedAttribute<number | null, any>;
|
|
509
|
+
};
|
|
510
|
+
};
|
|
511
|
+
}, {
|
|
512
|
+
readonly flags: {
|
|
513
|
+
readonly setback: true;
|
|
514
|
+
readonly occupancy: true;
|
|
515
|
+
};
|
|
516
|
+
readonly component: {
|
|
517
|
+
readonly attributes: {
|
|
518
|
+
readonly unoccupiedSetback: import("@matter/types").WritableAttribute<number | null, any>;
|
|
519
|
+
readonly unoccupiedSetbackMin: import("@matter/types").FixedAttribute<number | null, any>;
|
|
520
|
+
readonly unoccupiedSetbackMax: import("@matter/types").FixedAttribute<number | null, any>;
|
|
521
|
+
};
|
|
522
|
+
};
|
|
523
|
+
}, {
|
|
524
|
+
readonly flags: {
|
|
525
|
+
readonly presets: true;
|
|
526
|
+
};
|
|
527
|
+
readonly component: {
|
|
528
|
+
readonly attributes: {
|
|
529
|
+
readonly presetTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
|
|
530
|
+
presetScenario: import("@matter/types").FieldType<clusters.Thermostat.PresetScenario>;
|
|
531
|
+
numberOfPresets: import("@matter/types").FieldType<number>;
|
|
532
|
+
presetTypeFeatures: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
533
|
+
automatic: import("@matter/types/schema").BitFlag;
|
|
534
|
+
supportsNames: import("@matter/types/schema").BitFlag;
|
|
535
|
+
}>>;
|
|
536
|
+
}>[], any>;
|
|
537
|
+
readonly numberOfPresets: import("@matter/types").FixedAttribute<number, any>;
|
|
538
|
+
readonly activePresetHandle: import("@matter/types").Attribute<AllowSharedBufferSource | null, any>;
|
|
539
|
+
readonly presets: import("@matter/types").WritableAttribute<import("@matter/types").TypeFromFields<{
|
|
540
|
+
presetHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
|
|
541
|
+
presetScenario: import("@matter/types").FieldType<clusters.Thermostat.PresetScenario>;
|
|
542
|
+
name: import("@matter/types").OptionalFieldType<string | null>;
|
|
543
|
+
coolingSetpoint: import("@matter/types").OptionalFieldType<number>;
|
|
544
|
+
heatingSetpoint: import("@matter/types").OptionalFieldType<number>;
|
|
545
|
+
builtIn: import("@matter/types").FieldType<boolean | null>;
|
|
546
|
+
}>[], any>;
|
|
547
|
+
};
|
|
548
|
+
readonly commands: {
|
|
549
|
+
readonly setActivePresetRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
|
|
550
|
+
presetHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
|
|
551
|
+
}>, void, any>;
|
|
552
|
+
};
|
|
553
|
+
};
|
|
554
|
+
}, {
|
|
555
|
+
readonly flags: {
|
|
556
|
+
readonly matterScheduleConfiguration: true;
|
|
557
|
+
};
|
|
558
|
+
readonly component: {
|
|
559
|
+
readonly attributes: {
|
|
560
|
+
readonly scheduleTypes: import("@matter/types").FixedAttribute<import("@matter/types").TypeFromFields<{
|
|
561
|
+
systemMode: import("@matter/types").FieldType<clusters.Thermostat.SystemMode>;
|
|
562
|
+
numberOfSchedules: import("@matter/types").FieldType<number>;
|
|
563
|
+
scheduleTypeFeatures: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
564
|
+
supportsPresets: import("@matter/types/schema").BitFlag;
|
|
565
|
+
supportsSetpoints: import("@matter/types/schema").BitFlag;
|
|
566
|
+
supportsNames: import("@matter/types/schema").BitFlag;
|
|
567
|
+
supportsOff: import("@matter/types/schema").BitFlag;
|
|
568
|
+
}>>;
|
|
569
|
+
}>[], any>;
|
|
570
|
+
readonly numberOfSchedules: import("@matter/types").FixedAttribute<number, any>;
|
|
571
|
+
readonly numberOfScheduleTransitions: import("@matter/types").FixedAttribute<number, any>;
|
|
572
|
+
readonly numberOfScheduleTransitionPerDay: import("@matter/types").FixedAttribute<number | null, any>;
|
|
573
|
+
readonly activeScheduleHandle: import("@matter/types").Attribute<AllowSharedBufferSource | null, any>;
|
|
574
|
+
readonly schedules: import("@matter/types").WritableAttribute<import("@matter/types").TypeFromFields<{
|
|
575
|
+
scheduleHandle: import("@matter/types").FieldType<AllowSharedBufferSource | null>;
|
|
576
|
+
systemMode: import("@matter/types").FieldType<clusters.Thermostat.SystemMode>;
|
|
577
|
+
name: import("@matter/types").OptionalFieldType<string>;
|
|
578
|
+
presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
|
|
579
|
+
transitions: import("@matter/types").FieldType<import("@matter/types").TypeFromFields<{
|
|
580
|
+
dayOfWeek: import("@matter/types").FieldType<import("@matter/types/schema").TypeFromPartialBitSchema<{
|
|
581
|
+
sunday: import("@matter/types/schema").BitFlag;
|
|
582
|
+
monday: import("@matter/types/schema").BitFlag;
|
|
583
|
+
tuesday: import("@matter/types/schema").BitFlag;
|
|
584
|
+
wednesday: import("@matter/types/schema").BitFlag;
|
|
585
|
+
thursday: import("@matter/types/schema").BitFlag;
|
|
586
|
+
friday: import("@matter/types/schema").BitFlag;
|
|
587
|
+
saturday: import("@matter/types/schema").BitFlag;
|
|
588
|
+
away: import("@matter/types/schema").BitFlag;
|
|
589
|
+
}>>;
|
|
590
|
+
transitionTime: import("@matter/types").FieldType<number>;
|
|
591
|
+
presetHandle: import("@matter/types").OptionalFieldType<AllowSharedBufferSource>;
|
|
592
|
+
systemMode: import("@matter/types").OptionalFieldType<clusters.Thermostat.SystemMode>;
|
|
593
|
+
coolingSetpoint: import("@matter/types").OptionalFieldType<number>;
|
|
594
|
+
heatingSetpoint: import("@matter/types").OptionalFieldType<number>;
|
|
595
|
+
}>[]>;
|
|
596
|
+
builtIn: import("@matter/types").FieldType<boolean | null>;
|
|
597
|
+
}>[], any>;
|
|
598
|
+
};
|
|
599
|
+
readonly commands: {
|
|
600
|
+
readonly setActiveScheduleRequest: import("@matter/types").Command<import("@matter/types").TypeFromFields<{
|
|
601
|
+
scheduleHandle: import("@matter/types").FieldType<AllowSharedBufferSource>;
|
|
602
|
+
}>, void, any>;
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
}, {
|
|
606
|
+
readonly flags: {
|
|
607
|
+
readonly autoMode: true;
|
|
608
|
+
readonly heating: false;
|
|
609
|
+
};
|
|
610
|
+
readonly component: false;
|
|
611
|
+
}, {
|
|
612
|
+
readonly flags: {
|
|
613
|
+
readonly autoMode: true;
|
|
614
|
+
readonly cooling: false;
|
|
615
|
+
};
|
|
616
|
+
readonly component: false;
|
|
617
|
+
}, {
|
|
618
|
+
readonly flags: {
|
|
619
|
+
readonly heating: false;
|
|
620
|
+
readonly cooling: false;
|
|
621
|
+
};
|
|
622
|
+
readonly component: false;
|
|
623
|
+
}];
|
|
624
|
+
}>, readonly ["Heating", "Cooling"]>, typeof import("@matter/main/behaviors").ThermostatServer, import("@matter/main/behaviors").ThermostatInterface>]>>;
|
|
625
|
+
readonly Fan: devices.FanDevice;
|
|
626
|
+
readonly DoorLock: devices.DoorLockDevice;
|
|
627
|
+
readonly WindowCovering: devices.WindowCoveringDevice;
|
|
628
|
+
readonly RoboticVacuumCleaner: devices.RoboticVacuumCleanerDevice;
|
|
629
|
+
readonly GenericSwitch: devices.GenericSwitchDevice;
|
|
630
|
+
readonly Pump: devices.PumpDevice;
|
|
631
|
+
readonly RoomAirConditioner: devices.RoomAirConditionerDevice;
|
|
632
|
+
};
|
|
633
|
+
/**
|
|
634
|
+
* Get Matter clusters available for plugin use
|
|
635
|
+
*/
|
|
636
|
+
getClusters(): typeof clusters;
|
|
637
|
+
/**
|
|
638
|
+
* Remove a specific fabric (controller) from the bridge
|
|
639
|
+
* This decommissions a single controller while leaving others intact
|
|
640
|
+
*
|
|
641
|
+
* @param fabricIndex - The fabric index to remove
|
|
642
|
+
* @returns Promise that resolves when the fabric is removed
|
|
643
|
+
*/
|
|
644
|
+
removeFabric(fabricIndex: number): Promise<void>;
|
|
645
|
+
/**
|
|
646
|
+
* Check if a specific fabric exists
|
|
647
|
+
*/
|
|
648
|
+
hasFabric(fabricIndex: number): boolean;
|
|
649
|
+
/**
|
|
650
|
+
* Notify controllers that the parts list has changed
|
|
651
|
+
* This triggers controllers (like Home app) to re-read the device list
|
|
652
|
+
* and discover new or removed accessories without needing to re-pair
|
|
653
|
+
*/
|
|
654
|
+
private notifyPartsListChanged;
|
|
655
|
+
}
|
|
656
|
+
//# sourceMappingURL=matterServer.d.ts.map
|