public interface Group
Group
is the interface through which all Device
are added/removed from groups.Modifier and Type | Method and Description |
---|---|
CompletableFuture<Boolean> |
assignDevice(Device device)
Assign a device to this Group.
|
CompletableFuture<Boolean> |
assignDeviceIfIdentifying(Device device)
Assign a device to this Group only if it is identifying itself.
|
boolean |
changeName(String newName)
Change the current group name to
newName |
Collection<String> |
getDeviceIDs()
Get all device IDs in this Group
|
int |
getGroupID()
Get this Group's group ID
|
String |
getGroupName()
Get this Group's group name
|
CompletableFuture<Map<String,Property>> |
getProperty(String propertyName)
Get the
Property of devices in this Group. |
CompletableFuture<Boolean> |
removeDevice(Device device)
Remove a device from this Group.
|
CompletableFuture<Object> |
sendProtocolMessage(Object... params)
Send a zigbee specific protocol message (ZCL, or ZDO).
|
CompletableFuture<Map<String,Property>> |
updateProperty(Property property)
Update the
Property of devices in this Group. |
Collection<String> getDeviceIDs()
int getGroupID()
String getGroupName()
boolean changeName(String newName)
newName
newName
- The new group name.NullPointerException
- if newName is nullCompletableFuture<Boolean> assignDevice(Device device)
device
- The device to be assigned to this Group.CompletableFuture
object. It will contain True if the device is successfully assigned to
this Group; false otherwise.CompletableFuture<Boolean> removeDevice(Device device)
device
- The device to be removed from this Group.CompletableFuture
object. It will contain True if the device is successfully removed from
this Group; false otherwise.CompletableFuture<Boolean> assignDeviceIfIdentifying(Device device)
device
- The device to be assigned to this Group.CompletableFuture
object. It will contain True if the device is successfully assigned to
this Group; false otherwise.CompletableFuture<Map<String,Property>> updateProperty(Property property)
Property
of devices in this Group.property
- Property object with a new value to update.CompletableFuture
object. It will contain the updated Property object.CompletableFuture<Map<String,Property>> getProperty(String propertyName)
Property
of devices in this Group.propertyName
- Name of the PropertyCompletableFuture
object. It will contain a Map object with device id as Key, and
Property object as Value if it exists. The Future object will throw an exception if it cannot find the property.CompletableFuture<Object> sendProtocolMessage(Object... params)
params
- parameters pertaining to this protocol. For ZigBee look at ZigBeeGroupProtocolMessageRequest
CompletableFuture
object. It will contain a json array string containing the zcl or zdo response(s)
of the request.Copyright © 2021. All rights reserved.