Methods
getClusterIdByName
Return Matter cluster information
Signature
Long getClusterIdByName(String clusterName)
Parameters
clusterName - the string value to lookup
Returns
Long - cluster id, null if no matching entry found
getClusterName
Return Matter cluster information
Signature
String getClusterName(Long clusterId)
Parameters
clusterId - the long value to lookup
Returns
String - string name of cluster
parseDescriptionAsMap
Parse a matter message into a Map.
Signature
Map parseDescriptionAsMap(String description)
Parameters
description - the Matter message to parse
Returns
Map - a Map of key/value pairs that have been parsed from the Matter message.
unsubscribe
Unsubscribe from attribute changes
Signature
String unsubscribe()
Returns
String - Matter command string to unsubscribe from attributes/events
subscribe
Subscribe to attribute changes
Signature
String subscribe(Integer minReportTime, Integer maxReportTime, List<Map<String, String>> attributePaths)
Parameters
minReportTime - requested minimum reporting interval in seconds
maxReportTime - requested maximum reporting interval in seconds
attributePaths - List of attribute path maps to subscribe to
Returns
String - Matter command subscribe command string
attributePath
Generate attribute path Map
Signature
Map<String,String> attributePath(String ep, Integer cluster, Integer attr)
Map<String,String> attributePath(Integer ep, Integer cluster, Integer attr)
Parameters
ep - device endpoint
cluster - cluster id
attr - attribute id
Returns
Map<String,String> - attributePath map
readAttributes
Read attribute value
Signature
String readAttributes(List<Map<String, String attributePaths)
Parameters
attributePaths - List of attribute path maps
Returns
String - Matter read attributes command string
writeAttributes
Write attributes to device
Signature
String writeAttributes(List<Map<String, String> attributeWriteRequests)
Parameters
attributeWriteRequests - List of attribute write request maps
Returns
String - Matter write attributes command string
attributeWriteRequest
Generate attributeWriteRequest map
Signature
Map<String,String> attributeWriteRequest(String ep, Integer cluster, Integer attr, Integer type, String data)
Map<String,String> attributeWriteRequest(Integer ep, Integer cluster, Integer attr, Integer type, String data)
Parameters
ep - device endpoint
cluster - cluster id
attr - attribute id
type - Matter data type
data - hex string of attribute value to write
Returns
Map<String,String> - attributeWriteRequest map
cmdField
Generate command field map
Signature
Map<String,String> cmdField(Integer type, Integer num, String data)
Parameters
type - Matter data type
num - field number
data - hex string of attribute value to write
Returns
Map<String,String> - cmdField map
invoke
Invokes a command on the device
Signature
String invoke(Integer ep, Integer cluster, Integer cmd, List<Map<String, String> cmdFields)
String invoke(Integer ep, Integer cluster, Integer cmd)
Parameters
ep - Endpoint ID
cluster - Cluster for command
cmd - Command ID
cmdFields - List of command field maps (optional, when values need to be sent with command)
Returns
String - Matter command string
on
Generate the on command for the on/off Matter cluster
Signature
String on()
Returns
String - Matter command string
off
Generate the on command for the on/off Matter cluster
Signature
String off()
Returns
String - Matter command string
setLevel
Generate the set level command
Signature
String setLevel(Number level, Number transition)
Parameters
level - Level to set the device to
transition - Transition time (optional)
Returns
String - Matter set level command
setColor
Generate the set color command
Signature
String setHue(Map value)
Parameters
value - Hubitat COLOR_MAP
Returns
String - Matter set color command string
setHue
Generate the set hue command
Signature
String setHue(Integer value, Number transition)
Parameters
value - Integer 0-100 hue value
transition - Transition time (optional)
Returns
String - Matter set hue command string
setSaturation
Generate the set saturation command
Signature
String setSaturation(Integer value, Number transition)
Parameters
value - Integer 0-100 saturation value
transition - Transition time (optional)
Returns
String - Matter set saturation command string
setColorTemperature
Generate the set color temperature command
Signature
String setColorTemperature(Integer value, Number transition)
Parameters
value - Integer color temperature value
transition - Transition time (optional)
Returns
String - Matter set color temperature command string