Tuya iOS Smart Life App SDK 5.15.0
<ThingBLEActiveProtocol> Protocol Reference

激活协议,老的方法目前因为降级的存在,暂时不能挪走,只能一并放在Core中 More...

#import <ThingBLEActiveProtocol.h>

Inheritance diagram for <ThingBLEActiveProtocol>:

Instance Methods

(void) - startActiveWithDevice:handlerDelegate:
 miniProgram pair id More...
 
(void) - startPreActiveWithDevice:success:failure:
 
(void) - pairWithToken:ssid:pwd:
 
(void) - pairWithTokenWithDevice:token:ssid:pwd:
 
(void) - startActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure:
 
(void) - multiActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure:
 
(void) - pairZigbeeSubDeviceWithBleChannel:success:failure:
 
(void) - publishGatewayInfoWithBleChannel:gatewayInfo:success:failure:
 
(void) - connectToDevice:success:failure:
 
(void) - activeBLEBackUp:token:success:failure:
 
(void) - activeDualDeviceWifiChannel:result:ssid:password:listenState:failure:
 
(void) - cleanReconnectDevice:
 清除重连设备数据 More...
 
(void) - stopActive
 结束配网 More...
 
(void) - cancelActive
 Cancel the ongoing activation process. More...
 
(void) - sendConfigWifiInfoWithSsid:passwd:token:
 
(void) - queryStateWithDevice:handlerDelegate:success:failure:
 
(void) - startActiveWithDevice:handlerDelegate:
 miniProgram pair id More...
 
(void) - startPreActiveWithDevice:success:failure:
 
(void) - pairWithToken:ssid:pwd:
 
(void) - pairWithTokenWithDevice:token:ssid:pwd:
 
(void) - startActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure:
 
(void) - multiActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure:
 
(void) - pairZigbeeSubDeviceWithBleChannel:success:failure:
 
(void) - publishGatewayInfoWithBleChannel:gatewayInfo:success:failure:
 
(void) - connectToDevice:success:failure:
 
(void) - activeBLEBackUp:token:success:failure:
 
(void) - activeDualDeviceWifiChannel:result:ssid:password:listenState:failure:
 
(void) - cleanReconnectDevice:
 清除重连设备数据 More...
 
(void) - stopActive
 结束配网 More...
 
(void) - cancelActive
 Cancel the ongoing activation process. More...
 
(void) - sendConfigWifiInfoWithSsid:passwd:token:
 
(void) - queryStateWithDevice:handlerDelegate:success:failure:
 

Properties

id< ThingBLEActiveDelegatedelegate
 
id< ThingSmartBLEActiveDelegatehandlerDelegate
 < 配网代理 More...
 
NSString * miniPairId
 

Detailed Description

激活协议,老的方法目前因为降级的存在,暂时不能挪走,只能一并放在Core中

Definition at line 51 of file ThingBLEActiveProtocol.h.

Method Documentation

◆ activeBLEBackUp:token:success:failure: [1/2]

