public class ThermostatDevice extends ZigbeeDevice
Constructor and Description |
---|
ThermostatDevice(com.mmbnetworks.rotarrandevicemodel.DeviceModel deviceModel,
DeviceConnectionType deviceConnectionType,
com.mmbnetworks.dialogues.DialogueManager dialogueManager,
Executor clientExecutor) |
Modifier and Type | Method and Description |
---|---|
Optional<CommandData> |
adjustSetpoint(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint,
int amount)
Adjusts the setpoint up or down by a specified amount.
|
PropertyCommandData |
changeFanMode(com.mmbnetworks.rapidconnectdevice.zcl.cluster.FanControl.FanModeEnum fanMode)
Changes the
FanControl.FanModeEnum of the Thermostat. |
PropertyCommandData |
changeMode(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SystemModeEnum systemMode)
Changes the
Thermostat.SystemModeEnum of the Thermostat. |
CompletableFuture<String> |
enableDefaultReporting()
Configures the device to report changes to its properties to the
GatewayClient to which it is connected.
|
Optional<Property> |
readCachedFanMode()
Reads the cached
FanControl.FanModeEnum of the Thermostat. |
Optional<Property> |
readCachedMode()
Reads the cached
Thermostat.SystemModeEnum of the Thermostat. |
Optional<Property> |
readCachedRunningMode()
Reads the cached running mode of the thermostat device.
|
Optional<Property> |
readCachedSetpointLimit(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint)
Reads the cached setpoint of the thermostat device.
|
CompletableFuture<Property> |
readFanMode()
Reads the current
FanControl.FanModeEnum of the Thermostat. |
CompletableFuture<Property> |
readMode()
Reads the current
Thermostat.SystemModeEnum of the Thermostat. |
CompletableFuture<Property> |
readRunningMode()
Reads the current running mode of the thermostat.
|
CompletableFuture<Property> |
readSetpointLimit(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint)
Reads the setpoint.
|
PropertyCommandData |
setSetpointLimit(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint,
double setpointLimit)
Sets the Heating or Cooling setpoint to a specific value.
|
getDeviceType, readAttribute, readAttribute, sendZclCommand, sendZclCommand, writeAttribute, writeAttribute
accept, accept, addPropertyUpdateHandler, addProtocolHandler, addToGroup, bindDevice, callFunction, configureReporting, discoverAllProperties, getCachedProperties, getCachedProperty, getCachedProtocolProperties, getConnectedGatewayId, getDeviceConnectionType, getID, getProperties, getProperty, getProtocolProperties, leaveNetwork, removeAllPropertyUpdateHandlers, removeAllProtocolHandlers, removeFromGroup, removePropertyUpdateHandler, removeProtocolHandler, sendProtocolMessage, unbindDevice, updateProperty
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
andThen
public ThermostatDevice(com.mmbnetworks.rotarrandevicemodel.DeviceModel deviceModel, DeviceConnectionType deviceConnectionType, com.mmbnetworks.dialogues.DialogueManager dialogueManager, Executor clientExecutor)
public PropertyCommandData changeMode(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SystemModeEnum systemMode)
Thermostat.SystemModeEnum
of the Thermostat.systemMode
- Thermostat.SystemModeEnum
PropertyCommandData
containing the results.public CompletableFuture<Property> readMode()
Thermostat.SystemModeEnum
of the Thermostat.CompletableFuture
containing the results.public Optional<Property> readCachedMode()
Thermostat.SystemModeEnum
of the Thermostat.
The cache is updated upon every invocation of readMode()
Optional
containing the results, empty if there is no cache valuepublic PropertyCommandData changeFanMode(com.mmbnetworks.rapidconnectdevice.zcl.cluster.FanControl.FanModeEnum fanMode)
FanControl.FanModeEnum
of the Thermostat.fanMode
- see FanControl.FanModeEnum
PropertyCommandData
containing the results.public CompletableFuture<Property> readFanMode()
FanControl.FanModeEnum
of the Thermostat.CompletableFuture
containing the results.public Optional<Property> readCachedFanMode()
FanControl.FanModeEnum
of the Thermostat. This cache value is always updated upon successful
invocation of readFanMode()
Optional
contain the results, empty if there is no cache valuepublic Optional<CommandData> adjustSetpoint(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint, int amount)
setpoint
- Heat or Coolamount
- an amount in degrees celsiusCommandData
containing the results.public CompletableFuture<Property> readSetpointLimit(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint)
setpoint
- Thermostat.SetpointModeEnum#HEAT
or Thermostat.SetpointModeEnum#COOL
CompletableFuture
containing the results.public Optional<Property> readCachedSetpointLimit(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint)
readSetpointLimit(Thermostat.SetpointModeEnum)
setpoint
- Thermostat.SetpointModeEnum#HEAT
or Thermostat.SetpointModeEnum#COOL
Optional
contain the results, empty if no cache value existspublic PropertyCommandData setSetpointLimit(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint, double setpointLimit)
setpoint
- Heat or CoolsetpointLimit
- a specific value in degrees, in increments of 0.1 degrees (i.e. 2350 = 23.5 degrees)PropertyCommandData
containing the results.public CompletableFuture<Property> readRunningMode()
CompletableFuture
containing the results.public Optional<Property> readCachedRunningMode()
readRunningMode()
Optional
contains the results, empty if no cache value existspublic 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 © 2019. All rights reserved.