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

#import <ThingGroupServiceProtocol.h>

Inheritance diagram for <ThingGroupServiceProtocol>:
ThingBLEMeshGroupService ThingBLEMeshGroupService ThingBLEMeshRemoteControlService ThingBLEMeshRemoteControlService ThingGroupBaseService ThingGroupBaseService ThingGroupBeaconService ThingGroupBeaconService ThingSIGMeshGroupService ThingSIGMeshGroupService ThingSIGMeshRemoteControlNewService ThingSIGMeshRemoteControlNewService ThingSIGMeshRemoteControlService ThingSIGMeshRemoteControlService ThingStandardWiFiGroupService ThingStandardWiFiGroupService ThingStandardZigbeeGroupService ThingStandardZigbeeGroupService ThingThreadGroupService ThingThreadGroupService ThingWiFiGroupService ThingWiFiGroupService ThingZigbeeGroupService ThingZigbeeGroupService ThingZigbeeRemoteControlGroupService ThingZigbeeRemoteControlGroupService

Instance Methods

(instancetype) - initWithDevId:
 
(instancetype) - initWithGroupId:
 
(void) - setCurrentSpaceDeviceList:
 设置当前家庭的设备列表 适用于私有Mesh群组、普通SIGMesh群组、Beacon群组 More...
 
(instancetype) - initWithDevId:localId:categoryCode:codes:
 
(instancetype) - initWithDevId:localId:pccs:
 
(instancetype) - initWithDevId:localId:categoryCode:filterType:pccs:codes:
 
(void) - fetchDeviceListWithSuccess:failure:
 
(void) - createGroupWithName:deviceList:process:success:failure:
 
(void) - updateGroupWithDeviceList:process:success:failure:
 
(void) - removeGroupWithGroupId:success:failure:
 
(instancetype) - initWithDevId:
 
(instancetype) - initWithGroupId:
 
(void) - setCurrentSpaceDeviceList:
 设置当前家庭的设备列表 适用于私有Mesh群组、普通SIGMesh群组、Beacon群组 More...
 
(instancetype) - initWithDevId:localId:categoryCode:codes:
 
(instancetype) - initWithDevId:localId:pccs:
 
(instancetype) - initWithDevId:localId:categoryCode:filterType:pccs:codes:
 
(void) - fetchDeviceListWithSuccess:failure:
 
(void) - createGroupWithName:deviceList:process:success:failure:
 
(void) - updateGroupWithDeviceList:process:success:failure:
 
(void) - removeGroupWithGroupId:success:failure:
 

Detailed Description

Definition at line 15 of file ThingGroupServiceProtocol.h.

Method Documentation

◆ createGroupWithName:deviceList:process:success:failure: [1/2]

