Multi Sensors
To control the multi sensors, a user have to follow the MQTT2GO convention. To ease up the setup, this page is dedicated to the command and report messages utilized for such communication.
Commands
As specified by the MQTT2GO convention, the commands are utilized for device control. In the following subsection, we present the standardized way which is following the convention.
Set On
{
"timestamp": 1567677926,
"value": "on"
}
Set Off
{
"timestamp": 1567677926,
"value": "off"
}
Query Temperature
{
"timestamp": 1567677926,
"value": "temperature"
}
Query Humidity
{
"timestamp": 1567677926,
"value": "humidity"
}
Query Motion
{
"timestamp": 1567677926,
"value": "motion"
}
Query Smoke
{
"timestamp": 1567677926,
"value": "smoke"
}
Query Water
{
"timestamp": 1567677926,
"value": "water"
}
Reports
Reports are utilized either as responses to the commands or to report periodic or critical event.
State Report
{
"priority_level": 2,
"timestamp": 1567677956,
"report": "on"
}
{
"priority_level": 2,
"timestamp": 1567677956,
"report": "off"
}
{
"priority_level": 2,
"timestamp": 1567677956,
"report": "repair_needed"
}
Temperature Report
{
"priority_level": 2,
"timestamp": 1567677956,
"report": {
"value:": 21.8,
"unit": "C"
}
}
Humidity Report
{
"priority_level": 2,
"timestamp": 1567677956,
"report": {
"value": 35.5,
"unit": "%"
}
}
Motion Report
{
"priority_level": 2,
"timestamp": 1567677956,
"report": "motion"
}
Smoke Report
{
"priority_level": 2,
"timestamp": 1567677956,
"report": "smoke"
}
Water Report
{
"priority_level": 2,
"timestamp": 1567677956,
"report": "water"
}