@mega-yfue/eufy-sdk 0.6.0-beta.32 → 0.6.0-beta.33

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/index.js CHANGED
@@ -5361,7 +5361,7 @@ var AUDIO_MEMBERS = {
5361
5361
  kind: "percent",
5362
5362
  writeOnly: true,
5363
5363
  provenance: "verified",
5364
- available: (ctx) => hasCapability(ctx, "doorbell"),
5364
+ available: (ctx) => hasCapability(ctx, "doorbell") && !isCallDoorbell(ctx),
5365
5365
  min: 0,
5366
5366
  max: 100,
5367
5367
  description: "Doorbell ring/chime volume 0..100 (1708 DOORBELL_RINGTONE_VOLUME). Wire verified live on T8214.",
@@ -5419,8 +5419,11 @@ var DOORBELL_TYPES = [
5419
5419
  DeviceType.BATTERY_DOORBELL_2,
5420
5420
  DeviceType.BATTERY_DOORBELL_PLUS,
5421
5421
  DeviceType.DOORBELL_SOLO,
5422
- DeviceType.BATTERY_DOORBELL_PLUS_E340
5422
+ DeviceType.BATTERY_DOORBELL_PLUS_E340,
5423
+ DeviceType.BATTERY_DOORBELL_C30,
5424
+ DeviceType.BATTERY_DOORBELL_C31
5423
5425
  ];
5426
+ var writable = (ctx) => !isCallDoorbell(ctx);
5424
5427
  var DOORBELL_CMD = {
5425
5428
  /**
5426
5429
  * Doorbell "quick response" — make the doorbell PLAY a stored voice reply. Same 136-byte
@@ -5557,6 +5560,7 @@ var DOORBELL_MEMBERS = {
5557
5560
  */
5558
5561
  chimeSwitch: {
5559
5562
  param: DOORBELL_CMD.CHIME_SWITCH,
5563
+ available: writable,
5560
5564
  type: "bool",
5561
5565
  kind: "boolean",
5562
5566
  provenance: "verified",
@@ -5569,6 +5573,7 @@ var DOORBELL_MEMBERS = {
5569
5573
  */
5570
5574
  mechanicalChimeSwitch: {
5571
5575
  param: DOORBELL_CMD.MECHANICAL_CHIME_SWITCH,
5576
+ available: writable,
5572
5577
  type: "bool",
5573
5578
  kind: "boolean",
5574
5579
  provenance: "verified",
@@ -5578,6 +5583,7 @@ var DOORBELL_MEMBERS = {
5578
5583
  /** Same reasoning and the same capture session as {@link DOORBELL_MEMBERS.mechanicalChimeSwitch}. */
5579
5584
  wdrSwitch: {
5580
5585
  param: DOORBELL_CMD.WDR_SWITCH,
5586
+ available: writable,
5581
5587
  type: "bool",
5582
5588
  kind: "boolean",
5583
5589
  provenance: "verified",
@@ -5608,6 +5614,7 @@ var DOORBELL_MEMBERS = {
5608
5614
  */
5609
5615
  dingdongVolume: {
5610
5616
  param: DOORBELL_CMD.DINGDONG_VOLUME,
5617
+ available: writable,
5611
5618
  type: "number",
5612
5619
  unit: "%",
5613
5620
  kind: "percent",
@@ -5625,6 +5632,7 @@ var DOORBELL_MEMBERS = {
5625
5632
  */
5626
5633
  dingdongRingtone: {
5627
5634
  param: DOORBELL_CMD.DINGDONG_RINGTONE,
5635
+ available: writable,
5628
5636
  type: "number",
5629
5637
  kind: "enum",
5630
5638
  enumValues: enumLabels(DoorbellRingtone),
@@ -5690,7 +5698,7 @@ var DOORBELL_MEMBERS = {
5690
5698
  throw new Error(`videoQuality: ${String(quality)} is not one of ${enumLabels(DoorbellVideoQuality)}`);
5691
5699
  }
5692
5700
  await sink.dispatch(setScalar(DOORBELL_CMD.VIDEO_QUALITY, q + (asBool(highCompression) ? 5 : 0), ctx, "direct-binary"));
5693
- }, "Set the live-view quality and the video encoding format, which share one wire."),
5701
+ }, "Set the live-view quality and the video encoding format, which share one wire.", writable),
5694
5702
  /**
5695
5703
  * A config blob the device reports WHOLE, so it is typed `string` and handed back unparsed — three
5696
5704
  * settings live inside it (motion notifications, ring notifications, notification style) and the SDK
@@ -5738,7 +5746,7 @@ var DOORBELL_MEMBERS = {
5738
5746
  } catch {
5739
5747
  }
5740
5748
  }
5741
- }, "Play a quick response at the visitor."),
5749
+ }, "Play a quick response at the visitor.", writable),
5742
5750
  /**
5743
5751
  * Fetch the doorbell's quick-response list — a P2P request/reply query that returns data, so it
5744
5752
  * exists only on a device bound to a media provider that offers one.
@@ -6048,8 +6056,9 @@ function powerCommand(on, ctx) {
6048
6056
  function privacyCommand(enabled, channel) {
6049
6057
  return { kind: "p2p-privacy-burst", enabled, channel };
6050
6058
  }
6059
+ var doorbellLed = (ctx) => hasCapability(ctx, "doorbell") && !isCallDoorbell(ctx);
6051
6060
  function statusLedCommand(on, ctx) {
6052
- if (hasCapability(ctx, "doorbell"))
6061
+ if (doorbellLed(ctx))
6053
6062
  return setPayload(CAMERA_CMD.DOORBELL_LED, { light_enable: on ? 1 : 0 }, ctx);
6054
6063
  return setScalar(CAMERA_CMD.DEV_LED_SWITCH, on ? 1 : 0, ctx, "int-string");
6055
6064
  }
@@ -6360,8 +6369,8 @@ var CAMERA_MEMBERS = {
6360
6369
  kind: "boolean",
6361
6370
  provenance: "verified",
6362
6371
  available: isCameraCodec,
6363
- readAvailable: (ctx) => !hasCapability(ctx, "doorbell"),
6364
- readAliases: [{ paramType: CAMERA_CMD.DOORBELL_LED, available: (ctx) => hasCapability(ctx, "doorbell") }],
6372
+ readAvailable: (ctx) => !doorbellLed(ctx),
6373
+ readAliases: [{ paramType: CAMERA_CMD.DOORBELL_LED, available: doorbellLed }],
6365
6374
  requiresRead: true,
6366
6375
  description: "Camera status LED. Video doorbells report the same state under their button-ring LED parameter.",
6367
6376
  write: (v, ctx) => statusLedCommand(asBool(v), ctx)