homebridge-eufy-security 4.4.2-beta.33 → 4.4.2-beta.35

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/platform.js CHANGED
@@ -6,7 +6,7 @@ import { MotionSensorAccessory } from './accessories/MotionSensorAccessory.js';
6
6
  import { CameraAccessory } from './accessories/CameraAccessory.js';
7
7
  import { LockAccessory } from './accessories/LockAccessory.js';
8
8
  import { AutoSyncStationAccessory } from './accessories/AutoSyncStationAccessory.js';
9
- import { EufySecurity, Device, DeviceType, UserType, libVersion, LogLevel, } from 'eufy-security-client';
9
+ import { EufySecurity, Device, UserType, libVersion, LogLevel, } from 'eufy-security-client';
10
10
  import { createStream } from 'rotating-file-stream';
11
11
  import fs from 'fs';
12
12
  import os from 'node:os';
@@ -489,7 +489,7 @@ export class EufySecurityPlatform {
489
489
  /**
490
490
  * Processes pending stations and devices in batch.
491
491
  * Only creates station entities if:
492
- * 1. It's a real HomeBase (DeviceType.STATION) OR
492
+ * 1. It's a hub/base station (Device.isStation) OR
493
493
  * 2. It has at least one device attached
494
494
  *
495
495
  * All discovered devices are processed since they are already verified by bropat/eufy-security-client.
@@ -525,6 +525,11 @@ export class EufySecurityPlatform {
525
525
  stationsWithDevices.add(device.getStationSerial());
526
526
  try {
527
527
  const deviceType = device.getDeviceType();
528
+ // Skip devices that the client declares as unsupported
529
+ if (!Device.isSupported(deviceType)) {
530
+ log.warn(`[DEVICE SKIP] "${device.getName()}" (type ${deviceType}) is unsupported by eufy-security-client — skipping accessory creation`);
531
+ continue;
532
+ }
528
533
  const deviceContainer = {
529
534
  deviceIdentifier: {
530
535
  uniqueId: device.getSerial(),
@@ -547,9 +552,14 @@ export class EufySecurityPlatform {
547
552
  let stationsSkipped = 0;
548
553
  for (const station of this.pendingStations) {
549
554
  const stationType = station.getDeviceType();
555
+ // Skip devices that the client declares as unsupported
556
+ if (!Device.isSupported(stationType)) {
557
+ log.warn(`[STATION SKIP] "${station.getName()}" (type ${stationType}) is unsupported by eufy-security-client — skipping accessory creation`);
558
+ continue;
559
+ }
550
560
  const stationSerial = station.getSerial();
551
- // Create if: it's a real HomeBase OR it has devices
552
- const shouldCreate = stationType === DeviceType.STATION ||
561
+ // Create if: it's a hub/base station OR it has devices
562
+ const shouldCreate = Device.isStation(stationType) ||
553
563
  stationsWithDevices.has(stationSerial);
554
564
  if (!shouldCreate) {
555
565
  stationsSkipped++;
@@ -632,7 +642,7 @@ export class EufySecurityPlatform {
632
642
  log.debug(accessory.displayName + ' UUID:' + accessory.UUID);
633
643
  const type = container.deviceIdentifier.type;
634
644
  const station = container.eufyDevice;
635
- if (type !== DeviceType.STATION) {
645
+ if (!Device.isStation(type)) {
636
646
  // Standalone Lock or Doorbell doesn't have Security Control
637
647
  if (Device.isDoorbell(type) || Device.isLock(type)) {
638
648
  throw new Error(`looks station but it's not could imply some errors! Type: ${type}. You can ignore this message.`);
@@ -1 +1 @@
1
- {"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE3D,OAAO,EAAE,qBAAqB,EAA8B,MAAM,aAAa,CAAC;AAIhF,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAErF,OAAO,EACL,YAAY,EAEZ,MAAM,EACN,UAAU,EAKV,QAAQ,EAER,UAAU,EACV,QAAQ,GACT,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,YAAY,EAAE,MAAM,sB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,CAAC,CAAC;YAC9C,IAAI,aAAa,CAAC,IAAI,EAAE,SAAS,EAAE,MAAc,CAAC,CAAC;QACrD,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1D,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,GAAG,YAAY,CAAC,CAAC;YAChD,IAAI,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,MAAgB,CAAC,CAAC;QACzD,CAAC;IAEH,CAAC"}
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const LIB_VERSION = "4.4.2-beta.33";
1
+ export const LIB_VERSION = "4.4.2-beta.35";
2
2
  //# sourceMappingURL=version.js.map
@@ -86,6 +86,75 @@ const Api = {
86
86
  });
87
87
  },
88
88
 
89
+ /**
90
+ * Register a listener for discovery warnings (e.g. extended discovery due to unsupported devices)
91
+ * @param {function} callback - receives { unsupportedCount, unsupportedNames, waitSeconds, message }
92
+ */
93
+ onDiscoveryWarning(callback) {
94
+ this._on('discoveryWarning', (event) => {
95
+ callback(event.data);
96
+ });
97
+ },
98
+
99
+ /**
100
+ * Register a listener for real-time discovery progress events.
101
+ * @param {function} callback - receives { phase, stations?, devices?, message }
102
+ */
103
+ onDiscoveryProgress(callback) {
104
+ this._on('discoveryProgress', (event) => {
105
+ callback(event.data);
106
+ });
107
+ },
108
+ /**
109
+ * Register a listener for TFA (two-factor auth) request from the server.
110
+ * Fired when the Eufy server requires a verification code.
111
+ * @param {function} callback - receives no arguments
112
+ */
113
+ onTfaRequest(callback) {
114
+ this._on('tfaRequest', () => callback());
115
+ },
116
+
117
+ /**
118
+ * Register a listener for Captcha request from the server.
119
+ * Fired when the Eufy server requires captcha verification.
120
+ * @param {function} callback - receives { id, captcha }
121
+ */
122
+ onCaptchaRequest(callback) {
123
+ this._on('captchaRequest', (event) => callback(event.data));
124
+ },
125
+
126
+ /**
127
+ * Register a listener for successful authentication.
128
+ * @param {function} callback - receives no arguments
129
+ */
130
+ onAuthSuccess(callback) {
131
+ this._on('authSuccess', () => callback());
132
+ },
133
+
134
+ /**
135
+ * Register a listener for authentication errors (timeout, bad credentials, etc.).
136
+ * @param {function} callback - receives { message }
137
+ */
138
+ onAuthError(callback) {
139
+ this._on('authError', (event) => callback(event.data));
140
+ },
141
+ /**
142
+ * Tell the server to skip the unsupported-device intel wait and proceed immediately.
143
+ * @returns {Promise<{ok: boolean}>}
144
+ */
145
+ async skipIntelWait() {
146
+ return homebridge.request('/skipIntelWait');
147
+ },
148
+
149
+ /**
150
+ * Get the current discovery state (phase + pending counts).
151
+ * Used by the discovery UI to catch up on events that fired during login.
152
+ * @returns {Promise<{phase: string, stations: number, devices: number}>}
153
+ */
154
+ async getDiscoveryState() {
155
+ return homebridge.request('/discoveryState');
156
+ },
157
+
89
158
  /**
90
159
  * Register a listener for admin account error.
91
160
  * Replaces any previously registered listener.
@@ -390,31 +390,6 @@
390
390
  padding: 24px 20px;
391
391
  }
392
392
 
393
- .login-step-indicator {
394
- display: flex;
395
- justify-content: center;
396
- gap: 8px;
397
- margin-bottom: 20px;
398
- }
399
-
400
- .login-step-dot {
401
- width: 8px;
402
- height: 8px;
403
- border-radius: 50%;
404
- background: rgba(0, 0, 0, 0.15);
405
- transition: var(--eufy-transition);
406
- }
407
-
408
- .login-step-dot--active {
409
- background: var(--eufy-primary);
410
- width: 24px;
411
- border-radius: 4px;
412
- }
413
-
414
- .login-step-dot--done {
415
- background: var(--eufy-success);
416
- }
417
-
418
393
  /* ===== Detail View ===== */
419
394
  .detail-header {
420
395
  display: flex;
@@ -672,10 +647,6 @@ body.dark-mode .login-card .card-header {
672
647
  border-bottom-color: rgba(255, 255, 255, 0.08);
673
648
  }
674
649
 
675
- body.dark-mode .login-step-dot {
676
- background: rgba(255, 255, 255, 0.2);
677
- }
678
-
679
650
  body.dark-mode .settings-section {
680
651
  border-bottom-color: rgba(255, 255, 255, 0.08);
681
652
  }
@@ -10,6 +10,8 @@ const LoginView = {
10
10
  _captchaData: null,
11
11
  _credentials: null,
12
12
  _container: null,
13
+ /** @type {object|null} Login options to be consumed by _renderDiscovery for inline auth */
14
+ _loginOptions: null,
13
15
 
14
16
  render(container) {
15
17
  this._container = container;
@@ -173,58 +175,37 @@ const LoginView = {
173
175
  btnReconnect.addEventListener('click', async () => {
174
176
  btnReconnect.disabled = true;
175
177
  btnStart.disabled = true;
176
- const spinner = body.querySelector('#reconnect-spinner');
177
- spinner.classList.remove('d-none');
178
178
 
179
179
  try {
180
180
  // Get saved credentials from plugin config
181
181
  const config = await Config.get();
182
182
  if (!config.username || !config.password) {
183
- throw new Error('No saved credentials found.');
183
+ throw new Error('No saved credentials found. Please log in manually.');
184
184
  }
185
185
 
186
- const result = await Api.login({
186
+ // Go straight to discovery — auth will happen there
187
+ this._credentials = null; // reconnect uses existing config
188
+ this._loginOptions = {
187
189
  username: config.username,
188
190
  password: config.password,
189
191
  country: config.country || 'US',
190
192
  deviceName: config.deviceName || '',
191
193
  reconnect: true,
192
- });
193
-
194
- if (result.success) {
195
- this._currentStep = this.STEP.DISCOVERY;
196
- this._renderStep();
197
- } else if (result.failReason === 2) {
198
- this._currentStep = this.STEP.TFA;
199
- this._renderStep();
200
- } else if (result.failReason === 1) {
201
- this._captchaData = result.data;
202
- this._currentStep = this.STEP.CAPTCHA;
203
- this._renderStep();
204
- } else {
205
- spinner.classList.add('d-none');
206
- btnReconnect.disabled = false;
207
- btnStart.disabled = false;
208
- const errMsg = result.error || 'Refresh failed. Please try a full login.';
209
- const errEl = document.createElement('div');
210
- errEl.className = 'alert alert-danger mt-2';
211
- errEl.setAttribute('role', 'alert');
212
- errEl.style.fontSize = '0.85rem';
213
- errEl.textContent = errMsg;
214
- btnReconnect.insertAdjacentElement('afterend', errEl);
215
- setTimeout(() => errEl.remove(), 6000);
216
- }
194
+ };
195
+ this._currentStep = this.STEP.DISCOVERY;
196
+ this._renderStep();
217
197
  } catch (e) {
218
- spinner.classList.add('d-none');
219
198
  btnReconnect.disabled = false;
220
199
  btnStart.disabled = false;
221
- const errEl = document.createElement('div');
222
- errEl.className = 'alert alert-danger mt-2';
223
- errEl.setAttribute('role', 'alert');
224
- errEl.style.fontSize = '0.85rem';
225
- errEl.textContent = 'Connection error: ' + (e.message || e);
226
- btnReconnect.insertAdjacentElement('afterend', errEl);
227
- setTimeout(() => errEl.remove(), 6000);
200
+ const errMsg = e.message || 'Failed to load credentials.';
201
+ btnReconnect.classList.add('eufy-tooltip');
202
+ btnReconnect.setAttribute('data-tooltip', errMsg);
203
+ btnReconnect.classList.add('btn-outline-danger');
204
+ setTimeout(() => {
205
+ btnReconnect.classList.remove('eufy-tooltip');
206
+ btnReconnect.removeAttribute('data-tooltip');
207
+ btnReconnect.classList.remove('btn-outline-danger');
208
+ }, 6000);
228
209
  }
229
210
  });
230
211
  },
@@ -234,8 +215,6 @@ const LoginView = {
234
215
  const card = this._card(wrap, 'Sign In');
235
216
  const body = card.querySelector('.card-body');
236
217
 
237
- this._renderStepDots(body, 1);
238
-
239
218
  body.insertAdjacentHTML('beforeend', `
240
219
  <div class="mb-3">
241
220
  <label for="login-email" class="form-label">Email Address</label>
@@ -308,43 +287,18 @@ const LoginView = {
308
287
  return;
309
288
  }
310
289
 
311
- this._setLoading(body, true);
312
- this._hideError(body);
313
-
314
- try {
315
- // Stash credentials in memory — save only after full auth succeeds
316
- this._credentials = { username: email, password: password, country: country, deviceName: deviceName };
317
-
318
- const result = await Api.login({
319
- username: email,
320
- password: password,
321
- country: country,
322
- deviceName: deviceName,
323
- });
290
+ // Stash credentials in memory — save only after full auth succeeds
291
+ this._credentials = { username: email, password: password, country: country, deviceName: deviceName };
324
292
 
325
- if (result.success) {
326
- this._currentStep = this.STEP.DISCOVERY;
327
- this._renderStep();
328
- } else if (result.failReason === 2) {
329
- // TFA required
330
- this._currentStep = this.STEP.TFA;
331
- this._renderStep();
332
- } else if (result.failReason === 1) {
333
- // Captcha required
334
- this._captchaData = result.data;
335
- this._currentStep = this.STEP.CAPTCHA;
336
- this._renderStep();
337
- } else if (result.failReason === 3) {
338
- this._showError(body, 'Login timed out. Please try again.');
339
- this._setLoading(body, false);
340
- } else {
341
- this._showError(body, 'Login failed. Please check your credentials.');
342
- this._setLoading(body, false);
343
- }
344
- } catch (e) {
345
- this._showError(body, 'Connection error: ' + (e.message || e));
346
- this._setLoading(body, false);
347
- }
293
+ // Go straight to discovery — auth will happen there
294
+ this._loginOptions = {
295
+ username: email,
296
+ password: password,
297
+ country: country,
298
+ deviceName: deviceName,
299
+ };
300
+ this._currentStep = this.STEP.DISCOVERY;
301
+ this._renderStep();
348
302
  },
349
303
 
350
304
  // ===== Step 2: TFA =====
@@ -352,8 +306,6 @@ const LoginView = {
352
306
  const card = this._card(wrap, 'Two-Factor Authentication');
353
307
  const body = card.querySelector('.card-body');
354
308
 
355
- this._renderStepDots(body, 2);
356
-
357
309
  body.insertAdjacentHTML('beforeend', `
358
310
  <p class="text-muted" style="font-size: 0.85rem;">
359
311
  A verification code has been sent to your registered device or email. Enter it below.
@@ -385,22 +337,10 @@ const LoginView = {
385
337
  return;
386
338
  }
387
339
 
388
- this._setLoading(body, true);
389
- this._hideError(body);
390
-
391
- try {
392
- const result = await Api.login({ verifyCode: code });
393
- if (result.success) {
394
- this._currentStep = this.STEP.DISCOVERY;
395
- this._renderStep();
396
- } else {
397
- this._showError(body, 'Invalid code. Please try again.');
398
- this._setLoading(body, false);
399
- }
400
- } catch (e) {
401
- this._showError(body, 'Error: ' + (e.message || e));
402
- this._setLoading(body, false);
403
- }
340
+ // Go straight to discovery — auth outcome arrives via push events
341
+ this._loginOptions = { verifyCode: code };
342
+ this._currentStep = this.STEP.DISCOVERY;
343
+ this._renderStep();
404
344
  },
405
345
 
406
346
  // ===== Step 3: Captcha =====
@@ -408,8 +348,6 @@ const LoginView = {
408
348
  const card = this._card(wrap, 'Captcha Verification');
409
349
  const body = card.querySelector('.card-body');
410
350
 
411
- this._renderStepDots(body, 3);
412
-
413
351
  body.insertAdjacentHTML('beforeend', `
414
352
  <p class="text-muted" style="font-size: 0.85rem;">
415
353
  Please solve the captcha below to continue.
@@ -448,87 +386,181 @@ const LoginView = {
448
386
  return;
449
387
  }
450
388
 
451
- this._setLoading(body, true);
452
- this._hideError(body);
453
-
454
- try {
455
- const result = await Api.login({
456
- captcha: {
457
- captchaCode: code,
458
- captchaId: this._captchaData.id,
459
- },
460
- });
461
- if (result.success) {
462
- this._currentStep = this.STEP.DISCOVERY;
463
- this._renderStep();
464
- } else if (result.failReason === 2) {
465
- // TFA required after captcha — Eufy sent an OTP
466
- this._currentStep = this.STEP.TFA;
467
- this._renderStep();
468
- } else if (result.failReason === 1) {
469
- // New captcha
470
- this._captchaData = result.data;
471
- this._showError(body, 'Incorrect captcha. Please try again.');
472
- if (result.data && result.data.captcha) {
473
- body.querySelector('#captcha-image').src = result.data.captcha;
474
- }
475
- this._setLoading(body, false);
476
- } else if (result.failReason === 3) {
477
- this._showError(body, 'Login timed out. Please try again.');
478
- this._setLoading(body, false);
479
- } else {
480
- this._showError(body, 'Verification failed. Please try again.');
481
- this._setLoading(body, false);
482
- }
483
- } catch (e) {
484
- this._showError(body, 'Error: ' + (e.message || e));
485
- this._setLoading(body, false);
486
- }
389
+ // Go straight to discovery — auth outcome arrives via push events
390
+ this._loginOptions = {
391
+ captcha: {
392
+ captchaCode: code,
393
+ captchaId: this._captchaData.id,
394
+ },
395
+ };
396
+ this._currentStep = this.STEP.DISCOVERY;
397
+ this._renderStep();
487
398
  },
488
399
 
489
400
  // ===== Step 4: Discovery =====
490
401
  _renderDiscovery(wrap) {
402
+ // loginOptions may be set by the reconnect button or _doLogin before navigating here
403
+ const loginOptions = this._loginOptions || null;
404
+ this._loginOptions = null;
405
+
406
+ const isAuthNeeded = !!loginOptions;
407
+
491
408
  wrap.innerHTML = `
492
409
  <div class="discovery-screen">
493
410
  <div class="discovery-screen__icon">${Helpers.iconHtml('satellite_alt.svg', 32)}</div>
494
- <div class="discovery-screen__title">Discovering your devices...</div>
411
+ <div class="discovery-screen__title">${isAuthNeeded ? 'Refreshing your devices...' : 'Discovering your devices...'}</div>
495
412
  <div class="discovery-screen__subtitle">
496
- Connecting to Eufy servers and detecting all your stations and devices. Hang tight!
413
+ ${isAuthNeeded ? 'Authenticating and re-discovering all your stations and devices.' : 'Connecting to Eufy servers and detecting all your stations and devices. Hang tight!'}
497
414
  </div>
498
- <div class="progress mt-4" style="max-width: 300px; margin: 0 auto; height: 6px;">
415
+ <div class="progress mt-4" style="margin: 0 auto; height: 6px;">
499
416
  <div class="progress-bar progress-bar-striped progress-bar-animated" role="progressbar"
500
- style="width: 0%" id="discovery-progress"></div>
417
+ style="width: 5%" id="discovery-progress"></div>
501
418
  </div>
502
- <div class="text-muted mt-2" style="font-size: 0.8rem;" id="discovery-status">Initializing...</div>
419
+ <div class="text-muted mt-2" style="font-size: 0.8rem;" id="discovery-status">${isAuthNeeded ? 'Authenticating...' : 'Connecting to Eufy Cloud...'}</div>
420
+ <div id="discovery-warning" class="d-none mt-3" style="margin: 0 auto;"></div>
421
+ <div id="discovery-error" class="d-none mt-3" style="margin: 0 auto;"></div>
503
422
  </div>
504
423
  `;
505
424
 
506
- // Animate progress bar
507
- let progress = 0;
508
425
  const progressBar = wrap.querySelector('#discovery-progress');
509
426
  const statusEl = wrap.querySelector('#discovery-status');
427
+ const warningEl = wrap.querySelector('#discovery-warning');
428
+ const errorEl = wrap.querySelector('#discovery-error');
429
+ let warningActive = false;
430
+
431
+ // --- Show auth error with a back-to-login button ---
432
+ const showAuthError = (message) => {
433
+ progressBar.classList.remove('progress-bar-animated');
434
+ progressBar.classList.add('bg-danger');
435
+ statusEl.textContent = '';
436
+ errorEl.className = 'mt-3';
437
+ errorEl.style.maxWidth = '400px';
438
+ errorEl.style.margin = '0 auto';
439
+ errorEl.innerHTML = `
440
+ <div class="alert alert-danger mb-2" role="alert" style="font-size: 0.82rem;">
441
+ ${Helpers.escHtml(message)}
442
+ </div>
443
+ <button class="btn btn-sm btn-primary" id="btn-back-login">Back to Login</button>
444
+ `;
445
+ errorEl.querySelector('#btn-back-login').addEventListener('click', () => {
446
+ this._credentials = null;
447
+ this._currentStep = this.STEP.WELCOME;
448
+ this._renderStep();
449
+ });
450
+ };
451
+
452
+ // --- Handler functions (shared by catch-up replay and live events) ---
453
+ const handleProgress = (data) => {
454
+ if (!data) return;
455
+
456
+ if (typeof data.progress === 'number' && data.progress > 0) {
457
+ progressBar.style.width = data.progress + '%';
458
+ }
459
+
460
+ // Only update status text when no warning is being shown
461
+ if (!warningActive && data.message) {
462
+ statusEl.textContent = data.message;
463
+ }
464
+ };
465
+
466
+ const handleWarning = (data) => {
467
+ if (!data) return;
468
+ warningActive = true;
469
+
470
+ // Update status to indicate we're waiting
471
+ statusEl.textContent = 'Waiting for extra device details...';
472
+
473
+ warningEl.className = 'mt-3';
474
+ warningEl.style.maxWidth = '400px';
475
+ warningEl.style.margin = '0 auto';
476
+ warningEl.innerHTML = `
477
+ <div class="alert alert-warning mb-2" role="alert" style="font-size: 0.82rem; text-align: left;">
478
+ <strong>${data.unsupportedCount || ''} unsupported device(s)</strong> detected.<br>
479
+ <span class="text-muted" style="font-size: 0.78rem;">${Helpers.escHtml(data.unsupportedNames || '')}</span>
480
+ <hr class="my-2">
481
+ Collecting raw device data for diagnostics. This may take up to <strong>${data.waitSeconds || 120}s</strong>.
482
+ <br>You can <strong>skip</strong> this step and proceed now, or <strong>wait</strong> for better diagnostic info.
483
+ </div>
484
+ <div class="d-flex gap-2 justify-content-center">
485
+ <button class="btn btn-sm btn-outline-secondary" id="btn-skip-intel">Skip &amp; Continue</button>
486
+ <button class="btn btn-sm btn-primary" id="btn-wait-intel" disabled>
487
+ Waiting... <span id="intel-countdown">${data.waitSeconds || 120}</span>s
488
+ </button>
489
+ </div>
490
+ `;
491
+
492
+ // Countdown timer on the wait button
493
+ let remaining = data.waitSeconds || 120;
494
+ const countdownEl = warningEl.querySelector('#intel-countdown');
495
+ const waitBtn = warningEl.querySelector('#btn-wait-intel');
496
+ const countdownInterval = setInterval(() => {
497
+ remaining--;
498
+ if (countdownEl) countdownEl.textContent = remaining;
499
+ if (remaining <= 0) {
500
+ clearInterval(countdownInterval);
501
+ }
502
+ }, 1000);
503
+
504
+ // Skip button — tell server to abort the wait
505
+ warningEl.querySelector('#btn-skip-intel').addEventListener('click', () => {
506
+ clearInterval(countdownInterval);
507
+ warningActive = false;
508
+ warningEl.innerHTML = '<div class="text-muted" style="font-size: 0.78rem;">Skipped — finalizing devices...</div>';
509
+ statusEl.textContent = 'Finalizing...';
510
+ Api.skipIntelWait().catch(() => { /* ignore */ });
511
+ });
510
512
 
511
- const messages = [
512
- { at: 5, text: 'Authenticating with Eufy Cloud...' },
513
- { at: 15, text: 'Fetching station list...' },
514
- { at: 30, text: 'Detecting devices...' },
515
- { at: 50, text: 'Analyzing compatibility...' },
516
- { at: 70, text: 'Processing device features...' },
517
- { at: 85, text: 'Almost there...' },
518
- ];
513
+ // Wait button stays disabled — it's just a visual countdown
514
+ // When the server finishes (addAccessory event), it will proceed automatically
515
+ };
519
516
 
520
- const interval = setInterval(() => {
521
- progress += 2;
522
- if (progress > 90) progress = 90; // Cap at 90% until event arrives
523
- progressBar.style.width = progress + '%';
517
+ // Register live event listeners
518
+ Api.onDiscoveryProgress(handleProgress);
519
+ Api.onDiscoveryWarning(handleWarning);
524
520
 
525
- const msg = messages.filter((m) => m.at <= progress).pop();
526
- if (msg) statusEl.textContent = msg.text;
527
- }, 1000);
521
+ // Auth outcome event listeners all driven by server push events
522
+ Api.onAuthSuccess(() => {
523
+ // Server already sends discoveryProgress with "Authenticated" message
524
+ catchUpOnState();
525
+ });
526
+ Api.onAuthError((data) => {
527
+ showAuthError(data && data.message ? data.message : 'Authentication failed.');
528
+ });
529
+ Api.onTfaRequest(() => {
530
+ this._currentStep = this.STEP.TFA;
531
+ this._renderStep();
532
+ });
533
+ Api.onCaptchaRequest((data) => {
534
+ this._captchaData = data;
535
+ this._currentStep = this.STEP.CAPTCHA;
536
+ this._renderStep();
537
+ });
538
+
539
+ // Catch up on discovery events that fired during the login request.
540
+ const catchUpOnState = () => {
541
+ Api.getDiscoveryState().then((state) => {
542
+ if (state && state.progress > 0) {
543
+ handleProgress(state);
544
+ }
545
+ }).catch(() => { /* ignore — live events will still work */ });
546
+ };
547
+
548
+ // Fire login request — resolves immediately, outcomes arrive as push events
549
+ if (isAuthNeeded) {
550
+ Api.login(loginOptions).catch((e) => {
551
+ showAuthError('Connection error: ' + (e.message || e));
552
+ });
553
+ } else {
554
+ // Auth already done (came from _doTFA / _doCaptcha) — just catch up
555
+ catchUpOnState();
556
+ }
528
557
 
529
558
  // Listen for the batch-processed accessories
530
- Api.onAccessoriesReady((stations) => {
531
- clearInterval(interval);
559
+ Api.onAccessoriesReady((payload) => {
560
+ warningActive = false;
561
+
562
+ const stations = Array.isArray(payload) ? payload : (payload && payload.stations) || [];
563
+ const extended = payload && payload.extendedDiscovery;
532
564
 
533
565
  // If no stations or no devices were discovered, show an error instead of navigating
534
566
  const totalDevices = (stations || []).reduce((sum, s) => sum + (s.devices ? s.devices.length : 0), 0);
@@ -541,7 +573,13 @@ const LoginView = {
541
573
  }
542
574
 
543
575
  progressBar.style.width = '100%';
544
- statusEl.textContent = 'Done!';
576
+ progressBar.classList.remove('progress-bar-animated');
577
+ statusEl.textContent = extended
578
+ ? `Done — ${totalDevices} device(s) discovered (collected extra details for unsupported).`
579
+ : `Done — ${totalDevices} device(s) discovered!`;
580
+
581
+ // Hide the warning area
582
+ warningEl.className = 'd-none';
545
583
 
546
584
  // Auth fully complete — save credentials to config
547
585
  if (this._credentials) {
@@ -592,19 +630,6 @@ const LoginView = {
592
630
  return card;
593
631
  },
594
632
 
595
- _renderStepDots(body, activeStep) {
596
- const dots = document.createElement('div');
597
- dots.className = 'login-step-indicator';
598
- for (let i = 1; i <= 3; i++) {
599
- const dot = document.createElement('div');
600
- dot.className = 'login-step-dot';
601
- if (i === activeStep) dot.classList.add('login-step-dot--active');
602
- if (i < activeStep) dot.classList.add('login-step-dot--done');
603
- dots.appendChild(dot);
604
- }
605
- body.appendChild(dots);
606
- },
607
-
608
633
  _showError(body, msg) {
609
634
  const el = body.querySelector('#login-error');
610
635
  if (el) {
@@ -85,6 +85,7 @@ const UnsupportedDetailView = {
85
85
  type: accessory.type,
86
86
  typename: accessory.typename || undefined,
87
87
  ...props,
88
+ rawDevice: accessory.rawDevice || undefined,
88
89
  };
89
90
  // Remove potentially large/sensitive fields
90
91
  delete deviceInfo.picture;
@@ -170,6 +171,12 @@ const UnsupportedDetailView = {
170
171
  infoTitle.textContent = 'Device Information';
171
172
  section.appendChild(infoTitle);
172
173
 
174
+ const infoNote = document.createElement('p');
175
+ infoNote.className = 'text-muted';
176
+ infoNote.style.cssText = 'font-size: 0.75rem;';
177
+ infoNote.textContent = 'Diagnostic information below includes raw device properties from the client library.';
178
+ section.appendChild(infoNote);
179
+
173
180
  // JSON dump with copy button overlay
174
181
  const dumpWrap = document.createElement('div');
175
182
  dumpWrap.className = 'unsupported-detail__dump-wrap';
@@ -206,17 +213,20 @@ const UnsupportedDetailView = {
206
213
 
207
214
  /**
208
215
  * Find an accessory (device or station) by uniqueId across all stations.
209
- * For unsupported standalone stations the device may be null, so we fall back to the station.
216
+ * For standalone devices the station and device share the same uniqueId
217
+ * prefer the device because it carries richer data (rawDevice, etc.).
210
218
  * @param {string} id
211
219
  * @returns {object|null}
212
220
  */
213
221
  _findAccessory(id) {
214
222
  const stations = App.state.stations || [];
215
223
  for (const s of stations) {
216
- if (s.uniqueId === id) return s;
224
+ // Check devices first — standalone devices have the same uniqueId as their station
225
+ // but carry richer data (rawDevice, rawProperties, etc.)
217
226
  for (const d of s.devices || []) {
218
227
  if (d.uniqueId === id) return d;
219
228
  }
229
+ if (s.uniqueId === id) return s;
220
230
  }
221
231
  return null;
222
232
  },
@@ -10,12 +10,8 @@ import { createRequire } from 'module';
10
10
  const require = createRequire(import.meta.url);
11
11
  const { version: LIB_VERSION } = require('../package.json');
12
12
 
13
- const LoginFailReason = Object.freeze({
14
- UNKNOWN: 0,
15
- CAPTCHA: 1,
16
- TFA: 2,
17
- TIMEOUT: 3,
18
- });
13
+ /** Max time (ms) to wait for the client to populate raw data on unsupported items. */
14
+ const UNSUPPORTED_INTEL_WAIT_MS = 2 * 60 * 1000; // 2 minutes
19
15
 
20
16
  class UiServer extends HomebridgePluginUiServer {
21
17
 
@@ -34,6 +30,12 @@ class UiServer extends HomebridgePluginUiServer {
34
30
  pendingDevices = [];
35
31
  processingTimeout;
36
32
 
33
+ /** Set to true when the user clicks "Skip" in the UI to abort the unsupported intel wait. */
34
+ _skipIntelWait = false;
35
+
36
+ /** Current discovery phase — exposed via /discoveryState for UI catch-up. */
37
+ _discoveryPhase = 'idle';
38
+
37
39
  /** Seconds to wait after the last station/device event before processing. */
38
40
  static DISCOVERY_DEBOUNCE_SEC = 15;
39
41
 
@@ -45,7 +47,7 @@ class UiServer extends HomebridgePluginUiServer {
45
47
  trustedDeviceName: 'My Phone',
46
48
  persistentDir: '',
47
49
  p2pConnectionSetup: 0,
48
- pollingIntervalMinutes: 99,
50
+ pollingIntervalMinutes: 1,
49
51
  eventDurationSeconds: 10,
50
52
  acceptInvitations: true,
51
53
  };
@@ -116,6 +118,20 @@ class UiServer extends HomebridgePluginUiServer {
116
118
  this.onRequest('/reset', this.resetPlugin.bind(this));
117
119
  this.onRequest('/downloadDiagnostics', this.downloadDiagnostics.bind(this));
118
120
  this.onRequest('/systemInfo', this.getSystemInfo.bind(this));
121
+ this.onRequest('/skipIntelWait', () => {
122
+ this._skipIntelWait = true;
123
+ this.log.info('User requested to skip unsupported intel wait');
124
+ return { ok: true };
125
+ });
126
+ this.onRequest('/discoveryState', () => ({
127
+ phase: this._discoveryPhase,
128
+ progress: this._discoveryPhase === 'queuing' ? 30 : this._discoveryPhase === 'processing' ? 50 : 0,
129
+ stations: this.pendingStations.length,
130
+ devices: this.pendingDevices.length,
131
+ message: this.pendingStations.length > 0 || this.pendingDevices.length > 0
132
+ ? `Discovered ${this.pendingStations.length} station(s), ${this.pendingDevices.length} device(s)...`
133
+ : '',
134
+ }));
119
135
  }
120
136
 
121
137
  async deleteFileIfExists(filePath) {
@@ -179,6 +195,7 @@ class UiServer extends HomebridgePluginUiServer {
179
195
  this.stations = [];
180
196
  this.pendingStations = [];
181
197
  this.pendingDevices = [];
198
+ this._discoveryPhase = 'authenticating';
182
199
  this.log.debug('init eufyClient');
183
200
  this.config.username = options.username;
184
201
  this.config.password = options.password;
@@ -188,51 +205,103 @@ class UiServer extends HomebridgePluginUiServer {
188
205
  this.eufyClient = await EufySecurity.initialize(this.config, this.tsLog);
189
206
  this.eufyClient?.on('station added', this.addStation.bind(this));
190
207
  this.eufyClient?.on('device added', this.addDevice.bind(this));
208
+ this.eufyClient?.on('push connect', () => this.log.debug('Push Connected!'));
209
+ this.eufyClient?.on('push close', () => this.log.debug('Push Closed!'));
210
+ this.eufyClient?.on('connect', () => this.log.debug('Connected!'));
211
+ this.eufyClient?.on('close', () => this.log.debug('Closed!'));
191
212
  } catch (error) {
192
213
  this.log.error(error);
193
214
  }
194
215
  }
195
216
 
196
- return new Promise((resolve, reject) => {
197
- setTimeout(() => {
198
- resolve({ success: false, failReason: LoginFailReason.TIMEOUT });
199
- }, 25 * 1000);
200
-
201
- if (options && options.username && options.password && options.country) {
202
- this.log.debug('login with credentials');
203
- try {
204
- this.loginHandlers(resolve);
205
- this.eufyClient?.connect()
206
- .then(() => this.log.debug('connected?: ' + this.eufyClient?.isConnected()))
207
- .catch((error) => this.log.error(error));
208
- } catch (error) {
209
- this.log.error(error);
210
- resolve({ success: false, failReason: LoginFailReason.UNKNOWN, data: { error } });
211
- }
212
- } else if (options && options.verifyCode) {
213
- try {
214
- this.loginHandlers(resolve);
215
- this.eufyClient?.connect({ verifyCode: options.verifyCode, force: false });
216
- } catch (error) {
217
- resolve({ success: false, failReason: LoginFailReason.UNKNOWN, data: { error } });
218
- }
219
- } else if (options && options.captcha) {
220
- try {
221
- this.loginHandlers(resolve);
222
- this.eufyClient?.connect({ captcha: { captchaCode: options.captcha.captchaCode, captchaId: options.captcha.captchaId }, force: false });
223
- } catch (error) {
224
- resolve({ success: false, failReason: LoginFailReason.UNKNOWN, data: { error } });
225
- }
226
- } else {
227
- reject('unsupported login method');
217
+ // Timeout fire authError event after 25s if nothing else resolved
218
+ this._loginTimeout = setTimeout(() => {
219
+ this.pushEvent('authError', { message: 'Authentication timed out. Please try again.' });
220
+ }, 25 * 1000);
221
+
222
+ if (options && options.username && options.password && options.country) {
223
+ this.log.debug('login with credentials');
224
+ try {
225
+ this._registerAuthHandlers();
226
+ this.eufyClient?.connect()
227
+ .then(() => this.log.debug('connected?: ' + this.eufyClient?.isConnected()))
228
+ .catch((error) => this.log.error(error));
229
+ } catch (error) {
230
+ this.log.error(error);
231
+ clearTimeout(this._loginTimeout);
232
+ this.pushEvent('authError', { message: 'Login error: ' + (error.message || error) });
228
233
  }
229
- });
234
+ } else if (options && options.verifyCode) {
235
+ this.log.debug('login with TFA code');
236
+ this.pushEvent('discoveryProgress', {
237
+ phase: 'authenticating',
238
+ progress: 10,
239
+ message: 'Verifying TFA code...',
240
+ });
241
+ try {
242
+ this._registerAuthHandlers();
243
+ this.eufyClient?.connect({ verifyCode: options.verifyCode, force: false })
244
+ .then(() => this.log.debug('TFA connect resolved, connected?: ' + this.eufyClient?.isConnected()))
245
+ .catch((error) => {
246
+ this.log.error('TFA connect error: ' + error);
247
+ clearTimeout(this._loginTimeout);
248
+ this.pushEvent('authError', { message: 'TFA verification failed: ' + (error.message || error) });
249
+ });
250
+ } catch (error) {
251
+ clearTimeout(this._loginTimeout);
252
+ this.pushEvent('authError', { message: 'TFA verification error: ' + (error.message || error) });
253
+ }
254
+ } else if (options && options.captcha) {
255
+ this.log.debug('login with captcha');
256
+ this.pushEvent('discoveryProgress', {
257
+ phase: 'authenticating',
258
+ progress: 10,
259
+ message: 'Verifying captcha...',
260
+ });
261
+ try {
262
+ this._registerAuthHandlers();
263
+ this.eufyClient?.connect({ captcha: { captchaCode: options.captcha.captchaCode, captchaId: options.captcha.captchaId }, force: false })
264
+ .then(() => this.log.debug('Captcha connect resolved, connected?: ' + this.eufyClient?.isConnected()))
265
+ .catch((error) => {
266
+ this.log.error('Captcha connect error: ' + error);
267
+ clearTimeout(this._loginTimeout);
268
+ this.pushEvent('authError', { message: 'Captcha verification failed: ' + (error.message || error) });
269
+ });
270
+ } catch (error) {
271
+ clearTimeout(this._loginTimeout);
272
+ this.pushEvent('authError', { message: 'Captcha verification error: ' + (error.message || error) });
273
+ }
274
+ } else {
275
+ clearTimeout(this._loginTimeout);
276
+ this.pushEvent('authError', { message: 'Unsupported login method.' });
277
+ }
278
+
279
+ // Resolve immediately — all outcomes are delivered via push events
280
+ return { pending: true };
230
281
  }
231
282
 
232
- loginHandlers(resolveCallback) {
233
- this.eufyClient?.once('tfa request', () => resolveCallback({ success: false, failReason: LoginFailReason.TFA }));
234
- this.eufyClient?.once('captcha request', (id, captcha) => resolveCallback({ success: false, failReason: LoginFailReason.CAPTCHA, data: { id, captcha } }));
235
- this.eufyClient?.once('connect', () => resolveCallback({ success: true }));
283
+ /**
284
+ * Register one-time auth outcome handlers on the eufy client.
285
+ * All outcomes are delivered to the UI via push events.
286
+ */
287
+ _registerAuthHandlers() {
288
+ this.eufyClient?.once('tfa request', () => {
289
+ clearTimeout(this._loginTimeout);
290
+ this.pushEvent('tfaRequest', {});
291
+ });
292
+ this.eufyClient?.once('captcha request', (id, captcha) => {
293
+ clearTimeout(this._loginTimeout);
294
+ this.pushEvent('captchaRequest', { id, captcha });
295
+ });
296
+ this.eufyClient?.once('connect', () => {
297
+ clearTimeout(this._loginTimeout);
298
+ this.pushEvent('authSuccess', {});
299
+ this.pushEvent('discoveryProgress', {
300
+ phase: 'authenticating',
301
+ progress: 15,
302
+ message: 'Authenticated — waiting for devices...',
303
+ });
304
+ });
236
305
  }
237
306
 
238
307
  /**
@@ -322,6 +391,14 @@ class UiServer extends HomebridgePluginUiServer {
322
391
 
323
392
  this.pendingStations.push(station);
324
393
  this.log.debug(`${station.getName()}: Station queued for processing`);
394
+ this._discoveryPhase = 'queuing';
395
+ this.pushEvent('discoveryProgress', {
396
+ phase: 'queuing',
397
+ progress: 30,
398
+ stations: this.pendingStations.length,
399
+ devices: this.pendingDevices.length,
400
+ message: `Discovered ${this.pendingStations.length} station(s), ${this.pendingDevices.length} device(s)...`,
401
+ });
325
402
  this.resetDiscoveryDebounce();
326
403
  }
327
404
 
@@ -339,6 +416,14 @@ class UiServer extends HomebridgePluginUiServer {
339
416
 
340
417
  this.pendingDevices.push(device);
341
418
  this.log.debug(`${device.getName()}: Device queued for processing`);
419
+ this._discoveryPhase = 'queuing';
420
+ this.pushEvent('discoveryProgress', {
421
+ phase: 'queuing',
422
+ progress: 30,
423
+ stations: this.pendingStations.length,
424
+ devices: this.pendingDevices.length,
425
+ message: `Discovered ${this.pendingStations.length} station(s), ${this.pendingDevices.length} device(s)...`,
426
+ });
342
427
  this.resetDiscoveryDebounce();
343
428
  }
344
429
 
@@ -362,16 +447,26 @@ class UiServer extends HomebridgePluginUiServer {
362
447
  this.processingTimeout = setTimeout(() => {
363
448
  this.processPendingAccessories().catch(error => this.log.error('Error processing pending accessories:', error));
364
449
  }, delaySec * 1000);
365
- // Close connection 5 seconds after processing is scheduled
450
+ // Close connection after processing + potential 2-min unsupported intel wait
451
+ const closeAfterSec = delaySec + (UNSUPPORTED_INTEL_WAIT_MS / 1000) + 15;
366
452
  this._closeTimeout = setTimeout(() => {
367
453
  this.eufyClient?.removeAllListeners();
368
454
  this.eufyClient?.close();
369
- }, (delaySec + 5) * 1000);
455
+ }, closeAfterSec * 1000);
370
456
  }
371
457
 
372
458
  async processPendingAccessories() {
373
459
  this.log.debug(`Processing ${this.pendingStations.length} stations and ${this.pendingDevices.length} devices`);
374
460
 
461
+ this._discoveryPhase = 'processing';
462
+ this.pushEvent('discoveryProgress', {
463
+ phase: 'processing',
464
+ progress: 50,
465
+ stations: this.pendingStations.length,
466
+ devices: this.pendingDevices.length,
467
+ message: `Processing ${this.pendingStations.length} station(s) and ${this.pendingDevices.length} device(s)...`,
468
+ });
469
+
375
470
  if (this.pendingStations.length === 0 || this.pendingDevices.length === 0) {
376
471
  this.log.warn(
377
472
  `Discovery finished with ${this.pendingStations.length} station(s) and ${this.pendingDevices.length} device(s). ` +
@@ -379,12 +474,55 @@ class UiServer extends HomebridgePluginUiServer {
379
474
  );
380
475
  }
381
476
 
382
- // Build set of stations that have at least one device
383
- const stationsWithDevices = new Set();
477
+ // --- Collect unsupported items (stations + devices) upfront ---
478
+ const unsupportedItems = [];
479
+
480
+ for (const station of this.pendingStations) {
481
+ try {
482
+ if (!Device.isSupported(station.getDeviceType())) unsupportedItems.push(station);
483
+ } catch (e) { /* ignore */ }
484
+ }
384
485
  for (const device of this.pendingDevices) {
385
- stationsWithDevices.add(device.getStationSerial());
486
+ try {
487
+ if (!Device.isSupported(device.getDeviceType())) unsupportedItems.push(device);
488
+ } catch (e) { /* ignore */ }
386
489
  }
387
490
 
491
+ // If unsupported items exist, notify UI and wait (user can skip via /skipIntelWait)
492
+ if (unsupportedItems.length > 0) {
493
+ const names = unsupportedItems.map(i => `${i.getName()} (type ${i.getDeviceType()})`).join(', ');
494
+ this._skipIntelWait = false;
495
+
496
+ this.pushEvent('discoveryWarning', {
497
+ unsupportedCount: unsupportedItems.length,
498
+ unsupportedNames: names,
499
+ waitSeconds: UNSUPPORTED_INTEL_WAIT_MS / 1000,
500
+ message: `${unsupportedItems.length} unsupported device(s) detected: ${names}`,
501
+ });
502
+
503
+ this.log.info(`Unsupported intel: waiting up to ${UNSUPPORTED_INTEL_WAIT_MS / 1000}s for raw data (user can skip)`);
504
+
505
+ // Cancellable wait — check _skipIntelWait every second
506
+ const pollMs = 1000;
507
+ let waited = 0;
508
+ while (waited < UNSUPPORTED_INTEL_WAIT_MS && !this._skipIntelWait) {
509
+ await this.delay(pollMs);
510
+ waited += pollMs;
511
+ }
512
+
513
+ if (this._skipIntelWait) {
514
+ this.log.info(`Unsupported intel wait skipped by user after ${waited / 1000}s`);
515
+ } else {
516
+ this.log.info(`Unsupported intel wait completed (${waited / 1000}s)`);
517
+ }
518
+ }
519
+
520
+ this.pushEvent('discoveryProgress', {
521
+ phase: 'buildingStations',
522
+ progress: 65,
523
+ message: 'Building station list...',
524
+ });
525
+
388
526
  // Process queued stations
389
527
  for (const station of this.pendingStations) {
390
528
  const stationType = station.getDeviceType();
@@ -398,6 +536,7 @@ class UiServer extends HomebridgePluginUiServer {
398
536
  disabled: false,
399
537
  devices: [],
400
538
  properties: station.getProperties(),
539
+ unsupported: false,
401
540
  };
402
541
 
403
542
  try {
@@ -408,32 +547,56 @@ class UiServer extends HomebridgePluginUiServer {
408
547
 
409
548
  s.ignored = (this.config['ignoreStations'] ?? []).includes(s.uniqueId);
410
549
 
411
- if (stationType !== DeviceType.STATION) {
412
- // Non-HomeBase station — the station IS a device (station.type == device.type)
413
- // Check if the matching device was emitted by the client
414
- const hasMatchingDevice = this.pendingDevices.some(d => d.getSerial() === stationSerial);
550
+ if (!Device.isStation(stationType)) {
551
+ // Not a hub/base station — the station IS a standalone device (station.type == device.type)
552
+
553
+ if (!Device.isSupported(stationType)) {
554
+ // Device type not recognized by eufy-security-client — truly unsupported
555
+ s.unsupported = true;
556
+ s.rawDevice = station.getRawStation ? station.getRawStation() : undefined;
415
557
 
416
- if (hasMatchingDevice) {
417
- s.standalone = true;
418
- s.disabled = true; // No separate station card; settings accessible via device card
558
+ this.log.warn(`Station "${station.getName()}" (type ${stationType}) is not supported by eufy-security-client`);
419
559
 
420
- // Standalone Locks and Doorbells don't have Security Control
421
- if (Device.isLock(s.type) || Device.isDoorbell(s.type)) {
422
- s.noSecurityControl = true;
423
- }
560
+ // Immediately add the unsupported station and skip further processing
561
+ this.stations.push(s);
562
+ continue;
424
563
  } else {
425
- // Station exists but no device counterpart was emitted unsupported
426
- s.unsupported = true;
427
- this.log.warn(`Station "${station.getName()}" (${DeviceType[stationType]}) has no matching device and will be marked as unsupported`);
564
+ // Check if the matching device was emitted by the client
565
+ const hasMatchingDevice = this.pendingDevices.some(d => d.getSerial() === stationSerial);
566
+
567
+ if (hasMatchingDevice) {
568
+ s.standalone = true;
569
+ s.disabled = true; // No separate station card; settings accessible via device card
570
+
571
+ // Standalone Locks and Doorbells don't have Security Control
572
+ if (Device.isLock(s.type) || Device.isDoorbell(s.type)) {
573
+ s.noSecurityControl = true;
574
+ }
575
+ } else {
576
+ // Station exists but no device counterpart was emitted — unsupported
577
+ s.unsupported = true;
578
+ this.log.warn(`Station "${station.getName()}" (${DeviceType[stationType]}) has no matching device and will be marked as unsupported`);
579
+
580
+ // Short-circuit processing for unsupported station
581
+ this.stations.push(s);
582
+ continue;
583
+ }
428
584
  }
429
585
  }
430
586
 
431
587
  this.stations.push(s);
432
588
  }
433
589
 
590
+ this.pushEvent('discoveryProgress', {
591
+ phase: 'buildingDevices',
592
+ progress: 80,
593
+ message: 'Building device list...',
594
+ });
595
+
434
596
  // Process queued devices and attach them to stations
435
597
  for (const device of this.pendingDevices) {
436
598
  const devType = device.getDeviceType();
599
+
437
600
  const d = {
438
601
  uniqueId: device.getSerial(),
439
602
  displayName: device.getName(),
@@ -441,7 +604,7 @@ class UiServer extends HomebridgePluginUiServer {
441
604
  typename: DeviceType[devType],
442
605
  standalone: device.getSerial() === device.getStationSerial(),
443
606
  hasBattery: device.hasBattery(),
444
- isCamera: device.isCamera() || Device.isLockWifiVideo(devType),
607
+ isCamera: device.isCamera() || Device.isLockWifiVideo(devType),
445
608
  isDoorbell: device.isDoorbell(),
446
609
  isKeypad: device.isKeyPad(),
447
610
  isMotionSensor: Device.isMotionSensor(devType),
@@ -455,11 +618,13 @@ class UiServer extends HomebridgePluginUiServer {
455
618
  DeviceChimeIndoor: device.hasProperty(PropertyName.DeviceChimeIndoor),
456
619
  disabled: false,
457
620
  properties: device.getProperties(),
621
+ unsupported: false,
458
622
  };
459
623
 
460
- // Mark device as unsupported if it doesn't match any known accessory type
461
- if (!device.isCamera() && !Device.isLockWifiVideo(devType) && !Device.isMotionSensor(devType) && !Device.isEntrySensor(devType) && !Device.isLock(devType)) {
624
+ // Mark device as unsupported if eufy-security-client doesn't recognize this device type
625
+ if (!Device.isSupported(devType)) {
462
626
  d.unsupported = true;
627
+ d.rawDevice = device.getRawDevice ? device.getRawDevice() : undefined;
463
628
  }
464
629
 
465
630
  if (device.hasProperty(PropertyName.DeviceChargingStatus)) {
@@ -478,6 +643,11 @@ class UiServer extends HomebridgePluginUiServer {
478
643
  const stationIndex = this.stations.findIndex(station => station.uniqueId === stationUniqueId);
479
644
 
480
645
  if (stationIndex !== -1) {
646
+ // If parent station is unsupported, propagate flag to device
647
+ if (this.stations[stationIndex].unsupported) {
648
+ d.unsupported = true;
649
+ }
650
+
481
651
  if (!this.stations[stationIndex].devices) {
482
652
  this.stations[stationIndex].devices = [];
483
653
  }
@@ -497,7 +667,14 @@ class UiServer extends HomebridgePluginUiServer {
497
667
  } catch (error) {
498
668
  this.log.error('Error storing accessories:', error);
499
669
  }
500
- this.pushEvent('addAccessory', this.stations);
670
+
671
+ this.pushEvent('discoveryProgress', {
672
+ phase: 'done',
673
+ progress: 100,
674
+ message: 'Discovery complete!',
675
+ });
676
+
677
+ this.pushEvent('addAccessory', { stations: this.stations, extendedDiscovery: unsupportedItems.length > 0 });
501
678
  }
502
679
 
503
680
  storeAccessories() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge Eufy Security",
3
3
  "name": "homebridge-eufy-security",
4
- "version": "4.4.2-beta.33",
4
+ "version": "4.4.2-beta.35",
5
5
  "description": "Control Eufy Security from homebridge.",
6
6
  "type": "module",
7
7
  "license": "Apache-2.0",