MQTT
The gateway can publish sensor data to your own MQTT broker, and subscribe to the same topic for commands. It acts as an MQTT client and works with any broker from MQTT 3.1.1 up to MQTT 5.
Unlike Modbus and OPC UA, MQTT is a push integration: the gateway publishes whenever a sensor updates its data — on its sensor update interval, or whenever a waveform is taken because of an alarm or an on-demand request.
Settings
Section titled “Settings”Configured in the Gateway Admin Console:
| Setting | Notes |
|---|---|
| Protocol | mqtt://, mqtts://, ws:// or wss://, depending on what your broker supports |
| MQTT server | Hostname or IP of your broker |
| Port | The port your broker listens on |
| Username | Optional |
| Password | Optional |
| Publish Topic | Where the gateway publishes data and subscribes for commands |
| Publish QoS | Quality of Service tag. When in doubt, use 0 |
| Append Gateway and serial number as subtopics | Splits the stream per gateway and per sensor |
| Publish waveforms | See the warning below |
| Allow Gateway management through MQTT | See the warning below |
Pressing Save stores the settings and restarts the gateway. After it restarts it connects to the broker and shows the connection state in the MQTT section at the top of the console. Reset reverts to the previous values.
Message fields
Section titled “Message fields”Every published JSON message carries these fields:
| Field | Description |
|---|---|
dataType |
"collection" for vibration time waveforms, "stateupdate" for everything else — including a vibration sensor’s own internal RMS measurement |
type |
Sensor type |
phantomCode |
Sensor serial number |
gwSerial |
Gateway serial number |
timestamp |
Seconds since 1970, when the measurement was taken |
battery |
Battery level in volts |
batteryType |
1 = 1/6D, 2 = AAA, 3 = CR2032, 4 = CR2477 |
temperature |
Sensor internal temperature in °C |
version |
Firmware version |
rssi |
Sensor signal strength |
Beyond telemetry
Section titled “Beyond telemetry”Everything above describes the gateway publishing sensor data. The same MQTT connection can also carry the Management API, which lets you read the gateway’s full state and send it commands.
Coexistence
Section titled “Coexistence”MQTT runs at the same time as any other protocol the gateway supports, including EI Analytic, EI Monitor, OPC UA and Modbus.