-
public interface IThingHome
Home Api.
-
-
Method Summary
Modifier and Type Method Description abstract void
getHomeDetail(IThingHomeResultCallback callback)
Obtain all data under the family, including equipment, groups, rooms, etc. abstract void
getHomeLocalCache(IThingHomeResultCallback callback)
Obtain all offline data under the family, including equipment, groups, rooms, etc. abstract HomeBean
getHomeLocalCacheSync()
synchronous version of getHomeLocalCache abstract void
updateHome(String name, double lon, double lat, String geoName, IResultCallback callback)
Update Family Information. abstract void
updateHome(String name, double lon, double lat, String geoName, List<String> rooms, boolean overWriteRoom, IResultCallback callback)
Update Family Information. abstract void
dismissHome(IResultCallback callback)
Disband Family. abstract void
sortHome(List<Long> idList, IResultCallback callback)
Sort Family. abstract void
addRoom(String name, IThingRoomResultCallback callback)
Add Room. abstract void
removeRoom(long roomId, IResultCallback callback)
Remove Room. abstract void
sortRoom(List<Long> idList, IResultCallback callback)
Sort Rooms. abstract void
queryRoomList(IThingGetRoomListCallback callback)
Query room list. abstract HomeBean
getHomeBean()
Get HomeBean. abstract void
createGroup(String productId, String name, List<String> devIdList, IThingResultCallback<Long> callback)
Create a group. abstract void
createCommonGroup(GroupCreateBuilder builder, IThingResultCallback<Long> callback)
普通群组创建 abstract List<RoomBean>
queryRoomInfoByDevice(List<DeviceBean> deviceList)
Search room information according to the device list. abstract void
registerHomeStatusListener(IThingHomeStatusListener listener)
Register a listener for information changes within a family. abstract void
unRegisterHomeStatusListener(IThingHomeStatusListener listener)
Unregister a listener for information changes within a family. abstract void
registerHomeDeviceStatusListener(IThingHomeDeviceStatusListener listener)
Register a listener for device information changes in your home. abstract void
unRegisterHomeDeviceStatusListener(IThingHomeDeviceStatusListener listener)
Unregister a listener for device information changes in your home. abstract void
registerHomeDeviceRoomInfoListener(IThingHomeRoomInfoChangeListener listener)
Register a listener for device room information changes in your home. abstract void
unRegisterHomeDeviceRoomInfoListener(IThingHomeRoomInfoChangeListener listener)
Unregister a listener for device room information changes in your home. abstract void
createBlueMesh(String meshName, IThingResultCallback<BlueMeshBean> callback)
Generate a virtual mesh gateway device in the current home. abstract void
createSigMesh(IThingResultCallback<SigMeshBean> callback)
Generate a virtual sigmesh gateway device in the current home. abstract void
queryDeviceListToAddGroup(long groupId, String productId, IThingResultCallback<List<GroupDeviceBean>> callback)
Obtain the device list of product. abstract void
queryZigbeeDeviceListToAddGroup(long groupId, String productId, String parentId, IThingResultCallback<List<GroupDeviceBean>> callback)
Obtain the device list of product. abstract void
onDestroy()
On destroy. abstract void
createZigbeeGroup(String productId, String parentId, int parentType, String name, IThingResultCallback<CloudZigbeeGroupCreateBean> callback)
Creating a Group. abstract void
createZigbeeGroup(String productId, String parentId, String name, IThingResultCallback<CloudZigbeeGroupCreateBean> callback)
Creating a Group. abstract List<RoomBean>
queryRoomInfoByGroup(List<GroupBean> groupList)
Search for a list of rooms based on the group list. abstract void
bindNewConfigDevs(List<String> devIds, IResultCallback callback)
Bind the activated device (which performs the unbound home distribution method) to the home. abstract void
registerProductWarnListener(IWarningMsgListener listener)
Register product alarm listener. abstract void
unRegisterProductWarnListener(IWarningMsgListener listener)
Deregister product alarm listener. abstract void
sortDevInHome(String homeId, List<DeviceAndGroupInHomeBean> list, IResultCallback callback)
Sorting groups or devices in the home. abstract void
unSubscribeTopics(List<String> devIdList)
Cancel subscription information for home and home devices. abstract void
registerUpgradeStatusListener(IThingDeviceUpgradeStatusCallback callback)
Register device upgrade status listener. abstract void
getHomeWeatherDetail(int limit, Map<String, Object> unit, IGetHomeWetherCallBack callback)
Get detailed weather data in the home. abstract void
getHomeWeatherSketch(double lon, double lat, IIGetHomeWetherSketchCallBack callback)
Get brief weather parameters for your city. abstract void
registerHomeRelationUpdateListener(IThingHomeRelationUpdateListener listener)
abstract void
unRegisterHomeRelationUpdateListener(IThingHomeRelationUpdateListener listener)
abstract void
organizeRelation(IThingHomeRelationUpdateListener listener)
abstract void
createThreadGroup(String productId, String name, List<String> devIdList, String parentId, IThingResultCallback<GroupRespBean> callback)
Create thread common group . abstract void
queryThreadGroupDeviceList(long groupId, String productId, String parentId, IThingResultCallback<List<GroupDeviceBean>> callback)
Obtain the device list of product. abstract void
queryHidedDeviceGroupList(IThingResultCallback<ArrayList<DeviceAndGroupInHomeBean>> callback)
get the list of device and group with hide tag . abstract void
hideDeviceGroup(List<DeviceAndGroupInHomeBean> devIds, IThingResultCallback<Boolean> callback)
add hide tag on Device and Group . abstract void
showDeviceGroup(List<DeviceAndGroupInHomeBean> devIds, IThingResultCallback<Boolean> callback)
delete hide tag of Device and Group . abstract void
queryRoomDevSceneList(long roomId, IThingResultCallback<RoomInfoBean> callback)
delete hide tag of Device and Group . -
-
Method Detail
-
getHomeDetail
abstract void getHomeDetail(IThingHomeResultCallback callback)
Obtain all data under the family, including equipment, groups, rooms, etc.
- Parameters:
callback
- IThingHomeResultCallback IThingHomeResultCallback
-
getHomeLocalCache
abstract void getHomeLocalCache(IThingHomeResultCallback callback)
Obtain all offline data under the family, including equipment, groups, rooms, etc.
- Parameters:
callback
- IThingHomeResultCallback IThingHomeResultCallback
-
getHomeLocalCacheSync
abstract HomeBean getHomeLocalCacheSync()
synchronous version of getHomeLocalCache
-
updateHome
abstract void updateHome(String name, double lon, double lat, String geoName, IResultCallback callback)
Update Family Information.
- Parameters:
name
- Family name (Support up to 25 characters)lon
- Longitude of current familylat
- Latitude of the current familygeoName
- Address of geographical locationcallback
- IResultCallback IResultCallback
-
updateHome
abstract void updateHome(String name, double lon, double lat, String geoName, List<String> rooms, boolean overWriteRoom, IResultCallback callback)
Update Family Information.
- Parameters:
name
- Family name (Support up to 25 characters)lon
- Longitude of current familylat
- Latitude of the current familygeoName
- Address of geographical locationrooms
- Room informationoverWriteRoom
- overWriteRoom flag.callback
- IResultCallback IResultCallback
-
dismissHome
abstract void dismissHome(IResultCallback callback)
Disband Family.
- Parameters:
callback
- IResultCallback IResultCallback
-
sortHome
abstract void sortHome(List<Long> idList, IResultCallback callback)
Sort Family.
- Parameters:
idList
- homeId listcallback
- IResultCallback IResultCallback
-
addRoom
abstract void addRoom(String name, IThingRoomResultCallback callback)
Add Room.
- Parameters:
name
- Room namecallback
- IThingRoomResultCallback IThingRoomResultCallback
-
removeRoom
abstract void removeRoom(long roomId, IResultCallback callback)
Remove Room.
- Parameters:
roomId
- The room id which needs to be removed.callback
- IResultCallback IResultCallback
-
sortRoom
abstract void sortRoom(List<Long> idList, IResultCallback callback)
Sort Rooms.
- Parameters:
idList
- The List of room ids to be sorted.callback
- IResultCallback IResultCallback
-
queryRoomList
abstract void queryRoomList(IThingGetRoomListCallback callback)
Query room list.
- Parameters:
callback
- IThingGetRoomListCallback IThingGetRoomListCallback
-
getHomeBean
abstract HomeBean getHomeBean()
Get HomeBean.if you only need to get family role or related,it is NOT recommended using getHomeBean or getHomeBean.
USE following methods instead
-
createGroup
abstract void createGroup(String productId, String name, List<String> devIdList, IThingResultCallback<Long> callback)
Create a group.
- Parameters:
productId
- The id of Product.name
- The name of Product.devIdList
- The list of device ids that need to be created into groups.callback
- IThingResultCallback IThingResultCallback
-
createCommonGroup
abstract void createCommonGroup(GroupCreateBuilder builder, IThingResultCallback<Long> callback)
普通群组创建
-
queryRoomInfoByDevice
abstract List<RoomBean> queryRoomInfoByDevice(List<DeviceBean> deviceList)
Search room information according to the device list.
- Parameters:
deviceList
- The List of devices that need to query room information.
-
registerHomeStatusListener
abstract void registerHomeStatusListener(IThingHomeStatusListener listener)
Register a listener for information changes within a family.
- Parameters:
listener
- IThingHomeStatusListener IThingHomeStatusListener
-
unRegisterHomeStatusListener
abstract void unRegisterHomeStatusListener(IThingHomeStatusListener listener)
Unregister a listener for information changes within a family.
- Parameters:
listener
- IThingHomeStatusListener IThingHomeStatusListener
-
registerHomeDeviceStatusListener
abstract void registerHomeDeviceStatusListener(IThingHomeDeviceStatusListener listener)
Register a listener for device information changes in your home.
- Parameters:
listener
- IThingHomeDeviceStatusListener IThingHomeDeviceStatusListener
-
unRegisterHomeDeviceStatusListener
abstract void unRegisterHomeDeviceStatusListener(IThingHomeDeviceStatusListener listener)
Unregister a listener for device information changes in your home.
- Parameters:
listener
- IThingHomeDeviceStatusListener IThingHomeDeviceStatusListener
-
registerHomeDeviceRoomInfoListener
abstract void registerHomeDeviceRoomInfoListener(IThingHomeRoomInfoChangeListener listener)
Register a listener for device room information changes in your home.
- Parameters:
listener
- IThingHomeDeviceStatusListener IThingHomeRoomInfoChangeListener
-
unRegisterHomeDeviceRoomInfoListener
abstract void unRegisterHomeDeviceRoomInfoListener(IThingHomeRoomInfoChangeListener listener)
Unregister a listener for device room information changes in your home.
- Parameters:
listener
- IThingHomeDeviceStatusListener IThingHomeRoomInfoChangeListener
-
createBlueMesh
abstract void createBlueMesh(String meshName, IThingResultCallback<BlueMeshBean> callback)
Generate a virtual mesh gateway device in the current home.
Called once during network formation.
- Parameters:
meshName
- The name of mesh.callback
- IThingResultCallback IThingResultCallback
-
createSigMesh
abstract void createSigMesh(IThingResultCallback<SigMeshBean> callback)
Generate a virtual sigmesh gateway device in the current home.
Called once during network formation.
- Parameters:
callback
- IThingResultCallback IThingResultCallback
-
queryDeviceListToAddGroup
abstract void queryDeviceListToAddGroup(long groupId, String productId, IThingResultCallback<List<GroupDeviceBean>> callback)
Obtain the device list of product.
Group List Acquisition.
- Parameters:
groupId
- The group is not created, parameter groupId must be an integer -1productId
- Select the pid of the device that created the groupcallback
- IThingResultCallback IThingResultCallback
-
queryZigbeeDeviceListToAddGroup
abstract void queryZigbeeDeviceListToAddGroup(long groupId, String productId, String parentId, IThingResultCallback<List<GroupDeviceBean>> callback)
Obtain the device list of product.
Group List Acquisition.
- Parameters:
groupId
- The group is not created, parameter groupId must be an integer -1productId
- Select the pid of the device that created the grouparentId
- Select the meshId of the device that created the group, deviceBean.callback
- IThingResultCallback IThingResultCallback
-
onDestroy
abstract void onDestroy()
On destroy.
-
createZigbeeGroup
@Deprecated() abstract void createZigbeeGroup(String productId, String parentId, int parentType, String name, IThingResultCallback<CloudZigbeeGroupCreateBean> callback)
Creating a Group.
- Parameters:
productId
- The pid of the device what is using to create groupparentId
- Select the meshId of the device that created the group, deviceBean.parentType
- unknownname
- a name of the group to be createdcallback
- IThingResultCallback IThingResultCallback
-
createZigbeeGroup
abstract void createZigbeeGroup(String productId, String parentId, String name, IThingResultCallback<CloudZigbeeGroupCreateBean> callback)
Creating a Group.
- Parameters:
productId
- The pid of the device what is using to create groupparentId
- Select the meshId of the device that created the group, deviceBean.name
- A name of the group to be createdcallback
- IThingResultCallback IThingResultCallback
-
queryRoomInfoByGroup
@Deprecated() abstract List<RoomBean> queryRoomInfoByGroup(List<GroupBean> groupList)
Search for a list of rooms based on the group list.
- Parameters:
groupList
- The list of groups which you want to query the list of rooms.
-
bindNewConfigDevs
abstract void bindNewConfigDevs(List<String> devIds, IResultCallback callback)
Bind the activated device (which performs the unbound home distribution method) to the home.
- Parameters:
devIds
- The list of successfully activated device IDs.callback
- IResultCallback IResultCallback
-
registerProductWarnListener
abstract void registerProductWarnListener(IWarningMsgListener listener)
Register product alarm listener.
- Parameters:
listener
- IWarningMsgListener IWarningMsgListener
-
unRegisterProductWarnListener
abstract void unRegisterProductWarnListener(IWarningMsgListener listener)
Deregister product alarm listener.
- Parameters:
listener
- IWarningMsgListener IWarningMsgListener
-
sortDevInHome
abstract void sortDevInHome(String homeId, List<DeviceAndGroupInHomeBean> list, IResultCallback callback)
Sorting groups or devices in the home.
- Parameters:
homeId
- The family id.list
- The list of Groups or devices to be sorted.callback
- IResultCallback IResultCallback
-
unSubscribeTopics
abstract void unSubscribeTopics(List<String> devIdList)
Cancel subscription information for home and home devices.
Call when leaving the family or dissolving the family.
- Parameters:
devIdList
- The list of device ids to be unsubscribed
-
registerUpgradeStatusListener
abstract void registerUpgradeStatusListener(IThingDeviceUpgradeStatusCallback callback)
Register device upgrade status listener.
- Parameters:
callback
- IThingDeviceUpgradeStatusCallback IThingDeviceUpgradeStatusCallback
-
getHomeWeatherDetail
abstract void getHomeWeatherDetail(int limit, Map<String, Object> unit, IGetHomeWetherCallBack callback)
Get detailed weather data in the home.
Such as temperature, humidity, UV index, air quality, etc.
- Parameters:
limit
- Quantity limitunit
- unit.callback
- IGetHomeWetherCallBack IGetHomeWetherCallBack
-
getHomeWeatherSketch
abstract void getHomeWeatherSketch(double lon, double lat, IIGetHomeWetherSketchCallBack callback)
Get brief weather parameters for your city.
Such as state of weather(clear, cloudy, rainy, and so on), weather icon.
- Parameters:
lon
- longitudelat
- latitudecallback
- IIGetHomeWetherSketchCallBack IIGetHomeWetherSketchCallBack
-
registerHomeRelationUpdateListener
abstract void registerHomeRelationUpdateListener(IThingHomeRelationUpdateListener listener)
-
unRegisterHomeRelationUpdateListener
abstract void unRegisterHomeRelationUpdateListener(IThingHomeRelationUpdateListener listener)
-
organizeRelation
abstract void organizeRelation(IThingHomeRelationUpdateListener listener)
-
createThreadGroup
abstract void createThreadGroup(String productId, String name, List<String> devIdList, String parentId, IThingResultCallback<GroupRespBean> callback)
Create thread common group .
- Parameters:
productId
- The id of Product.name
- The name of Product.devIdList
- The list of device ids that need to be created into groups.callback
- IThingResultCallback IThingResultCallback
-
queryThreadGroupDeviceList
abstract void queryThreadGroupDeviceList(long groupId, String productId, String parentId, IThingResultCallback<List<GroupDeviceBean>> callback)
Obtain the device list of product.
Group List Acquisition.
- Parameters:
groupId
- The group is not created, parameter groupId must be an integer -1productId
- Select the pid of the device that created the groupcallback
- IThingResultCallback IThingResultCallback
-
queryHidedDeviceGroupList
abstract void queryHidedDeviceGroupList(IThingResultCallback<ArrayList<DeviceAndGroupInHomeBean>> callback)
get the list of device and group with hide tag .
query hided all device and group
- Parameters:
callback
- IThingResultCallback IThingResultCallback
-
hideDeviceGroup
abstract void hideDeviceGroup(List<DeviceAndGroupInHomeBean> devIds, IThingResultCallback<Boolean> callback)
add hide tag on Device and Group .
Device add hide tag
- Parameters:
devIds
- the list of device and group which you want to add hide tagcallback
- IThingResultCallback IThingResultCallback
-
showDeviceGroup
abstract void showDeviceGroup(List<DeviceAndGroupInHomeBean> devIds, IThingResultCallback<Boolean> callback)
delete hide tag of Device and Group .
Device delete hide tag
- Parameters:
devIds
- the list of device and group which you want to delete hide tagcallback
- IThingResultCallback IThingResultCallback
-
queryRoomDevSceneList
abstract void queryRoomDevSceneList(long roomId, IThingResultCallback<RoomInfoBean> callback)
delete hide tag of Device and Group .
Device delete hide tag
- Parameters:
roomId
- the roomId which you want to querycallback
- IThingResultCallback IThingResultCallback
-
-
-
-