@homebridge-plugins/homebridge-sharkiq 2.0.0-beta.12 → 2.0.0-beta.13
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/constants.d.ts.map +1 -1
- package/dist/constants.js.map +1 -1
- package/dist/devices/BaseMatterAccessory.d.ts +63 -0
- package/dist/devices/BaseMatterAccessory.d.ts.map +1 -0
- package/dist/devices/BaseMatterAccessory.js +100 -0
- package/dist/devices/BaseMatterAccessory.js.map +1 -0
- package/dist/devices/RoboticVacuumAccessory.d.ts +53 -28
- package/dist/devices/RoboticVacuumAccessory.d.ts.map +1 -1
- package/dist/devices/RoboticVacuumAccessory.js +316 -308
- package/dist/devices/RoboticVacuumAccessory.js.map +1 -1
- package/dist/devices/index.d.ts +9 -0
- package/dist/devices/index.d.ts.map +1 -0
- package/dist/devices/index.js +8 -0
- package/dist/devices/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/platform.d.ts +32 -32
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +91 -312
- package/dist/platform.js.map +1 -1
- package/docs/variables/default.html +2 -1
- package/package.json +1 -1
- package/dist/errorHandling.d.ts +0 -19
- package/dist/errorHandling.d.ts.map +0 -1
- package/dist/errorHandling.js +0 -27
- package/dist/errorHandling.js.map +0 -1
- package/dist/platformAccessory.d.ts +0 -48
- package/dist/platformAccessory.d.ts.map +0 -1
- package/dist/platformAccessory.js +0 -560
- package/dist/platformAccessory.js.map +0 -1
package/dist/platform.js
CHANGED
|
@@ -1,341 +1,120 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { RoboticVacuumAccessory, } from './devices/index.js';
|
|
2
|
+
import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js';
|
|
3
|
+
/**
|
|
4
|
+
* MatterPlatform
|
|
5
|
+
* Demonstrates all available Matter device types in Homebridge
|
|
6
|
+
*
|
|
7
|
+
* Organized by official Matter Specification v1.4.1 categories
|
|
8
|
+
*/
|
|
8
9
|
export class SharkIQPlatform {
|
|
9
10
|
log;
|
|
10
11
|
config;
|
|
11
12
|
api;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
vacuumDevices = [];
|
|
18
|
-
// Track restored Matter cached accessories (if running with Matter)
|
|
13
|
+
// Track restored HAP cached accessories (required for DynamicPlatformPlugin)
|
|
14
|
+
// This is commented out here as this plugin does not have any HAP accessories
|
|
15
|
+
// public readonly accessories: Map<string, PlatformAccessory> = new Map()
|
|
16
|
+
// Track restored Matter cached accessories
|
|
17
|
+
// Can contain either the serialized object restored from disk or a runtime Platform/MatterAccessory
|
|
19
18
|
matterAccessories = new Map();
|
|
20
|
-
// cache whether matter is enabled/available
|
|
21
|
-
matterEnabled;
|
|
22
19
|
constructor(log, config, api) {
|
|
23
20
|
this.log = log;
|
|
24
21
|
this.config = config;
|
|
25
22
|
this.api = api;
|
|
26
|
-
this.Service = this.api.hap.Service;
|
|
27
|
-
this.Characteristic = this.api.hap.Characteristic;
|
|
28
23
|
this.log.debug('Finished initializing platform:', this.config.name);
|
|
29
|
-
//
|
|
24
|
+
// Does the user have a version of Homebridge that is compatible with matter?
|
|
25
|
+
if (!this.api.isMatterAvailable?.()) {
|
|
26
|
+
this.log.warn('Matter is not available in this version of Homebridge. Please update Homebridge to use this plugin.');
|
|
27
|
+
}
|
|
28
|
+
// Check if the user has matter enabled, this means:
|
|
29
|
+
// - If the plugin is running on the main bridge, then the user must have enabled matter in the Homebridge settings page in the UI
|
|
30
|
+
// - If the plugin is running on a child bridge, then the user must have enabled matter on the plugin bridge settings section in the UI
|
|
31
|
+
// In reality, only the below check is needed, but they are both included here for completeness
|
|
32
|
+
// Remember to use a '?.' optional chaining operator in case the user is running an older version of Homebridge that does not have these APIs
|
|
33
|
+
if (!this.api.isMatterEnabled?.()) {
|
|
34
|
+
this.log.warn('Matter is not enabled in Homebridge. Please enable Matter in the Homebridge settings to use this plugin.');
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
// Register Matter accessories when Homebridge has finished launching
|
|
30
38
|
this.api.on('didFinishLaunching', () => {
|
|
31
|
-
|
|
32
|
-
this.
|
|
33
|
-
this.log.info(`Found ${devices.length} device(s) on your account.`);
|
|
34
|
-
this.log.debug('Devices:', devices);
|
|
35
|
-
// Build a list of DSNs returned by the API for logging
|
|
36
|
-
const apiDsns = devices.map(d => (d._dsn && d._dsn.toString) ? d._dsn.toString() : String(d._dsn));
|
|
37
|
-
this.log.info('DSNs on account:', apiDsns);
|
|
38
|
-
if (serialNumbers.length > 0) {
|
|
39
|
-
// If user provided DSNs in config, only add those that match
|
|
40
|
-
for (let i = 0; i < devices.length; i++) {
|
|
41
|
-
if (serialNumbers.includes(devices[i]._dsn)) {
|
|
42
|
-
this.vacuumDevices.push(devices[i]);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const selectedDsns = this.vacuumDevices.map(d => d._dsn && d._dsn.toString ? d._dsn.toString() : String(d._dsn));
|
|
46
|
-
this.log.info('Selected DSNs from config:', selectedDsns);
|
|
47
|
-
if (this.vacuumDevices.length === 0) {
|
|
48
|
-
log.warn('None of the DSNs provided matched the vacuum(s) on your account.');
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
// No DSNs provided in config — add all devices returned by the API
|
|
53
|
-
this.log.info('No `vacuums` array specified in config; adding all devices from the account.');
|
|
54
|
-
this.vacuumDevices = devices.slice();
|
|
55
|
-
const addedDsns = this.vacuumDevices.map(d => d._dsn && d._dsn.toString ? d._dsn.toString() : String(d._dsn));
|
|
56
|
-
this.log.info('Added DSNs:', addedDsns);
|
|
57
|
-
}
|
|
58
|
-
// Does the user have a version of Homebridge that is compatible with matter?
|
|
59
|
-
if (!this.api.isMatterAvailable?.()) {
|
|
60
|
-
this.log.warn('Matter is not available in this version of Homebridge. Please update Homebridge to use this plugin.');
|
|
61
|
-
}
|
|
62
|
-
// Check if the user has matter enabled, this means:
|
|
63
|
-
// - If the plugin is running on the main bridge, then the user must have enabled matter in the Homebridge settings page in the UI
|
|
64
|
-
// - If the plugin is running on a child bridge, then the user must have enabled matter on the plugin bridge settings section in the UI
|
|
65
|
-
// In reality, only the below check is needed, but they are both included here for completeness
|
|
66
|
-
// Remember to use a '?.' optional chaining operator in case the user is running an older version of Homebridge that does not have these APIs
|
|
67
|
-
if (!this.api.isMatterEnabled?.()) {
|
|
68
|
-
this.log.warn('Matter is not enabled in Homebridge. Please enable Matter in the Homebridge settings to use this plugin.');
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
this.discoverDevices();
|
|
72
|
-
}).catch((error) => {
|
|
73
|
-
log.error('Error with login.');
|
|
74
|
-
log.error(error);
|
|
75
|
-
});
|
|
39
|
+
this.log.debug('Executed didFinishLaunching callback');
|
|
40
|
+
this.registerMatterAccessories();
|
|
76
41
|
});
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
else if (isAvailable && isEnabled) {
|
|
88
|
-
this.log.info('Matter is available and enabled. Matter accessories will be published when supported.');
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
this.log.debug('Matter availability check inconclusive (functions may be missing).');
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
catch (e) {
|
|
95
|
-
this.log.debug('Matter availability check skipped (not supported by this Homebridge version).');
|
|
96
|
-
}
|
|
97
|
-
// store a boolean for quick checks later
|
|
98
|
-
this.matterEnabled = !!(this.api.matter && this.api.matter.publishExternalAccessories);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Required for DynamicPlatformPlugin
|
|
45
|
+
* Called when homebridge restores cached accessories from disk at startup
|
|
46
|
+
*/
|
|
47
|
+
configureAccessory( /* accessory: PlatformAccessory */) {
|
|
48
|
+
// Note this is not used for Matter accessories - use configureMatterAccessory instead
|
|
49
|
+
// This plugin does not have any hap accessories, so here we can comment this out
|
|
50
|
+
// this.accessories.set(accessory.UUID, accessory)
|
|
99
51
|
}
|
|
100
52
|
/**
|
|
101
53
|
* Called when homebridge restores cached Matter accessories from disk at startup.
|
|
102
|
-
*
|
|
54
|
+
*
|
|
55
|
+
* This is where you can access the `accessory.context` object to retrieve
|
|
56
|
+
* any custom data you stored when the accessory was originally registered.
|
|
103
57
|
*/
|
|
104
58
|
configureMatterAccessory(accessory) {
|
|
105
59
|
this.log.debug('Loading cached Matter accessory:', accessory.displayName);
|
|
106
|
-
//
|
|
107
|
-
|
|
108
|
-
if (stored && stored.instance && typeof stored.instance.attachToPublishedAccessory === 'function') {
|
|
109
|
-
stored.accessory = accessory;
|
|
110
|
-
try {
|
|
111
|
-
stored.instance.attachToPublishedAccessory(accessory);
|
|
112
|
-
}
|
|
113
|
-
catch (e) {
|
|
114
|
-
this.log.debug('Error attaching instance to published Matter accessory', e);
|
|
115
|
-
}
|
|
116
|
-
this.matterAccessories.set(accessory.uuid, stored);
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
// No instance cached; store accessory so future publish or restarts can map it
|
|
120
|
-
this.matterAccessories.set(accessory.uuid, { instance: null, accessory });
|
|
121
|
-
}
|
|
60
|
+
// store the serialized accessory; later code may replace this with a runtime MatterAccessory instance
|
|
61
|
+
this.matterAccessories.set(accessory.uuid, accessory);
|
|
122
62
|
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
//
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
else if (oAuthCode && typeof oAuthCode === 'string' && oAuthCode.trim() !== '') {
|
|
139
|
-
this.log.info('Valid OAuth code present, using OAuth login method.');
|
|
140
|
-
}
|
|
141
|
-
if (email !== '' && password === '') {
|
|
142
|
-
return Promise.reject(new Error('Password must be present in the config if email is provided.'));
|
|
143
|
-
}
|
|
144
|
-
else if (email === '' && password !== '') {
|
|
145
|
-
return Promise.reject(new Error('Email must be present in the config if password is provided.'));
|
|
146
|
-
}
|
|
147
|
-
const login = new Login(this.log, auth_file, oauth_file, email, password, oAuthCode, europe);
|
|
148
|
-
try {
|
|
149
|
-
await login.checkLogin();
|
|
150
|
-
const ayla_api = get_ayla_api(auth_file, this.log, europe);
|
|
151
|
-
await ayla_api.sign_in();
|
|
152
|
-
const devices = await ayla_api.get_devices();
|
|
153
|
-
return devices;
|
|
154
|
-
}
|
|
155
|
-
catch (error) {
|
|
156
|
-
return Promise.reject(error);
|
|
157
|
-
}
|
|
158
|
-
};
|
|
159
|
-
// Restore accessory cache.
|
|
160
|
-
configureAccessory(accessory) {
|
|
161
|
-
this.log.info('Loading accessory from cache:', accessory.displayName);
|
|
162
|
-
this.accessories.push(accessory);
|
|
63
|
+
/**
|
|
64
|
+
* Register all Matter accessories
|
|
65
|
+
*/
|
|
66
|
+
async registerMatterAccessories() {
|
|
67
|
+
this.log.info('═'.repeat(80));
|
|
68
|
+
this.log.info('Homebridge Matter Plugin');
|
|
69
|
+
this.log.info('═'.repeat(80));
|
|
70
|
+
// Remove accessories that are disabled in config
|
|
71
|
+
await this.removeDisabledAccessories();
|
|
72
|
+
// Register devices by Matter specification sections
|
|
73
|
+
await this.registerSection12Robotic();
|
|
74
|
+
this.log.info('═'.repeat(80));
|
|
75
|
+
this.log.info('Finished registering Matter accessories');
|
|
76
|
+
this.log.info('═'.repeat(80));
|
|
163
77
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
// Matter API is required; build Matter external accessories list from our vacuum devices using RoboticVacuumAccessory
|
|
181
|
-
const apiMatter = this.api.matter;
|
|
182
|
-
const matterAccessoriesToPublish = [];
|
|
183
|
-
for (const vacuumDevice of this.vacuumDevices) {
|
|
184
|
-
try {
|
|
185
|
-
const rvc = new RoboticVacuumAccessory(this.api, this.log, vacuumDevice);
|
|
186
|
-
const acc = rvc.toAccessory();
|
|
187
|
-
// store instance with accessory placeholder; the actual published accessory object will be attached after publishing
|
|
188
|
-
this.matterAccessories.set(acc.uuid, { instance: rvc, accessory: null });
|
|
189
|
-
matterAccessoriesToPublish.push(acc);
|
|
190
|
-
}
|
|
191
|
-
catch (err) {
|
|
192
|
-
this.log.debug('Failed to create RoboticVacuumAccessory for device', vacuumDevice, err);
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
if (matterAccessoriesToPublish.length === 0) {
|
|
196
|
-
this.log.warn('No Matter accessories to publish (no supported robotic vacuums found).');
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
this.log.info(`✓ Publishing ${matterAccessoriesToPublish.length} robotic device(s) as external Matter accessories`);
|
|
200
|
-
for (const acc of matterAccessoriesToPublish) {
|
|
201
|
-
this.log.info(` - ${acc.displayName}`);
|
|
202
|
-
}
|
|
203
|
-
try {
|
|
204
|
-
// Publish and then attach the exact published accessory objects back to our instances
|
|
205
|
-
// Some Homebridge builds expose the publish API directly on api.matter, while others nest it under api.matter.api.
|
|
206
|
-
if (apiMatter && typeof apiMatter.publishExternalAccessories === 'function') {
|
|
207
|
-
apiMatter.publishExternalAccessories(PLUGIN_NAME, matterAccessoriesToPublish);
|
|
208
|
-
this.log.info('Matter accessories published using api.matter.publishExternalAccessories');
|
|
209
|
-
}
|
|
210
|
-
else if (apiMatter && apiMatter.api && typeof apiMatter.api.publishExternalAccessories === 'function') {
|
|
211
|
-
// Some Homebridge builds expect PlatformAccessory instances from api.matter.api.platformAccessory
|
|
212
|
-
const platformAccFactory = apiMatter.api.platformAccessory;
|
|
213
|
-
let platformAccessoriesToPublish = matterAccessoriesToPublish;
|
|
214
|
-
if (typeof platformAccFactory === 'function') {
|
|
215
|
-
try {
|
|
216
|
-
platformAccessoriesToPublish = matterAccessoriesToPublish.map((acc) => platformAccFactory(acc));
|
|
217
|
-
}
|
|
218
|
-
catch (e) {
|
|
219
|
-
this.log.debug('Failed to convert accessories to platformAccessory instances, will try publishing raw objects', e);
|
|
220
|
-
}
|
|
78
|
+
/**
|
|
79
|
+
* Remove accessories that are disabled in config
|
|
80
|
+
*/
|
|
81
|
+
async removeDisabledAccessories() {
|
|
82
|
+
const configMap = [
|
|
83
|
+
{ enabled: this.config.enableRobotVacuum, uuid: this.api.matter.uuid.generate('matter-robot-vacuum'), name: 'Robot Vacuum' },
|
|
84
|
+
];
|
|
85
|
+
for (const { enabled, uuid, name } of configMap) {
|
|
86
|
+
if (enabled === false) {
|
|
87
|
+
const existingAccessory = this.matterAccessories.get(uuid);
|
|
88
|
+
if (existingAccessory) {
|
|
89
|
+
this.log.info(`Removing accessory '${name}' (disabled in config)`);
|
|
90
|
+
await this.api.matter.unregisterPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [existingAccessory]);
|
|
91
|
+
this.matterAccessories.delete(uuid);
|
|
221
92
|
}
|
|
222
|
-
apiMatter.api.publishExternalAccessories(PLUGIN_NAME, platformAccessoriesToPublish);
|
|
223
|
-
this.log.info('Matter accessories published using api.matter.api.publishExternalAccessories');
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
throw new Error('publishExternalAccessories API not found on api.matter or api.matter.api');
|
|
227
|
-
}
|
|
228
|
-
// After publish, the homebridge runtime will provide published accessory objects via the configureMatterAccessory hook.
|
|
229
|
-
// We will expect configureMatterAccessory to be called for each published accessory and then attach listeners there.
|
|
230
|
-
}
|
|
231
|
-
catch (err) {
|
|
232
|
-
this.log.error('Failed to publish Matter external accessories:', err);
|
|
233
|
-
this.log.error('Detected matter object:', Boolean(apiMatter), 'api.matter keys:', apiMatter ? Object.keys(apiMatter) : []);
|
|
234
|
-
// If nested api object exists, show its keys too for debugging
|
|
235
|
-
if (apiMatter && apiMatter.api) {
|
|
236
|
-
this.log.error('api.matter.api keys:', Object.keys(apiMatter.api));
|
|
237
93
|
}
|
|
238
|
-
this.log.error('Ensure Homebridge is running a Matter-capable build and that Matter is enabled.');
|
|
239
94
|
}
|
|
240
|
-
// Note: configureMatterAccessory will be called for cached/published Matter accessories and attach instances
|
|
241
95
|
}
|
|
242
96
|
/**
|
|
243
|
-
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
* method used by Homebridge Matter examples and allows each device to appear as its own
|
|
248
|
-
* Matter bridge/device in Apple Home.
|
|
249
|
-
*
|
|
250
|
-
* Compatibility: some Homebridge builds expose the Matter API under `api.matter.api` and
|
|
251
|
-
* expect `PlatformAccessory` instances produced by `api.matter.api.platformAccessory`.
|
|
252
|
-
* This helper attempts the canonical serialized-object publish first, and will try to
|
|
253
|
-
* convert to `PlatformAccessory` instances when required by the runtime.
|
|
97
|
+
* Section 12: Robotic Devices (Matter Spec § 12)
|
|
98
|
+
* ⚠️ IMPORTANT: RVC devices use a DIFFERENT PROCESS (same code) than other devices!
|
|
99
|
+
* When this runs, you'll see separate commissioning codes in the logs for the robot vacuum.
|
|
100
|
+
* Use those codes to pair the vacuum as a separate bridge in your Home app.
|
|
254
101
|
*/
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
const platformAccFactory = apiMatter.api.platformAccessory;
|
|
272
|
-
let platformAccessoriesToPublish = accessories;
|
|
273
|
-
if (typeof platformAccFactory === 'function') {
|
|
274
|
-
const converted = [];
|
|
275
|
-
for (const acc of accessories) {
|
|
276
|
-
try {
|
|
277
|
-
const p = platformAccFactory(acc);
|
|
278
|
-
this.log.debug('Converted accessory using platformAccessory factory:', p && p.constructor ? p.constructor.name : typeof p, Object.keys(p || {}));
|
|
279
|
-
converted.push(p);
|
|
280
|
-
}
|
|
281
|
-
catch (e) {
|
|
282
|
-
this.log.debug('platformAccessory factory threw for accessory, falling back to raw serialized object', e);
|
|
283
|
-
// push the raw serialized object so we still attempt to publish
|
|
284
|
-
converted.push(acc);
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
platformAccessoriesToPublish = converted;
|
|
288
|
-
}
|
|
289
|
-
try {
|
|
290
|
-
apiMatter.api.publishExternalAccessories(pluginName, platformAccessoriesToPublish);
|
|
291
|
-
this.log.info('Matter accessories published using api.matter.api.publishExternalAccessories');
|
|
292
|
-
}
|
|
293
|
-
catch (pubErr) {
|
|
294
|
-
// Log diagnostics about each object we tried to register to help debug the runtime TypeError
|
|
295
|
-
this.log.error('publishExternalAccessories threw an error when called with the following accessory shapes:');
|
|
296
|
-
for (const a of platformAccessoriesToPublish) {
|
|
297
|
-
try {
|
|
298
|
-
this.log.error(' - constructor:', a && a.constructor ? a.constructor.name : typeof a, 'keys:', a ? Object.keys(a) : []);
|
|
299
|
-
}
|
|
300
|
-
catch (diagErr) {
|
|
301
|
-
this.log.error(' - (failed to introspect accessory):', diagErr);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
throw pubErr;
|
|
305
|
-
}
|
|
306
|
-
return true;
|
|
307
|
-
}
|
|
308
|
-
return false;
|
|
309
|
-
};
|
|
310
|
-
try {
|
|
311
|
-
// Prefer canonical serialized publish first
|
|
312
|
-
if (tryPublishSerialized()) {
|
|
313
|
-
return;
|
|
314
|
-
}
|
|
315
|
-
// If canonical publish not available, attempt nested API publish
|
|
316
|
-
if (tryPublishNestedApi()) {
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
// As a last resort, retry once after a short delay — some Homebridge builds initialize
|
|
320
|
-
// the nested Matter object shortly after didFinishLaunching.
|
|
321
|
-
setTimeout(() => {
|
|
322
|
-
this.log.debug('Retrying Matter publish after short delay...');
|
|
323
|
-
if (tryPublishSerialized()) {
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
if (tryPublishNestedApi()) {
|
|
327
|
-
return;
|
|
328
|
-
}
|
|
329
|
-
this.log.error('publishExternalAccessories API not found on api.matter or api.matter.api');
|
|
330
|
-
}, 250);
|
|
331
|
-
}
|
|
332
|
-
catch (err) {
|
|
333
|
-
this.log.error('Failed to publish Matter external accessories:', err);
|
|
334
|
-
this.log.error('Detected matter object:', Boolean(apiMatter), 'api.matter keys:', apiMatter ? Object.keys(apiMatter) : []);
|
|
335
|
-
if (apiMatter && apiMatter.api) {
|
|
336
|
-
this.log.error('api.matter.api keys:', Object.keys(apiMatter.api));
|
|
337
|
-
}
|
|
338
|
-
this.log.error('Ensure Homebridge is running a Matter-capable build and that Matter is enabled.');
|
|
102
|
+
async registerSection12Robotic() {
|
|
103
|
+
this.log.info('═'.repeat(80));
|
|
104
|
+
this.log.info('Section 12: Robotic Devices (Matter Spec § 12)');
|
|
105
|
+
this.log.info('═'.repeat(80));
|
|
106
|
+
const accessories = [];
|
|
107
|
+
// Robot Vacuum
|
|
108
|
+
if (this.config.enableRobotVacuum !== false) {
|
|
109
|
+
const device = new RoboticVacuumAccessory(this.api, this.log);
|
|
110
|
+
accessories.push(device.toAccessory());
|
|
111
|
+
}
|
|
112
|
+
if (accessories.length > 0) {
|
|
113
|
+
this.log.info(`✓ Registered ${accessories.length} robot vacuum device(s)`);
|
|
114
|
+
for (const acc of accessories) {
|
|
115
|
+
this.log.info(` - ${acc.displayName} (standalone for Apple Home compatibility)`);
|
|
116
|
+
}
|
|
117
|
+
await this.api.matter.registerPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, accessories);
|
|
339
118
|
}
|
|
340
119
|
}
|
|
341
120
|
}
|
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAEhC,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AASnD,6BAA6B;AAC7B,MAAM,OAAO,eAAe;IAcR;IACA;IACA;IAfF,OAAO,CAAgB;IACvB,cAAc,CAAuB;IAErD,oDAAoD;IACpC,WAAW,GAAwB,EAAE,CAAA;IACrD,8BAA8B;IACvB,aAAa,GAAoB,EAAE,CAAA;IAC1C,oEAAoE;IACpD,iBAAiB,GAAqB,IAAI,GAAG,EAAE,CAAA;IAC/D,4CAA4C;IAC5B,aAAa,CAAS;IAEtC,YACkB,GAAW,EACX,MAAsB,EACtB,GAAQ;QAFR,QAAG,GAAH,GAAG,CAAQ;QACX,WAAM,GAAN,MAAM,CAAgB;QACtB,QAAG,GAAH,GAAG,CAAK;QAExB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAA;QACnC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAA;QACjD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,iCAAiC,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;QAEnE,oCAAoC;QACpC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,oBAAoB,EAAE,GAAG,E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;QAEzC,eAAe;QACf,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,KAAK,KAAK,EAAE,CAAC;YAC5C,MAAM,MAAM,GAAG,IAAI,sBAAsB,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAA;YAC7D,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAA;QACxC,CAAC;QAED,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC3B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,gBAAgB,WAAW,CAAC,MAAM,yBAAyB,CAAC,CAAA;YAC1E,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;gBAC9B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,WAAW,4CAA4C,CAAC,CAAA;YACnF,CAAC;YACD,MAAM,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,2BAA2B,CAAC,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAA;QAC5F,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>default | @homebridge-plugins/homebridge-sharkiq</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-sharkiq"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@homebridge-plugins/homebridge-sharkiq</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">default</a></li></ul><h1>Variable default</h1></div><div class="tsd-signature"><span class="tsd-kind-variable">default</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">api</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">API</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></div><div class="tsd-
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>default | @homebridge-plugins/homebridge-sharkiq</title><meta name="description" content="Documentation for @homebridge-plugins/homebridge-sharkiq"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@homebridge-plugins/homebridge-sharkiq</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">default</a></li></ul><h1>Variable default</h1></div><div class="tsd-signature"><span class="tsd-kind-variable">default</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">api</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">API</span><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></div><div class="tsd-comment tsd-typography"><p>This method registers the platform with Homebridge</p>
|
|
2
|
+
</div><div class="tsd-type-declaration"><h4>Type Declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="__type"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">api</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">API</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">api</span>: <span class="tsd-signature-type">API</span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/homebridge-plugins/homebridge-sharkiq/blob/24bd8885f38688e93f25f6cf6df689cd1e55d5a5/src/index.ts#L9">index.ts:9</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@homebridge-plugins/homebridge-sharkiq</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@homebridge-plugins/homebridge-sharkiq",
|
|
3
3
|
"displayName": "SharkIQ Plugin",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "2.0.0-beta.
|
|
5
|
+
"version": "2.0.0-beta.13",
|
|
6
6
|
"description": "A Homebridge plugin to connect your Shark Vacuum to homebridge.",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Bubba8291",
|
package/dist/errorHandling.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { Logger } from 'homebridge';
|
|
2
|
-
/**
|
|
3
|
-
* Centralized error handling utilities
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Logs a rejected promise with consistent formatting
|
|
7
|
-
* @param log - The logger instance
|
|
8
|
-
* @param operation - Description of the operation that failed
|
|
9
|
-
* @param error - Optional error details
|
|
10
|
-
*/
|
|
11
|
-
export declare function logRejectedPromise(log: Logger, operation: string, error?: unknown): void;
|
|
12
|
-
/**
|
|
13
|
-
* Creates a promise rejection handler that logs the error
|
|
14
|
-
* @param log - The logger instance
|
|
15
|
-
* @param operation - Description of the operation that failed
|
|
16
|
-
* @returns A function that can be used with .catch()
|
|
17
|
-
*/
|
|
18
|
-
export declare function createPromiseRejectionHandler(log: Logger, operation: string): (error?: unknown) => void;
|
|
19
|
-
//# sourceMappingURL=errorHandling.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandling.d.ts","sourceRoot":"","sources":["../src/errorHandling.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC;;GAEG;AAEH;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAKxF;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAClE,QAAQ,OAAO,UAGxB"}
|
package/dist/errorHandling.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Centralized error handling utilities
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Logs a rejected promise with consistent formatting
|
|
6
|
-
* @param log - The logger instance
|
|
7
|
-
* @param operation - Description of the operation that failed
|
|
8
|
-
* @param error - Optional error details
|
|
9
|
-
*/
|
|
10
|
-
export function logRejectedPromise(log, operation, error) {
|
|
11
|
-
log.debug(`Promise Rejected with ${operation}.`);
|
|
12
|
-
if (error) {
|
|
13
|
-
log.debug(`Error details: ${error}`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Creates a promise rejection handler that logs the error
|
|
18
|
-
* @param log - The logger instance
|
|
19
|
-
* @param operation - Description of the operation that failed
|
|
20
|
-
* @returns A function that can be used with .catch()
|
|
21
|
-
*/
|
|
22
|
-
export function createPromiseRejectionHandler(log, operation) {
|
|
23
|
-
return (error) => {
|
|
24
|
-
logRejectedPromise(log, operation, error);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=errorHandling.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandling.js","sourceRoot":"","sources":["../src/errorHandling.ts"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW,EAAE,SAAiB,EAAE,KAAe;IAChF,GAAG,CAAC,KAAK,CAAC,yBAAyB,SAAS,GAAG,CAAC,CAAA;IAChD,IAAI,KAAK,EAAE,CAAC;QACV,GAAG,CAAC,KAAK,CAAC,kBAAkB,KAAK,EAAE,CAAC,CAAA;IACtC,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B,CAAC,GAAW,EAAE,SAAiB;IAC1E,OAAO,CAAC,KAAe,EAAE,EAAE;QACzB,kBAAkB,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAA;IAC3C,CAAC,CAAA;AACH,CAAC"}
|