Door sensor initialize
1. Scan remote control
c
[TTWirelessKeyFob startScanWithBlock:^(TTWirelessKeyFobScanModel *model) {
}];2. Binding remote control with lock
c
[TTLock addWirelessKeyFobWithCyclicConfig:nil keyFobMac:model.keyFobMac startDate:startDate endDate:endDate lockData:self.lockData success:^{
} failure:^(TTError errorCode, NSString *errorMsg) {
}];3. Add lock data into remote control
c
[TTWirelessKeyFob newInitializeWithKeyFobMac:model.keyFobMac lockData:self.lockData block:^(TTKeyFobStatus status, int electricQuantity, TTSystemInfoModel *systemModel) {
if (status == TTKeyFobSuccess) {
} else {
}
}];4. Request API to binding remote control with lock in the cloud server
Cloud API: https://cnapi.ttlock.com/v3/remote/add
