eufy-security-client 3.7.2 → 3.8.0-dev.7

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.
Files changed (44) hide show
  1. package/README.md +27 -0
  2. package/build/eufysecurity.d.ts +1 -0
  3. package/build/eufysecurity.js +25 -3
  4. package/build/eufysecurity.js.map +1 -1
  5. package/build/http/api.d.ts +2 -0
  6. package/build/http/api.js +37 -1
  7. package/build/http/api.js.map +1 -1
  8. package/build/http/device.d.ts +14 -0
  9. package/build/http/device.js +101 -7
  10. package/build/http/device.js.map +1 -1
  11. package/build/http/parameter.js +1 -1
  12. package/build/http/parameter.js.map +1 -1
  13. package/build/http/station.js +94 -26
  14. package/build/http/station.js.map +1 -1
  15. package/build/http/types.d.ts +11 -0
  16. package/build/http/types.js +553 -2
  17. package/build/http/types.js.map +1 -1
  18. package/build/http/utils.d.ts +2 -2
  19. package/build/http/utils.js +5 -5
  20. package/build/http/utils.js.map +1 -1
  21. package/build/p2p/session.js +14 -2
  22. package/build/p2p/session.js.map +1 -1
  23. package/build/p2p/utils.js +1 -0
  24. package/build/p2p/utils.js.map +1 -1
  25. package/build/push/service.js +9 -1
  26. package/build/push/service.js.map +1 -1
  27. package/build/push/types.d.ts +3 -1
  28. package/build/push/types.js +2 -0
  29. package/build/push/types.js.map +1 -1
  30. package/coverage/clover.xml +13237 -10603
  31. package/coverage/coverage-final.json +31 -21
  32. package/coverage/lcov-report/index.html +65 -50
  33. package/coverage/lcov.info +25622 -20507
  34. package/package.json +7 -3
  35. package/scripts/cut_release.sh +2 -0
  36. package/scripts/generate_changelog.sh +93 -0
  37. package/.idea/eufy-security-client.iml +0 -12
  38. package/.idea/modules.xml +0 -8
  39. package/.idea/vcs.xml +0 -7
  40. package/a.ts +0 -61
  41. package/bin/act +0 -0
  42. package/coverage/lcov-report/error.ts.html +0 -871
  43. package/coverage/lcov-report/logging.ts.html +0 -598
  44. package/dont-care.js +0 -101
