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.
- package/README.md +27 -0
- package/build/eufysecurity.d.ts +1 -0
- package/build/eufysecurity.js +25 -3
- package/build/eufysecurity.js.map +1 -1
- package/build/http/api.d.ts +2 -0
- package/build/http/api.js +37 -1
- package/build/http/api.js.map +1 -1
- package/build/http/device.d.ts +14 -0
- package/build/http/device.js +101 -7
- package/build/http/device.js.map +1 -1
- package/build/http/parameter.js +1 -1
- package/build/http/parameter.js.map +1 -1
- package/build/http/station.js +94 -26
- package/build/http/station.js.map +1 -1
- package/build/http/types.d.ts +11 -0
- package/build/http/types.js +553 -2
- package/build/http/types.js.map +1 -1
- package/build/http/utils.d.ts +2 -2
- package/build/http/utils.js +5 -5
- package/build/http/utils.js.map +1 -1
- package/build/p2p/session.js +14 -2
- package/build/p2p/session.js.map +1 -1
- package/build/p2p/utils.js +1 -0
- package/build/p2p/utils.js.map +1 -1
- package/build/push/service.js +9 -1
- package/build/push/service.js.map +1 -1
- package/build/push/types.d.ts +3 -1
- package/build/push/types.js +2 -0
- package/build/push/types.js.map +1 -1
- package/coverage/clover.xml +13237 -10603
- package/coverage/coverage-final.json +31 -21
- package/coverage/lcov-report/index.html +65 -50
- package/coverage/lcov.info +25622 -20507
- package/package.json +7 -3
- package/scripts/cut_release.sh +2 -0
- package/scripts/generate_changelog.sh +93 -0
- package/.idea/eufy-security-client.iml +0 -12
- package/.idea/modules.xml +0 -8
- package/.idea/vcs.xml +0 -7
- package/a.ts +0 -61
- package/bin/act +0 -0
- package/coverage/lcov-report/error.ts.html +0 -871
- package/coverage/lcov-report/logging.ts.html +0 -598
- package/dont-care.js +0 -101
package/build/http/parameter.js
CHANGED
|
@@ -55,7 +55,7 @@ class ParameterHelper {
|
|
|
55
55
|
//if (typeof value !== "string") return value;
|
|
56
56
|
if (typeof value !== "string") {
|
|
57
57
|
log.debug("Watch out for this object! .", {
|
|
58
|
-
value: JSON.stringify(value, null, 2)
|
|
58
|
+
value: JSON.stringify(value, null, 2),
|
|
59
59
|
});
|
|
60
60
|
return value;
|
|
61
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../src/http/parameter.ts"],"names":[],"mappings":";;;AAEA,gCAAyD;AACzD,wCAAqE;AACrE,oCAA+C;AAC/C,mCAAoC;AACpC,mCAA6C;AAC7C,oCAAuC;AAEvC,MAAa,eAAe;IAClB,MAAM,CAAU,wBAAwB,GAAG,IAAI,GAAG,CAAS;QACjE,iBAAS,CAAC,WAAW;QACrB,iBAAS,CAAC,mBAAmB;QAC7B,iBAAW,CAAC,oCAAoC;QAChD,iBAAW,CAAC,8BAA8B;QAC1C,iBAAW,CAAC,cAAc;QAC1B,iBAAW,CAAC,cAAc;QAC1B,iBAAW,CAAC,cAAc;QAC1B,iBAAW,CAAC,cAAc;QAC1B,iBAAW,CAAC,cAAc;QAC1B,iBAAW,CAAC,aAAa;QACzB,iBAAW,CAAC,aAAa;QACzB,iBAAW,CAAC,+CAA+C;QAC3D,iBAAW,CAAC,iDAAiD;QAC7D,iBAAW,CAAC,+CAA+C;QAC3D,iBAAW,CAAC,+CAA+C;QAC3D,iBAAW,CAAC,8BAA8B;QAC1C,iBAAW,CAAC,oBAAoB;QAChC,iBAAW,CAAC,+BAA+B;QAC3C,iBAAW,CAAC,gCAAgC;QAC5C,iBAAW,CAAC,kCAAkC;QAC9C,iBAAW,CAAC,iCAAiC;QAC7C,iBAAW,CAAC,wCAAwC;QACpD,iBAAW,CAAC,mCAAmC;QAC/C,iBAAW,CAAC,mCAAmC;KAChD,CAAC,CAAC;IAEK,MAAM,CAAU,uBAAuB,GAAG,IAAI,GAAG,CAAS;QAChE,iBAAW,CAAC,sCAAsC;QAClD,iBAAW,CAAC,gDAAgD;QAC5D,iBAAW,CAAC,wCAAwC;QACpD,iBAAW,CAAC,qCAAqC;Q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,KAAK,CAAC;qBACvB,CAAC,CAAC;gBACL,CAAC;gBACD,OAAO,EAAE,CAAC;YACZ,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,KAAa;QAClD,IAAI,KAAK,EAAE,CAAC;YACV,IACE,IAAI,KAAK,iBAAS,CAAC,WAAW;gBAC9B,IAAI,KAAK,iBAAS,CAAC,mBAAmB;gBACtC,IAAI,KAAK,iBAAW,CAAC,oCAAoC;gBACzD,IAAI,KAAK,iBAAW,CAAC,8BAA8B,EACnD,CAAC;gBACD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAC/D,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;;AA5GH,0CA6GC"}
|
package/build/http/station.js
CHANGED
|
@@ -97,7 +97,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
97
97
|
!device_1.Device.isLockWifiT8506(stationData.device_type) &&
|
|
98
98
|
!device_1.Device.isLockWifiT8502(stationData.device_type) &&
|
|
99
99
|
!device_1.Device.isLockWifiT8510P(stationData.device_type, stationData.station_sn) &&
|
|
100
|
-
!device_1.Device.isLockWifiT8520P(stationData.device_type, stationData.station_sn)
|
|
100
|
+
!device_1.Device.isLockWifiT8520P(stationData.device_type, stationData.station_sn) &&
|
|
101
|
+
!device_1.Device.isLockWifiT85L0(stationData.device_type) &&
|
|
102
|
+
!device_1.Device.isLockWifiT85V0(stationData.device_type, stationData.station_sn)) {
|
|
101
103
|
publicKey = await api.getPublicKey(stationData.station_sn, types_1.PublicKeyType.LOCK);
|
|
102
104
|
}
|
|
103
105
|
return new Station(api, stationData, ipAddress, listeningPort, publicKey, enableEmbeddedPKCS1Support);
|
|
@@ -404,6 +406,10 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
404
406
|
if (property.name === types_1.PropertyName.Model && device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial())) {
|
|
405
407
|
return "T8510P";
|
|
406
408
|
}
|
|
409
|
+
else if (property.name === types_1.PropertyName.Model &&
|
|
410
|
+
device_1.Device.isLockWifiT85V0(this.getDeviceType(), this.getSerial())) {
|
|
411
|
+
return "T85V0";
|
|
412
|
+
}
|
|
407
413
|
else if (property.type === "number") {
|
|
408
414
|
const numericProperty = property;
|
|
409
415
|
try {
|
|
@@ -5661,6 +5667,12 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
5661
5667
|
});
|
|
5662
5668
|
}
|
|
5663
5669
|
if (!device.hasCommand(types_1.CommandName.DeviceTriggerAlarmSound)) {
|
|
5670
|
+
logging_1.rootHTTPLogger.debug(`This functionality is not implemented or supported by this device - triggerDeviceAlarmSound`, {
|
|
5671
|
+
device: device.getSerial(),
|
|
5672
|
+
station: this.getSerial(),
|
|
5673
|
+
commandName: commandData.name,
|
|
5674
|
+
commandValue: commandData.value,
|
|
5675
|
+
});
|
|
5664
5676
|
throw new error_1.NotSupportedError("This functionality is not implemented or supported by this device", {
|
|
5665
5677
|
context: {
|
|
5666
5678
|
device: device.getSerial(),
|
|
@@ -5733,6 +5745,11 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
5733
5745
|
value: value,
|
|
5734
5746
|
};
|
|
5735
5747
|
if (!this.hasProperty(propertyData.name)) {
|
|
5748
|
+
logging_1.rootHTTPLogger.debug(`This functionality is not implemented or supported - setStationAlarmTone`, {
|
|
5749
|
+
propertyName: propertyData.name,
|
|
5750
|
+
propertyValue: propertyData.value,
|
|
5751
|
+
station: this.getSerial(),
|
|
5752
|
+
});
|
|
5736
5753
|
throw new error_1.NotSupportedError("This functionality is not implemented or supported", {
|
|
5737
5754
|
context: { propertyName: propertyData.name, propertyValue: propertyData.value, station: this.getSerial() },
|
|
5738
5755
|
});
|
|
@@ -6028,6 +6045,12 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
6028
6045
|
});
|
|
6029
6046
|
}
|
|
6030
6047
|
if (!device.hasProperty(propertyData.name)) {
|
|
6048
|
+
logging_1.rootHTTPLogger.debug(`This functionality is not implemented or supported by this device - setRTSPStream`, {
|
|
6049
|
+
device: device.getSerial(),
|
|
6050
|
+
station: this.getSerial(),
|
|
6051
|
+
propertyName: propertyData.name,
|
|
6052
|
+
propertyValue: propertyData.value,
|
|
6053
|
+
});
|
|
6031
6054
|
throw new error_1.NotSupportedError("This functionality is not implemented or supported by this device", {
|
|
6032
6055
|
context: {
|
|
6033
6056
|
device: device.getSerial(),
|
|
@@ -6569,7 +6592,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
6569
6592
|
command: commandData,
|
|
6570
6593
|
});
|
|
6571
6594
|
}
|
|
6572
|
-
else if (device.isOutdoorPanAndTiltCamera()) {
|
|
6595
|
+
else if (device.isOutdoorPanAndTiltCamera() || device.isBatteryDoorbellDualE340() || device.isFloodLightT8425()) {
|
|
6573
6596
|
logging_1.rootHTTPLogger.debug(`Station start livestream - sending command using CMD_DOORBELL_SET_PAYLOAD (1)`, {
|
|
6574
6597
|
stationSN: this.getSerial(),
|
|
6575
6598
|
deviceSN: device.getSerial(),
|
|
@@ -6621,8 +6644,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
6621
6644
|
command: commandData,
|
|
6622
6645
|
});
|
|
6623
6646
|
}
|
|
6624
|
-
else if ((
|
|
6625
|
-
|
|
6647
|
+
else if ((device.isIndoorPanAndTiltCameraS350() || device.isIndoorCamC24()) &&
|
|
6648
|
+
this.isDeviceControlledByHomeBase()) {
|
|
6626
6649
|
logging_1.rootHTTPLogger.debug(`Station start livestream - sending command using CMD_SET_PAYLOAD`, {
|
|
6627
6650
|
stationSN: this.getSerial(),
|
|
6628
6651
|
deviceSN: device.getSerial(),
|
|
@@ -7316,7 +7339,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
7316
7339
|
else if (device.isLockWifiT8506() ||
|
|
7317
7340
|
device.isLockWifiT8502() ||
|
|
7318
7341
|
device.isLockWifiT8510P() ||
|
|
7319
|
-
device.isLockWifiT8520P()
|
|
7342
|
+
device.isLockWifiT8520P() ||
|
|
7343
|
+
device.isLockWifiT85L0() ||
|
|
7344
|
+
device.isLockWifiT85V0()) {
|
|
7320
7345
|
const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.ON_OFF_LOCK, device.getChannel(), this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockUnlock(this.rawStation.member.admin_user_id, value, this.rawStation.member.nick_name, this.rawStation.member.short_user_id));
|
|
7321
7346
|
logging_1.rootHTTPLogger.debug("Station lock device - Locking/unlocking device...", {
|
|
7322
7347
|
station: this.getSerial(),
|
|
@@ -8834,7 +8859,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
8834
8859
|
else if (device.isLockWifiT8506() ||
|
|
8835
8860
|
device.isLockWifiT8502() ||
|
|
8836
8861
|
device.isLockWifiT8510P() ||
|
|
8837
|
-
device.isLockWifiT8520P()
|
|
8862
|
+
device.isLockWifiT8520P() ||
|
|
8863
|
+
device.isLockWifiT85L0() ||
|
|
8864
|
+
device.isLockWifiT85V0()) {
|
|
8838
8865
|
const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.ON_OFF_LOCK, device.getChannel(), this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockCalibrate(this.rawStation.member.admin_user_id));
|
|
8839
8866
|
logging_1.rootHTTPLogger.debug("Station calibrate lock - Calibrate lock...", {
|
|
8840
8867
|
station: this.getSerial(),
|
|
@@ -10963,7 +10990,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
10963
10990
|
else if (device.isLockWifiT8506() ||
|
|
10964
10991
|
device.isLockWifiT8502() ||
|
|
10965
10992
|
device.isLockWifiT8510P() ||
|
|
10966
|
-
device.isLockWifiT8520P()
|
|
10993
|
+
device.isLockWifiT8520P() ||
|
|
10994
|
+
device.isLockWifiT85L0() ||
|
|
10995
|
+
device.isLockWifiT85V0()) {
|
|
10967
10996
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceScramblePasscode, value);
|
|
10968
10997
|
}
|
|
10969
10998
|
else if (device.isSmartSafe()) {
|
|
@@ -11019,7 +11048,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11019
11048
|
else if (device.isLockWifiT8506() ||
|
|
11020
11049
|
device.isLockWifiT8502() ||
|
|
11021
11050
|
device.isLockWifiT8510P() ||
|
|
11022
|
-
device.isLockWifiT8520P()
|
|
11051
|
+
device.isLockWifiT8520P() ||
|
|
11052
|
+
device.isLockWifiT85L0() ||
|
|
11053
|
+
device.isLockWifiT85V0()) {
|
|
11023
11054
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceWrongTryProtection, value);
|
|
11024
11055
|
}
|
|
11025
11056
|
else if (device.isSmartSafe()) {
|
|
@@ -11075,7 +11106,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11075
11106
|
else if (device.isLockWifiT8506() ||
|
|
11076
11107
|
device.isLockWifiT8502() ||
|
|
11077
11108
|
device.isLockWifiT8510P() ||
|
|
11078
|
-
device.isLockWifiT8520P()
|
|
11109
|
+
device.isLockWifiT8520P() ||
|
|
11110
|
+
device.isLockWifiT85L0() ||
|
|
11111
|
+
device.isLockWifiT85V0()) {
|
|
11079
11112
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceWrongTryAttempts, value);
|
|
11080
11113
|
}
|
|
11081
11114
|
else if (device.isSmartSafe()) {
|
|
@@ -11131,7 +11164,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11131
11164
|
else if (device.isLockWifiT8506() ||
|
|
11132
11165
|
device.isLockWifiT8502() ||
|
|
11133
11166
|
device.isLockWifiT8510P() ||
|
|
11134
|
-
device.isLockWifiT8520P()
|
|
11167
|
+
device.isLockWifiT8520P() ||
|
|
11168
|
+
device.isLockWifiT85L0() ||
|
|
11169
|
+
device.isLockWifiT85V0()) {
|
|
11135
11170
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceWrongTryLockdownTime, value);
|
|
11136
11171
|
}
|
|
11137
11172
|
else if (device.isSmartSafe()) {
|
|
@@ -11668,7 +11703,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11668
11703
|
else if (device.isLockWifiT8506() ||
|
|
11669
11704
|
device.isLockWifiT8502() ||
|
|
11670
11705
|
device.isLockWifiT8510P() ||
|
|
11671
|
-
device.isLockWifiT8520P()
|
|
11706
|
+
device.isLockWifiT8520P() ||
|
|
11707
|
+
device.isLockWifiT85L0() ||
|
|
11708
|
+
device.isLockWifiT85V0()) {
|
|
11672
11709
|
const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.ADD_PW, device.getChannel(), this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockAddUser(this.rawStation.member.admin_user_id, shortUserId, (0, utils_1.encodePasscode)(passcode), username, schedule));
|
|
11673
11710
|
logging_1.rootHTTPLogger.debug("Station smart lock device - Add user...", {
|
|
11674
11711
|
station: this.getSerial(),
|
|
@@ -11782,7 +11819,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11782
11819
|
else if (device.isLockWifiT8506() ||
|
|
11783
11820
|
device.isLockWifiT8502() ||
|
|
11784
11821
|
device.isLockWifiT8510P() ||
|
|
11785
|
-
device.isLockWifiT8520P()
|
|
11822
|
+
device.isLockWifiT8520P() ||
|
|
11823
|
+
device.isLockWifiT85L0() ||
|
|
11824
|
+
device.isLockWifiT85V0()) {
|
|
11786
11825
|
const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.DELETE_USER, device.getChannel(), this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockDeleteUser(this.rawStation.member.admin_user_id, shortUserId));
|
|
11787
11826
|
logging_1.rootHTTPLogger.debug("Station delete user - payload", {
|
|
11788
11827
|
station: this.getSerial(),
|
|
@@ -11910,7 +11949,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11910
11949
|
else if (device.isLockWifiT8506() ||
|
|
11911
11950
|
device.isLockWifiT8502() ||
|
|
11912
11951
|
device.isLockWifiT8510P() ||
|
|
11913
|
-
device.isLockWifiT8520P()
|
|
11952
|
+
device.isLockWifiT8520P() ||
|
|
11953
|
+
device.isLockWifiT85L0() ||
|
|
11954
|
+
device.isLockWifiT85V0()) {
|
|
11914
11955
|
const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.UPDATE_USER_TIME, device.getChannel(), this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockUpdateSchedule(this.rawStation.member.admin_user_id, shortUserId, username, schedule));
|
|
11915
11956
|
logging_1.rootHTTPLogger.debug("Station update user schedule - payload", {
|
|
11916
11957
|
station: this.getSerial(),
|
|
@@ -12037,7 +12078,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12037
12078
|
else if (device.isLockWifiT8506() ||
|
|
12038
12079
|
device.isLockWifiT8502() ||
|
|
12039
12080
|
device.isLockWifiT8510P() ||
|
|
12040
|
-
device.isLockWifiT8520P()
|
|
12081
|
+
device.isLockWifiT8520P() ||
|
|
12082
|
+
device.isLockWifiT85L0() ||
|
|
12083
|
+
device.isLockWifiT85V0()) {
|
|
12041
12084
|
const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.UPDATE_PW, device.getChannel(), this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockModifyPassword(this.rawStation.member.admin_user_id, passwordId, (0, utils_1.encodePasscode)(passcode)));
|
|
12042
12085
|
logging_1.rootHTTPLogger.debug("Station update user passcode - payload", {
|
|
12043
12086
|
station: this.getSerial(),
|
|
@@ -12192,7 +12235,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12192
12235
|
if (device.isLockWifiT8506() ||
|
|
12193
12236
|
device.isLockWifiT8502() ||
|
|
12194
12237
|
device.isLockWifiT8510P() ||
|
|
12195
|
-
device.isLockWifiT8520P()
|
|
12238
|
+
device.isLockWifiT8520P() ||
|
|
12239
|
+
device.isLockWifiT85L0() ||
|
|
12240
|
+
device.isLockWifiT85V0()) {
|
|
12196
12241
|
let payload;
|
|
12197
12242
|
switch (property) {
|
|
12198
12243
|
case types_1.PropertyName.DeviceWrongTryProtection:
|
|
@@ -12294,7 +12339,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12294
12339
|
else if (device.isLockWifiT8506() ||
|
|
12295
12340
|
device.isLockWifiT8502() ||
|
|
12296
12341
|
device.isLockWifiT8510P() ||
|
|
12297
|
-
device.isLockWifiT8520P()
|
|
12342
|
+
device.isLockWifiT8520P() ||
|
|
12343
|
+
device.isLockWifiT85L0() ||
|
|
12344
|
+
device.isLockWifiT85V0()) {
|
|
12298
12345
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLock, value);
|
|
12299
12346
|
}
|
|
12300
12347
|
else {
|
|
@@ -12347,7 +12394,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12347
12394
|
else if (device.isLockWifiT8506() ||
|
|
12348
12395
|
device.isLockWifiT8502() ||
|
|
12349
12396
|
device.isLockWifiT8510P() ||
|
|
12350
|
-
device.isLockWifiT8520P()
|
|
12397
|
+
device.isLockWifiT8520P() ||
|
|
12398
|
+
device.isLockWifiT85L0() ||
|
|
12399
|
+
device.isLockWifiT85V0()) {
|
|
12351
12400
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockSchedule, value);
|
|
12352
12401
|
}
|
|
12353
12402
|
else {
|
|
@@ -12400,7 +12449,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12400
12449
|
else if (device.isLockWifiT8506() ||
|
|
12401
12450
|
device.isLockWifiT8502() ||
|
|
12402
12451
|
device.isLockWifiT8510P() ||
|
|
12403
|
-
device.isLockWifiT8520P()
|
|
12452
|
+
device.isLockWifiT8520P() ||
|
|
12453
|
+
device.isLockWifiT85L0() ||
|
|
12454
|
+
device.isLockWifiT85V0()) {
|
|
12404
12455
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockScheduleStartTime, value);
|
|
12405
12456
|
}
|
|
12406
12457
|
else {
|
|
@@ -12453,7 +12504,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12453
12504
|
else if (device.isLockWifiT8506() ||
|
|
12454
12505
|
device.isLockWifiT8502() ||
|
|
12455
12506
|
device.isLockWifiT8510P() ||
|
|
12456
|
-
device.isLockWifiT8520P()
|
|
12507
|
+
device.isLockWifiT8520P() ||
|
|
12508
|
+
device.isLockWifiT85L0() ||
|
|
12509
|
+
device.isLockWifiT85V0()) {
|
|
12457
12510
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockScheduleEndTime, value);
|
|
12458
12511
|
}
|
|
12459
12512
|
else {
|
|
@@ -12506,7 +12559,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12506
12559
|
else if (device.isLockWifiT8506() ||
|
|
12507
12560
|
device.isLockWifiT8502() ||
|
|
12508
12561
|
device.isLockWifiT8510P() ||
|
|
12509
|
-
device.isLockWifiT8520P()
|
|
12562
|
+
device.isLockWifiT8520P() ||
|
|
12563
|
+
device.isLockWifiT85L0() ||
|
|
12564
|
+
device.isLockWifiT85V0()) {
|
|
12510
12565
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockTimer, value);
|
|
12511
12566
|
}
|
|
12512
12567
|
else {
|
|
@@ -12559,7 +12614,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12559
12614
|
else if (device.isLockWifiT8506() ||
|
|
12560
12615
|
device.isLockWifiT8502() ||
|
|
12561
12616
|
device.isLockWifiT8510P() ||
|
|
12562
|
-
device.isLockWifiT8520P()
|
|
12617
|
+
device.isLockWifiT8520P() ||
|
|
12618
|
+
device.isLockWifiT85L0() ||
|
|
12619
|
+
device.isLockWifiT85V0()) {
|
|
12563
12620
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceOneTouchLocking, value);
|
|
12564
12621
|
}
|
|
12565
12622
|
else {
|
|
@@ -12612,7 +12669,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12612
12669
|
else if (device.isLockWifiT8506() ||
|
|
12613
12670
|
device.isLockWifiT8502() ||
|
|
12614
12671
|
device.isLockWifiT8510P() ||
|
|
12615
|
-
device.isLockWifiT8520P()
|
|
12672
|
+
device.isLockWifiT8520P() ||
|
|
12673
|
+
device.isLockWifiT85L0() ||
|
|
12674
|
+
device.isLockWifiT85V0()) {
|
|
12616
12675
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceSound, value);
|
|
12617
12676
|
}
|
|
12618
12677
|
else {
|
|
@@ -12676,6 +12735,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12676
12735
|
device.isLockWifiT8510P() ||
|
|
12677
12736
|
device.isLockWifiT8520P() ||
|
|
12678
12737
|
device.isLockWifiR10() ||
|
|
12738
|
+
device.isLockWifiT85L0() ||
|
|
12679
12739
|
device.isLockWifiR20()) {
|
|
12680
12740
|
let oldvalue = 0;
|
|
12681
12741
|
const rawproperty = device.getRawProperty(types_2.CommandType.CMD_DOORLOCK_SET_PUSH_MODE);
|
|
@@ -12754,6 +12814,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12754
12814
|
device.isLockWifiT8510P() ||
|
|
12755
12815
|
device.isLockWifiT8520P() ||
|
|
12756
12816
|
device.isLockWifiR10() ||
|
|
12817
|
+
device.isLockWifiT85L0() ||
|
|
12757
12818
|
device.isLockWifiR20()) {
|
|
12758
12819
|
let oldvalue = 0;
|
|
12759
12820
|
const rawproperty = device.getRawProperty(types_2.CommandType.CMD_DOORLOCK_SET_PUSH_MODE);
|
|
@@ -12832,6 +12893,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12832
12893
|
device.isLockWifiT8510P() ||
|
|
12833
12894
|
device.isLockWifiT8520P() ||
|
|
12834
12895
|
device.isLockWifiR10() ||
|
|
12896
|
+
device.isLockWifiT85L0() ||
|
|
12835
12897
|
device.isLockWifiR20()) {
|
|
12836
12898
|
let oldvalue = 0;
|
|
12837
12899
|
const rawproperty = device.getRawProperty(types_2.CommandType.CMD_DOORLOCK_SET_PUSH_MODE);
|
|
@@ -12987,7 +13049,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12987
13049
|
else if (device.isLockWifiT8506() ||
|
|
12988
13050
|
device.isLockWifiT8502() ||
|
|
12989
13051
|
device.isLockWifiT8510P() ||
|
|
12990
|
-
device.isLockWifiT8520P()
|
|
13052
|
+
device.isLockWifiT8520P() ||
|
|
13053
|
+
device.isLockWifiT85L0() ||
|
|
13054
|
+
device.isLockWifiT85V0()) {
|
|
12991
13055
|
const command = (0, utils_2.getSmartLockP2PCommand)(this.rawStation.station_sn, this.rawStation.member.admin_user_id, types_2.SmartLockCommand.QUERY_ALL_USERS, device.getChannel(), this.p2pSession.incLockSequenceNumber(), device_1.Lock.encodeCmdSmartLockGetUserList(this.rawStation.member.admin_user_id));
|
|
12992
13056
|
logging_1.rootHTTPLogger.debug("Station get user list - payload", {
|
|
12993
13057
|
station: this.getSerial(),
|
|
@@ -13154,7 +13218,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
13154
13218
|
flag: 0,
|
|
13155
13219
|
res_unzip: 1,
|
|
13156
13220
|
start_date: format(startDate, "YYYYMMDD"),
|
|
13157
|
-
start_time: `${format(
|
|
13221
|
+
start_time: `${format(startDate, "YYYYMMDD")}000000`,
|
|
13158
13222
|
storage_cloud: storageType === types_2.FilterStorageType.NONE ||
|
|
13159
13223
|
(storageType !== types_2.FilterStorageType.LOCAL && storageType !== types_2.FilterStorageType.CLOUD)
|
|
13160
13224
|
? -1
|
|
@@ -15409,7 +15473,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
15409
15473
|
if (device_1.Device.isLockWifiT8506(this.getDeviceType()) ||
|
|
15410
15474
|
device_1.Device.isLockWifiT8502(this.getDeviceType()) ||
|
|
15411
15475
|
device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial()) ||
|
|
15412
|
-
device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial())
|
|
15476
|
+
device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial()) ||
|
|
15477
|
+
device_1.Device.isLockWifiT85V0(this.getDeviceType(), this.getSerial()) ||
|
|
15478
|
+
device_1.Device.isLockWifiT85L0(this.getDeviceType())) {
|
|
15413
15479
|
logging_1.rootHTTPLogger.debug(`Station smart lock send get lock parameters command`, { stationSN: this.getSerial() });
|
|
15414
15480
|
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));
|
|
15415
15481
|
this.p2pSession.sendCommandWithStringPayload(command.payload);
|
|
@@ -15425,7 +15491,9 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
15425
15491
|
if (device_1.Device.isLockWifiT8506(this.getDeviceType()) ||
|
|
15426
15492
|
device_1.Device.isLockWifiT8502(this.getDeviceType()) ||
|
|
15427
15493
|
device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial()) ||
|
|
15428
|
-
device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial())
|
|
15494
|
+
device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial()) ||
|
|
15495
|
+
device_1.Device.isLockWifiT85V0(this.getDeviceType(), this.getSerial()) ||
|
|
15496
|
+
device_1.Device.isLockWifiT85L0(this.getDeviceType())) {
|
|
15429
15497
|
logging_1.rootHTTPLogger.debug(`Station smart lock send get lock status command`, { stationSN: this.getSerial() });
|
|
15430
15498
|
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));
|
|
15431
15499
|
this.p2pSession.sendCommandWithStringPayload(command.payload);
|