MQTT
MQTT provides programmatic access to the Veva III - E01 and W01 devices allowing developers to integrate the device into their own software platforms and systems. The API provides remote configuration, status checks, real-time data telemetry and event notifications from the Veva III.
MQTT and Inzwa Cloud
If you're using Inzwa Cloud to manage your Veva III's data, using your own MQTT broker may disable certain functions in Inzwa Cloud. Contact us before configuring your own MQTT broker.
The following instructions apply to a device configured to use Inzwa's MQTT services, but could be used to inform your own MQTT confirguration. These instructions also assume you're familiar with the MQTT protocol.
MQTT Broker URL¶
Inzwa's MQTT broker can be found at:
mqtt.inzwa.cloud
MQTT Broker Authentication¶
MQTT utilizes username/passwortd authentication key to grant access to the broker. If your organization hasn't been provided with MQTT broker credentials, please contact Inzwa.
Veva III MQTT Configuration¶
See the MQTT configuration command section. Message Routing must also be configured. In addition, the MQTT_OFF configuration property in the Main Commands configuration must be set to false
for MQTT to be activated.
MQTT Topics¶
The Veva III publishes data on four topics and consumes data on one topic. Each of those topics is described below
SAMP Topic¶
The SAMP topic is used to publish measurement samples like vibration, tilt and sound readings allowing for real-time access to sample data. The topic path is set using the PUB_SAMP
parameter of the MQTT configuration command.
Example SAMP Topic Responses
{
"type": "ppv peak",
"mac": "abc123",
"time": "2024-02-22T13:40:00.000-05:00",
"scale": "mm/s",
"ppv_x": [
7.722,
5.494,
"2024-02-22T13:39:31.779-05:00"
],
"ppv_y": [
17.538,
9.433,
"2024-02-22T13:35:12.781-05:00"
],
"ppv_z": [
6.911,
15.625,
"2024-02-22T13:35:13.249-05:00"
],
"pvs": [
18.258,
"2024-02-22T13:35:12.781-05:00"
]
}
{
"type": "beat",
"mac": "abc123",
"scale": "deg",
"time": "2023-10-26T12:11:31.907-04:00",
"base": "[0.000 0.000]",
"inst": "[-2.842 -1.950]",
"diff": "[-2.842 -1.950]",
"degc": "27.541"
}
{
"type": "mic peak",
"mac": "2b0005",
"time": "2024-05-06T17:25:00.000-04:00",
"units": "dBA",
"leq": 46.3,
"lmin": 26.5,
"lmax": 79.8,
"l1": 47.4,
"l5": 39.6,
"l10": 36.5,
"l50": 28.4,
"l90": 27.5,
"l95": 27.5,
"l99": 26.9
}
ALERT Topic¶
The ALERT topic is used to publish vibration, tilt and sound alert allowing for real-time access to alarm event data. The topic path is set using the PUB_ALERT
parameter of the MQTT configuration command.
Example ALERT Topic Responses
{
"type": "event",
"mac": "abc123",
"time": "2023-09-26T15:35:30.807-04:00",
"sequence": "3",
"scale_vel": "mm/s",
"scale_aud": "dBA",
"ppv": "[ 5.637, 4.257, 8.827]",
"hertz": "[ 4.902, 7.692,11.905]",
"pvs": "10.578",
"psl": "47.36"
}
{
"type": "event",
"mac": "abc123",
"time": "2023-09-26T15:35:30.807-04:00",
"sequence": "3",
"scale": "deg",
"base": "[ 0.000 0.000]",
"inst": "[ 0.000 -5.046]",
"diff": "[-1.229 -5.046]"
}
{
"type": "audio event",
"mac": "2b0005",
"time": "2024-05-02T16:42:40.302-04:00",
"sequence": "4",
"units_aud": "dBA",
"frame_ms": "100",
"weighting": "A",
"samp_rate": "48000",
"peak_aud": "42.72"
}
NOTIFY Topic¶
The NOTIFY topic is used to publish device related event information. The topic path is set using the PUB_NOTIFY
parameter of the MQTT configuration command.
Example NOTIFY Topic Responses
{
"type":"notify",
"msg":"up",
"mac":"abc123",
"fw_ver":"5.2.8"
}
REPLY Topic¶
The REPLY topic is used to publish responses to commands consumed by the COMMAND topic. The topic path is set using the PUB_REPLY
parameter of the MQTT configuration command.
Example REPLY Topic Responses
{
"type": "response",
"cmd": "stat_get",
"Temp": "22.0",
"Mode": "VIBR",
"State": "Monitor",
"Opts": [
"ADXL355",
"AB-RTCM"
]
}
{
"type": "battery status",
"Last Upd": "2024-02-25T02:36:30.886-10:00",
"Cap mAh": "52000",
"Used mAh": "6058",
"Rem mAh": "45942",
"Meas mA": "-44",
"Idle mA": "-8",
"Meas Volt": " 3.54",
"Rem Pct": "88"
}
{
"type": "response",
"cmd": "stat 3g",
"mac": "abc123",
"hwver": "1.1",
"fwver": "5.2.17",
"temp": "22.9",
"power": "Battery",
"volts": "3.5",
"modem": "Quectel",
"model": "EG25",
"rev": "EG25GGBR07A08M2G",
"ssid": "",
"rssi": "31",
"bat": "90%",
"net": "4",
"act": "FDD LTE",
"plmnid": "310260",
"band": "LTE_BAND_4",
"chan": "2250"
}
{
"type": "wifi status",
"mac": "abc123",
"hwver": "1.1",
"fwver": "5.2.15",
"temp": "21.1",
"power": "External",
"volts": "0.6",
"modem": "Dialog",
"model": "DA16200",
"rev": "3.2.7.1",
"ssid": "'7K7QKF'",
"rssi": "-36",
"bat": "0%"
}
COMMAND Topic¶
The COMMAND topic is used by the device to consume device related commands sent by a publisher to the MQTT broker. The topic path is set using the SUB_COMMAND
parameter of the MQTT configuration command. The available commands to send to a device are found in the Command Reference section.
QOS
When sending messages on the COMMAND topic, the publisher must use QOS 1 or 2.
Example COMMAND Topic Requests
stat get
stat bat
stat 3g
See the REPLY Topic section for response examples.
MQTT Clients¶
MQTT clients allow users or systems to publish and consume messages via MQTT. MQTT clients exist for virtually every modem programming language. GUI-based MQTT clients also exist allowing humans to interact with Veva III devices and are available for all modern operating systems. MQTT Explorer is one example of a GUI-based MQTT client.