TuyaSmartHomeKitActivator Class Reference

Inherits from NSObject
Declared in TuyaSmartHomeKitActivator.h

+ sharedInstance

单例

+ (instancetype)sharedInstance

Discussion

单例

Declared In

TuyaSmartHomeKitActivator.h

  delegate

@property (nonatomic, weak) id<TuyaSmartHomeKitActivatorDelegate> delegate

– getTokenSuccess:failure:

获取HomeKit设备配网Token

- (void)getTokenSuccess:(TYSuccessString)success failure:(TYFailureError)failure

Parameters

success

成功回调,返回token

failure

失败回调

Discussion

获取HomeKit设备配网Token

Declared In

TuyaSmartHomeKitActivator.h

– startDiscoverHomeKitDeviceWithTimeout:token:success:failure:

搜索HomeKit设备

- (void)startDiscoverHomeKitDeviceWithTimeout:(NSTimeInterval)timeout token:(NSString *)token success:(void ( ^ ) ( TuyaSmartDeviceModel *))success failure:(TYFailureError)failure

Parameters

timeout

超时时间

token

配网token

success

成功回调

failure

失败回调

Discussion

搜索HomeKit设备

Declared In

TuyaSmartHomeKitActivator.h

– startDiscoverHomeKitDeviceWithTimeout:success:failure:

搜索HomeKit设备 HomeKit 配网

- (void)startDiscoverHomeKitDeviceWithTimeout:(NSTimeInterval)timeout success:(TYSuccessString)success failure:(TYFailureError)failure

Parameters

timeout

timeout

success

Success block

failure

Failure block

Discussion

搜索HomeKit设备 HomeKit 配网

Declared In

TuyaSmartHomeKitActivator.h

– bindHomeKitDeviceWithHomeId:devIds:success:failure:

将HomeKit设备绑定家庭

- (void)bindHomeKitDeviceWithHomeId:(long long)homeId devIds:(NSArray<NSString*> *)devIds success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

homeId

家庭的id

devIds

设备id的列表

success

成功回调

failure

失败回调

Discussion

将HomeKit设备绑定家庭

Declared In

TuyaSmartHomeKitActivator.h

– getHomekitDeviceInfoWithProductId:success:failure:

根据pid获取设备信息

- (void)getHomekitDeviceInfoWithProductId:(NSString *)productId success:(TYSuccessDict)success failure:(TYFailureError)failure

Parameters

productId

pid

success

成功回调

failure

失败回调

Discussion

根据pid获取设备信息

Declared In

TuyaSmartHomeKitActivator.h

– stopDiscover

停止发现设备

- (void)stopDiscover

Discussion

停止发现设备

Declared In

TuyaSmartHomeKitActivator.h