- (void) createGroupWithName: (NSString *)  name
deviceList: (NSArray< NSString * > *)  deviceList
process: (ThingGroupProcess process
success: (ThingGroupSuccess result
failure: (ThingGroupResultFailure failure 
optional

创建群组–将设备加入群组 遥控器群组不需要此步骤

Parameters
name群组名字
deviceList待添加设备列表
process进度信息 {"total":5,"current":1}
result成功回调 {"groupId":"xxx"}
failure失败回调 {"groupId":"xxxx","failureList":[{"devId":"xxx","errorCode":1},{"devId":"xxx","errorCode":1}],"error":{"errorCode":1,"errorMsg":"xxx"}} 优先解析error信息,error不存在时解析failureList,failureList为失败设备列表

◆ createGroupWithName:deviceList:process:success:failure: [2/2]

- (void) createGroupWithName: (NSString *)  name
deviceList: (NSArray< NSString * > *)  deviceList
process: (ThingGroupProcess process
success: (ThingGroupSuccess result
failure: (ThingGroupResultFailure failure 
optional

创建群组–将设备加入群组 遥控器群组不需要此步骤

Parameters
name群组名字
deviceList待添加设备列表
process进度信息 {"total":5,"current":1}
result成功回调 {"groupId":"xxx"}
failure失败回调 {"groupId":"xxxx","failureList":[{"devId":"xxx","errorCode":1},{"devId":"xxx","errorCode":1}],"error":{"errorCode":1,"errorMsg":"xxx"}} 优先解析error信息,error不存在时解析failureList,failureList为失败设备列表

◆ fetchDeviceListWithSuccess:failure: [1/2]

- (void) fetchDeviceListWithSuccess: (ThingGroupDevListResult result
failure: (void(^)(NSError *error))  failure 
optional

获取群组下符合条件的设备列表

Parameters
result设备列表
failurefailure

◆ fetchDeviceListWithSuccess:failure: [2/2]

- (void) fetchDeviceListWithSuccess: (ThingGroupDevListResult result
failure: (void(^)(NSError *error))  failure 
optional

获取群组下符合条件的设备列表

Parameters
result设备列表
failurefailure

◆ initWithDevId: [1/2]

- (instancetype) initWithDevId: (NSString *)  devId
optional

根据devId初始化群组实例–创建群组

Parameters
devIddevId

◆ initWithDevId: [2/2]

- (instancetype) initWithDevId: (NSString *)  devId
optional

根据devId初始化群组实例–创建群组

Parameters
devIddevId

◆ initWithDevId:localId:categoryCode:codes: [1/2]

- (instancetype) initWithDevId: (NSString *)  devId
localId: (NSString *)  localId
categoryCode: (NSString *)  categoryCode
codes: (NSArray *)  codes 
optional

初始化Zigbee遥控器实例

Parameters
devId遥控器devId
localIdlocalId
categoryCodecategoryCode非三级品类编码,云端用于判断处理遥控器群组 zigbee遥控器有单分组和8分组的区别,单分组为8001,8分组为3001-3008
codes二级品类code

◆ initWithDevId:localId:categoryCode:codes: [2/2]

- (instancetype) initWithDevId: (NSString *)  devId
localId: (NSString *)  localId
categoryCode: (NSString *)  categoryCode
codes: (NSArray *)  codes 
optional

初始化Zigbee遥控器实例

Parameters
devId遥控器devId
localIdlocalId
categoryCodecategoryCode非三级品类编码,云端用于判断处理遥控器群组 zigbee遥控器有单分组和8分组的区别,单分组为8001,8分组为3001-3008
codes二级品类code

◆ initWithDevId:localId:categoryCode:filterType:pccs:codes: [1/2]

- (instancetype) initWithDevId: (NSString *)  devId
localId: (NSString *)  localId
categoryCode: (nullable NSString *)  categoryCode
filterType: (nullable NSString *)  filterType
pccs: (NSArray *)  pccs
codes: (nullable NSArray *)  codes 
optional

初始化遥控器实例— 新版本 SIGMesh遥控器

Parameters
devId遥控器devId
localIdlocalId
categoryCode并非三级品类,与localId匹配范围为7001-7008;localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
filterType类型 ,0:pccs 、1:codes,旧面板无此字段,作为新旧面板区分标志,旧面板走之前本地逻辑,新面板走云端
pccsmesh category
codes二级品类code

◆ initWithDevId:localId:categoryCode:filterType:pccs:codes: [2/2]

- (instancetype) initWithDevId: (NSString *)  devId
localId: (NSString *)  localId
categoryCode: (nullable NSString *)  categoryCode
filterType: (nullable NSString *)  filterType
pccs: (NSArray *)  pccs
codes: (nullable NSArray *)  codes 
optional

初始化遥控器实例— 新版本 SIGMesh遥控器

Parameters
devId遥控器devId
localIdlocalId
categoryCode并非三级品类,与localId匹配范围为7001-7008;localId 为云端分配,步长为8,因此一个遥控器内部最多支持关联8个群组,localid为初始值依次+1,与之匹配的categoryCode从7001依次+1.
filterType类型 ,0:pccs 、1:codes,旧面板无此字段,作为新旧面板区分标志,旧面板走之前本地逻辑,新面板走云端
pccsmesh category
codes二级品类code

◆ initWithDevId:localId:pccs: [1/2]

- (instancetype) initWithDevId: (NSString *)  devId
localId: (NSString *)  localId
pccs: (NSArray *)  pccs 
optional

初始化遥控器实例– 旧版本 SIGMesh遥控器

Parameters
devId遥控器devId
localIdlocalId
pccspcc过滤条件

◆ initWithDevId:localId:pccs: [2/2]

- (instancetype) initWithDevId: (NSString *)  devId
localId: (NSString *)  localId
pccs: (NSArray *)  pccs 
optional

初始化遥控器实例– 旧版本 SIGMesh遥控器

Parameters
devId遥控器devId
localIdlocalId
pccspcc过滤条件

◆ initWithGroupId: [1/2]

- (instancetype) initWithGroupId: (NSString *)  groupId
optional

根据groupId初始化群组实例–编辑群组

Parameters
groupIdgroupId

◆ initWithGroupId: [2/2]

- (instancetype) initWithGroupId: (NSString *)  groupId
optional

根据groupId初始化群组实例–编辑群组

Parameters
groupIdgroupId

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

- (void) removeGroupWithGroupId: (NSString *)  groupId
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 
optional

删除群组(支持正常群组和分享的群组移除) — 遥控器群组不支持

Parameters
groupId群组id
success成功回调
failure失败回调

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

- (void) removeGroupWithGroupId: (NSString *)  groupId
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 
optional

删除群组(支持正常群组和分享的群组移除) — 遥控器群组不支持

Parameters
groupId群组id
success成功回调
failure失败回调

◆ setCurrentSpaceDeviceList: [1/2]

- (void) setCurrentSpaceDeviceList: (NSArray< ThingSmartDeviceModel * > *)  deviceList
optional

设置当前家庭的设备列表 适用于私有Mesh群组、普通SIGMesh群组、Beacon群组

◆ setCurrentSpaceDeviceList: [2/2]

- (void) setCurrentSpaceDeviceList: (NSArray< ThingSmartDeviceModel * > *)  deviceList
optional

设置当前家庭的设备列表 适用于私有Mesh群组、普通SIGMesh群组、Beacon群组

◆ updateGroupWithDeviceList:process:success:failure: [1/2]

- (void) updateGroupWithDeviceList: (NSArray< NSString * > *)  deviceList
process: (ThingGroupProcess process
success: (ThingGroupSuccess result
failure: (ThingGroupResultFailure failure 
optional

更新群组

Parameters
deviceList选中的设备列表
process进度信息 {"total":5,"current":1}
result成功回调 {"groupId":"xxx"}
failure失败回调 {"groupId":"xxxx","failureList":[{"devId":"xxx","errorCode":1},{"devId":"xxx","errorCode":1}],"error":{"errorCode":1,"errorMsg":"xxx"}} 优先解析error信息,error不存在时解析failureList,failureList为失败设备列表

◆ updateGroupWithDeviceList:process:success:failure: [2/2]

- (void) updateGroupWithDeviceList: (NSArray< NSString * > *)  deviceList
process: (ThingGroupProcess process
success: (ThingGroupSuccess result
failure: (ThingGroupResultFailure failure 
optional

更新群组

Parameters
deviceList选中的设备列表
process进度信息 {"total":5,"current":1}
result成功回调 {"groupId":"xxx"}
failure失败回调 {"groupId":"xxxx","failureList":[{"devId":"xxx","errorCode":1},{"devId":"xxx","errorCode":1}],"error":{"errorCode":1,"errorMsg":"xxx"}} 优先解析error信息,error不存在时解析failureList,failureList为失败设备列表

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