- (void) activeBLEBackUp: (id< ThingBLEDeviceInfoProtocol >)  dev
token: (NSString *)  token
success: (nullable ThingSuccessID success
failure: (ThingFailureError failure 

兜底激活(PlugPlay)(Core)

Parameters
dev需要配网的设备
success成功回调
failure失败回调

◆ activeBLEBackUp:token:success:failure: [2/2]

- (void) activeBLEBackUp: (id< ThingBLEDeviceInfoProtocol >)  dev
token: (NSString *)  token
success: (nullable ThingSuccessID success
failure: (ThingFailureError failure 

兜底激活(PlugPlay)(Core)

Parameters
dev需要配网的设备
success成功回调
failure失败回调

◆ activeDualDeviceWifiChannel:result:ssid:password:listenState:failure: [1/2]

- (void) activeDualDeviceWifiChannel: (NSString *)  devId
result: (id)  result
ssid: (NSString *)  ssid
password: (NSString *)  password
listenState: (void(^)(void))  callback
failure: (ThingFailureError failure 

双模激活(PlugPlay)(Core)

Parameters
devId设备id
resultresult
ssid路由器热点名称
password路由器热点密码
callback状态回调
failure失败回调

◆ activeDualDeviceWifiChannel:result:ssid:password:listenState:failure: [2/2]

- (void) activeDualDeviceWifiChannel: (NSString *)  devId
result: (id)  result
ssid: (NSString *)  ssid
password: (NSString *)  password
listenState: (void(^)(void))  callback
failure: (ThingFailureError failure 

双模激活(PlugPlay)(Core)

Parameters
devId设备id
resultresult
ssid路由器热点名称
password路由器热点密码
callback状态回调
failure失败回调

◆ cancelActive [1/2]

- (void) cancelActive

Cancel the ongoing activation process.

◆ cancelActive [2/2]

- (void) cancelActive

Cancel the ongoing activation process.

◆ cleanReconnectDevice: [1/2]

- (void) cleanReconnectDevice: (NSString *)  uuid

清除重连设备数据

◆ cleanReconnectDevice: [2/2]

- (void) cleanReconnectDevice: (NSString *)  uuid

清除重连设备数据

◆ connectToDevice:success:failure: [1/2]

- (void) connectToDevice: (id< ThingBLEDeviceInfoProtocol >)  dev
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

连接设备(双模、PlugPlay)(Core)

Parameters
dev需要配网的设备
success成功回调
failure失败回调

◆ connectToDevice:success:failure: [2/2]

- (void) connectToDevice: (id< ThingBLEDeviceInfoProtocol >)  dev
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

连接设备(双模、PlugPlay)(Core)

Parameters
dev需要配网的设备
success成功回调
failure失败回调

◆ multiActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure: [1/2]

- (void) multiActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
ssid: (NSString *)  ssid
passwd: (NSString *)  passwd
token: (NSString *)  token
handlerDelegate: (id< ThingSmartBLEActiveDelegate >)  handlerDelegate
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

批量配网(Core)

Parameters
deviceInfo需要配网的设备
ssid路由器热点名称
passwd路由器热点密码
token配网Token
handlerDelegate用于获取部分补充信息的代理对象
success成功回调
failure失败回调

◆ multiActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure: [2/2]

- (void) multiActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
ssid: (NSString *)  ssid
passwd: (NSString *)  passwd
token: (NSString *)  token
handlerDelegate: (id< ThingSmartBLEActiveDelegate >)  handlerDelegate
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

批量配网(Core)

Parameters
deviceInfo需要配网的设备
ssid路由器热点名称
passwd路由器热点密码
token配网Token
handlerDelegate用于获取部分补充信息的代理对象
success成功回调
failure失败回调

◆ pairWithToken:ssid:pwd: [1/2]

- (void) pairWithToken: (NSString *)  token
ssid: (NSString *)  ssid
pwd: (NSString *)  pwd 

◆ pairWithToken:ssid:pwd: [2/2]

- (void) pairWithToken: (NSString *)  token
ssid: (NSString *)  ssid
pwd: (NSString *)  pwd 

◆ pairWithTokenWithDevice:token:ssid:pwd: [1/2]

- (void) pairWithTokenWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
token: (NSString *)  token
ssid: (NSString *)  ssid
pwd: (NSString *)  pwd 

◆ pairWithTokenWithDevice:token:ssid:pwd: [2/2]

- (void) pairWithTokenWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
token: (NSString *)  token
ssid: (NSString *)  ssid
pwd: (NSString *)  pwd 

◆ pairZigbeeSubDeviceWithBleChannel:success:failure: [1/2]

- (void) pairZigbeeSubDeviceWithBleChannel: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

Zigbee 双模子设备蓝牙配对(Core) (包括蓝牙连接、获取子设备信息、配对操作)

Parameters
deviceInfo需要配网的设备
success成功回调
failure失败回调

◆ pairZigbeeSubDeviceWithBleChannel:success:failure: [2/2]

- (void) pairZigbeeSubDeviceWithBleChannel: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

Zigbee 双模子设备蓝牙配对(Core) (包括蓝牙连接、获取子设备信息、配对操作)

Parameters
deviceInfo需要配网的设备
success成功回调
failure失败回调

◆ publishGatewayInfoWithBleChannel:gatewayInfo:success:failure: [1/2]

- (void) publishGatewayInfoWithBleChannel: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
gatewayInfo: (NSDictionary *)  gatewayInfo
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

下发网关信息给 Zigbee 双模子设备

Parameters
deviceInfo需要配网的设备
gatewayInfo网关信息
success成功回调
failure失败回调

◆ publishGatewayInfoWithBleChannel:gatewayInfo:success:failure: [2/2]

- (void) publishGatewayInfoWithBleChannel: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
gatewayInfo: (NSDictionary *)  gatewayInfo
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

下发网关信息给 Zigbee 双模子设备

Parameters
deviceInfo需要配网的设备
gatewayInfo网关信息
success成功回调
failure失败回调

◆ queryStateWithDevice:handlerDelegate:success:failure: [1/2]

- (void) queryStateWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
handlerDelegate: (id< ThingSmartBLEActiveDelegate >)  handlerDelegate
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

◆ queryStateWithDevice:handlerDelegate:success:failure: [2/2]

- (void) queryStateWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
handlerDelegate: (id< ThingSmartBLEActiveDelegate >)  handlerDelegate
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

◆ sendConfigWifiInfoWithSsid:passwd:token: [1/2]

- (void) sendConfigWifiInfoWithSsid: (NSString *)  ssid
passwd: (NSString *)  passwd
token: (NSString *)  token 

下发配网信息(ble+wifi双模配网)支持多次下发配网信息

Parameters
ssidThe ssid of router
passwdThe password of router
tokenThe token of config

◆ sendConfigWifiInfoWithSsid:passwd:token: [2/2]

- (void) sendConfigWifiInfoWithSsid: (NSString *)  ssid
passwd: (NSString *)  passwd
token: (NSString *)  token 

下发配网信息(ble+wifi双模配网)支持多次下发配网信息

Parameters
ssidThe ssid of router
passwdThe password of router
tokenThe token of config

◆ startActiveWithDevice:handlerDelegate: [1/2]

- (void) startActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
handlerDelegate: (nullable id< ThingSmartBLEActiveDelegate >)  handlerDelegate 

miniProgram pair id

开始配网(Core)

Parameters
deviceInfo需要配网的设备
handlerDelegate用于获取部分补充信息的代理对象

◆ startActiveWithDevice:handlerDelegate: [2/2]

- (void) startActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
handlerDelegate: (nullable id< ThingSmartBLEActiveDelegate >)  handlerDelegate 

miniProgram pair id

开始配网(Core)

Parameters
deviceInfo需要配网的设备
handlerDelegate用于获取部分补充信息的代理对象

◆ startActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure: [1/2]

- (void) startActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
ssid: (NSString *)  ssid
passwd: (NSString *)  passwd
token: (NSString *)  token
handlerDelegate: (id< ThingSmartBLEActiveDelegate >)  handlerDelegate
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

开始配网(Core)

Parameters
deviceInfo需要配网的设备
ssid路由器热点名称
passwd路由器热点密码
token配网Token
handlerDelegate用于获取部分补充信息的代理对象
success成功回调
failure失败回调

◆ startActiveWithDevice:ssid:passwd:token:handlerDelegate:success:failure: [2/2]

- (void) startActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
ssid: (NSString *)  ssid
passwd: (NSString *)  passwd
token: (NSString *)  token
handlerDelegate: (id< ThingSmartBLEActiveDelegate >)  handlerDelegate
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

开始配网(Core)

Parameters
deviceInfo需要配网的设备
ssid路由器热点名称
passwd路由器热点密码
token配网Token
handlerDelegate用于获取部分补充信息的代理对象
success成功回调
failure失败回调

◆ startPreActiveWithDevice:success:failure: [1/2]

- (void) startPreActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

双模配网预连接(Core)

Parameters
deviceInfo需要配网的设备

◆ startPreActiveWithDevice:success:failure: [2/2]

- (void) startPreActiveWithDevice: (id< ThingBLEDeviceInfoProtocol >)  deviceInfo
success: (nullable ThingSuccessID success
failure: (nullable ThingFailureError failure 

双模配网预连接(Core)

Parameters
deviceInfo需要配网的设备

◆ stopActive [1/2]

- (void) stopActive

结束配网

◆ stopActive [2/2]

- (void) stopActive

结束配网

Property Documentation

◆ delegate

- (id< ThingBLEActiveDelegate >) delegate
readwriteoptionalnonatomicweak

Definition at line 55 of file ThingBLEActiveProtocol.h.

◆ handlerDelegate

- (id<ThingSmartBLEActiveDelegate>) handlerDelegate
readwritenonatomicweak

< 配网代理

中间过程要外部补充数据的代理

Definition at line 56 of file ThingBLEActiveProtocol.h.

◆ miniPairId

- (NSString *) miniPairId
readwritenonatomiccopy

Definition at line 57 of file ThingBLEActiveProtocol.h.


The documentation for this protocol was generated from the following files: