-
public interface IExtServiceScenario extend capability
-
-
Method Summary
Modifier and Type Method Description abstract StringgetDeviceNodeId(String deviceId)Get device nodeId abstract StringgetDeviceCommunication(String deviceId)Get Device Gateway ID abstract Unit)>executeDeviceDp(<ERROR CLASS> action)Deliver device dp abstract Unit)>addGidSid(List<String> cids, <ERROR CLASS> sidGid)Write the gid and sid of the scene to the gateway abstract Unit)>clearGidSid(List<String> cids, <ERROR CLASS> sidGid)Remove the scene's gid and sid from the gateway abstract UnitregisterGwMqttListener(Function4<Integer, String, List<String>, List<Integer>, Unit> listener)Register gateway listener abstract UnitunRegisterGwMqttListener()Remove gateway listener abstract UnitregisterDeviceListener(String deviceId, Function2<String, String, Unit> listener)Register device listener abstract UnitunRegisterDevListener(String deviceId)Remove device listener abstract BooleanisDeviceDpOk(String devId, Map<String, Object> executorProperty)Determine whether the real dp state of the device is the same as the state to be set abstract BooleanisModeWR(String devId, Map<String, Object> executorProperty)Determine whether the device dp is a write-only type abstract Boolean,String)>groupHasDevice(<ERROR CLASS> action, String deviceId)Determine if a group contains a device abstract UnitgetGuideBannerAll(IResultCallback<<ERROR CLASS>> callback)Get scene guide list abstract UnitgetSceneStyle(IResultCallback<<ERROR CLASS>> callback)Get a list of scene styles abstract DeviceBeangetDevice(String deviceId)Get a device bean abstract GroupBeangetGroupDevice(Long groupId)Get a group bean abstract List<DeviceBean>getGroupDevices(Long groupId)Get a list of devices in a group abstract UnitremoveAllGeofence()Remove all geofences abstract Unit,IResultCallback)>addGeofence(<ERROR CLASS> geofenceCondition, IResultCallback<Unit> listener)Add geofencing registration abstract UnitremoveGeofence(String geofenceId, IResultCallback<Unit> listener)Remove geofence registration abstract UnitresetGeofence()Reset geofence abstract UnitremoveRoomRules(Long relationId, String roomId, String ruleIds, IResultCallback<Boolean> listener)房间移除规则 abstract UnitsortRoomRule(Long relationId, String roomId, String ruleIds, IResultCallback<Boolean> listener)房间下场景规则排序 abstract UnitonDestroy()when destroy -
-
Method Detail
-
getDeviceNodeId
abstract String getDeviceNodeId(String deviceId)
Get device nodeId
- Parameters:
deviceId- the id of the device
-
getDeviceCommunication
abstract String getDeviceCommunication(String deviceId)
Get Device Gateway ID
- Parameters:
deviceId- the id of the device
-
executeDeviceDp
abstract Unit )>executeDeviceDp(<ERROR CLASS> action)
Deliver device dp
- Parameters:
action- the action of the scene SceneAction
-
addGidSid
abstract Unit )>addGidSid(List<String> cids, <ERROR CLASS> sidGid)
Write the gid and sid of the scene to the gateway
- Parameters:
cids- the child node ids under same gatewaysidGid- sid, gid, gwId in StandardSceneInfo
-
clearGidSid
abstract Unit )>clearGidSid(List<String> cids, <ERROR CLASS> sidGid)
Remove the scene's gid and sid from the gateway
- Parameters:
cids- the child node idssidGid- sid, gid, gwId in StandardSceneInfo
-
registerGwMqttListener
abstract Unit registerGwMqttListener(Function4<Integer, String, List<String>, List<Integer>, Unit> listener)
Register gateway listener
- Parameters:
listener- listener
-
unRegisterGwMqttListener
abstract Unit unRegisterGwMqttListener()
Remove gateway listener
-
registerDeviceListener
abstract Unit registerDeviceListener(String deviceId, Function2<String, String, Unit> listener)
Register device listener
- Parameters:
deviceId- the id of the devicelistener- listener
-
unRegisterDevListener
abstract Unit unRegisterDevListener(String deviceId)
Remove device listener
- Parameters:
deviceId- the id of the device
-
isDeviceDpOk
abstract Boolean isDeviceDpOk(String devId, Map<String, Object> executorProperty)
Determine whether the real dp state of the device is the same as the state to be set
- Parameters:
devId- the id of the deviceexecutorProperty- the dps to be execute
-
isModeWR
abstract Boolean isModeWR(String devId, Map<String, Object> executorProperty)
Determine whether the device dp is a write-only type
- Parameters:
devId- the id of the deviceexecutorProperty- the dps to be judge
-
groupHasDevice
abstract Boolean ,String)>groupHasDevice(<ERROR CLASS> action, String deviceId)
Determine if a group contains a device
- Parameters:
action- the action of the scenedeviceId- the id of the device
-
getGuideBannerAll
abstract Unit getGuideBannerAll(IResultCallback<<ERROR CLASS>> callback)
Get scene guide list
- Parameters:
callback- callback IResultCallback, BannerList
-
getSceneStyle
abstract Unit getSceneStyle(IResultCallback<<ERROR CLASS>> callback)
Get a list of scene styles
- Parameters:
callback- callback IResultCallback, SceneStyle
-
getDevice
abstract DeviceBean getDevice(String deviceId)
Get a device bean
- Parameters:
deviceId- the id of the device
-
getGroupDevice
abstract GroupBean getGroupDevice(Long groupId)
Get a group bean
- Parameters:
groupId- the id of the group
-
getGroupDevices
abstract List<DeviceBean> getGroupDevices(Long groupId)
Get a list of devices in a group
- Parameters:
groupId- the id of the group
-
removeAllGeofence
abstract Unit removeAllGeofence()
Remove all geofences
-
addGeofence
abstract Unit ,IResultCallback)>addGeofence(<ERROR CLASS> geofenceCondition, IResultCallback<Unit> listener)
Add geofencing registration
- Parameters:
geofenceCondition- the condition of the scenelistener- callback IResultCallback
-
removeGeofence
abstract Unit removeGeofence(String geofenceId, IResultCallback<Unit> listener)
Remove geofence registration
- Parameters:
geofenceId- the id of the geofencelistener- callback IResultCallback
-
resetGeofence
abstract Unit resetGeofence()
Reset geofence
-
removeRoomRules
abstract Unit removeRoomRules(Long relationId, String roomId, String ruleIds, IResultCallback<Boolean> listener)
房间移除规则
-
sortRoomRule
abstract Unit sortRoomRule(Long relationId, String roomId, String ruleIds, IResultCallback<Boolean> listener)
房间下场景规则排序
-
onDestroy
abstract Unit onDestroy()
when destroy
-
-
-
-