@@ -1130,7 +1130,7 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1130
1130
  this.isIndoorPanAndTiltCameraS350()) {
1131
1131
  const booleanProperty = property;
1132
1132
  try {
1133
- return (0, utils_1.isIndoorNotitficationEnabled)(Number.parseInt(value), property.name === types_1.PropertyName.DeviceNotificationAllOtherMotion
1133
+ return (0, utils_1.isIndoorNotificationEnabled)(Number.parseInt(value), property.name === types_1.PropertyName.DeviceNotificationAllOtherMotion
1134
1134
  ? types_1.IndoorS350NotificationTypes.ALL_OTHER_MOTION
1135
1135
  : property.name === types_1.PropertyName.DeviceNotificationPerson
1136
1136
  ? types_1.IndoorS350NotificationTypes.HUMAN
@@ -1158,7 +1158,7 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1158
1158
  (this.isFloodLightT8425() || this.isCameraC35())) {
1159
1159
  const booleanProperty = property;
1160
1160
  try {
1161
- return (0, utils_1.isFloodlightT8425NotitficationEnabled)(Number.parseInt(value), property.name === types_1.PropertyName.DeviceNotificationAllOtherMotion
1161
+ return (0, utils_1.isFloodlightT8425NotificationEnabled)(Number.parseInt(value), property.name === types_1.PropertyName.DeviceNotificationAllOtherMotion
1162
1162
  ? types_1.FloodlightT8425NotificationTypes.ALL_OTHER_MOTION
1163
1163
  : property.name === types_1.PropertyName.DeviceNotificationPerson
1164
1164
  ? types_1.FloodlightT8425NotificationTypes.HUMAN
@@ -1429,6 +1429,9 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1429
1429
  else if (property.name === types_1.PropertyName.Model && this.isLockWifiT8510P()) {
1430
1430
  return "T8510P";
1431
1431
  }
1432
+ else if (property.name === types_1.PropertyName.Model && this.isLockWifiT85V0()) {
1433
+ return "T85V0";
1434
+ }
1432
1435
  else if (property.type === "number") {
1433
1436
  const numericProperty = property;
1434
1437
  try {
@@ -1551,6 +1554,12 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1551
1554
  metadata[types_1.PropertyName.Type].states[this.getDeviceType()] =
1552
1555
  "Smart Lock S231 (T8520P)";
1553
1556
  }
1557
+ else if (this.isLockWifiT85V0()) {
1558
+ metadata = {
1559
+ ...types_1.LockT85V0DeviceProperties,
1560
+ };
1561
+ metadata[types_1.PropertyName.Type].states[this.getDeviceType()] = "FamiLock S3 (T85V0)";
1562
+ }
1554
1563
  else if (this.isSoloCameras() && station_1.Station.isDeviceControlledByHomeBaseBySn(this.getStationSerial())) {
1555
1564
  const newMetadata = {
1556
1565
  ...metadata,
@@ -1713,7 +1722,9 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1713
1722
  type == types_1.DeviceType.SOLO_CAMERA_SOLAR ||
1714
1723
  type == types_1.DeviceType.SOLO_CAMERA_C210 ||
1715
1724
  type == types_1.DeviceType.SOLO_CAMERA_E30 ||
1725
+ type == types_1.DeviceType.CAMERA_S4 ||
1716
1726
  type == types_1.DeviceType.CAMERA_C35 ||
1727
+ type == types_1.DeviceType.LOCK_85V0 ||
1717
1728
  type == types_1.DeviceType.INDOOR_OUTDOOR_CAMERA_1080P ||
1718
1729
  type == types_1.DeviceType.INDOOR_OUTDOOR_CAMERA_1080P_NO_LIGHT ||
1719
1730
  type == types_1.DeviceType.INDOOR_OUTDOOR_CAMERA_2K ||
@@ -1729,11 +1740,13 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1729
1740
  type == types_1.DeviceType.CAMERA_GARAGE_T8453 ||
1730
1741
  type == types_1.DeviceType.CAMERA_GARAGE_T8452 ||
1731
1742
  type == types_1.DeviceType.CAMERA_FG ||
1743
+ type == types_1.DeviceType.CAMERA_4G_S330 ||
1732
1744
  type == types_1.DeviceType.INDOOR_PT_CAMERA_S350 ||
1733
1745
  type == types_1.DeviceType.INDOOR_PT_CAMERA_E30 ||
1734
1746
  type == types_1.DeviceType.INDOOR_PT_CAMERA_C210 ||
1735
1747
  type == types_1.DeviceType.INDOOR_PT_CAMERA_C220 ||
1736
1748
  type == types_1.DeviceType.INDOOR_PT_CAMERA_C220_V2 ||
1749
+ type == types_1.DeviceType.SOLOCAM_E42 ||
1737
1750
  type == types_1.DeviceType.SMART_DROP);
1738
1751
  }
1739
1752
  static hasBattery(type) {
@@ -1761,6 +1774,7 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1761
1774
  type == types_1.DeviceType.SOLO_CAMERA_SOLAR ||
1762
1775
  type == types_1.DeviceType.SOLO_CAMERA_C210 ||
1763
1776
  type == types_1.DeviceType.SOLO_CAMERA_E30 ||
1777
+ type == types_1.DeviceType.CAMERA_S4 ||
1764
1778
  type == types_1.DeviceType.CAMERA_C35 ||
1765
1779
  type == types_1.DeviceType.LOCK_WIFI ||
1766
1780
  type == types_1.DeviceType.LOCK_WIFI_NO_FINGER ||
@@ -1770,15 +1784,21 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1770
1784
  type == types_1.DeviceType.LOCK_8592 ||
1771
1785
  type == types_1.DeviceType.LOCK_85A3 ||
1772
1786
  type == types_1.DeviceType.LOCK_8506 ||
1787
+ type == types_1.DeviceType.LOCK_85D0 ||
1788
+ type == types_1.DeviceType.LOCK_8531 ||
1789
+ type == types_1.DeviceType.LOCK_85V0 ||
1773
1790
  type == types_1.DeviceType.LOCK_8502 ||
1791
+ type == types_1.DeviceType.LOCK_85L0 ||
1774
1792
  type == types_1.DeviceType.SMART_SAFE_7400 ||
1775
1793
  type == types_1.DeviceType.SMART_SAFE_7401 ||
1776
1794
  type == types_1.DeviceType.SMART_SAFE_7402 ||
1777
1795
  type == types_1.DeviceType.SMART_SAFE_7403 ||
1778
1796
  type == types_1.DeviceType.CAMERA_FG ||
1797
+ type == types_1.DeviceType.CAMERA_4G_S330 ||
1779
1798
  type == types_1.DeviceType.WALL_LIGHT_CAM_81A0 ||
1780
1799
  type == types_1.DeviceType.SMART_DROP ||
1781
1800
  type == types_1.DeviceType.OUTDOOR_PT_CAMERA ||
1801
+ type == types_1.DeviceType.SOLOCAM_E42 ||
1782
1802
  type == types_1.DeviceType.ENTRY_SENSOR_E20);
1783
1803
  }
1784
1804
  static isStation(type) {
@@ -1812,6 +1832,7 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1812
1832
  type == types_1.DeviceType.BATTERY_DOORBELL_PLUS_E340 ||
1813
1833
  type == types_1.DeviceType.BATTERY_DOORBELL_C30 ||
1814
1834
  type == types_1.DeviceType.BATTERY_DOORBELL_C31 ||
1835
+ type == types_1.DeviceType.LOCK_85V0 ||
1815
1836
  type == types_1.DeviceType.DOORBELL_SOLO)
1816
1837
  return true;
1817
1838
  return false;
@@ -1859,6 +1880,9 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1859
1880
  type == types_1.DeviceType.FLOODLIGHT_CAMERA_8426 ||
1860
1881
  type == types_1.DeviceType.INDOOR_COST_DOWN_CAMERA ||
1861
1882
  type == types_1.DeviceType.OUTDOOR_PT_CAMERA ||
1883
+ type == types_1.DeviceType.CAMERA_S4 ||
1884
+ type == types_1.DeviceType.SOLOCAM_E42 ||
1885
+ type == types_1.DeviceType.CAMERA_4G_S330 ||
1862
1886
  type == types_1.DeviceType.INDOOR_PT_CAMERA_S350 ||
1863
1887
  type == types_1.DeviceType.INDOOR_PT_CAMERA_E30 ||
1864
1888
  type == types_1.DeviceType.INDOOR_PT_CAMERA_C210 ||
@@ -1868,7 +1892,11 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1868
1892
  return false;
1869
1893
  }
1870
1894
  static isOutdoorPanAndTiltCamera(type) {
1871
- if (type == types_1.DeviceType.OUTDOOR_PT_CAMERA || type == types_1.DeviceType.SOLO_CAMERA_E30)
1895
+ if (type == types_1.DeviceType.OUTDOOR_PT_CAMERA ||
1896
+ type == types_1.DeviceType.SOLO_CAMERA_E30 ||
1897
+ type == types_1.DeviceType.CAMERA_S4 ||
1898
+ type == types_1.DeviceType.SOLOCAM_E42 ||
1899
+ type == types_1.DeviceType.CAMERA_4G_S330)
1872
1900
  return true;
1873
1901
  return false;
1874
1902
  }
@@ -1926,7 +1954,11 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1926
1954
  Device.isLockWifiR20(type) ||
1927
1955
  Device.isLockWifiVideo(type) ||
1928
1956
  Device.isLockWifiT8506(type) ||
1929
- Device.isLockWifiT8502(type));
1957
+ Device.isLockWifiT85V0(type, "") ||
1958
+ Device.isLockWifiT8502(type) ||
1959
+ Device.isLockWifiT85L0(type) ||
1960
+ Device.isLockWifiT8531(type) ||
1961
+ Device.isLockWifiT85D0(type));
1930
1962
  }
1931
1963
  static isLockKeypad(type) {
1932
1964
  return Device.isLockWifiR10Keypad(type) || Device.isLockWifiR20Keypad(type);
@@ -1940,11 +1972,18 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1940
1972
  static isLockWifi(type, serialnumber) {
1941
1973
  return (types_1.DeviceType.LOCK_WIFI == type &&
1942
1974
  !Device.isLockWifiT8510P(type, serialnumber) &&
1943
- !Device.isLockWifiT8520P(type, serialnumber));
1975
+ !Device.isLockWifiT8520P(type, serialnumber) &&
1976
+ !Device.isLockWifiT8531(type));
1944
1977
  }
1945
1978
  static isLockWifiNoFinger(type) {
1946
1979
  return types_1.DeviceType.LOCK_WIFI_NO_FINGER == type;
1947
1980
  }
1981
+ static isLockWifiT8531(type) {
1982
+ return types_1.DeviceType.LOCK_8531 == type;
1983
+ }
1984
+ static isLockWifiT85D0(type) {
1985
+ return types_1.DeviceType.LOCK_85D0 == type;
1986
+ }
1948
1987
  static isLockWifiR10(type) {
1949
1988
  return types_1.DeviceType.LOCK_8503 == type;
1950
1989
  }
@@ -1982,6 +2021,17 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1982
2021
  return true;
1983
2022
  return false;
1984
2023
  }
2024
+ static isLockWifiT85V0(type, serialnumber) {
2025
+ if (type == types_1.DeviceType.LOCK_85V0 &&
2026
+ serialnumber.startsWith("T85V0") &&
2027
+ serialnumber.length > 6 &&
2028
+ serialnumber.charAt(6) === "9")
2029
+ return true;
2030
+ return false;
2031
+ }
2032
+ static isLockWifiT85L0(type) {
2033
+ return types_1.DeviceType.LOCK_85L0 == type;
2034
+ }
1985
2035
  static isBatteryDoorbell1(type) {
1986
2036
  return types_1.DeviceType.BATTERY_DOORBELL == type;
1987
2037
  }
@@ -1989,7 +2039,7 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
1989
2039
  return types_1.DeviceType.BATTERY_DOORBELL_2 == type;
1990
2040
  }
1991
2041
  static isBatteryDoorbellDual(type) {
1992
- return types_1.DeviceType.BATTERY_DOORBELL_PLUS == type;
2042
+ return types_1.DeviceType.BATTERY_DOORBELL_PLUS == type || types_1.DeviceType.LOCK_85V0 == type;
1993
2043
  }
1994
2044
  static isBatteryDoorbellDualE340(type) {
1995
2045
  return types_1.DeviceType.BATTERY_DOORBELL_PLUS_E340 == type;
@@ -2009,7 +2059,8 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2009
2059
  type == types_1.DeviceType.BATTERY_DOORBELL_PLUS ||
2010
2060
  type == types_1.DeviceType.BATTERY_DOORBELL_PLUS_E340 ||
2011
2061
  type == types_1.DeviceType.BATTERY_DOORBELL_C30 ||
2012
- type == types_1.DeviceType.BATTERY_DOORBELL_C31)
2062
+ type == types_1.DeviceType.BATTERY_DOORBELL_C31 ||
2063
+ type == types_1.DeviceType.LOCK_85V0)
2013
2064
  return true;
