public class LightDevice extends ZigbeeDevice
Modifier and Type | Field and Description |
---|---|
static int |
FIXED_DELAY |
static int |
MAX_LEVEL_DECIMAL |
static int |
MAX_LEVEL_PERCENTAGE |
static double |
MAX_LEVEL_PERCENTAGE_DOUBLE |
static int |
MAX_LEVEL_TRANSITION_TIME |
static long |
MILLISECOND_MULTIPLIER |
static int |
MIN_LEVEL_PERCENTAGE |
static int |
MIN_LEVEL_TRANSITION_TIME |
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, addGroup, addGroupIfIdentifying, getDeviceType, getGroupMembership, getHardwareVersion, getManufacturerName, getModelNumber, readAttribute, readAttribute, removeGroup, sendZclBroadcastCommand, sendZclCommand, sendZclCommand, sendZclMulticastCommand, startOtaUpgrade, viewGroup, 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 static final double MAX_LEVEL_PERCENTAGE_DOUBLE
public static final int MAX_LEVEL_DECIMAL
public static final int MIN_LEVEL_TRANSITION_TIME
public static final int MAX_LEVEL_TRANSITION_TIME
public static final long MILLISECOND_MULTIPLIER
public static final int FIXED_DELAY
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 © 2021. All rights reserved.