The following commands and attributes are accepted as JSON payloads for the NameAndLocation cluster.
NameAndLocation Attributes
The following attribute topics are used to retrieve the NameAndLocation cluster state.
NameAndLocation/Name Attribute
MQTT Topic Pattern:
[PREFIX]/NameAndLocation/Attributes/Name/Reported
[PREFIX]/NameAndLocation/Attributes/Name/Desired
MQTT Payload JSON Schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NameAndLocation Cluster Name Attribute Properties",
"type": "object",
"properties": {
"value": {
"type": "string"
}
},
"required": [
"value"
]
}
Example Mosquitto CLI Tool Usage
To see desired/reported value for Name attribute under the by-unid topic space:
mosquitto_sub -t 'ucl/by-unid/+/+/NameAndLocation/Attributes/Name/+'
# Example output
ucl/by-unid/<UNID>/ep0/NameAndLocation/Attributes/Name/Desired { "value": <DESIRED_NAME>}
ucl/by-unid/<UNID>/ep0/NameAndLocation/Attributes/Name/Reported { "value": <REPORTED_NAME>}
NameAndLocation/Location Attribute
MQTT Topic Pattern:
[PREFIX]/NameAndLocation/Attributes/Location/Reported
[PREFIX]/NameAndLocation/Attributes/Location/Desired
MQTT Payload JSON Schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NameAndLocation Cluster Location Attribute Properties",
"type": "object",
"properties": {
"value": {
"type": "string"
}
},
"required": [
"value"
]
}
Example Mosquitto CLI Tool Usage
To see desired/reported value for Location attribute under the by-unid topic space:
mosquitto_sub -t 'ucl/by-unid/+/+/NameAndLocation/Attributes/Location/+'
# Example output
ucl/by-unid/<UNID>/ep0/NameAndLocation/Attributes/Location/Desired { "value": <DESIRED_LOCATION>}
ucl/by-unid/<UNID>/ep0/NameAndLocation/Attributes/Location/Reported { "value": <REPORTED_LOCATION>}
NameAndLocation/ClusterRevision Attribute
MQTT Topic Pattern:
[PREFIX]/NameAndLocation/Attributes/ClusterRevision/Reported
[PREFIX]/NameAndLocation/Attributes/ClusterRevision/Desired
MQTT Payload JSON Schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NameAndLocation Cluster ClusterRevision Attribute Properties",
"type": "object",
"properties": {
"value": {
"type": "integer"
}
},
"required": [
"value"
]
}
Example Mosquitto CLI Tool Usage
To see desired/reported value for ClusterRevision attribute under the by-unid topic space:
mosquitto_sub -t 'ucl/by-unid/<UNID>/<EP>/NameAndLocation/Attributes/ClusterRevision/+'
# Example output
ucl/by-unid/<UNID>/<EP>/NameAndLocation/Attributes/ClusterRevision/Desired { "value": <DESIRED_CLUSTER_REVISION> }
ucl/by-unid/<UNID>/<EP>/NameAndLocation/Attributes/ClusterRevision/Reported { "value": <REPORTED_CLUSTER_REVISION> }
NameAndLocation Command Support
MQTT Topic Pattern:
[PREFIX]/NameAndLocation/SupportedCommands
[PREFIX]/NameAndLocation/SupportedGeneratedCommands
MQTT Payload JSON Schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NameAndLocation Command Support Properties",
"type": "object",
"properties": {
"value": {
"type": "array",
"items" : {
"type": "string",
"enum": [
]
}
}
}
},
"required": [
"value"
]
}
Example Mosquitto CLI Tool Usage
To see supported commands for NameAndLocation cluster under the by-unid topic space:
mosquitto_sub -t 'ucl/by-unid/<UNID>/<EP>/NameAndLocation/SupportedCommands'
# Example output
ucl/by-unid/<UNID>/<EP>/NameAndLocation/SupportedCommands { "value": [] }
To see supported generated commands for NameAndLocation cluster under the by-unid topic space:
mosquitto_sub -t 'ucl/by-unid/<UNID>/<EP>/NameAndLocation/SupportedGeneratedCommands'
# Example output
ucl/by-unid/<UNID>/<EP>/NameAndLocation/SupportedGeneratedCommands { "value": [] }
NameAndLocation Commands
NameAndLocation/WriteAttributes Command
MQTT Topic Pattern:
[PREFIX]/NameAndLocation/Commands/WriteAttributes
MQTT Payload JSON Schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NameAndLocation Cluster WriteAttributes Command Properties",
"type": "object",
"properties": {
"Name": {
"type": "string"
},
"Location": {
"type": "string"
}
},
"required": [
"value"
]
}
Example Mosquitto CLI Tool Usage
To update all NameAndLocation attributes under the by-unid topic space:
mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/NameAndLocation/Commands/WriteAttributes' -m '{ "Name": <NAME_VALUE> ,"Location": <LOCATION_VALUE> }'
NOTE: Specify only the list of attributes to write in this command. Unspecified attributes will not be updated.
NameAndLocation/ForceReadAttributes Command
MQTT Topic Pattern:
[PREFIX]/NameAndLocation/Commands/ForceReadAttributes
MQTT Payload JSON Schema:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "NameAndLocation Cluster ForceReadAttributes Command Properties",
"type": "object",
"properties": {
"value": {
"type": "array"
"items": {
"type": "string",
"enum": [
"Name",
"Location"
]
}
}
},
"required": [
"value"
]
}
Example Mosquitto CLI Tool Usage
To force read all NameAndLocation attributes under the by-unid topic space (by sending an empty array):
mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/NameAndLocation/Commands/ForceReadAttributes' -m '{ "value": [] }'
To force read one of the NameAndLocation attributes under the by-unid topic space:
mosquitto_pub -t 'ucl/by-unid/<UNID>/<EP>/NameAndLocation/Commands/ForceReadAttributes' -m '{ "value": ["Name"] }'