2014
2065
  return false;
2015
2066
  }
@@ -2040,6 +2091,10 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2040
2091
  static isSoloCameraE30(type) {
2041
2092
  return types_1.DeviceType.SOLO_CAMERA_E30 == type;
2042
2093
  }
2094
+ static isSoloCamE42(type) {
2095
+ //T8173
2096
+ return types_1.DeviceType.SOLOCAM_E42 == type;
2097
+ }
2043
2098
  static isSoloCameras(type) {
2044
2099
  return (Device.isSoloCamera(type) ||
2045
2100
  Device.isSoloCameraPro(type) ||
@@ -2050,11 +2105,16 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2050
2105
  Device.isSoloCameraSolar(type) ||
2051
2106
  Device.isSoloCameraC210(type) ||
2052
2107
  Device.isSoloCameraE30(type) ||
2108
+ Device.isSoloCamE42(type) ||
2053
2109
  Device.isCameraC35(type));
2054
2110
  }
2055
2111
  static isStarlight4GLTE(type) {
2056
2112
  return types_1.DeviceType.CAMERA_FG == type;
2057
2113
  }
2114
+ static is4GLTECamS330(type) {
2115
+ //T86P2
2116
+ return types_1.DeviceType.CAMERA_4G_S330 == type;
2117
+ }
2058
2118
  static isIndoorOutdoorCamera1080p(type) {
2059
2119
  return types_1.DeviceType.INDOOR_OUTDOOR_CAMERA_1080P == type;
2060
2120
  }
