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 |
---|---|
CompletableFuture<String> |
adjustOccupiedSetpoint(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint,
double amount)
Adjusts the heating or cooling 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 |
changeSystemMode(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> |
readCachedOccupiedSetpoint(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint)
Reads the cached heating or cool setpoint of the thermostat device.
|
Optional<Property> |
readCachedRunningMode()
Reads the cached running mode of the thermostat device.
|
Optional<Property> |
readCachedSystemMode()
Reads the cached
Thermostat.SystemModeEnum of the Thermostat. |
CompletableFuture<Property> |
readFanMode()
Reads the current
FanControl.FanModeEnum of the Thermostat. |
CompletableFuture<Property> |
readOccupiedCoolingSetpoint()
Reads the cooling setpoint.
|
CompletableFuture<Property> |
readOccupiedHeatingSetpoint()
Reads the heating setpoint.
|
CompletableFuture<Property> |
readRunningMode()
Reads the current running mode of the thermostat.
|
CompletableFuture<Property> |
readSystemMode()
Reads the current
Thermostat.SystemModeEnum of the Thermostat. |
PropertyCommandData |
setOccupiedCoolingSetpoint(double temperature)
Sets the cooling setpoint to a specific value.
|
PropertyCommandData |
setOccupiedHeatingSetpoint(double temperature)
Sets the heating setpoint to a specific value.
|
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 ThermostatDevice(com.mmbnetworks.rotarrandevicemodel.DeviceModel deviceModel, DeviceConnectionType deviceConnectionType, com.mmbnetworks.dialogues.DialogueManager dialogueManager, Executor clientExecutor)
public CompletableFuture<Property> readSystemMode()
Thermostat.SystemModeEnum
of the Thermostat.CompletableFuture
containing the Property
.public Optional<Property> readCachedSystemMode()
Thermostat.SystemModeEnum
of the Thermostat.
The cache is updated upon every invocation of readSystemMode()
.Optional
containing the results, empty if there is no cached value.public PropertyCommandData changeSystemMode(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SystemModeEnum systemMode)
Thermostat.SystemModeEnum
of the Thermostat.systemMode
- Thermostat.SystemModeEnum
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. The cached value is always updated upon successful
invocation of readFanMode()
Optional
contain the results, empty if there is no cached value.public 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> readOccupiedCoolingSetpoint()
CompletableFuture
containing the results.public CompletableFuture<Property> readOccupiedHeatingSetpoint()
CompletableFuture
containing the results.public Optional<Property> readCachedOccupiedSetpoint(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint)
readOccupiedCoolingSetpoint()
or readOccupiedHeatingSetpoint()
setpoint
- Thermostat.SetpointModeEnum#HEAT
or Thermostat.SetpointModeEnum#COOL
Optional
contain the results, empty if no cached value existspublic PropertyCommandData setOccupiedCoolingSetpoint(double temperature)
temperature
- a specific temperature, in degrees. Example: 23.5PropertyCommandData
containing the results.public PropertyCommandData setOccupiedHeatingSetpoint(double temperature)
temperature
- a specific temperature, in degrees. Example: 22.0PropertyCommandData
containing the results.public CompletableFuture<String> adjustOccupiedSetpoint(com.mmbnetworks.rapidconnectdevice.zcl.cluster.Thermostat.SetpointModeEnum setpoint, double amount)
setpoint
- Heat or Coolamount
- an amount in degrees, example 1.5. Max range is -12.7 to 12.7 degrees.CompletableFuture
containing the result of the command. The CompletableFuture
will complete exceptionally with a RequestException
on errors.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 © 2020. All rights reserved.