homebridge 2.0.0-alpha.7 → 2.0.0-alpha.71

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 (112) hide show
  1. package/README.md +1 -1
  2. package/bin/homebridge.js +22 -0
  3. package/dist/api.d.ts +250 -3
  4. package/dist/api.d.ts.map +1 -1
  5. package/dist/api.js +92 -0
  6. package/dist/api.js.map +1 -1
  7. package/dist/bridgeService.d.ts +11 -3
  8. package/dist/bridgeService.d.ts.map +1 -1
  9. package/dist/bridgeService.js +9 -5
  10. package/dist/bridgeService.js.map +1 -1
  11. package/dist/childBridgeFork.d.ts +30 -3
  12. package/dist/childBridgeFork.d.ts.map +1 -1
  13. package/dist/childBridgeFork.js +278 -5
  14. package/dist/childBridgeFork.js.map +1 -1
  15. package/dist/childBridgeService.d.ts +22 -0
  16. package/dist/childBridgeService.d.ts.map +1 -1
  17. package/dist/childBridgeService.js +85 -26
  18. package/dist/childBridgeService.js.map +1 -1
  19. package/dist/cli.d.ts.map +1 -1
  20. package/dist/cli.js +3 -2
  21. package/dist/cli.js.map +1 -1
  22. package/dist/externalPortService.d.ts +27 -6
  23. package/dist/externalPortService.d.ts.map +1 -1
  24. package/dist/externalPortService.js +73 -7
  25. package/dist/externalPortService.js.map +1 -1
  26. package/dist/index.d.ts +48 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +15 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/ipcService.d.ts +20 -0
  31. package/dist/ipcService.d.ts.map +1 -1
  32. package/dist/ipcService.js.map +1 -1
  33. package/dist/logger.d.ts +6 -0
  34. package/dist/logger.d.ts.map +1 -1
  35. package/dist/logger.js +8 -0
  36. package/dist/logger.js.map +1 -1
  37. package/dist/matter/index.d.ts +123 -0
  38. package/dist/matter/index.d.ts.map +1 -0
  39. package/dist/matter/index.js +19 -0
  40. package/dist/matter/index.js.map +1 -0
  41. package/dist/matter/matterAccessoryCache.d.ts +77 -0
  42. package/dist/matter/matterAccessoryCache.d.ts.map +1 -0
  43. package/dist/matter/matterAccessoryCache.js +176 -0
  44. package/dist/matter/matterAccessoryCache.js.map +1 -0
  45. package/dist/matter/matterBehaviors.d.ts +177 -0
  46. package/dist/matter/matterBehaviors.d.ts.map +1 -0
  47. package/dist/matter/matterBehaviors.js +639 -0
  48. package/dist/matter/matterBehaviors.js.map +1 -0
  49. package/dist/matter/matterConfigValidator.d.ts +81 -0
  50. package/dist/matter/matterConfigValidator.d.ts.map +1 -0
  51. package/dist/matter/matterConfigValidator.js +240 -0
  52. package/dist/matter/matterConfigValidator.js.map +1 -0
  53. package/dist/matter/matterErrorHandler.d.ts +94 -0
  54. package/dist/matter/matterErrorHandler.d.ts.map +1 -0
  55. package/dist/matter/matterErrorHandler.js +485 -0
  56. package/dist/matter/matterErrorHandler.js.map +1 -0
  57. package/dist/matter/matterLogFormatter.d.ts +19 -0
  58. package/dist/matter/matterLogFormatter.d.ts.map +1 -0
  59. package/dist/matter/matterLogFormatter.js +126 -0
  60. package/dist/matter/matterLogFormatter.js.map +1 -0
  61. package/dist/matter/matterNetworkMonitor.d.ts +68 -0
  62. package/dist/matter/matterNetworkMonitor.d.ts.map +1 -0
  63. package/dist/matter/matterNetworkMonitor.js +249 -0
  64. package/dist/matter/matterNetworkMonitor.js.map +1 -0
  65. package/dist/matter/matterServer.d.ts +644 -0
  66. package/dist/matter/matterServer.d.ts.map +1 -0
  67. package/dist/matter/matterServer.js +1460 -0
  68. package/dist/matter/matterServer.js.map +1 -0
  69. package/dist/matter/matterServerHelpers.d.ts +76 -0
  70. package/dist/matter/matterServerHelpers.d.ts.map +1 -0
  71. package/dist/matter/matterServerHelpers.js +298 -0
  72. package/dist/matter/matterServerHelpers.js.map +1 -0
  73. package/dist/matter/matterSharedTypes.d.ts +165 -0
  74. package/dist/matter/matterSharedTypes.d.ts.map +1 -0
  75. package/dist/matter/matterSharedTypes.js +51 -0
  76. package/dist/matter/matterSharedTypes.js.map +1 -0
  77. package/dist/matter/matterStorage.d.ts +126 -0
  78. package/dist/matter/matterStorage.d.ts.map +1 -0
  79. package/dist/matter/matterStorage.js +419 -0
  80. package/dist/matter/matterStorage.js.map +1 -0
  81. package/dist/matter/matterTypes.d.ts +668 -0
  82. package/dist/matter/matterTypes.d.ts.map +1 -0
  83. package/dist/matter/matterTypes.js +174 -0
  84. package/dist/matter/matterTypes.js.map +1 -0
  85. package/dist/platformAccessory.d.ts +1 -0
  86. package/dist/platformAccessory.d.ts.map +1 -1
  87. package/dist/platformAccessory.js +8 -1
  88. package/dist/platformAccessory.js.map +1 -1
  89. package/dist/plugin.d.ts +0 -1
  90. package/dist/plugin.d.ts.map +1 -1
  91. package/dist/plugin.js +8 -11
  92. package/dist/plugin.js.map +1 -1
  93. package/dist/pluginManager.d.ts.map +1 -1
  94. package/dist/pluginManager.js +22 -21
  95. package/dist/pluginManager.js.map +1 -1
  96. package/dist/server.d.ts +23 -1
  97. package/dist/server.d.ts.map +1 -1
  98. package/dist/server.js +374 -10
  99. package/dist/server.js.map +1 -1
  100. package/dist/storageService.js +8 -8
  101. package/dist/storageService.js.map +1 -1
  102. package/dist/user.d.ts +1 -0
  103. package/dist/user.d.ts.map +1 -1
  104. package/dist/user.js +10 -7
  105. package/dist/user.js.map +1 -1
  106. package/dist/util/mac.d.ts.map +1 -1
  107. package/dist/util/mac.js +2 -2
  108. package/dist/util/mac.js.map +1 -1
  109. package/dist/version.js +2 -2
  110. package/dist/version.js.map +1 -1
  111. package/package.json +23 -22
  112. package/bin/homebridge +0 -19
