@homebridge-plugins/homebridge-sharkiq 2.0.0-beta.5 → 2.0.0-beta.7

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/CHANGELOG.md CHANGED
@@ -2,11 +2,27 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. This project uses [Semantic Versioning](https://semver.org/)
4
4
 
5
- ## [1.4.1] (TBD)
5
+ ## [2.0.0] (https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v2.0.0) (2025-XX-XX)
6
+
7
+ ### Breaking Changes
8
+ - This release is Matter-only. The plugin now publishes external Matter Robotic Vacuum Cleaner accessories and no longer publishes HAP platform accessories. If you need the legacy HAP behavior, continue using a pre-2.0 release or a branch that preserves the HAP path.
9
+ - Minimum required Homebridge: >= 2.0.0-alpha.28 (or later) with Matter support exposed via `api.matter`.
10
+
11
+ ### What's Changed
12
+ - Converted plugin to Matter-only and added Matter external accessory publishing for Robotic Vacuum Cleaner devices.
13
+ - Added lifecycle wiring so accessories wait for READY before initial sync and polling.
14
+ - Added retry/backoff for critical Ayla API calls.
15
+ - Removed HAP-specific configuration options (invertDockedStatus, dockedUpdateInterval, enhancedVacuumMode).
16
+
17
+ **Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.4.1...v2.0.0
18
+
19
+ ## [1.4.1] (https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.4.1) (2025-XX-XX)
6
20
 
7
21
  ### What's Changed
8
22
  - Fix ARM64 OAuth code handling for users with both email/password and OAuth code [#54](https://github.com/homebridge-plugins/homebridge-sharkiq/issues/54)
9
23
 
24
+ **Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.4.0...v1.4.1
25
+
10
26
  ## [1.4.0](https://github.com/homebridge-plugins/homebridge-sharkiq/releases/tag/v1.4.0) (2025-07-17)
11
27
 
12
28
  ### What's Changes
@@ -14,4 +30,5 @@ All notable changes to this project will be documented in this file. This projec
14
30
  - Fix JSON parsing errors in SharkIQ API responses [#44](https://github.com/homebridge-plugins/homebridge-sharkiq/pull/44) [@mmenanno](https://github.com/mmenanno)
15
31
  - Housekeeping and updated dependencies.
16
32
 
17
- **Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.3.2...v1.4.0
33
+ **Full Changelog**: https://github.com/homebridge-plugins/homebridge-sharkiq/compare/v1.3.2...v1.4.0
34
+
package/README.md CHANGED
@@ -39,10 +39,7 @@ Configure Homebridge. The config file for SharkIQ should include:
39
39
  "[Shark Vacuum DSN]",
40
40
  "..."
41
41
  ],
42
- "europe": false,
43
- "invertDockedStatus": false,
44
- "dockedUpdateInterval": 30000,
45
- "enhancedVacuumMode": true
42
+ "europe": false
46
43
  }
47
44
  ]
48
45
  }
@@ -78,6 +75,15 @@ The `enhancedVacuumMode` option (enabled by default) provides improved vacuum be
78
75
 
79
76
  ## Homebridge 2.0.0+ Compatibility
80
77
 
78
+ This release of the plugin is Matter-only and requires a Homebridge runtime that exposes the Matter API.
79
+ Minimum tested Homebridge: 2.0.0-alpha.28 or later. If your Homebridge installation does not support Matter, this plugin will log an error and will not start.
80
+
81
+ This plugin uses Matter external accessories (Robotic Vacuum Cleaner) to integrate with the platform and no longer publishes HAP platform accessories.
82
+
83
+ If you rely on the legacy HAP (HomeKit) path, keep using an older plugin release or run this code from a separate branch — this release intentionally removes HAP fallback.
84
+
85
+ Compatibility notes and behavior:
86
+
81
87
  This plugin is compatible with Homebridge 2.0.0-alpha.28 and later versions, providing enhanced vacuum functionality while maintaining compatibility with current HomeKit limitations:
82
88
 
83
89
  - **Current Implementation**: Uses optimized FanV2 service with vacuum-specific behavior
@@ -109,3 +115,34 @@ Contributions would be very helpful to help this Homebridge plugin stay maintain
109
115
  ## Useful Links
110
116
 