@@ -2113,6 +2173,10 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2113
2173
  // T8600 - E330
2114
2174
  return types_1.DeviceType.PROFESSIONAL_247 == type;
2115
2175
  }
2176
+ static isCameraS4(type) {
2177
+ //T8172
2178
+ return types_1.DeviceType.CAMERA_S4 == type;
2179
+ }
2116
2180
  static isCamera3Product(type) {
2117
2181
  return (Device.isCamera3(type) ||
2118
2182
  Device.isCamera3C(type) ||
@@ -2156,9 +2220,14 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2156
2220
  sn.startsWith("T8130") ||
2157
2221
  sn.startsWith("T8131") ||
2158
2222
  sn.startsWith("T8171") ||
2223
+ sn.startsWith("T8172") ||
2224
+ sn.startsWith("T8173") ||
2225
+ sn.startsWith("T86P2") ||
2226
+ sn.startsWith("T8214") ||
2159
2227
  sn.startsWith("T8422") ||
2160
2228
  sn.startsWith("T8423") ||
2161
2229
  sn.startsWith("T8424") ||
2230
+ sn.startsWith("T8425") ||
2162
2231
  sn.startsWith("T8426") ||
2163
2232
  sn.startsWith("T8440") ||
2164
2233
  sn.startsWith("T8441") ||
@@ -2171,6 +2240,8 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2171
2240
  sn.startsWith("T8123") ||
2172
2241
  sn.startsWith("T8124") ||
2173
2242
  sn.startsWith("T8171") ||
2243
+ sn.startsWith("T8173") ||
2244
+ sn.startsWith("T86P2") ||
2174
2245
  sn.startsWith("T8134"));
2175
2246
  }
