public class LightDevice extends ZigbeeDevice
Modifier and Type | Field and Description |
---|---|
static int |
MAX_LEVEL_PERCENTAGE |
static int |
MIN_LEVEL_PERCENTAGE |
Constructor and Description |
---|
LightDevice(com.mmbnetworks.rotarrandevicemodel.DeviceModel deviceModel,
DeviceConnectionType deviceConnectionType,
com.mmbnetworks.dialogues.DialogueManager dialogueManager,
Executor clientExecutor) |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<String> |
enableDefaultReporting()
Configures the device to report changes to its properties to the
GatewayClient to which it is connected.
|
PropertyCommandData |
moveToLevel(int levelPercentage) |
PropertyCommandData |
moveToLevel(int levelPercentage,
int transitionTime) |
PropertyCommandData |
off() |
PropertyCommandData |
on() |
Optional<Property> |
readCachedLevel()
Reads the cache level value of this light device.
|
CompletableFuture<Property> |
readLevel()
Reads the current level of this light device
|
abortOtaUpgrade, getDeviceType, getHardwareVersion, getManufacturerName, getModelNumber, readAttribute, readAttribute, sendZclBroadcastCommand, sendZclCommand, sendZclCommand, sendZclMulticastCommand, startOtaUpgrade, writeAttribute, writeAttribute
accept, accept, addPropertyUpdateHandler, addProtocolHandler, addToGroup, bindDevice, callFunction, configureReporting, discoverAllProperties, getCachedProperties, getCachedProperty, getCachedProtocolProperties, getConnectedGatewayId, getDeviceConnectionType, getID, getProperties, getProperty, getProtocolProperties, leaveNetwork, ping, removeAllPropertyUpdateHandlers, removeAllProtocolHandlers, removeFromGroup, removePropertyUpdateHandler, removeProtocolHandler, sendProtocolMessage, unbindDevice, updateProperty
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen
public static final int MIN_LEVEL_PERCENTAGE
public static final int MAX_LEVEL_PERCENTAGE
public LightDevice(com.mmbnetworks.rotarrandevicemodel.DeviceModel deviceModel, DeviceConnectionType deviceConnectionType, com.mmbnetworks.dialogues.DialogueManager dialogueManager, Executor clientExecutor)
public PropertyCommandData on()
public PropertyCommandData off()
public CompletableFuture<Property> readLevel()
CompletableFuture
representing the resultpublic Optional<Property> readCachedLevel()
readLevel()
Optional
representing the result, empty if there is no cached level propertypublic PropertyCommandData moveToLevel(int levelPercentage)
public PropertyCommandData moveToLevel(int levelPercentage, int transitionTime)
public CompletableFuture<String> enableDefaultReporting() throws IllegalStateException
enableDefaultReporting
in class ZigbeeDevice
IllegalStateException
- if the function is called before
the device Properties have been discovered (i.e. through getProperties()).Copyright © 2020. All rights reserved.