MQTT — automatic discovery and liveness tracking
The publish/subscribe protocol of IoT and field sensors. The MergenHub MQTT driver decodes payloads automatically and clearly marks values as stale when a topic goes silent.
| Tag | Address | Value | Quality |
|---|---|---|---|
| Temperature | DHT22/temp | 24.6 | |
| Humidity | DHT22/humidity | 58.2 | |
| Door_State | sensors/door/state | 1 | |
| Battery | sensors/n1/batt | 3.71 | |
| Motion | sensors/pir/motion | 0 |
The MergenHub interface — values discovered via MQTT topic / JSON-pointer addresses; liveness via arrival-watchdog.
What is MQTT?
MQTT is a lightweight publish/subscribe protocol where devices publish and subscribe to topics through a broker. It is ideal for sensors, IoT gateways and cloud links; payloads are usually JSON, sometimes binary or plain text.
Where is it used?
Remote field sensors, LoRa/NB-IoT gateways, energy metering links and cloud telemetry. Wherever the device "pushes" data at its own pace and event-driven flow is preferred over polling.
Channel model, smart discovery and liveness
MQTT is not a poll-based PLC; the driver models that difference correctly from the architecture up.
Channel-level broker
Broker settings live at the CHANNEL level; all device-topics on the same broker share one connection — no double connections or wasted session overhead.
Smart JSON discovery
Automatically discovers fields in incoming payloads via JSON-pointer and generates tags; nested objects, arrays and deep structures are walked (with an upper bound).
Multi-format payloads
JSON, key=value, CSV, XML and binary payloads; second/millisecond time-stamp detection.
Arrival watchdog
The expected arrival interval is tracked per topic; if no new message arrives in time, the tag quality is degraded.
Stale data never stays Good
Some tools hold the last value as "Good" indefinitely; MergenHub marks the quality of a silent topic as UNCERTAIN and shows it on screen.
Sparkplug-ready
The channel=broker / device=topic model extends naturally to structured payload frames (e.g. Sparkplug).
MergenHub