111
117
  - [SharkIQ Python](https://github.com/JeffResc/sharkiq/)
118
+
119
+ ## Integration checklist — Matter
120
+
121
+ Follow these steps to verify Matter integration locally on a Homebridge instance that supports Matter (Homebridge >= 2.0.0-alpha.28):
122
+
123
+ 1. Ensure your Homebridge runtime supports Matter and the `api.matter` external accessory API.
124
+ 2. Configure the plugin in `config.json` with your Shark credentials or `oAuthCode` and do NOT include deprecated HAP-only options (the plugin is Matter-only).
125
+ 3. Start Homebridge in a terminal and watch logs. You should see the plugin log the DSNs found on your account and then a "Publishing X robotic device(s) as external Matter accessories" message.
126
+ 4. After publishing, Homebridge should emit READY/COMMISSIONED events for each accessory. The plugin will perform an initial sync and start polling.
127
+ 5. From the Home app or a Matter controller, attempt these actions and verify the vacuum responds:
128
+
129
+ - Start / Stop cleaning
130
+ - Pause / Resume
131
+ - Go Home (return to dock)
132
+ - Select Areas (if your device supports area cleaning)
133
+
134
+ 6. Observe plugin logs for successful API calls and state updates. Look for `Matter accessory ready` and `Performing initial device sync` log lines.
135
+
136
+ Quick troubleshooting:
137
+
138
+ - If you see "requires Homebridge with Matter support" in logs, update Homebridge to a Matter-enabled build.
139
+ - If actions fail, inspect network connectivity and plugin logs for Ayla API errors; the plugin now includes retries with exponential backoff for critical calls.
140
+
141
+ Optional: run the prepublish checks locally (lint, build, docs) to validate everything before publishing:
142
+
143
+ ```bash
144
+ # Run this in the project root (macOS / zsh)
145
+ npm run prepublishOnly
146
+ ```
147
+
148
+ If you'd like, I can add a short automated script that validates a sample run (requires a Matter-enabled Homebridge instance and credentials).
@@ -30,7 +30,7 @@
30
30
  "vacuums": {
31
31
  "title": "SharkClean Vacuum Devicess",
32
32
  "type": "array",
33
- "required": true,
33
+ "required": false,
34
34
  "items": {
35
35
  "title": "SharkClean DSN",
36
36
  "type": "string"
@@ -42,26 +42,8 @@
42
42
  "type": "boolean",
43
43
  "required": false,
44
44
  "default": false
45
- },
46
- "invertDockedStatus": {
47
- "title": "Invert Vacuum Docked Status",
48
- "type": "boolean",
49
- "required": false,
50
- "default": false
51
- },
52
- "dockedUpdateInterval": {
53
- "title": "Docked Update Interval",
54
- "type": "integer",
55
- "required": false,
56
- "default": 30000
57
- },
58
- "enhancedVacuumMode": {
59
- "title": "Enhanced Vacuum Mode",
60
- "type": "boolean",
61
- "required": false,
62
- "default": true,
63
- "description": "Use improved power level mappings and vacuum-optimized behavior. Prepares for future robot vacuum service support."
64
45
  }
46
+
65
47
  }
66
48
  },
67
49
  "layout": [
@@ -113,14 +95,7 @@
113
95
  }
114
96
  ]
115
97
  },
116
- "europe",
117
- "invertDockedStatus",
118
- "dockedUpdateInterval",
119
- {
120
- "type": "help",
121
- "helpvalue": "<h5>Enhanced Vacuum Mode</h5><em class='primary-text'>Enables improved vacuum behavior with better power level mappings (25%=Eco, 50%=Normal, 100%=Max). This prepares your setup for future native HomeKit robot vacuum support.</em>"
122
- },
123
- "enhancedVacuumMode"
98
+ "europe"
124
99
  ]
125
100
  }
126
101
  ]
