@homebridge-plugins/homebridge-eufy-security 5.0.0-beta.42 → 5.0.0-beta.44

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.
@@ -387,7 +387,8 @@ function renderLiveEncode(state) {
387
387
  }, 3000);
388
388
  const name = (index) => dashboardDevices.find(({ serial }) => serial === cameras[index])?.name ?? `#${index + 1}`;
389
389
  if (previewing) {
390
- const text = liveEncodeText('diagnosticsEncodePreview', { camera: name(live.previews.length) });
390
+ const asked = liveEncodeText('diagnosticsEncodePreview', { camera: name(live.previews.length) });
391
+ const text = liveEncodePreviewEnd ? `${asked} ${liveEncodePreviewEnd}` : asked;
391
392
  if (diagnosticsEncodeStep.textContent !== text) diagnosticsEncodeStep.textContent = text;
392
393
  diagnosticsEncodeAnswer.hidden = false;
393
394
  return;
@@ -420,12 +421,15 @@ function renderLiveEncode(state) {
420
421
 
421
422
  /** The camera whose own video the page shows before its attempts, so the reporter can say whether it plays at all. */
422
423
  let liveEncodePreviewSerial;
424
+ /** Why that camera's video never showed, once its stream ended without a picture. */
425
+ let liveEncodePreviewEnd = '';
423
426
 
424
427
  /** Shows `serial`'s own video in the guided capture, stopping any other camera's first; nothing stops it. */
425
428
  function previewLiveEncode(serial) {
426
429
  if (serial === liveEncodePreviewSerial) return;
427
430
  if (liveEncodePreviewSerial) void requestWithinDeadline('/device/live/stop', {}, 12000).catch(() => undefined);
428
431
  liveEncodePreviewSerial = serial;
432
+ liveEncodePreviewEnd = '';
429
433
  diagnosticsEncodePreview.src = '';
430
434
  diagnosticsEncodePreview.hidden = !serial;
431
435
  if (!serial) return;
@@ -1259,7 +1263,12 @@ wizardLiveSave.addEventListener('click', async () => {
1259
1263
  }
1260
1264
  });
1261
1265
  wizardLiveDiagnoseStart.addEventListener('click', () => openDiagnostics({ profile: 'live-media' }));
1262
- homebridge.addEventListener('device-live-end', (event) => endWizardLive(event.data?.serial, event.data?.unplayable));
1266
+ homebridge.addEventListener('device-live-end', (event) => {
1267
+ endWizardLive(event.data?.serial, event.data?.unplayable);
1268
+ if (event.data?.serial !== liveEncodePreviewSerial || diagnosticsEncodePreview.src) return;
1269
+ liveEncodePreviewEnd = messages.wizardLiveFailed ?? '';
1270
+ renderLiveEncode(diagnosticsState);
1271
+ });
1263
1272
 
1264
1273
  /** One control per eufy setting the device states and can change, named and valued the way the camera describes it. */
1265
1274
  function eufySettingControl(setting) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "displayName": "Homebridge Eufy",
3
3
  "name": "@homebridge-plugins/homebridge-eufy-security",
4
- "version": "5.0.0-beta.42",
4
+ "version": "5.0.0-beta.44",
5
5
  "description": "Control Eufy Security from homebridge.",
6
6
  "type": "module",
7
7
  "license": "Apache-2.0",
@@ -44,7 +44,7 @@
44
44
  ],
45
45
  "dependencies": {
46
46
  "@homebridge/plugin-ui-utils": "^2.2.6",
47
- "@mega-yfue/eufy-sdk": "0.6.0-beta.26",
47
+ "@mega-yfue/eufy-sdk": "0.6.0-beta.32",
48
48
  "ffmpeg-for-homebridge": "2.2.2"
49
49
  },
50
50
  "devDependencies": {