@homebridge-eufy-security/eufy-security-client 3.8.0-dev.7 → 3.8.0-dev.8

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.
@@ -382,6 +382,7 @@ export interface Cipher {
382
382
  cipher_id: number;
383
383
  user_id: string;
384
384
  private_key: string;
385
+ ecc_private_key?: string;
385
386
  }
386
387
  export interface Voice {
387
388
  voice_id: number;
@@ -3,7 +3,7 @@ import { HTTPApi } from "./api";
3
3
  import { AlarmTone, NotificationSwitchMode, DeviceType, FloodlightMotionTriggeredDistance, GuardMode, NotificationType, PowerSource, PropertyName, TimeFormat, CommandName, VideoTypeStoreToNAS, HB3DetectionTypes, WalllightNotificationType, DailyLightingType, MotionActivationMode, LightingActiveMode, SourceType, T8170DetectionTypes, IndoorS350NotificationTypes, SoloCameraDetectionTypes, MotionDetectionRangeType, ViewModeType, FloodlightT8425NotificationTypes, PresetPositionType, IndoorS350DetectionTypes, EufyCamC35DetectionTypes } from "./types";
4
4
  import { SnoozeDetail, StationListResponse } from "./models";
5
5
  import { IndexedProperty, PropertyMetadataAny, PropertyValue, PropertyValues, RawValues, StationEvents, Schedule } from "./interfaces";
6
- import { CrossTrackingGroupEntry, DynamicLighting, MotionZone, RGBColor } from "../p2p/interfaces";
6
+ import { CrossTrackingGroupEntry, DynamicLighting, MotionZone, RGBColor, StreamTimeoutOptions } from "../p2p/interfaces";
7
7
  import { CalibrateGarageType, FilterDetectType, FilterEventType, FilterStorageType, P2PConnectionType, PanTiltDirection, VideoCodec, WatermarkSetting1, WatermarkSetting2, WatermarkSetting3, WatermarkSetting4, WatermarkSetting5 } from "../p2p/types";
8
8
  import { Device } from "./device";
9
9
  import { PushMessage } from "../push/models";
@@ -51,11 +51,17 @@ export declare class Station extends TypedEmitter<StationEvents> {
51
51
  static isStationHomeBase2OrOlder(type: number): boolean;
52
52
  static isStationHomeBase3(type: number): boolean;
53
53
  static isStationHomeBaseMini(type: number): boolean;
54
+ static isStationNVR(type: number): boolean;
54
55
  static isStationHomeBase3BySn(sn: string): boolean;
55
56
  static isStationHomeBaseMiniBySn(sn: string): boolean;
57
+ static isStationMiniBaseChime(type: number): boolean;
58
+ static isStationMiniBaseChimeBySn(sn: string): boolean;
59
+ static isStationNVRBySn(sn: string): boolean;
56
60
  isStationHomeBase2OrOlder(): boolean;
57
61
  isStationHomeBase3(): boolean;
58
62
  isStationHomeBaseMini(): boolean;
63
+ isStationMiniBaseChime(): boolean;
64
+ isStationNVR(): boolean;
59
65
  /**
60
66
  * Checks if the station is a HomeBase 3 or HomeBase mini for determining if SoloDevices are connected to a supported HomeBase.
61
67
  * @returns Returns true, if this is a HomeBase 3 or a HomeBase mini, otherwise false.
@@ -182,6 +188,7 @@ export declare class Station extends TypedEmitter<StationEvents> {
182
188
  startLivestream(device: Device, videoCodec?: VideoCodec): void;
183
189
  stopLivestream(device: Device): void;
184
190
  isLiveStreaming(device: Device): boolean;
191
+ setStreamTimeouts(options: StreamTimeoutOptions): void;
185
192
  isDownloading(device: Device): boolean;
186
193
  quickResponse(device: Device, voice_id: number): void;
187
194
  setChirpVolume(device: Device, value: number): void;
@@ -100,7 +100,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
100
100
  !device_1.Device.isLockWifiT8510P(stationData.device_type, stationData.station_sn) &&
101
101
  !device_1.Device.isLockWifiT8520P(stationData.device_type, stationData.station_sn) &&
102
102
  !device_1.Device.isLockWifiT85L0(stationData.device_type) &&
103
- !device_1.Device.isLockWifiT85V0(stationData.device_type, stationData.station_sn)) {
103
+ !device_1.Device.isLockWifiT85V0(stationData.device_type)) {
104
104
  publicKey = await api.getPublicKey(stationData.station_sn, types_1.PublicKeyType.LOCK);
105
105
  }
106
106
  return new Station(api, stationData, ipAddress, listeningPort, publicKey, enableEmbeddedPKCS1Support);
@@ -407,8 +407,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
407
407
  if (property.name === types_1.PropertyName.Model && device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial())) {
408
408
  return "T8510P";
409
409
  }
410
- else if (property.name === types_1.PropertyName.Model &&
411
- device_1.Device.isLockWifiT85V0(this.getDeviceType(), this.getSerial())) {
410
+ else if (property.name === types_1.PropertyName.Model && device_1.Device.isLockWifiT85V0(this.getDeviceType())) {
412
411
  return "T85V0";
413
412
  }
414
413
  else if (property.type === "number") {
@@ -562,7 +561,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
562
561
  return (type === types_1.DeviceType.STATION ||
563
562
  type === types_1.DeviceType.HB3 ||
564
563
  type === types_1.DeviceType.MINIBASE_CHIME ||
565
- type === types_1.DeviceType.HOMEBASE_MINI);
564
+ type === types_1.DeviceType.HOMEBASE_MINI ||
565
+ type === types_1.DeviceType.NVR_S4_MAX);
566
566
  }
567
567
  isStation() {
568
568
  return Station.isStation(this.rawStation.device_type);
@@ -576,12 +576,24 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
576
576
  static isStationHomeBaseMini(type) {
577
577
  return type === types_1.DeviceType.HOMEBASE_MINI;
578
578
  }
579
+ static isStationNVR(type) {
580
+ return type === types_1.DeviceType.NVR_S4_MAX;
581
+ }
579
582
  static isStationHomeBase3BySn(sn) {
580
583
  return sn.startsWith("T8030");
581
584
  }
582
585
  static isStationHomeBaseMiniBySn(sn) {
583
586
  return sn.startsWith("T8025");
584
587
  }
588
+ static isStationMiniBaseChime(type) {
589
+ return type === types_1.DeviceType.MINIBASE_CHIME;
590
+ }
591
+ static isStationMiniBaseChimeBySn(sn) {
592
+ return sn.startsWith("T8023");
593
+ }
594
+ static isStationNVRBySn(sn) {
595
+ return sn.startsWith("T8N00");
596
+ }
585
597
  isStationHomeBase2OrOlder() {
586
598
  return Station.isStationHomeBase2OrOlder(this.rawStation.device_type);
587
599
  }
@@ -591,6 +603,12 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
591
603
  isStationHomeBaseMini() {
592
604
  return Station.isStationHomeBaseMini(this.rawStation.device_type);
593
605
  }
606
+ isStationMiniBaseChime() {
607
+ return Station.isStationMiniBaseChime(this.rawStation.device_type);
608
+ }
609
+ isStationNVR() {
610
+ return Station.isStationNVR(this.rawStation.device_type);
611
+ }
594
612
  /**
595
613
  * Checks if the station is a HomeBase 3 or HomeBase mini for determining if SoloDevices are connected to a supported HomeBase.
596
614
  * @returns Returns true, if this is a HomeBase 3 or a HomeBase mini, otherwise false.
@@ -6593,7 +6611,10 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
6593
6611
  command: commandData,
6594
6612
  });
6595
6613
  }
6596
- else if (device.isOutdoorPanAndTiltCamera() || device.isBatteryDoorbellDualE340() || device.isFloodLightT8425()) {
6614
+ else if (device.isOutdoorPanAndTiltCamera() ||
6615
+ device.isFloodLightT8425() ||
6616
+ (device.isBatteryDoorbellDualE340() && !this.isStationMiniBaseChime()) ||
6617
+ ((device.isIndoorPTCameraE30() || device.isIndoorCameraBase()) && this.isDeviceControlledByHomeBase())) {
6597
6618
  logging_1.rootHTTPLogger.debug(`Station start livestream - sending command using CMD_DOORBELL_SET_PAYLOAD (1)`, {
6598
6619
  stationSN: this.getSerial(),
6599
6620
  deviceSN: device.getSerial(),
@@ -6618,9 +6639,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
6618
6639
  });
6619
6640
  }
6620
6641
  else if (device.isSoloCameras() ||
6621
- device.getDeviceType() === types_1.DeviceType.FLOODLIGHT_CAMERA_8423 ||
6622
- device.getDeviceType() === types_1.DeviceType.FLOODLIGHT_CAMERA_8424 ||
6623
- device.getDeviceType() === types_1.DeviceType.FLOODLIGHT_CAMERA_8424 ||
6642
+ device.isFloodLightT8423() ||
6643
+ device.isFloodLightT8424() ||
6624
6644
  device.isWiredDoorbellT8200X() ||
6625
6645
  device.isWallLightCam() ||
6626
6646
  device.isGarageCamera()) {
@@ -6848,6 +6868,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
6848
6868
  return false;
6849
6869
  return this.p2pSession.isLiveStreaming(device.getChannel());
6850
6870
  }
6871
+ setStreamTimeouts(options) {
6872
+ this.p2pSession.setStreamTimeouts(options);
6873
+ }
6851
6874
  isDownloading(device) {
6852
6875
  if (device.getStationSerial() !== this.getSerial())
6853
6876
  return false;
@@ -15475,7 +15498,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
15475
15498
  device_1.Device.isLockWifiT8502(this.getDeviceType()) ||
15476
15499
  device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial()) ||
15477
15500
  device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial()) ||
15478
- device_1.Device.isLockWifiT85V0(this.getDeviceType(), this.getSerial()) ||
15501
+ device_1.Device.isLockWifiT85V0(this.getDeviceType()) ||
15479
15502
  device_1.Device.isLockWifiT85L0(this.getDeviceType())) {
15480
15503
  logging_1.rootHTTPLogger.debug(`Station smart lock send get lock parameters command`, { stationSN: this.getSerial() });
15481
15504
  const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.GET_LOCK_PARAM, 0, this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockGetParams(this.rawStation.member.admin_user_id));
@@ -15493,7 +15516,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
15493
15516
  device_1.Device.isLockWifiT8502(this.getDeviceType()) ||
15494
15517
  device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial()) ||
15495
15518
  device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial()) ||
15496
- device_1.Device.isLockWifiT85V0(this.getDeviceType(), this.getSerial()) ||
15519
+ device_1.Device.isLockWifiT85V0(this.getDeviceType()) ||
15497
15520
  device_1.Device.isLockWifiT85L0(this.getDeviceType())) {
15498
15521
  logging_1.rootHTTPLogger.debug(`Station smart lock send get lock status command`, { stationSN: this.getSerial() });
15499
15522
  const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.QUERY_STATUS_IN_LOCK, 0, this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockStatus(this.rawStation.member.admin_user_id));