Lock Interfaces

1.Judging whether Bluetooth is available
2.Request to turn on Bluetooth
3.Init the Bluetooth configuration
4.Stop the service to release Bluetooth resource
5.Start scan BT lock
6.Stop the scan
7.Init the lock
8.Reset the ekey

Reset the ekey, and the lockFlagPos will change.

9.Reset the lock

The lock will be reset to factory mode and if you want to use it,you should do initLock.

10.Lock or unlock (ControlAction.LOCK and ControlAction.UNLOCK)
11.Get Audio Switch State.
12.Set lock mute mode

true – on, false – off

13.Set remote unlock switch state

true – on, false – off

This setting will change the lock feature value, you need to call Update lock data API to synchronize the cloud data with the new lockdata returned

14.Get remote unlock switch state

true – on, false – off

15.Set the lock time
16.Get the lock time
17.Get the lock log

LogType.NEW - only the new added operation record from last time you get log.

LogType. ALL - all the operation record from lock is initialized.

18.Get lock battery
19.Set Automatic locking period
20.Create custom passcode(Passcode range : 6 - 9 Digits in length)
21.Modify passcode

If newPasscode is null or "" means you do not want to change original passcode.

startDate and endDate values are both 0 means you do not want to change expired date,or both values should not be 0.

22.Delete passcode
23.Reset passcode(all passcodes will be invalid)
24.Get all valid passcodes in lock
25.Modify admin passcode
26.Add IC Card

startDate and endDate set 0 means the card will be valid for ever.

onEnterAddMode:the lock is ready to add a card.

27.Modify IC Card Period
28.Get all valid IC Cards
29.Delete IC Card
30.Clear ic cards
31.Add Fingerprint

startDate and endDate set 0 means the fingerprint will be valid for ever.

onEnterAddMode:the lock is ready to add a fingerprint.

totalCount: lock collect your fingerprint needed.

currentCount : current count the lock is collecting.

32.Get all valid fingerprints
33.Delete fingerprint
34.Clear all fingerprints
35.Modify fingerprint period
36.Get passage mode
37.Set passage mode

PassageModeType.Weekly effective value from 1 to 7,1 means Monday 2 means Tuesday ,...,7 means Sunday, 0 means everydays

38.Delete passage mode
39.Clear passage mode
40. Wifi lock scan nearby wifi

Currently, only support 2.4G wifi, 5 G don't support.

41. Wifi lock config wifi
42. Wifi lock config server

The server and port of the wifi lock

serverAddress = "wifilock.ttlock.com";

portNumber = 4999;

43. Get the wifi info the wifi lock
44. Wifi lock config ip

Need support below feature.

Para info:

45. Lock config

Type info:

46. Set sound volume

para info

47. Get sound volume
48. Add remote control
49. Modify remote control
50. Delete remote control
51. Clear remote control
52. Add door sensor
53. Delete door sensor
54. Get Wifi MAC of gateway(Only can use when lock is connected gateway)
55. Configure hotel data

hotelData: hotelData.setHotelInfo(hotelInfo); gain hotelinfo from cloud API hotelData.setBuildingNumber(buildingNumber); BuildingNo hotelData.setFloorNumber(floorNumber); FloorNo

56. Set lock sector

sectorStr (start counting from 1, Data format "1,2,3" means write sector 1, 2, 3)

57. Configure lift control wrok mode

ttLiftWorkMode: ActivateAllFloors (Allow control all floors after use card) ActivateSpecificFloor (Allow control floors that same as card data)

58. Set the floors associated with the lift control

controlableFloors (Data format "1,2,3" means the associated floor is 1、2、3)

59. Set the floors that lift control can be arrived

activateFloors (List of floors that can be arrived) currentDate (System current time)

60. Obtain accessory battery level

para info:

61. Add face
62. Modify face period
63. Delete face
64. Clear face
65. Add face feature data

featureData; Human face feature data

66. Gain all valid face in the lock
67. Add palm vein
68. Modify palm vein period
69. Delete palm vein
70. Claer plam vein
71. Gain all valid palm vein in the lock
72. Modify the sensitivity of recognizing face, palm vein and QR code.
73. Gain the sensitivity of recognizing face, palm vein and QR code.
74. Door unclosed alarm time setting

time (Door unclosed alarm time, unit of seconds)

75. Setting power saver work mode

PowerSaveWorkMode: ALL_CARDS (All cards can active the power saver) HOTEL_CARD (Only hotel card can active the power saver) ROOM_CARD (Only room card can active the power saver)

76.Set unauthorized attempt alert

77.Get unauthorized attempt alert config.