eufy-security-client 3.8.0-dev.18 → 3.8.0-dev.19
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/build/http/device.d.ts +2 -0
- package/build/http/device.js +14 -1
- package/build/http/device.js.map +1 -1
- package/build/http/station.js +47 -22
- package/build/http/station.js.map +1 -1
- package/build/http/types.d.ts +1 -0
- package/build/http/types.js +29 -0
- package/build/http/types.js.map +1 -1
- package/build/p2p/session.js +2 -1
- package/build/p2p/session.js.map +1 -1
- package/coverage/clover.xml +5489 -5484
- package/coverage/coverage-final.json +4 -4
- package/coverage/lcov-report/index.html +16 -16
- package/coverage/lcov.info +10033 -9991
- package/package.json +1 -1
package/build/http/station.js
CHANGED
|
@@ -100,7 +100,8 @@ 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)
|
|
103
|
+
!device_1.Device.isLockWifiT85V0(stationData.device_type) &&
|
|
104
|
+
!device_1.Device.isLockWifiT85P0(stationData.device_type)) {
|
|
104
105
|
publicKey = await api.getPublicKey(stationData.station_sn, types_1.PublicKeyType.LOCK);
|
|
105
106
|
}
|
|
106
107
|
return new Station(api, stationData, ipAddress, listeningPort, publicKey, enableEmbeddedPKCS1Support);
|
|
@@ -7346,7 +7347,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
7346
7347
|
device.isLockWifiT8510P() ||
|
|
7347
7348
|
device.isLockWifiT8520P() ||
|
|
7348
7349
|
device.isLockWifiT85L0() ||
|
|
7349
|
-
device.isLockWifiT85V0()
|
|
7350
|
+
device.isLockWifiT85V0() ||
|
|
7351
|
+
device.isLockWifiT85P0()) {
|
|
7350
7352
|
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));
|
|
7351
7353
|
logging_1.rootHTTPLogger.debug("Station lock device - Locking/unlocking device...", {
|
|
7352
7354
|
station: this.getSerial(),
|
|
@@ -8866,7 +8868,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
8866
8868
|
device.isLockWifiT8510P() ||
|
|
8867
8869
|
device.isLockWifiT8520P() ||
|
|
8868
8870
|
device.isLockWifiT85L0() ||
|
|
8869
|
-
device.isLockWifiT85V0()
|
|
8871
|
+
device.isLockWifiT85V0() ||
|
|
8872
|
+
device.isLockWifiT85P0()) {
|
|
8870
8873
|
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));
|
|
8871
8874
|
logging_1.rootHTTPLogger.debug("Station calibrate lock - Calibrate lock...", {
|
|
8872
8875
|
station: this.getSerial(),
|
|
@@ -10997,7 +11000,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
10997
11000
|
device.isLockWifiT8510P() ||
|
|
10998
11001
|
device.isLockWifiT8520P() ||
|
|
10999
11002
|
device.isLockWifiT85L0() ||
|
|
11000
|
-
device.isLockWifiT85V0()
|
|
11003
|
+
device.isLockWifiT85V0() ||
|
|
11004
|
+
device.isLockWifiT85P0()) {
|
|
11001
11005
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceScramblePasscode, value);
|
|
11002
11006
|
}
|
|
11003
11007
|
else if (device.isSmartSafe()) {
|
|
@@ -11055,7 +11059,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11055
11059
|
device.isLockWifiT8510P() ||
|
|
11056
11060
|
device.isLockWifiT8520P() ||
|
|
11057
11061
|
device.isLockWifiT85L0() ||
|
|
11058
|
-
device.isLockWifiT85V0()
|
|
11062
|
+
device.isLockWifiT85V0() ||
|
|
11063
|
+
device.isLockWifiT85P0()) {
|
|
11059
11064
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceWrongTryProtection, value);
|
|
11060
11065
|
}
|
|
11061
11066
|
else if (device.isSmartSafe()) {
|
|
@@ -11113,7 +11118,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11113
11118
|
device.isLockWifiT8510P() ||
|
|
11114
11119
|
device.isLockWifiT8520P() ||
|
|
11115
11120
|
device.isLockWifiT85L0() ||
|
|
11116
|
-
device.isLockWifiT85V0()
|
|
11121
|
+
device.isLockWifiT85V0() ||
|
|
11122
|
+
device.isLockWifiT85P0()) {
|
|
11117
11123
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceWrongTryAttempts, value);
|
|
11118
11124
|
}
|
|
11119
11125
|
else if (device.isSmartSafe()) {
|
|
@@ -11171,7 +11177,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11171
11177
|
device.isLockWifiT8510P() ||
|
|
11172
11178
|
device.isLockWifiT8520P() ||
|
|
11173
11179
|
device.isLockWifiT85L0() ||
|
|
11174
|
-
device.isLockWifiT85V0()
|
|
11180
|
+
device.isLockWifiT85V0() ||
|
|
11181
|
+
device.isLockWifiT85P0()) {
|
|
11175
11182
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceWrongTryLockdownTime, value);
|
|
11176
11183
|
}
|
|
11177
11184
|
else if (device.isSmartSafe()) {
|
|
@@ -11710,7 +11717,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11710
11717
|
device.isLockWifiT8510P() ||
|
|
11711
11718
|
device.isLockWifiT8520P() ||
|
|
11712
11719
|
device.isLockWifiT85L0() ||
|
|
11713
|
-
device.isLockWifiT85V0()
|
|
11720
|
+
device.isLockWifiT85V0() ||
|
|
11721
|
+
device.isLockWifiT85P0()) {
|
|
11714
11722
|
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));
|
|
11715
11723
|
logging_1.rootHTTPLogger.debug("Station smart lock device - Add user...", {
|
|
11716
11724
|
station: this.getSerial(),
|
|
@@ -11826,7 +11834,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11826
11834
|
device.isLockWifiT8510P() ||
|
|
11827
11835
|
device.isLockWifiT8520P() ||
|
|
11828
11836
|
device.isLockWifiT85L0() ||
|
|
11829
|
-
device.isLockWifiT85V0()
|
|
11837
|
+
device.isLockWifiT85V0() ||
|
|
11838
|
+
device.isLockWifiT85P0()) {
|
|
11830
11839
|
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));
|
|
11831
11840
|
logging_1.rootHTTPLogger.debug("Station delete user - payload", {
|
|
11832
11841
|
station: this.getSerial(),
|
|
@@ -11956,7 +11965,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
11956
11965
|
device.isLockWifiT8510P() ||
|
|
11957
11966
|
device.isLockWifiT8520P() ||
|
|
11958
11967
|
device.isLockWifiT85L0() ||
|
|
11959
|
-
device.isLockWifiT85V0()
|
|
11968
|
+
device.isLockWifiT85V0() ||
|
|
11969
|
+
device.isLockWifiT85P0()) {
|
|
11960
11970
|
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));
|
|
11961
11971
|
logging_1.rootHTTPLogger.debug("Station update user schedule - payload", {
|
|
11962
11972
|
station: this.getSerial(),
|
|
@@ -12085,7 +12095,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12085
12095
|
device.isLockWifiT8510P() ||
|
|
12086
12096
|
device.isLockWifiT8520P() ||
|
|
12087
12097
|
device.isLockWifiT85L0() ||
|
|
12088
|
-
device.isLockWifiT85V0()
|
|
12098
|
+
device.isLockWifiT85V0() ||
|
|
12099
|
+
device.isLockWifiT85P0()) {
|
|
12089
12100
|
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)));
|
|
12090
12101
|
logging_1.rootHTTPLogger.debug("Station update user passcode - payload", {
|
|
12091
12102
|
station: this.getSerial(),
|
|
@@ -12242,7 +12253,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12242
12253
|
device.isLockWifiT8510P() ||
|
|
12243
12254
|
device.isLockWifiT8520P() ||
|
|
12244
12255
|
device.isLockWifiT85L0() ||
|
|
12245
|
-
device.isLockWifiT85V0()
|
|
12256
|
+
device.isLockWifiT85V0() ||
|
|
12257
|
+
device.isLockWifiT85P0()) {
|
|
12246
12258
|
let payload;
|
|
12247
12259
|
switch (property) {
|
|
12248
12260
|
case types_1.PropertyName.DeviceWrongTryProtection:
|
|
@@ -12346,7 +12358,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12346
12358
|
device.isLockWifiT8510P() ||
|
|
12347
12359
|
device.isLockWifiT8520P() ||
|
|
12348
12360
|
device.isLockWifiT85L0() ||
|
|
12349
|
-
device.isLockWifiT85V0()
|
|
12361
|
+
device.isLockWifiT85V0() ||
|
|
12362
|
+
device.isLockWifiT85P0()) {
|
|
12350
12363
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLock, value);
|
|
12351
12364
|
}
|
|
12352
12365
|
else {
|
|
@@ -12401,7 +12414,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12401
12414
|
device.isLockWifiT8510P() ||
|
|
12402
12415
|
device.isLockWifiT8520P() ||
|
|
12403
12416
|
device.isLockWifiT85L0() ||
|
|
12404
|
-
device.isLockWifiT85V0()
|
|
12417
|
+
device.isLockWifiT85V0() ||
|
|
12418
|
+
device.isLockWifiT85P0()) {
|
|
12405
12419
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockSchedule, value);
|
|
12406
12420
|
}
|
|
12407
12421
|
else {
|
|
@@ -12456,7 +12470,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12456
12470
|
device.isLockWifiT8510P() ||
|
|
12457
12471
|
device.isLockWifiT8520P() ||
|
|
12458
12472
|
device.isLockWifiT85L0() ||
|
|
12459
|
-
device.isLockWifiT85V0()
|
|
12473
|
+
device.isLockWifiT85V0() ||
|
|
12474
|
+
device.isLockWifiT85P0()) {
|
|
12460
12475
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockScheduleStartTime, value);
|
|
12461
12476
|
}
|
|
12462
12477
|
else {
|
|
@@ -12511,7 +12526,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12511
12526
|
device.isLockWifiT8510P() ||
|
|
12512
12527
|
device.isLockWifiT8520P() ||
|
|
12513
12528
|
device.isLockWifiT85L0() ||
|
|
12514
|
-
device.isLockWifiT85V0()
|
|
12529
|
+
device.isLockWifiT85V0() ||
|
|
12530
|
+
device.isLockWifiT85P0()) {
|
|
12515
12531
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockScheduleEndTime, value);
|
|
12516
12532
|
}
|
|
12517
12533
|
else {
|
|
@@ -12566,7 +12582,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12566
12582
|
device.isLockWifiT8510P() ||
|
|
12567
12583
|
device.isLockWifiT8520P() ||
|
|
12568
12584
|
device.isLockWifiT85L0() ||
|
|
12569
|
-
device.isLockWifiT85V0()
|
|
12585
|
+
device.isLockWifiT85V0() ||
|
|
12586
|
+
device.isLockWifiT85P0()) {
|
|
12570
12587
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceAutoLockTimer, value);
|
|
12571
12588
|
}
|
|
12572
12589
|
else {
|
|
@@ -12621,7 +12638,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12621
12638
|
device.isLockWifiT8510P() ||
|
|
12622
12639
|
device.isLockWifiT8520P() ||
|
|
12623
12640
|
device.isLockWifiT85L0() ||
|
|
12624
|
-
device.isLockWifiT85V0()
|
|
12641
|
+
device.isLockWifiT85V0() ||
|
|
12642
|
+
device.isLockWifiT85P0()) {
|
|
12625
12643
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceOneTouchLocking, value);
|
|
12626
12644
|
}
|
|
12627
12645
|
else {
|
|
@@ -12676,7 +12694,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12676
12694
|
device.isLockWifiT8510P() ||
|
|
12677
12695
|
device.isLockWifiT8520P() ||
|
|
12678
12696
|
device.isLockWifiT85L0() ||
|
|
12679
|
-
device.isLockWifiT85V0()
|
|
12697
|
+
device.isLockWifiT85V0() ||
|
|
12698
|
+
device.isLockWifiT85P0()) {
|
|
12680
12699
|
this.setSmartLockParams(device, types_1.PropertyName.DeviceSound, value);
|
|
12681
12700
|
}
|
|
12682
12701
|
else {
|
|
@@ -12741,6 +12760,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12741
12760
|
device.isLockWifiT8520P() ||
|
|
12742
12761
|
device.isLockWifiR10() ||
|
|
12743
12762
|
device.isLockWifiT85L0() ||
|
|
12763
|
+
device.isLockWifiT85P0() ||
|
|
12744
12764
|
device.isLockWifiR20()) {
|
|
12745
12765
|
let oldvalue = 0;
|
|
12746
12766
|
const rawproperty = device.getRawProperty(types_2.CommandType.CMD_DOORLOCK_SET_PUSH_MODE);
|
|
@@ -12820,6 +12840,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12820
12840
|
device.isLockWifiT8520P() ||
|
|
12821
12841
|
device.isLockWifiR10() ||
|
|
12822
12842
|
device.isLockWifiT85L0() ||
|
|
12843
|
+
device.isLockWifiT85P0() ||
|
|
12823
12844
|
device.isLockWifiR20()) {
|
|
12824
12845
|
let oldvalue = 0;
|
|
12825
12846
|
const rawproperty = device.getRawProperty(types_2.CommandType.CMD_DOORLOCK_SET_PUSH_MODE);
|
|
@@ -12899,6 +12920,7 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
12899
12920
|
device.isLockWifiT8520P() ||
|
|
12900
12921
|
device.isLockWifiR10() ||
|
|
12901
12922
|
device.isLockWifiT85L0() ||
|
|
12923
|
+
device.isLockWifiT85P0() ||
|
|
12902
12924
|
device.isLockWifiR20()) {
|
|
12903
12925
|
let oldvalue = 0;
|
|
12904
12926
|
const rawproperty = device.getRawProperty(types_2.CommandType.CMD_DOORLOCK_SET_PUSH_MODE);
|
|
@@ -13056,7 +13078,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
13056
13078
|
device.isLockWifiT8510P() ||
|
|
13057
13079
|
device.isLockWifiT8520P() ||
|
|
13058
13080
|
device.isLockWifiT85L0() ||
|
|
13059
|
-
device.isLockWifiT85V0()
|
|
13081
|
+
device.isLockWifiT85V0() ||
|
|
13082
|
+
device.isLockWifiT85P0()) {
|
|
13060
13083
|
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));
|
|
13061
13084
|
logging_1.rootHTTPLogger.debug("Station get user list - payload", {
|
|
13062
13085
|
station: this.getSerial(),
|
|
@@ -15480,7 +15503,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
15480
15503
|
device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial()) ||
|
|
15481
15504
|
device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial()) ||
|
|
15482
15505
|
device_1.Device.isLockWifiT85V0(this.getDeviceType()) ||
|
|
15483
|
-
device_1.Device.isLockWifiT85L0(this.getDeviceType())
|
|
15506
|
+
device_1.Device.isLockWifiT85L0(this.getDeviceType()) ||
|
|
15507
|
+
device_1.Device.isLockWifiT85P0(this.getDeviceType())) {
|
|
15484
15508
|
logging_1.rootHTTPLogger.debug(`Station smart lock send get lock parameters command`, { stationSN: this.getSerial() });
|
|
15485
15509
|
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));
|
|
15486
15510
|
this.p2pSession.sendCommandWithStringPayload(command.payload);
|
|
@@ -15498,7 +15522,8 @@ class Station extends tiny_typed_emitter_1.TypedEmitter {
|
|
|
15498
15522
|
device_1.Device.isLockWifiT8510P(this.getDeviceType(), this.getSerial()) ||
|
|
15499
15523
|
device_1.Device.isLockWifiT8520P(this.getDeviceType(), this.getSerial()) ||
|
|
15500
15524
|
device_1.Device.isLockWifiT85V0(this.getDeviceType()) ||
|
|
15501
|
-
device_1.Device.isLockWifiT85L0(this.getDeviceType())
|
|
15525
|
+
device_1.Device.isLockWifiT85L0(this.getDeviceType()) ||
|
|
15526
|
+
device_1.Device.isLockWifiT85P0(this.getDeviceType())) {
|
|
15502
15527
|
logging_1.rootHTTPLogger.debug(`Station smart lock send get lock status command`, { stationSN: this.getSerial() });
|
|
15503
15528
|
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));
|
|
15504
15529
|
this.p2pSession.sendCommandWithStringPayload(command.payload);
|