TuyaSmartAutoActivator Class Reference

Inherits from NSObject
Declared in TuyaSmartAutoActivator.h

  delegate

delegate

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

Discussion

delegate

Declared In

TuyaSmartAutoActivator.h

+ sharedInstance

Single 单例

+ (instancetype)sharedInstance

Return Value

instance

Discussion

Single 单例

Declared In

TuyaSmartAutoActivator.h

– autoActiveSupportedDeviceListWithHomeId:

Get a list of all devices that support auto atvice in the current home 获取当前家庭下所有支持免密配网的设备列表

- (NSArray<TuyaSmartDeviceModel*> *)autoActiveSupportedDeviceListWithHomeId:(long long)homeId

Parameters

homeId

HomeId

Return Value

当前家庭所有支持免密配网的设备列表

Discussion

Get a list of all devices that support auto atvice in the current home 获取当前家庭下所有支持免密配网的设备列表

Declared In

TuyaSmartAutoActivator.h

– autoActiveRouterDeviceListWithHomeId:

Get a list of all devices that support route atvice in the current home 获取当前家庭下所有网关路由器设备列表

- (NSArray<TuyaSmartDeviceModel*> *)autoActiveRouterDeviceListWithHomeId:(long long)homeId

Parameters

homeId

当前家庭的id

Return Value

当前家庭所有网关路由器设备列表

Discussion

Get a list of all devices that support route atvice in the current home 获取当前家庭下所有网关路由器设备列表

Declared In

TuyaSmartAutoActivator.h

– startDiscoverWithDevIds:timeout:success:failure:

start discover device 开始发现设备

- (void)startDiscoverWithDevIds:(NSArray<NSString*> *)devIds timeout:(NSTimeInterval)timeout success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

devIds

Device Id list

timeout

Timeout, default 100 seconds

success

Success block

failure

Failure block

Discussion

start discover device 开始发现设备

Declared In

TuyaSmartAutoActivator.h

– getTokenSuccess:failure:

To obtain token (valid for 10 minutes) 获取配网Token(有效期10分钟)

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

Parameters

success

Success block

failure

Failure block

Discussion

To obtain token (valid for 10 minutes) 获取配网Token(有效期10分钟)

Declared In

TuyaSmartAutoActivator.h

– startDiscoverWithDevIds:token:timeout:success:failure:

start discover device 开始发现设备

- (void)startDiscoverWithDevIds:(NSArray<NSString*> *)devIds token:(NSString *)token timeout:(NSTimeInterval)timeout success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

devIds

Device Id list

token

Config Token

timeout

Timeout, default 100 seconds

success

Success block

failure

Failure block

Discussion

start discover device 开始发现设备

Declared In

TuyaSmartAutoActivator.h

– startDiscoverRouterWithDevIds:type:timeout:success:failure:

start discover gateway route 开始发现网关路由器

- (void)startDiscoverRouterWithDevIds:(NSArray<NSString*> *)devIds type:(NSInteger)type timeout:(NSTimeInterval)timeout success:(TYSuccessHandler)success failure:(TYFailureError)failure

Parameters

devIds

Device Id list

type

Type, 0 to start discover device

timeout

Timeout, default 100 seconds

success

Success block

failure

Failure block

Discussion

start discover gateway route 开始发现网关路由器

Declared In

TuyaSmartAutoActivator.h

– stopDiscover

stop discover 停止发现设备

- (void)stopDiscover

Discussion

stop discover 停止发现设备

Declared In

TuyaSmartAutoActivator.h

– bindDeviceWithHomeId:devIds:success:failure:

Binding device to the home 将设备绑定家庭

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

Parameters

homeId

HomeId

devIds

Deivce Id list

success

Success block

failure

Failure block

Discussion

Binding device to the home 将设备绑定家庭

Declared In

TuyaSmartAutoActivator.h