Skip to content

遥控示例 ​

1. 开启遥控扫描

c
[TTWirelessKeyFob startScanWithBlock:^(TTWirelessKeyFobScanModel *model) {
    
}];

2. 将遥控信息与锁绑定

c
 [TTLock addWirelessKeyFobWithCyclicConfig:nil keyFobMac:model.keyFobMac startDate:startDate endDate:endDate lockData:self.lockData success:^{
      
    } failure:^(TTError errorCode, NSString *errorMsg) {


}];

3. 将锁信息写到遥控

c
[TTWirelessKeyFob newInitializeWithKeyFobMac:model.keyFobMac lockData:self.lockData block:^(TTKeyFobStatus status, int electricQuantity, TTSystemInfoModel *systemModel) {
        if (status == TTKeyFobSuccess) {
          
        } else {


          }
}];
4. 调用服务器端接口在云端将遥控与锁绑定 ​

Cloud API: https://cnapi.sciener.com/v3/remote/add