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