2176
2247
  static isSmartDropBySn(sn) {
@@ -2179,12 +2250,14 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2179
2250
  static isLockBySn(sn) {
2180
2251
  return (sn.startsWith("T8510") ||
2181
2252
  sn.startsWith("T8520") ||
2253
+ sn.startsWith("T85V0") ||
2182
2254
  sn.startsWith("T8500") ||
2183
2255
  sn.startsWith("T8501") ||
2184
2256
  sn.startsWith("T8503") ||
2185
2257
  sn.startsWith("T8502") ||
2186
2258
  sn.startsWith("T8504") ||
2187
2259
  sn.startsWith("T8506") ||
2260
+ sn.startsWith("T85L0") ||
2188
2261
  sn.startsWith("T8530"));
2189
2262
  }
2190
2263
  static isGarageCameraBySn(sn) {
@@ -2304,6 +2377,15 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2304
2377
  isLockWifiT8520P() {
2305
2378
  return Device.isLockWifiT8520P(this.rawDevice.device_type, this.rawDevice.device_sn);
2306
2379
  }
2380
+ isLockWifiT8531() {
2381
+ return Device.isLockWifiT8531(this.rawDevice.device_type);
2382
+ }
2383
+ isLockWifiT85V0() {
2384
+ return Device.isLockWifiT85V0(this.rawDevice.device_type, this.rawDevice.device_sn);
2385
+ }
2386
+ isLockWifiT85L0() {
2387
+ return Device.isLockWifiT85L0(this.rawDevice.device_type);
2388
+ }
2307
2389
  isBatteryDoorbell1() {
2308
2390
  return Device.isBatteryDoorbell1(this.rawDevice.device_type);
2309
2391
  }
@@ -2355,9 +2437,15 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2355
2437
  isSoloCameraE30() {
2356
2438
  return Device.isSoloCameraE30(this.rawDevice.device_type);
2357
2439
  }
2440
+ isSoloCamE42() {
2441
+ return Device.isSoloCamE42(this.rawDevice.device_type);
2442
+ }
2358
2443
  isStarlight4GLTE() {
2359
2444
  return Device.isStarlight4GLTE(this.rawDevice.device_type);
2360
2445
  }
2446
+ is4GLTECamS330() {
2447
+ return Device.is4GLTECamS330(this.rawDevice.device_type);
2448
+ }
2361
2449
  isIndoorOutdoorCamera1080p() {
2362
2450
  return Device.isIndoorOutdoorCamera1080p(this.rawDevice.device_type);
2363
2451
  }
@@ -2388,6 +2476,9 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2388
2476
  isCamera2CPro() {
2389
2477
  return Device.isCamera2CPro(this.rawDevice.device_type);
2390
2478
  }
2479
+ isCameraE40() {
2480
+ return Device.isCameraE40(this.rawDevice.device_type);
2481
+ }
2391
2482
  isCamera2Product() {
2392
2483
  return Device.isCamera2Product(this.rawDevice.device_type);
2393
2484
  }
@@ -2406,6 +2497,9 @@ class Device extends tiny_typed_emitter_1.TypedEmitter {
2406
2497
  isCamera3Product() {
2407
2498
  return Device.isCamera3Product(this.rawDevice.device_type);
2408
2499
  }
2500
+ isCameraS4() {
2501
+ return Device.isCameraS4(this.rawDevice.device_type);
2502
+ }
2409
2503
  isEntrySensor() {
2410
2504
  return Device.isEntrySensor(this.rawDevice.device_type);
2411
2505
  }