@@ -0,0 +1,36 @@
1
+ import type { API, Logger } from 'homebridge';
2
+ type MatterAccessory = any;
3
+ export declare class RoboticVacuumAccessory {
4
+ private api;
5
+ private log;
6
+ private device;
7
+ private isReady;
8
+ private publishedAccessory;
9
+ private pollIntervalId;
10
+ private dockedDelay;
11
+ private dockedUpdateInterval;
12
+ constructor(api: API, log: Logger, device: any);
13
+ private retry;
14
+ toAccessory(): MatterAccessory;
15
+ attachToPublishedAccessory(accessory: MatterAccessory): void;
16
+ private performInitialSync;
17
+ private startPolling;
18
+ private stopPolling;
19
+ private setClusterValue;
20
+ updateOperationalState(): Promise<void>;
21
+ updateRunMode(): Promise<void>;
22
+ updateCleanMode(): Promise<void>;
23
+ updateSelectedAreas(): Promise<void>;
24
+ updateProgress(): Promise<void>;
25
+ private handleStart;
26
+ private handleStop;
27
+ private handlePause;
28
+ private handleResume;
29
+ private handleGoHome;
30
+ private handleChangeRunMode;
31
+ private handleChangeCleanMode;
32
+ private handleSelectAreas;
33
+ private handleSkipArea;
34
+ }
35
+ export {};
36
+ //# sourceMappingURL=RoboticVacuumAccessory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoboticVacuumAccessory.d.ts","sourceRoot":"","sources":["../../src/devices/RoboticVacuumAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAK7C,KAAK,eAAe,GAAG,GAAG,CAAA;AAI1B,qBAAa,sBAAsB;IACjC,OAAO,CAAC,GAAG,CAAK;IAChB,OAAO,CAAC,GAAG,CAAQ;IACnB,OAAO,CAAC,MAAM,CAAK;IACnB,OAAO,CAAC,OAAO,CAAQ;IACvB,OAAO,CAAC,kBAAkB,CAA+B;IACzD,OAAO,CAAC,cAAc,CAA8C;IACpE,OAAO,CAAC,WAAW,CAAI;IACvB,OAAO,CAAC,oBAAoB,CAA0C;gBAE1D,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG;YAOhC,KAAK;IAkBZ,WAAW,IAAI,eAAe;IA4E9B,0BAA0B,CAAC,SAAS,EAAE,eAAe,GAAG,IAAI;YA8BrD,kBAAkB;IAkBhC,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,eAAe;IAoBV,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;IAwBvC,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAe9B,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBhC,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC;IAcpC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;YAW9B,WAAW;YASX,UAAU;YASV,WAAW;YASX,YAAY;YASZ,YAAY;YASZ,mBAAmB;YAcnB,qBAAqB;YAKrB,iBAAiB;YAYjB,cAAc;CAG7B"}
@@ -0,0 +1,367 @@
1
+ import { TIMEOUTS } from '../constants.js';
2
+ import { OperatingModes, PowerModes, Properties } from '../sharkiq-js/sharkiq.js';
3
+ const MatterAccessoryEventTypes = globalThis.MatterAccessoryEventTypes || {};
4
+ // Simplified RoboticVacuumAccessory implementation based on the template
5
+ export class RoboticVacuumAccessory {
6
+ api;
7
+ log;
8
+ device;
9
+ isReady = false;
10
+ publishedAccessory = null;
11
+ pollIntervalId = null;
12
+ dockedDelay = 0;
13
+ dockedUpdateInterval = TIMEOUTS.DEFAULT_DOCKED_UPDATE_INTERVAL;
14
+ constructor(api, log, device) {
15
+ this.api = api;
16
+ this.log = log;
17
+ this.device = device;
18
+ }
19
+ // Simple retry helper with exponential backoff
20
+ async retry(fn, attempts = 3, initialDelay = 500) {
21
+ let lastError;
22
+ let delay = initialDelay;
23
+ for (let i = 0; i < attempts; i++) {
24
+ try {
25
+ return await fn();
26
+ }
27
+ catch (e) {
28
+ lastError = e;
29
+ this.log.debug(`Retry ${i + 1}/${attempts} failed:`, e);
30
+ if (i < attempts - 1) {
31
+ await new Promise(res => setTimeout(res, delay));
32
+ delay *= 2;
33
+ }
34
+ }
35
+ }
36
+ throw lastError;
37
+ }
38
+ toAccessory() {
39
+ const serialNumber = this.device._dsn && this.device._dsn.toString ? this.device._dsn.toString() : String(this.device._dsn);
40
+ const uuid = this.api.matter.uuid.generate(serialNumber);
41
+ const deviceType = this.api.matter.deviceTypes.RoboticVacuumCleaner;
42
+ const acc = {
43
+ uuid,
44
+ displayName: this.device._name || `Robot Vacuum ${serialNumber}`,
45
+ deviceType,
46
+ serialNumber,
47
+ manufacturer: 'Shark',
48
+ model: this.device._vac_model_number || 'SharkIQ',
49
+ firmwareRevision: this.device._firmware_version || '1.0.0',
50
+ hardwareRevision: '1.0.0',
51
+ clusters: {
52
+ rvcRunMode: {
53
+ supportedModes: [
54
+ { label: 'Idle', mode: 0 },
55
+ { label: 'Cleaning', mode: 1 },
56
+ { label: 'Mapping', mode: 2 },
57
+ ],
58
+ currentMode: 0,
59
+ },
60
+ rvcCleanMode: {
61
+ supportedModes: [
62
+ { label: 'Vacuum', mode: 0 },
63
+ { label: 'Mop', mode: 1 },
64
+ { label: 'Vacuum & Mop', mode: 2 },
65
+ ],
66
+ currentMode: 0,
67
+ },
68
+ rvcOperationalState: {
69
+ operationalStateList: [
70
+ { operationalStateId: 0, operationalStateLabel: 'Stopped' },
71
+ { operationalStateId: 1, operationalStateLabel: 'Running' },
72
+ { operationalStateId: 2, operationalStateLabel: 'Paused' },
73
+ { operationalStateId: 64, operationalStateLabel: 'Seeking Charger' },
74
+ { operationalStateId: 65, operationalStateLabel: 'Charging' },
75
+ { operationalStateId: 66, operationalStateLabel: 'Docked' },
76
+ ],
77
+ operationalState: 0,
78
+ },
79
+ serviceArea: {
80
+ supportedMaps: [],
81
+ supportedAreas: [],
82
+ selectedAreas: [],
83
+ currentArea: null,
84
+ },
85
+ },
86
+ handlers: {
87
+ rvcRunMode: {
88
+ changeToMode: async (request) => this.handleChangeRunMode(request),
89
+ },
90
+ rvcCleanMode: {
91
+ changeToMode: async (request) => this.handleChangeCleanMode(request),
92
+ },
93
+ rvcOperationalState: {
94
+ start: async () => this.handleStart(),
95
+ stop: async () => this.handleStop(),
96
+ pause: async () => this.handlePause(),
97
+ resume: async () => this.handleResume(),
98
+ goHome: async () => this.handleGoHome(),
99
+ },
100
+ serviceArea: {
101
+ selectAreas: async (request) => this.handleSelectAreas(request),
102
+ skipArea: async (request) => this.handleSkipArea(request),
103
+ },
104
+ },
105
+ };
106
+ return acc;
107
+ }
108
+ // Attach event listeners to the exact published Matter accessory object
109
+ attachToPublishedAccessory(accessory) {
110
+ // Keep a reference to the exact published accessory object so we can update clusters later
111
+ this.publishedAccessory = accessory;
112
+ try {
113
+ accessory._eventEmitter?.on(MatterAccessoryEventTypes.READY, async (port) => {
114
+ this.isReady = true;
115
+ this.log.info(`Matter accessory ready on port ${port} for ${accessory.displayName}`);
116
+ // When ready, perform an initial sync to populate state
117
+ try {
118
+ await this.performInitialSync();
119
+ // Start periodic polling after initial sync
120
+ this.startPolling();
121
+ }
122
+ catch (e) {
123
+ this.log.debug('performInitialSync error', e);
124
+ }
125
+ });
126
+ accessory._eventEmitter?.on(MatterAccessoryEventTypes.COMMISSIONED, () => {
127
+ this.log.info(`Matter accessory commissioned: ${accessory.displayName}`);
128
+ });
129
+ accessory._eventEmitter?.on(MatterAccessoryEventTypes.DECOMMISSIONED, () => {
130
+ this.log.warn(`Matter accessory decommissioned: ${accessory.displayName}`);
131
+ });
132
+ }
133
+ catch (e) {
134
+ this.log.debug('attachToPublishedAccessory error', e);
135
+ }
136
+ }
137
+ // Perform initial device sync once the Matter accessory is ready
138
+ async performInitialSync() {
139
+ try {
140
+ this.log.debug('Performing initial device sync for Matter accessory', this.device._dsn);
141
+ if (typeof this.device.update === 'function') {
142
+ await this.retry(() => this.device.update());
143
+ }
144
+ // Update Matter clusters with current device state (power mode, docked status, etc.)
145
+ await this.updateOperationalState();
146
+ await this.updateRunMode();
147
+ await this.updateCleanMode();
148
+ await this.updateSelectedAreas();
149
+ await this.updateProgress();
150
+ }
151
+ catch (e) {
152
+ this.log.debug('performInitialSync error', e);
153
+ }
154
+ }
155
+ // Start periodic polling for device state
156
+ startPolling() {
157
+ if (this.pollIntervalId) {
158
+ return;
159
+ }
160
+ const interval = this.dockedUpdateInterval || TIMEOUTS.DEFAULT_DOCKED_UPDATE_INTERVAL;
161
+ this.pollIntervalId = setInterval(async () => {
162
+ try {
163
+ const maybeDelay = await this.retry(() => this.device.update([Properties.DOCKED_STATUS, Properties.OPERATING_MODE, Properties.POWER_MODE]));
164
+ if (typeof maybeDelay === 'number') {
165
+ this.dockedDelay = maybeDelay;
166
+ }
167
+ await this.updateOperationalState();
168
+ await this.updateRunMode();
169
+ await this.updateCleanMode();
170
+ await this.updateSelectedAreas();
171
+ await this.updateProgress();
172
+ }
173
+ catch (e) {
174
+ this.log.debug('Polling update error', e);
175
+ }
176
+ }, interval + this.dockedDelay);
177
+ }
178
+ // Stop periodic polling
179
+ stopPolling() {
180
+ if (this.pollIntervalId) {
181
+ clearInterval(this.pollIntervalId);
182
+ this.pollIntervalId = null;
183
+ }
184
+ }
185
+ // Helper to set cluster values defensively on the published accessory object
186
+ setClusterValue(clusterName, prop, value) {
187
+ try {
188
+ if (!this.publishedAccessory) {
189
+ return;
190
+ }
191
+ // If accessory exposes an update method, prefer it
192
+ if (typeof this.publishedAccessory.updateCluster === 'function') {
193
+ this.publishedAccessory.updateCluster(clusterName, { [prop]: value });
194
+ return;
195
+ }
196
+ // Otherwise, update the clusters object directly
197
+ if (this.publishedAccessory.clusters && this.publishedAccessory.clusters[clusterName]) {
198
+ this.publishedAccessory.clusters[clusterName][prop] = value;
199
+ }
200
+ }
201
+ catch (e) {
202
+ this.log.debug('setClusterValue error', e);
203
+ }
204
+ }
205
+ // Update operational state cluster from device state
206
+ async updateOperationalState() {
207
+ try {
208
+ await this.device.update();
209
+ const mode = this.device.operating_mode();
210
+ // Map operating modes to RVC operationalState values
211
+ // 0: Stopped, 1: Running, 2: Paused, 64: Seeking Charger, 65: Charging, 66: Docked
212
+ let opState = 0;
213
+ if (mode === OperatingModes.START) {
214
+ opState = 1;
215
+ }
216
+ else if (mode === OperatingModes.STOP) {
217
+ opState = 2;
218
+ }
219
+ // Docked status overrides when docked
220
+ const docked = this.device.docked_status && this.device.docked_status() === 1;
221
+ if (docked) {
222
+ opState = 66;
223
+ }
224
+ this.setClusterValue('rvcOperationalState', 'operationalState', opState);
225
+ }
226
+ catch (e) {
227
+ this.log.debug('updateOperationalState error', e);
228
+ }
229
+ }
230
+ // Update run mode cluster (Idle / Cleaning / Mapping)
231
+ async updateRunMode() {
232
+ try {
233
+ await this.device.update();
234
+ const mode = this.device.operating_mode();
235
+ let runMode = 0;
236
+ if (mode === OperatingModes.START) {
237
+ runMode = 1;
238
+ }
239
+ this.setClusterValue('rvcRunMode', 'currentMode', runMode);
240
+ }
241
+ catch (e) {
242
+ this.log.debug('updateRunMode error', e);
243
+ }
244
+ }
245
+ // Update clean mode cluster (Vacuum / Mop / Vacuum & Mop)
246
+ async updateCleanMode() {
247
+ try {
248
+ await this.device.update();
249
+ const power = this.device.power_mode && this.device.power_mode();
250
+ // Best-effort mapping: treat power mode as clean mode placeholder
251
+ let cleanMode = 0;
252
+ if (power === PowerModes.MAX) {
253
+ cleanMode = 0;
254
+ }
255
+ this.setClusterValue('rvcCleanMode', 'currentMode', cleanMode);
256
+ }
257
+ catch (e) {
258
+ this.log.debug('updateCleanMode error', e);
259
+ }
260
+ }
261
+ // Update selected areas / supported areas cluster
262
+ async updateSelectedAreas() {
263
+ try {
264
+ // If device exposes map/area info, use it. Otherwise leave defaults.
265
+ const maps = this.device.maps || [];
266
+ const areas = this.device.areas || [];
267
+ this.setClusterValue('serviceArea', 'supportedMaps', maps);
268
+ this.setClusterValue('serviceArea', 'supportedAreas', areas);
269
+ // No selectedAreas by default
270
+ }
271
+ catch (e) {
272
+ this.log.debug('updateSelectedAreas error', e);
273
+ }
274
+ }
275
+ // Update progress / current area cluster
276
+ async updateProgress() {
277
+ try {
278
+ await this.device.update();
279
+ const currentArea = this.device.current_area || null;
280
+ this.setClusterValue('serviceArea', 'currentArea', currentArea);
281
+ }
282
+ catch (e) {
283
+ this.log.debug('updateProgress error', e);
284
+ }
285
+ }
286
+ // Handler implementations delegate to the underlying SharkIqVacuum device
287
+ async handleStart() {
288
+ this.log.info('Matter -> Start');
289
+ try {
290
+ await this.retry(() => this.device.clean_rooms([]));
291
+ }
292
+ catch (e) {
293
+ this.log.debug('handleStart error', e);
294
+ }
295
+ }
296
+ async handleStop() {
297
+ this.log.info('Matter -> Stop');
298
+ try {
299
+ await this.retry(() => this.device.cancel_clean());
300
+ }
301
+ catch (e) {
302
+ this.log.debug('handleStop error', e);
303
+ }
304
+ }
305
+ async handlePause() {
306
+ this.log.info('Matter -> Pause');
307
+ try {
308
+ await this.retry(() => this.device.set_operating_mode(this.device.OperatingModes?.STOP ?? 2));
309
+ }
310
+ catch (e) {
311
+ this.log.debug('handlePause error', e);
312
+ }
313
+ }
314
+ async handleResume() {
315
+ this.log.info('Matter -> Resume');
316
+ try {
317
+ await this.retry(() => this.device.set_operating_mode(this.device.OperatingModes?.START ?? 1));
318
+ }
319
+ catch (e) {
320
+ this.log.debug('handleResume error', e);
321
+ }
322
+ }
323
+ async handleGoHome() {
324
+ this.log.info('Matter -> GoHome');
325
+ try {
326
+ await this.retry(() => this.device.cancel_clean());
327
+ }
328
+ catch (e) {
329
+ this.log.debug('handleGoHome error', e);
330
+ }
331
+ }
332
+ async handleChangeRunMode(request) {
333
+ this.log.info('Matter -> Change Run Mode', request);
334
+ const newMode = request?.newMode;
335
+ try {
336
+ if (newMode === 1) {
337
+ await this.retry(() => this.device.clean_rooms([]));
338
+ }
339
+ else if (newMode === 0) {
340
+ await this.retry(() => this.device.cancel_clean());
341
+ }
342
+ }
343
+ catch (e) {
344
+ this.log.debug('handleChangeRunMode error', e);
345
+ }
346
+ }
347
+ async handleChangeCleanMode(request) {
348
+ this.log.info('Matter -> Change Clean Mode', request);
349
+ // Best-effort: implement if device supports clean mode change
350
+ }
351
+ async handleSelectAreas(request) {
352
+ this.log.info('Matter -> Select Areas', request);
353
+ const areas = request?.newAreas;
354
+ if (Array.isArray(areas) && areas.length > 0) {
355
+ try {
356
+ await this.retry(() => this.device.clean_rooms(areas));
357
+ }
358
+ catch (e) {
359
+ this.log.debug('handleSelectAreas error', e);
360
+ }
361
+ }
362
+ }
363
+ async handleSkipArea(request) {
364
+ this.log.info('Matter -> Skip Area', request);
365
+ }
366
+ }
367
+ //# sourceMappingURL=RoboticVacuumAccessory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RoboticVacuumAccessory.js","sourceRoot":"","sources":["../../src/devices/RoboticVacuumAccessory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAGjF,MAAM,yBAAyB,GAAS,UAAkB,CAAC,yBAAyB,IAAI,EAAE,CAAA;AAE1F,yEAAyE;AACzE,MAAM,OAAO,sBAAsB;IACzB,GAAG,CAAK;IACR,GAAG,CAA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ACH,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAA;YACxD,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,yBAAyB,EAAE,CAAC,CAAC,CAAA;YAC9C,CAAC;QACH,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,cAAc,CAAC,OAAY;QACvC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,qBAAqB,EAAE,OAAO,CAAC,CAAA;IAC/C,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import type { CharacteristicValue, Logger, PlatformAccessory, uuid } from 'homebridge';
2
- import type { SharkIQPlatform } from './platform.js';
3
- import type { SharkIqVacuum } from './sharkiq-js/sharkiq.js';
2
+ import type { SharkIQPlatform } from '../platform.js';
3
+ import type { SharkIqVacuum } from '../sharkiq-js/sharkiq.js';
4
4
  export declare class SharkIQAccessory {
5
5
  private readonly platform;
6
6
  private readonly accessory;
@@ -15,6 +15,21 @@ export declare class SharkIQAccessory {
15
15
  private vacuumPausedService;
16
16
  private isNativeVacuumServiceAvailable;
17
17
  constructor(platform: SharkIQPlatform, accessory: PlatformAccessory, device: SharkIqVacuum, UUIDGen: typeof uuid, log: Logger, invertDockedStatus: boolean, dockedUpdateInterval: number, enhancedVacuumMode?: boolean, dockedDelay?: number);
18
+ /**
19
+ * Convert this accessory to a MatterAccessory-like plain object.
20
+ * Uses the provided `api.matter` if available. This returns a minimal
21
+ * RoboticVacuumCleaner configuration with handlers bound to this instance.
22
+ */
23
+ toMatterAccessory(api: any): any;
24
+ private matterHandleStart;
25
+ private matterHandleStop;
26
+ private matterHandlePause;
27
+ private matterHandleResume;
28
+ private matterHandleGoHome;
29
+ private matterHandleChangeRunMode;
30
+ private matterHandleChangeCleanMode;
31
+ private matterHandleSelectAreas;
32
+ private matterHandleSkipArea;
18
33
  private checkForNativeVacuumService;
19
34
  private calculateDockedStatus;
20
35
  retrieveVacuumStateInterval(): Promise<void>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platformAccessory.d.ts","sourceRoot":"","sources":["../../src/devices/platformAccessory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,EAAE,iBAAiB,EAAW,IAAI,EAAE,MAAM,YAAY,CAAA;AAE/F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAM7D,qBAAa,gBAAgB;IAOzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,MAAM;IAEd,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IACrC,OAAO,CAAC,QAAQ,CAAC,kBAAkB;IACnC,OAAO,CAAC,WAAW;IAdrB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,mBAAmB,CAAS;IACpC,OAAO,CAAC,8BAA8B,CAAS;gBAG5B,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,iBAAiB,EACrC,MAAM,EAAE,aAAa,EAC7B,OAAO,EAAE,OAAO,IAAI,EACH,GAAG,EAAE,MAAM,EACX,kBAAkB,EAAE,OAAO,EAC3B,oBAAoB,EAAE,MAAM,EAC5B,kBAAkB,GAAE,OAAc,EAC3C,WAAW,GAAE,MAAU;IA8EjC;;;;OAIG;IACI,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG;YAmFzB,iBAAiB;YAWjB,gBAAgB;YAUhB,iBAAiB;YAUjB,kBAAkB;YAUlB,kBAAkB;YAWlB,yBAAyB;YAgBzB,2BAA2B;YAM3B,u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