@@ -0,0 +1,639 @@
1
+ /**
2
+ * Custom Matter Behavior Classes for Homebridge
3
+ *
4
+ * These custom behaviors extend the base Matter.js behaviors and override
5
+ * command methods to allow plugins to inject custom handlers.
6
+ *
7
+ * Note: Only clusters with user-triggered commands need custom behaviors.
8
+ * Read-only clusters (like sensors) don't need custom behaviors since
9
+ * they only report state, they don't receive commands.
10
+ */
11
+ import { ColorControlServer, DoorLockServer, FanControlServer, IdentifyServer, LevelControlServer, OnOffServer, RvcCleanModeServer, RvcOperationalStateServer, RvcRunModeServer, ServiceAreaServer, ThermostatServer, WindowCoveringBaseServer, } from '@matter/main/behaviors';
12
+ import { Logger } from '../logger.js';
13
+ import { clusterNames } from './matterTypes.js';
14
+ const log = Logger.withPrefix('Matter/Behaviours');
15
+ /**
16
+ * Command names for each cluster
17
+ * Provides type safety and autocomplete for command names
18
+ */
19
+ const commandNames = {
20
+ OnOff: {
21
+ on: 'on',
22
+ off: 'off',
23
+ toggle: 'toggle',
24
+ },
25
+ LevelControl: {
26
+ moveToLevel: 'moveToLevel',
27
+ moveToLevelWithOnOff: 'moveToLevelWithOnOff',
28
+ move: 'move',
29
+ step: 'step',
30
+ stop: 'stop',
31
+ },
32
+ WindowCovering: {
33
+ upOrOpen: 'upOrOpen',
34
+ downOrClose: 'downOrClose',
35
+ stopMotion: 'stopMotion',
36
+ goToLiftPercentage: 'goToLiftPercentage',
37
+ goToTiltPercentage: 'goToTiltPercentage',
38
+ },
39
+ FanControl: {
40
+ step: 'step',
41
+ fanModeChange: 'fanModeChange',
42
+ percentSettingChange: 'percentSettingChange',
43
+ },
44
+ DoorLock: {
45
+ lockDoor: 'lockDoor',
46
+ unlockDoor: 'unlockDoor',
47
+ },
48
+ Thermostat: {
49
+ setpointRaiseLower: 'setpointRaiseLower',
50
+ systemModeChange: 'systemModeChange',
51
+ occupiedHeatingSetpointChange: 'occupiedHeatingSetpointChange',
52
+ occupiedCoolingSetpointChange: 'occupiedCoolingSetpointChange',
53
+ },
54
+ Identify: {
55
+ identify: 'identify',
56
+ },
57
+ ColorControl: {
58
+ moveToColorTemperatureLogic: 'moveToColorTemperatureLogic',
59
+ moveToHueAndSaturationLogic: 'moveToHueAndSaturationLogic',
60
+ moveToColorLogic: 'moveToColorLogic',
61
+ moveToHueLogic: 'moveToHueLogic',
62
+ moveToSaturationLogic: 'moveToSaturationLogic',
63
+ stopAllColorMovement: 'stopAllColorMovement',
64
+ },
65
+ RvcOperationalState: {
66
+ pause: 'pause',
67
+ resume: 'resume',
68
+ goHome: 'goHome',
69
+ },
70
+ RvcRunMode: {
71
+ changeToMode: 'changeToMode',
72
+ },
73
+ RvcCleanMode: {
74
+ changeToMode: 'changeToMode',
75
+ },
76
+ ServiceArea: {
77
+ selectAreas: 'selectAreas',
78
+ skipArea: 'skipArea',
79
+ },
80
+ };
81
+ /**
82
+ * Store for custom handlers
83
+ * Maps endpoint ID -> cluster name -> command name -> handler
84
+ */
85
+ const handlerStore = new Map();
86
+ /**
87
+ * Store for accessory references
88
+ * This allows handlers to update cached clusters after state changes
89
+ */
90
+ let accessoriesMap = null;
91
+ /**
92
+ * Set the accessories map reference for cache syncing
93
+ */
94
+ export function setAccessoriesMap(map) {
95
+ accessoriesMap = map;
96
+ }
97
+ /**
98
+ * Sync endpoint state back to cached clusters
99
+ * This ensures state changes from handlers persist across restarts
100
+ */
101
+ function syncEndpointStateToCache(endpointId, clusterName, attributes) {
102
+ if (!accessoriesMap) {
103
+ return;
104
+ }
105
+ const accessory = accessoriesMap.get(endpointId);
106
+ if (!accessory) {
107
+ return;
108
+ }
109
+ // Update the cached clusters with the new state
110
+ if (!accessory.clusters[clusterName]) {
111
+ accessory.clusters[clusterName] = {};
112
+ }
113
+ accessory.clusters[clusterName] = {
114
+ ...accessory.clusters[clusterName],
115
+ ...attributes,
116
+ };
117
+ log.debug(`Synced ${clusterName} state to cache for ${endpointId}:`, attributes);
118
+ }
119
+ /**
120
+ * Register a handler for a specific endpoint/cluster/command
121
+ *
122
+ * @param endpointId - Unique endpoint identifier (typically the accessory UUID)
123
+ * @param clusterName - Name of the Matter cluster (e.g., 'onOff', 'levelControl')
124
+ * @param commandName - Name of the command method (e.g., 'on', 'off', 'moveToLevel')
125
+ * @param handler - Callback function to execute when the command is received
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * registerHandler('my-light-uuid', 'onOff', 'on', async () => {
130
+ * console.log('Light turned on!')
131
+ * })
132
+ * ```
133
+ */
134
+ export function registerHandler(endpointId, clusterName, commandName, handler) {
135
+ if (!handlerStore.has(endpointId)) {
136
+ handlerStore.set(endpointId, new Map());
137
+ }
138
+ const endpointHandlers = handlerStore.get(endpointId);
139
+ if (!endpointHandlers.has(clusterName)) {
140
+ endpointHandlers.set(clusterName, new Map());
141
+ }
142
+ const clusterHandlers = endpointHandlers.get(clusterName);
143
+ clusterHandlers.set(commandName, handler);
144
+ log.debug(`Registered handler for ${endpointId}.${clusterName}.${commandName}`);
145
+ }
146
+ /**
147
+ * Get a handler for a specific endpoint/cluster/command
148
+ */
149
+ function getHandler(endpointId, clusterName, commandName) {
150
+ return handlerStore.get(endpointId)?.get(clusterName)?.get(commandName);
151
+ }
152
+ /**
153
+ * Execute a handler with consistent error handling and logging
154
+ */
155
+ function executeHandler(endpointId, clusterName, commandName, request) {
156
+ const handler = getHandler(endpointId, clusterName, commandName);
157
+ log.debug(`${clusterName}.${commandName} called for endpoint ${endpointId}`);
158
+ if (handler) {
159
+ handler(request);
160
+ log.debug(` ✓ Plugin handler for ${endpointId}.${clusterName}.${commandName} executed successfully`);
161
+ }
162
+ else {
163
+ // Don't warn for optional methods that are called internally by Matter.js
164
+ // These are typically handled by their combined counterparts (e.g., moveToHueAndSaturationLogic)
165
+ const optionalMethods = [
166
+ commandNames.ColorControl.moveToHueLogic,
167
+ commandNames.ColorControl.moveToSaturationLogic,
168
+ commandNames.ColorControl.stopAllColorMovement,
169
+ ];
170
+ if (!optionalMethods.includes(commandName)) {
171
+ log.warn(` ⚠ No handler registered for ${endpointId}.${clusterName}.${commandName}`);
172
+ }
173
+ }
174
+ }
175
+ /**
176
+ * Custom OnOff Server that calls plugin handlers
177
+ */
178
+ export class HomebridgeOnOffServer extends OnOffServer {
179
+ on() {
180
+ const endpointId = this.endpoint.id;
181
+ executeHandler(endpointId, clusterNames.OnOff, commandNames.OnOff.on);
182
+ const result = super.on();
183
+ syncEndpointStateToCache(endpointId, clusterNames.OnOff, { onOff: true });
184
+ return result;
185
+ }
186
+ off() {
187
+ const endpointId = this.endpoint.id;
188
+ executeHandler(endpointId, clusterNames.OnOff, commandNames.OnOff.off);
189
+ const result = super.off();
190
+ syncEndpointStateToCache(endpointId, clusterNames.OnOff, { onOff: false });
191
+ return result;
192
+ }
193
+ toggle() {
194
+ const endpointId = this.endpoint.id;
195
+ executeHandler(endpointId, clusterNames.OnOff, commandNames.OnOff.toggle);
196
+ const result = super.toggle();
197
+ // Read the new state from the endpoint and sync to cache
198
+ const newState = this.state.onOff;
199
+ syncEndpointStateToCache(endpointId, clusterNames.OnOff, { onOff: newState });
200
+ return result;
201
+ }
202
+ }
203
+ /**
204
+ * Custom LevelControl Server that calls plugin handlers
205
+ */
206
+ export class HomebridgeLevelControlServer extends LevelControlServer {
207
+ moveToLevel(request) {
208
+ const endpointId = this.endpoint.id;
209
+ executeHandler(endpointId, clusterNames.LevelControl, commandNames.LevelControl.moveToLevel, request);
210
+ const result = super.moveToLevel(request);
211
+ syncEndpointStateToCache(endpointId, clusterNames.LevelControl, { currentLevel: request.level });
212
+ return result;
213
+ }
214
+ moveToLevelWithOnOff(request) {
215
+ const endpointId = this.endpoint.id;
216
+ // Try specific handler first, fall back to moveToLevel handler
217
+ const handler = getHandler(endpointId, clusterNames.LevelControl, commandNames.LevelControl.moveToLevelWithOnOff)
218
+ || getHandler(endpointId, clusterNames.LevelControl, commandNames.LevelControl.moveToLevel);
219
+ log.debug(`LevelControl.moveToLevelWithOnOff called for endpoint ${endpointId} with level ${request.level}`);
220
+ if (handler) {
221
+ handler(request);
222
+ log.debug(` ✓ Plugin handler for ${endpointId}.LevelControl.moveToLevelWithOnOff executed successfully`);
223
+ }
224
+ else {
225
+ log.warn(` ⚠ No handler registered for ${endpointId}.levelControl.moveToLevelWithOnOff or moveToLevel`);
226
+ }
227
+ const result = super.moveToLevelWithOnOff(request);
228
+ syncEndpointStateToCache(endpointId, clusterNames.LevelControl, { currentLevel: request.level });
229
+ return result;
230
+ }
231
+ move(request) {
232
+ const endpointId = this.endpoint.id;
233
+ executeHandler(endpointId, clusterNames.LevelControl, commandNames.LevelControl.move, request);
234
+ return super.move(request);
235
+ }
236
+ step(request) {
237
+ const endpointId = this.endpoint.id;
238
+ executeHandler(endpointId, clusterNames.LevelControl, commandNames.LevelControl.step, request);
239
+ return super.step(request);
240
+ }
241
+ stop(request) {
242
+ const endpointId = this.endpoint.id;
243
+ executeHandler(endpointId, clusterNames.LevelControl, commandNames.LevelControl.stop, request);
244
+ return super.stop(request);
245
+ }
246
+ }
247
+ /**
248
+ * Custom WindowCovering Server that calls plugin handlers
249
+ */
250
+ export class HomebridgeWindowCoveringServer extends WindowCoveringBaseServer {
251
+ upOrOpen() {
252
+ const endpointId = this.endpoint.id;
253
+ executeHandler(endpointId, clusterNames.WindowCovering, commandNames.WindowCovering.upOrOpen);
254
+ const result = super.upOrOpen();
255
+ // Sync state to cache - window covering opening
256
+ const currentState = this.state;
257
+ const stateUpdate = {};
258
+ if (currentState.targetPositionLiftPercent100ths !== undefined) {
259
+ stateUpdate.targetPositionLiftPercent100ths = currentState.targetPositionLiftPercent100ths;
260
+ }
261
+ if (currentState.currentPositionLiftPercent100ths !== undefined) {
262
+ stateUpdate.currentPositionLiftPercent100ths = currentState.currentPositionLiftPercent100ths;
263
+ }
264
+ syncEndpointStateToCache(endpointId, clusterNames.WindowCovering, stateUpdate);
265
+ return result;
266
+ }
267
+ downOrClose() {
268
+ const endpointId = this.endpoint.id;
269
+ executeHandler(endpointId, clusterNames.WindowCovering, commandNames.WindowCovering.downOrClose);
270
+ const result = super.downOrClose();
271
+ // Sync state to cache - window covering closing
272
+ const currentState = this.state;
273
+ const stateUpdate = {};
274
+ if (currentState.targetPositionLiftPercent100ths !== undefined) {
275
+ stateUpdate.targetPositionLiftPercent100ths = currentState.targetPositionLiftPercent100ths;
276
+ }
277
+ if (currentState.currentPositionLiftPercent100ths !== undefined) {
278
+ stateUpdate.currentPositionLiftPercent100ths = currentState.currentPositionLiftPercent100ths;
279
+ }
280
+ syncEndpointStateToCache(endpointId, clusterNames.WindowCovering, stateUpdate);
281
+ return result;
282
+ }
283
+ stopMotion() {
284
+ const endpointId = this.endpoint.id;
285
+ executeHandler(endpointId, clusterNames.WindowCovering, commandNames.WindowCovering.stopMotion);
286
+ const result = super.stopMotion();
287
+ // Sync state to cache - window covering stopped
288
+ const currentState = this.state;
289
+ const stateUpdate = {};
290
+ if (currentState.targetPositionLiftPercent100ths !== undefined) {
291
+ stateUpdate.targetPositionLiftPercent100ths = currentState.targetPositionLiftPercent100ths;
292
+ }
293
+ if (currentState.currentPositionLiftPercent100ths !== undefined) {
294
+ stateUpdate.currentPositionLiftPercent100ths = currentState.currentPositionLiftPercent100ths;
295
+ }
296
+ syncEndpointStateToCache(endpointId, clusterNames.WindowCovering, stateUpdate);
297
+ return result;
298
+ }
299
+ goToLiftPercentage(request) {
300
+ const endpointId = this.endpoint.id;
301
+ executeHandler(endpointId, clusterNames.WindowCovering, commandNames.WindowCovering.goToLiftPercentage, request);
302
+ const result = super.goToLiftPercentage(request);
303
+ // Sync state to cache - window covering moving to target position
304
+ const currentState = this.state;
305
+ const stateUpdate = {};
306
+ if (currentState.targetPositionLiftPercent100ths !== undefined) {
307
+ stateUpdate.targetPositionLiftPercent100ths = currentState.targetPositionLiftPercent100ths;
308
+ }
309
+ if (currentState.currentPositionLiftPercent100ths !== undefined) {
310
+ stateUpdate.currentPositionLiftPercent100ths = currentState.currentPositionLiftPercent100ths;
311
+ }
312
+ syncEndpointStateToCache(endpointId, clusterNames.WindowCovering, stateUpdate);
313
+ return result;
314
+ }
315
+ goToTiltPercentage(request) {
316
+ const endpointId = this.endpoint.id;
317
+ executeHandler(endpointId, clusterNames.WindowCovering, commandNames.WindowCovering.goToTiltPercentage, request);
318
+ const result = super.goToTiltPercentage(request);
319
+ // Sync state to cache - window covering tilting to target angle
320
+ const currentState = this.state;
321
+ const stateUpdate = {};
322
+ if (currentState.targetPositionTiltPercent100ths !== undefined) {
323
+ stateUpdate.targetPositionTiltPercent100ths = currentState.targetPositionTiltPercent100ths;
324
+ }
325
+ if (currentState.currentPositionTiltPercent100ths !== undefined) {
326
+ stateUpdate.currentPositionTiltPercent100ths = currentState.currentPositionTiltPercent100ths;
327
+ }
328
+ syncEndpointStateToCache(endpointId, clusterNames.WindowCovering, stateUpdate);
329
+ return result;
330
+ }
331
+ }
332
+ /**
333
+ * Custom FanControl Server that calls plugin handlers
334
+ */
335
+ export class HomebridgeFanControlServer extends FanControlServer {
336
+ initialize() {
337
+ super.initialize();
338
+ // React to fanMode attribute changes (on/off)
339
+ this.reactTo(this.events.fanMode$Changed, this.#handleFanModeChange);
340
+ // React to percentSetting attribute changes (speed)
341
+ this.reactTo(this.events.percentSetting$Changed, this.#handlePercentSettingChange);
342
+ }
343
+ #handleFanModeChange(value, oldValue) {
344
+ const endpointId = this.endpoint.id;
345
+ executeHandler(endpointId, clusterNames.FanControl, commandNames.FanControl.fanModeChange, { fanMode: value, oldFanMode: oldValue });
346
+ syncEndpointStateToCache(endpointId, clusterNames.FanControl, { fanMode: value });
347
+ }
348
+ #handlePercentSettingChange(value, oldValue) {
349
+ const endpointId = this.endpoint.id;
350
+ executeHandler(endpointId, clusterNames.FanControl, commandNames.FanControl.percentSettingChange, {
351
+ percentSetting: value,
352
+ oldPercentSetting: oldValue,
353
+ });
354
+ syncEndpointStateToCache(endpointId, clusterNames.FanControl, {
355
+ percentSetting: value,
356
+ percentCurrent: value,
357
+ });
358
+ }
359
+ }
360
+ /**
361
+ * Custom DoorLock Server that calls plugin handlers
362
+ */
363
+ export class HomebridgeDoorLockServer extends DoorLockServer {
364
+ lockDoor() {
365
+ const endpointId = this.endpoint.id;
366
+ executeHandler(endpointId, clusterNames.DoorLock, commandNames.DoorLock.lockDoor);
367
+ const result = super.lockDoor();
368
+ // Sync lock state to cache
369
+ const currentState = this.state;
370
+ if (currentState.lockState !== undefined) {
371
+ syncEndpointStateToCache(endpointId, clusterNames.DoorLock, { lockState: currentState.lockState });
372
+ }
373
+ return result;
374
+ }
375
+ unlockDoor() {
376
+ const endpointId = this.endpoint.id;
377
+ executeHandler(endpointId, clusterNames.DoorLock, commandNames.DoorLock.unlockDoor);
378
+ const result = super.unlockDoor();
379
+ // Sync lock state to cache
380
+ const currentState = this.state;
381
+ if (currentState.lockState !== undefined) {
382
+ syncEndpointStateToCache(endpointId, clusterNames.DoorLock, { lockState: currentState.lockState });
383
+ }
384
+ return result;
385
+ }
386
+ }
387
+ /**
388
+ * Custom Thermostat Server that calls plugin handlers
389
+ */
390
+ export class HomebridgeThermostatServer extends ThermostatServer {
391
+ initialize() {
392
+ super.initialize();
393
+ // React to systemMode attribute changes (off, heat, cool, auto, etc.)
394
+ this.reactTo(this.events.systemMode$Changed, this.#handleSystemModeChange);
395
+ // React to occupiedHeatingSetpoint attribute changes (target heating temperature)
396
+ const events = this.events;
397
+ if (events.occupiedHeatingSetpoint$Changing) {
398
+ this.reactTo(events.occupiedHeatingSetpoint$Changing, this.#handleOccupiedHeatingSetpointChanging);
399
+ }
400
+ // React to occupiedCoolingSetpoint attribute changes (target cooling temperature)
401
+ if (events.occupiedCoolingSetpoint$Changing) {
402
+ this.reactTo(events.occupiedCoolingSetpoint$Changing, this.#handleOccupiedCoolingSetpointChanging);
403
+ }
404
+ }
405
+ #handleSystemModeChange(value, oldValue) {
406
+ const endpointId = this.endpoint.id;
407
+ executeHandler(endpointId, clusterNames.Thermostat, commandNames.Thermostat.systemModeChange, {
408
+ systemMode: value,
409
+ oldSystemMode: oldValue,
410
+ });
411
+ syncEndpointStateToCache(endpointId, clusterNames.Thermostat, { systemMode: value });
412
+ }
413
+ #handleOccupiedHeatingSetpointChanging(value) {
414
+ const endpointId = this.endpoint.id;
415
+ const oldValue = this.state.occupiedHeatingSetpoint;
416
+ executeHandler(endpointId, clusterNames.Thermostat, commandNames.Thermostat.occupiedHeatingSetpointChange, {
417
+ occupiedHeatingSetpoint: value,
418
+ oldOccupiedHeatingSetpoint: oldValue,
419
+ });
420
+ syncEndpointStateToCache(endpointId, clusterNames.Thermostat, { occupiedHeatingSetpoint: value });
421
+ }
422
+ #handleOccupiedCoolingSetpointChanging(value) {
423
+ const endpointId = this.endpoint.id;
424
+ const oldValue = this.state.occupiedCoolingSetpoint;
425
+ executeHandler(endpointId, clusterNames.Thermostat, commandNames.Thermostat.occupiedCoolingSetpointChange, {
426
+ occupiedCoolingSetpoint: value,
427
+ oldOccupiedCoolingSetpoint: oldValue,
428
+ });
429
+ syncEndpointStateToCache(endpointId, clusterNames.Thermostat, { occupiedCoolingSetpoint: value });
430
+ }
431
+ setpointRaiseLower(request) {
432
+ const endpointId = this.endpoint.id;
433
+ executeHandler(endpointId, clusterNames.Thermostat, commandNames.Thermostat.setpointRaiseLower, request);
434
+ const result = super.setpointRaiseLower(request);
435
+ // Sync thermostat setpoints to cache
436
+ const currentState = this.state;
437
+ const stateUpdate = {};
438
+ if (currentState.occupiedCoolingSetpoint !== undefined) {
439
+ stateUpdate.occupiedCoolingSetpoint = currentState.occupiedCoolingSetpoint;
440
+ }
441
+ if (currentState.occupiedHeatingSetpoint !== undefined) {
442
+ stateUpdate.occupiedHeatingSetpoint = currentState.occupiedHeatingSetpoint;
443
+ }
444
+ syncEndpointStateToCache(endpointId, clusterNames.Thermostat, stateUpdate);
445
+ return result;
446
+ }
447
+ }
448
+ /**
449
+ * Custom Identify Server that calls plugin handlers
450
+ */
451
+ export class HomebridgeIdentifyServer extends IdentifyServer {
452
+ identify(request) {
453
+ const endpointId = this.endpoint.id;
454
+ executeHandler(endpointId, clusterNames.Identify, commandNames.Identify.identify, request);
455
+ return super.identify(request);
456
+ }
457
+ }
458
+ /**
459
+ * Custom ColorControl Server that calls plugin handlers
460
+ *
461
+ * ColorControl handles color changes for lights (hue, saturation, XY color, color temperature).
462
+ * Plugin developers can override these *Logic methods to handle color changes in their hardware.
463
+ *
464
+ * Features (Xy, ColorTemperature, HueSaturation) are added by the device type, not this behavior.
465
+ * This ensures each device only gets the features it needs.
466
+ */
467
+ export class HomebridgeColorControlServer extends ColorControlServer {
468
+ /**
469
+ * Called when color temperature is changed
470
+ * @param colorTemperatureMireds - Target color temperature in mireds (micro reciprocal degrees)
471
+ * @param transitionTime - Transition time in seconds (0 = as fast as possible)
472
+ */
473
+ moveToColorTemperatureLogic(colorTemperatureMireds, transitionTime) {
474
+ const endpointId = this.endpoint.id;
475
+ executeHandler(endpointId, clusterNames.ColorControl, commandNames.ColorControl.moveToColorTemperatureLogic, { colorTemperatureMireds, transitionTime });
476
+ const result = super.moveToColorTemperatureLogic(colorTemperatureMireds, transitionTime);
477
+ // Sync color temperature to cache
478
+ const currentState = this.state;
479
+ if (currentState.colorTemperatureMireds !== undefined) {
480
+ syncEndpointStateToCache(endpointId, clusterNames.ColorControl, {
481
+ colorTemperatureMireds: currentState.colorTemperatureMireds,
482
+ });
483
+ }
484
+ return result;
485
+ }
486
+ /**
487
+ * Called when hue and saturation are changed together
488
+ * @param hue - Target hue value (0-254 for normal hue, 0-65535 for enhanced hue)
489
+ * @param saturation - Target saturation value (0-254)
490
+ * @param transitionTime - Transition time in seconds (0 = as fast as possible)
491
+ */
492
+ moveToHueAndSaturationLogic(hue, saturation, transitionTime) {
493
+ const endpointId = this.endpoint.id;
494
+ executeHandler(endpointId, clusterNames.ColorControl, commandNames.ColorControl.moveToHueAndSaturationLogic, { hue, saturation, transitionTime });
495
+ const result = super.moveToHueAndSaturationLogic(hue, saturation, transitionTime);
496
+ // Sync hue and saturation to cache
497
+ const currentState = this.state;
498
+ const stateUpdate = {};
499
+ if (currentState.currentHue !== undefined) {
500
+ stateUpdate.currentHue = currentState.currentHue;
501
+ }
502
+ if (currentState.currentSaturation !== undefined) {
503
+ stateUpdate.currentSaturation = currentState.currentSaturation;
504
+ }
505
+ syncEndpointStateToCache(endpointId, clusterNames.ColorControl, stateUpdate);
506
+ return result;
507
+ }
508
+ /**
509
+ * Called when XY color coordinates are changed
510
+ * @param targetX - Target X value (0-65535 representing 0.0-1.0 in CIE color space)
511
+ * @param targetY - Target Y value (0-65535 representing 0.0-1.0 in CIE color space)
512
+ * @param transitionTime - Transition time in seconds (0 = as fast as possible)
513
+ */
514
+ moveToColorLogic(targetX, targetY, transitionTime) {
515
+ const endpointId = this.endpoint.id;
516
+ executeHandler(endpointId, clusterNames.ColorControl, commandNames.ColorControl.moveToColorLogic, { targetX, targetY, transitionTime });
517
+ const result = super.moveToColorLogic(targetX, targetY, transitionTime);
518
+ // Sync XY color to cache
519
+ const currentState = this.state;
520
+ const stateUpdate = {};
521
+ if (currentState.currentX !== undefined) {
522
+ stateUpdate.currentX = currentState.currentX;
523
+ }
524
+ if (currentState.currentY !== undefined) {
525
+ stateUpdate.currentY = currentState.currentY;
526
+ }
527
+ syncEndpointStateToCache(endpointId, clusterNames.ColorControl, stateUpdate);
528
+ return result;
529
+ }
530
+ /**
531
+ * Called when hue is changed individually
532
+ * @param targetHue - Target hue value
533
+ * @param direction - Direction to move (shortest, longest, up, down)
534
+ * @param transitionTime - Transition time in seconds
535
+ * @param isEnhancedHue - Whether this is enhanced hue (16-bit) or normal hue (8-bit)
536
+ */
537
+ moveToHueLogic(targetHue, direction, transitionTime, isEnhancedHue = false) {
538
+ const endpointId = this.endpoint.id;
539
+ executeHandler(endpointId, clusterNames.ColorControl, commandNames.ColorControl.moveToHueLogic, { targetHue, direction, transitionTime, isEnhancedHue });
540
+ const result = super.moveToHueLogic(targetHue, direction, transitionTime, isEnhancedHue);
541
+ // Sync hue to cache
542
+ const currentState = this.state;
543
+ const stateUpdate = {};
544
+ if (isEnhancedHue && currentState.enhancedCurrentHue !== undefined) {
545
+ stateUpdate.enhancedCurrentHue = currentState.enhancedCurrentHue;
546
+ }
547
+ else if (currentState.currentHue !== undefined) {
548
+ stateUpdate.currentHue = currentState.currentHue;
549
+ }
550
+ syncEndpointStateToCache(endpointId, clusterNames.ColorControl, stateUpdate);
551
+ return result;
552
+ }
553
+ /**
554
+ * Called when saturation is changed individually
555
+ * @param targetSaturation - Target saturation value (0-254)
556
+ * @param transitionTime - Transition time in seconds
557
+ */
558
+ moveToSaturationLogic(targetSaturation, transitionTime) {
559
+ const endpointId = this.endpoint.id;
560
+ executeHandler(endpointId, clusterNames.ColorControl, commandNames.ColorControl.moveToSaturationLogic, { targetSaturation, transitionTime });
561
+ const result = super.moveToSaturationLogic(targetSaturation, transitionTime);
562
+ // Sync saturation to cache
563
+ const currentState = this.state;
564
+ if (currentState.currentSaturation !== undefined) {
565
+ syncEndpointStateToCache(endpointId, clusterNames.ColorControl, {
566
+ currentSaturation: currentState.currentSaturation,
567
+ });
568
+ }
569
+ return result;
570
+ }
571
+ /**
572
+ * Called when all color movement should be stopped
573
+ */
574
+ stopAllColorMovement() {
575
+ const endpointId = this.endpoint.id;
576
+ executeHandler(endpointId, clusterNames.ColorControl, commandNames.ColorControl.stopAllColorMovement);
577
+ return super.stopAllColorMovement();
578
+ }
579
+ }
580
+ /**
581
+ * Custom RvcOperationalState Server that calls plugin handlers
582
+ * Handles robotic vacuum cleaner operational state commands
583
+ */
584
+ export class HomebridgeRvcOperationalStateServer extends RvcOperationalStateServer {
585
+ pause() {
586
+ const endpointId = this.endpoint.id;
587
+ executeHandler(endpointId, clusterNames.RvcOperationalState, commandNames.RvcOperationalState.pause);
588
+ return super.pause();
589
+ }
590
+ resume() {
591
+ const endpointId = this.endpoint.id;
592
+ executeHandler(endpointId, clusterNames.RvcOperationalState, commandNames.RvcOperationalState.resume);
593
+ return super.resume();
594
+ }
595
+ goHome() {
596
+ const endpointId = this.endpoint.id;
597
+ executeHandler(endpointId, clusterNames.RvcOperationalState, commandNames.RvcOperationalState.goHome);
598
+ return super.goHome();
599
+ }
600
+ }
601
+ /**
602
+ * Custom RvcRunMode Server that calls plugin handlers
603
+ * Handles robotic vacuum cleaner run mode changes
604
+ */
605
+ export class HomebridgeRvcRunModeServer extends RvcRunModeServer {
606
+ changeToMode(request) {
607
+ const endpointId = this.endpoint.id;
608
+ executeHandler(endpointId, clusterNames.RvcRunMode, commandNames.RvcRunMode.changeToMode, request);
609
+ return super.changeToMode(request);
610
+ }
611
+ }
612
+ /**
613
+ * Custom RvcCleanMode Server that calls plugin handlers
614
+ * Handles robotic vacuum cleaner cleaning mode changes
615
+ */
616
+ export class HomebridgeRvcCleanModeServer extends RvcCleanModeServer {
617
+ changeToMode(request) {
618
+ const endpointId = this.endpoint.id;
619
+ executeHandler(endpointId, clusterNames.RvcCleanMode, commandNames.RvcCleanMode.changeToMode, request);
620
+ return super.changeToMode(request);
621
+ }
622
+ }
623
+ /**
624
+ * Custom ServiceArea Server that calls plugin handlers
625
+ * Handles service area selection for robotic vacuum cleaners
626
+ */
627
+ export class HomebridgeServiceAreaServer extends ServiceAreaServer {
628
+ selectAreas(request) {
629
+ const endpointId = this.endpoint.id;
630
+ executeHandler(endpointId, clusterNames.ServiceArea, commandNames.ServiceArea.selectAreas, request);
631
+ return super.selectAreas(request);
632
+ }
633
+ skipArea(request) {
634
+ const endpointId = this.endpoint.id;
635
+ executeHandler(endpointId, clusterNames.ServiceArea, commandNames.ServiceArea.skipArea, request);
636
+ return super.skipArea(request);
637
+ }
638
+ }
639
+ //# sourceMappingURL=matterBehaviors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matterBehaviors.js","sourceRoot":"","sources":["../../src/matter/matterBehaviors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAeH,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,yBAAyB,EACzB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE/C,MAAM,GAAG,GAAG,MAAM,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAA;AAQlD;;;GAGG;AACH,MAAM,YAAY,GAA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