SMX MQTT-Spezifikation
This document provides a comprehensive technical guide for working with the MQTT interface of the SensMax Data Collector series.
1. Overview
This document describes the parameters and commands used for communication between the MQTT broker and the SensMax data collector.
1.1. Topics description
Two topic branches are used for data exchange. The collector sends data to topic {user_prefix}smx/device/{collector_serial}, and receives incoming commands and settings from topic {user_prefix}smx/server/{collector_serial}.
Using of {user_prefix} is optional, it can be added by the user in the device settings.
The {collector_serial} is the 9-digit serial number of the data collector, which is printed on its housing.
To subscribe to all messages sent by a specific collector, user can subscribe to:
smx/device/{collector_serial}/#
To subscribe to all SensMax devices, user need to subscribe to:
smx/device/#
1.2. Supported devices
All SensMax data collectors are divided into two main types: REGULAR and TIMESTAMP. Depending on the device type, different MQTT commands are supported.
REGULAR device type
REGULAR devices are designed to send data in a 24-hour format, where data divided at 1-hour intervals. This type of device follows a predefined schedule for data delivery and does not support immediate data transmission. As a result, the data from REGULAR devices is collected periodically throughout the day, and there is no option for real-time data updates.
TIMESTAMP device type
These devices send data in a 24-hour format, where data divided at 5-minute intervals. Additionally, TIMESTAMP devices are capable of sending individual data packets for each new visitor, enabling real-time monitoring. The immediate data delivery capability makes these devices suitable for situations where up-to-the-minute data is crucial for operational decisions or analysis.
List of supported data collector models and their types:
| Device model name | Device type |
|---|---|
| SensMax Wi-Fi LR | REGULAR |
| SensMax Wi-Fi SLR | REGULAR |
| SensMax Wi-Fi PRO | REGULAR |
| SensMax SMX LR | REGULAR |
| SensMax SMX SLR | REGULAR |
| SensMax SMX PRO | REGULAR |
| SensMax Wi-Fi LR TS | TIMESTAMP |
| SensMax Wi-Fi SLR TS | TIMESTAMP |
| SensMax SMX LR TS | TIMESTAMP |
| SensMax SMX SLR TS | TIMESTAMP |
1.3. Power profiles
The data collectors support multiple power profiles that allows to set the operating mode of the connected sensors. The power profile is configured in the settings command.
| Power profile | Supported device type | Description |
|---|---|---|
ImmediateDelivery |
TIMESTAMP only | Data about each new visitor is immediately delivered to the broker. Also 24 hour data divided in 5-min intervals uploads to broker every 5 minutes. |
NormalPowerProfile |
REGULAR, TIMESTAMP | Sensors send data to collector every 15 minutes. Data uploading to the broker every 15 minutes. |
MaxBatteryLife |
REGULAR, TIMESTAMP | Sensors send data to collector every 40 minutes. Data uploading to the broker every 15 minutes. |
TestPowerProfile |
REGULAR, TIMESTAMP | Sensors send data to collector every 60 seconds. Data uploading to the broker every 60 seconds. |
2. Incoming Commands (Data Packets Sent from the MQTT Broker to the Device)
All commands sent to the device from the broker are optional. The data collector will operate and send data to the broker without first receiving settings from the broker.
2.1. sync_list
This command is used to send the device an up-to-date list of linked sensors and their names. If an empty device_list is sent, all sensors linked to the collector will be deleted.
- Topic:
{user_prefix}smx/server/{collector_serial} - Retained:
1 - Supported device type: REGULAR, TIMESTAMP
JSON parameter description:
| Parameter | Value | Required | Type | Comments |
|---|---|---|---|---|
messageType |
"sync_list" |
Yes | string | |
collector_serial |
<collector serial> |
Yes | string | The 9-digit serial number of the data collector, which is printed on its housing. |
device_list |
Yes | object | ||
<sensor 1 serial> |
<sensor 1 name> |
Optional | string | |
<sensor 2 serial> |
<sensor 2 name> |
Optional | string |
Example:
{
"messageType": "sync_list",
"collector_serial": "051000222",
"device_list": {
"041000111": "Shop AAA",
"041000222": "Shop BBB",
"041000333": "Riga mall"
}
}
2.2. settings
This command is used to send settings to the device.
- Topic:
{user_prefix}smx/server/{collector_serial} - Retained:
1 - Supported device type: REGULAR, TIMESTAMP
JSON parameter description:
| Parameter | Value | Required | Type | Comments |
|---|---|---|---|---|
messageType |
"settings" |
Yes | string | |
collector_serial |
<collector serial> |
Yes | string | The 9-digit serial number of the data collector. |
time_zone |
<time zone> |
Optional | string | Time zone format is "UTC+HH:00". Where HH is hour offset. Leading zero required also. |
dst |
true / false |
Optional | bool | Apply daylight saving time. |
power_profile |
<power profile> |
Optional | string | Supported power profiles: ImmediateDelivery, TestPowerProfile, MaxBatteryLife, NormalPowerProfile. |
make_beep |
true / false |
Optional | bool | If enabled, all connected sensors will emit sound when new visitor detected. |
Example:
{
"messageType": "settings",
"collector_serial": "051000222",
"time_zone": "UTC+03:00",
"dst": true,
"power_profile": "NormalPowerProfile",
"make_beep": false
}
2.3. reset
After receiving this command, the device performs a reboot.
- Topic:
{user_prefix}smx/server/{collector_serial} - Retained:
0 - Supported device type: REGULAR, TIMESTAMP
JSON parameter description:
| Parameter | Value | Required | Type | Comments |
|---|---|---|---|---|
messageType |
"reset" |
Yes | string | |
collector_serial |
<collector serial> |
Yes | string | The 9-digit serial number of the data collector. |
Example:
{
"messageType": "reset",
"collector_serial": "051000222"
}
2.4. data_request
This command forces the data collector to resend all data for the specified date. If no data for the specified date is found in memory, the device will send error_notification.
- Topic:
{user_prefix}smx/server/{collector_serial} - Retained:
0 - Supported device type: TIMESTAMP only
JSON parameter description:
| Parameter | Value | Required | Type | Comments |
|---|---|---|---|---|
messageType |
"data_request" |
Yes | string | |
collector_serial |
<collector serial> |
Yes | string | The 9-digit serial number of the data collector. |
date |
<date> |
Yes | string | Date should be presented in format DD/MM/YY. |
Example:
{
"messageType": "data_request",
"collector_serial": "051000222",
"date": "06/12/23"
}
2.5. memory_info
After receiving this command, the device will send a memory_info packet that contains a list of all dates that contain data in memory.
- Topic:
{user_prefix}smx/server/{collector_serial} - Retained:
0 - Supported device type: TIMESTAMP only
JSON parameter description:
| Parameter | Value | Required | Type | Comments |
|---|---|---|---|---|
messageType |
"memory_info" |
Yes | string | |
collector_serial |
<collector serial> |
Yes | string | The 9-digit serial number of the data collector. |
Example:
{
"messageType": "memory_info",
"collector_serial": "051000222"
}
3. Outgoing Packets (Data Packets Sent from the Device to the MQTT Broker)
3.1. sync_list
This packets sends to broker after each device reboot and after any changes in sensor list.
- Topic:
{user_prefix}smx/device/{collector_serial}/sync_list - Retained:
1 - Supported device type: REGULAR, TIMESTAMP
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"sync_list" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | The collector ID allows to identify device type. Possible values: COLLECTOR-TS (for TIMESTAMP type), COLLECTOR (for REGULAR type) |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
collector_frm |
<firmware version> |
string | Current firmware version of the SensMax Data Collector device. |
device_list |
object | ||
<sensor 1 serial> |
<sensor 1 name> |
string | |
<sensor 2 serial> |
<sensor 2 name> |
string |
Example:
{
"messageType": "sync_list",
"id": "AB12F1",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051000222",
"collector_frm": "1.0",
"device_list":
{
"041000111": "Shop AAA",
"041000222": "Shop BBB",
"041000333": "Riga mall"
}
}
3.2. settings
This packet sends to broker when device settings were changed, how also after device reboot and once per day.
- Topic:
{user_prefix}smx/device/{collector_serial}/settings - Retained:
1 - Supported device type: REGULAR, TIMESTAMP
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"settings" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
collector_frm |
<firmware version> |
string | Current firmware version of the SensMax Data Collector device. |
time_zone |
<time zone> |
string | Time zone format is "UTC+HH:00". |
dst |
true / false |
bool | Apply daylight saving time. |
power_profile |
<power profile> |
string | Current power profile. |
make_beep |
true / false |
bool | If enabled, all connected sensors will emit sound when new visitor detected. |
request_settings_update |
true / false |
bool | The sensor sends true after a reboot or once a day. This flag used optionally to force the user application to update actual current settings on broker. |
Example:
{
"messageType": "settings",
"id": "AB12F1",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051000222",
"collector_frm": "1.0",
"time_zone": "UTC+03:00",
"dst": true,
"power_profile": "ImmediateDelivery",
"make_beep": false,
"request_settings_update": false
}
3.3. memory_info
This packets sends to broker after Data Collector received the "memory_info" request from the broker.
- Topic:
{user_prefix}smx/device/{collector_serial}/memory_info - Retained:
0 - Supported device type: TIMESTAMP only
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"memory_info" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
notes |
object | ||
<note Nr> |
<date> |
string |
Example:
{
"messageType": "memory_info",
"id": "6833498",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051002363",
"notes": {
"note 00": "21/08/24",
"note 01": "22/08/24"
}
}
3.4. error_notification
This packet sends to broker when device cannot accept command by any reason.
- Topic:
{user_prefix}smx/device/{collector_serial}/errors - Retained:
0 - Supported device type: REGULAR, TIMESTAMP
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"error_notification" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
description |
<error description> |
string | Possible values: "unknown command", "data not found" |
Example:
{
"messageType": "error_notification",
"id": "AB12F1",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051000222",
"description": "unknown command"
}
3.5. single_ts
This packed used for sending data about every new visitor. This packet can be send immediately after detecting of new visitor, if the ImmediateDelivery power profile enabled.
- Topic:
{user_prefix}smx/device/{collector_serial}/single_ts/{date}/{sensor_serial} - The
{date}in a topic displays the date inYYYYMMDDformat. - The
{sensor_serial}in the topic corresponds to the serial number of the sensor from which the data is sent. - Retained:
0 - Supported device type: TIMESTAMP only
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"single_ts" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
sensor_serial |
<sensor serial> |
string | The 9-digit serial number of the sensor's direction. |
sensor_name |
<sensor name> |
string | The name of sensor |
sensor_type |
<sensor type> |
string | Possible values: BI-DIR (for bi-directional), UNI-DIR (for uni-directional), LOYALTY BUTTON (for Loyalty Button) |
in_today |
<in today> |
number | The sum of all incoming visitors for today. Present only for BI-DIR type sensors. |
out_today |
<out today> |
number | The sum of all outgoing visitors for today. Present only for BI-DIR type sensors. |
RSSI |
<rssi value> |
number | Reflects the link quality between the sensor and data collector (0…100). |
direction |
<direction code> |
string | Reflects the motion direction (IN, OUT) or which button was pressed (GREEN, YELLOW, RED). |
battery |
1 (OK) / 0 (low) |
number | Used to indicate when the sensor battery is low. |
date |
<date> |
string | Date of current visit. Presented in format YYYY-MM-DD |
time |
<time> |
string | Time of current visit. Presented in format HH:MM:SS |
five-min |
<five-min number> |
number | The number of the five-minute to which this visitor relates (0...287). |
Example:
{
"messageType": "single_ts",
"id": "AB12F1",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051000222",
"sensor_serial": "141000222",
"sensor_name": "Shop AAA IN",
"sensor_type": "BI-DIR",
"in_today": 123,
"out_today": 222,
"RSSI": 90,
"direction": "IN",
"battery": 1,
"date": "2016-04-26",
"time": "10:22:30",
"five-min": 124
}
3.6. sensor_blocked_error
This packed used for sending notification when sensor is blocked. This packet can be send immediately after detecting of new visitor, if the ImmediateDelivery power profile enabled.
This packet available for BI-DIR sensors only, as LOYALTY BUTTON TIMESTAMP do not provides blocking error data.
- Topic:
{user_prefix}smx/device/{collector_serial}/single_ts/{date}/{sensor_serial} - Retained:
0 - Supported device type: TIMESTAMP only
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"sensor_blocked_error" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
sensor_serial |
<sensor serial> |
string | The 9-digit serial number of the sensor's direction. |
sensor_name |
<sensor name> |
string | The name of sensor |
sensor_type |
<sensor type> |
string | Possible values: BI-DIR, UNI-DIR, LOYALTY BUTTON |
in_today |
<in today> |
number | The sum of all incoming visitors for today. Present only for BI-DIR type sensors. |
out_today |
<out today> |
number | The sum of all outgoing visitors for today. Present only for BI-DIR type sensors. |
RSSI |
<rssi value> |
number | Reflects the link quality between the sensor and data collector (0…100). |
direction |
IN / OUT |
string | Reflects the motion direction of captured visitor. Present only for BI-DIR type sensors. |
battery |
1 (OK) / 0 (low) |
number | Used to indicate when the sensor battery is low. |
date |
<date> |
string | Date of current visit. Presented in format YYYY-MM-DD |
time |
<time> |
string | Time of current visit. Presented in format HH:MM:SS |
five-min |
<five-min number> |
number | The number of the five-minute to which this visitor relates (0...287). |
Example:
{
"messageType": "sensor_blocked_error",
"id": "AB12F1",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051000222",
"sensor_serial": "141000222",
"sensor_name": "Shop AAA IN",
"sensor_type": "BI-DIR",
"in_today": 123,
"out_today": 222,
"RSSI": 90,
"direction": "IN",
"battery": 1,
"date": "2016-04-26",
"time": "10:22:30",
"five-min": 124
}
3.7. 5_min_data
This packet is used to send 24 hours of data divided into 5-minute intervals. The packet is sent to the broker according to schedule defined for the selected power profile.
- Topic:
{user_prefix}smx/device/{collector_serial}/5_min_data/{date}/{sensor_serial} - Retained:
0or1(depending from user settings) - Supported device type: TIMESTAMP only
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"5_min_data" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
sensor_serial |
<sensor serial> |
string | The 9-digit serial number of the sensor's direction. |
sensor_name |
<sensor name> |
string | The name of sensor |
sensor_type |
<sensor type> |
string | Possible values: BI-DIR, UNI-DIR, LOYALTY BUTTON |
direction |
<direction code> |
string | Reflects the motion direction of captured visitor for BI-DIR type sensors. Or which button was pressed for the LOYALTY BUTTON sensors. Possible direction codes: IN, OUT, GREEN, YELLOW, RED |
battery |
1 (OK) / 0 (low) |
number | Used to indicate when the sensor battery is low. |
date |
<date> |
string | Date of data to be sent. Presented in format YYYY-MM-DD |
first_entry_time |
<time> |
string | Time of the first visitor per day HH:MM:SS |
last_entry_time |
<time> |
string | Time of the last visitor per day HH:MM:SS |
visits |
array | Array of 24 hours of data divided into 5-minute intervals. A total of 288 values. | |
errors |
array | An array of errors over 24 hours, divided into 5-minute intervals. Value 0 means that there were no errors during this interval. Value 1 means that beam blocking was detected during this interval. There are 288 values in total. Presented for BI-DIR sensors only. |
Example:
{
"messageType": "5_min_data",
"id": "AB12F1",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051000222",
"collector_frm": "1.0",
"sensor_serial": "141000222",
"sensor_name": "Shop AAA",
"battery": 1,
"sensor_type": "BI-DIR",
"direction": "IN",
"date": "2016-04-26",
"first_entry_time": "08:35:59",
"last_entry_time": "17:35:59",
"visits": [
0,0,0,0,0,0,0,0,1,2,3,4,5,6,7,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,22,0,0,0,0,0,56,0,0,0,23,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,55,128,16,5,45,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
],
"errors": [
0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
]
}
3.8. 24_hour_data
This packet is used to send 24 hours of data divided into 5-minute intervals. The packet is sent to the broker according to schedule defined for the selected power profile.
- Topic:
{user_prefix}smx/device/{collector_serial}/24_hour_data/{date}/{sensor_serial} - Retained:
0or1(depending from user settings) - Supported device type: REGULAR only
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"24_hour_data" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
sensor_serial |
<sensor serial> |
string | The 9-digit serial number of the sensor's direction. |
sensor_name |
<sensor name> |
string | The name of sensor |
sensor_type |
<sensor type> |
string | Possible values: BI-DIR, UNI-DIR, LOYALTY BUTTON |
direction |
<direction code> |
string | Presented for BI-DIR type sensors only. Reflects the motion direction (IN, OUT). |
battery |
1 (OK) / 0 (low) |
number | Used to indicate when the sensor battery is low. |
date |
<date> |
string | Date of data to be sent. Presented in format YYYY-MM-DD |
first_entry_time |
<time> |
string | Time of the first visitor per day HH:MM:SS |
last_entry_time |
<time> |
string | Time of the last visitor per day HH:MM:SS |
GREEN_pressed_count |
<pressed count> |
number | Represent how many times GREEN button was pressed for current date. Presented for LOYALTY BUTTON sensors only. |
YELLOW_pressed_count |
<pressed count> |
number | Represent how many times YELLOW button was pressed for current date. Presented for LOYALTY BUTTON sensors only. |
RED_pressed_count |
<pressed count> |
number | Represent how many times RED button was pressed for current date. Presented for LOYALTY BUTTON sensors only. |
visits |
array | Array of 24 hours of data divided into 1-hour intervals. A total of 24 values. Presented for BI-DIR type sensors only. |
|
errors |
array | An array of errors over 24 hours, divided into 1-hour intervals. Value 0 means that there were no errors during this interval. Value 1 means that beam/button blocking was detected during this interval. There are 24 values in total. |
Example 1: BI-DIR sensor type:
{
"messageType": "24_hour_data",
"id": "AB12F1",
"collector_id": "COLLECTOR",
"collector_serial": "050000222",
"collector_frm": "1.0",
"sensor_serial": "140000555",
"sensor_name": "AAA",
"sensor_type": "BI-DIR",
"direction": "IN",
"battery": 1,
"date": "2016-04-26",
"first_entry_time": "08:35:59",
"last_entry_time": "17:35:59",
"visits": [
0,0,0,0,0,0,0,0,233,62,30,464,888,123,0,0,0,0,0,0,0,0,0,0
],
"errors": [
0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
]
}
Example 2: LOYALTY BUTTON sensor type:
{
"messageType": "24_hour_data",
"id": "AB12F1",
"collector_id": "COLLECTOR",
"collector_serial": "050000222",
"collector_frm": "1.0",
"sensor_serial": "140000555",
"sensor_name": "AAA",
"sensor_type": "LOYALTY BUTTON",
"GREEN_pressed_count": 100,
"YELLOW_pressed_count": 110,
"RED_pressed_count": 120,
"battery": 1,
"date": "2016-04-26",
"first_entry_time": "08:35:59",
"last_entry_time": "17:35:59",
"errors": [
0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
]
}
3.9. ping
This packet can be used for monitoring of sensor activity and detecting situation when sensor offline. This packet sends every 5 minutes for every online sensor.
- Topic:
{user_prefix}smx/device/{collector_serial}/ping/{date}/{sensor_serial} - Retained:
0 - Supported device type: TIMESTAMP only
JSON parameter description:
| Parameter | Value | Type | Comments |
|---|---|---|---|
messageType |
"ping" |
string | |
id |
<message ID> |
string | Device provides unique message ID for each message |
collector_id |
<collector ID> |
string | Possible values: COLLECTOR-TS, COLLECTOR |
collector_serial |
<collector serial> |
string | The 9-digit serial number of the data collector. |
sensor_serial |
<sensor serial> |
string | The 9-digit serial number of the sensor. |
collector_frm |
<firmware version> |
string | Current firmware version of the SensMax Data Collector device. |
sensor_name |
<sensor name> |
string | The name of sensor |
battery |
1 (OK) / 0 (low) |
number | Used to indicate when the sensor battery is low. |
date |
<date> |
string | Date of current ping. Presented in format YYYY-MM-DD |
time |
<time> |
string | Time of current ping. Presented in format HH:MM:SS |
five-min |
<five-min number> |
number | The number of the five-minute to which this ping relates (0...287). |
Example:
{
"messageType": "ping",
"id": "AB12F1",
"collector_id": "COLLECTOR-TS",
"collector_serial": "051000222",
"collector_frm": "1.0",
"sensor_serial": "041000222",
"sensor_name": "Shop AAA",
"battery": 1,
"date": "2016-04-26",
"time": "10:22:30",
"five-min": 124
}