TuyaSmartRouterActivator Class Reference

Inherits from NSObject
Declared in TuyaSmartRouterActivator.h

  delegate

delegate

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

Discussion

delegate

Declared In

TuyaSmartRouterActivator.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

TuyaSmartRouterActivator.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

TuyaSmartRouterActivator.h

– startDiscoverRouterWithDevIds:type:timeout:success:failure:

start discover device with 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 device with gateway route 开始发现设备

Declared In

TuyaSmartRouterActivator.h

– startDiscoverRouterWithDevIds:token:type:timeout:success:failure:

start discover device with gateway route 开始发现设备

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

Parameters

devIds

Device Id list

token

Config Token

type

Type, 0 to start discover device

timeout

Timeout, default 100 seconds

success

Success block

failure

Failure block

Discussion

start discover device with gateway route 开始发现设备

Declared In

TuyaSmartRouterActivator.h

– stopDiscover

stop discover 停止发现设备

- (void)stopDiscover

Discussion

stop discover 停止发现设备

Declared In

TuyaSmartRouterActivator.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

TuyaSmartRouterActivator.h