MQTT
The MQTT plugin connects to a broker and maps topics to signals. A topic with a bare number is one signal; a topic with a JSON object can feed several, one per field. No schema file is needed: the plugin browses the broker for what is publishing, and you pick your signals.
Several MQTT interfaces can run in one session, on different brokers.
Config fields
Section titled “Config fields”| Field | Type | Default | Notes |
|---|---|---|---|
| Broker URL | text | localhost | Hostname or address, e.g. broker.example.com |
| Port | number | 1883 | 1 – 65535. Usually 1883, or 8883 with TLS |
| TLS | combo | Off | Encrypt the connection and verify the broker’s certificate |
| CA certificate | file | empty | Shown with TLS on. Only for a broker with a private or self-made certificate |
| Client ID | text | vizualog-client | Must be unique on the broker. Discovery connects as <Client ID>-discovery |
| Username | text | empty | Optional |
| Password | password | empty | Optional. Hidden as you type, and kept in your system’s keychain rather than in the session |
| QoS Level | combo | 0 - At most once | 0, 1 or 2 |
| Keep-alive (s) | number | 60 | 1 – 3600 |
| No-data warning after (s) | number | 0 (off) | Warn when nothing has arrived for this long. Off by default: a device that publishes every 30 s, or only when a value changes, is not faulty |
Finding signals
Section titled “Finding signals”Instead of loading a file, you browse the broker.
Start discovery and the plugin subscribes to the wildcard topic #, listing each topic as a
message arrives on it. Choose the topics you want and they become signals, with the topic as
their topic addressing. Set the name, unit, type and range in the app afterwards.
A topic marked retained is the broker’s stored last value, sent as soon as you start browsing. It may be old, from a device that has stopped publishing.
A topic with a JSON object or array payload is listed as its fields, one entry per numeric value,
for example plant/motor.temp and plant/motor.rpm. Each field you pick becomes a signal with
the topic and a jsonPath to the field.

A topic that publishes nothing while you browse, and has no retained value, does not show up. Keep discovery open until it publishes. MQTT signals cannot be loaded from a signal file yet, and you cannot type a topic in by hand.
How payloads become values
Section titled “How payloads become values”On connect, the plugin subscribes to the topics your signals name, once per topic however many signals read from it. When a message arrives:
- A signal without a
jsonPathreads the whole payload as text and parses it as a number.trueandfalseare also accepted and become 1 and 0. - A signal with a
jsonPathreads one value from a JSON payload, parsed once for all signals on the topic. The value can be a JSON number,true/false, or a string holding a number. - Anything else, such as a CSV fragment, a word, or a missing or non-numeric JSON field, is reported as a warning for that signal and skipped.
- Messages within 20 ms of each other are merged into one sample. It holds every signal’s latest value and is timestamped when its newest message arrived. Signals with no value yet are empty, not 0.
This shows in recordings. MQTT delivers one topic at a time, so a recording is a series of rows at arrival times, not a synchronized scan. In each row only the values that just arrived are new. Fields of one JSON payload always land in the same row. Merging never drops a value: if a signal gets a second value before the row is written, the row is written first.
jsonPath
Section titled “jsonPath”jsonPath is a small subset of JSONPath: object keys and array indices, nothing else.
| Path | Picks |
|---|---|
temp or $.temp | temp at the top level |
motor.temp | temp inside motor |
sensors[0].value | value of the first element of sensors |
["temp.avg"] | a key that contains ., [, ] or a quote |
empty or $ | the whole payload, read as a bare number |
Filters, wildcards and recursive descent ([?()], [*], ..) are not supported. An invalid
path is reported on connect, and that signal does not update.
Turn TLS on for a broker that encrypts its connections, usually on port 8883. VizuaLog always checks the broker’s certificate and refuses to connect if it fails, so your password never goes to an unverified server.
- A broker with a public certificate (most cloud brokers) needs nothing else.
- A broker with a private or self-made certificate (a Mosquitto on your own network, a
company CA) needs its CA certificate: choose the
.pem,.crtor.cerfile that signed the broker’s certificate.
If the check fails you get Could not verify the certificate of the broker… with the reason. Client certificates (required by AWS IoT Core) are not supported yet.
When the broker goes away
Section titled “When the broker goes away”- A failed first connect (wrong host or port, broker not running) stops at once with Connection failed and the reason.
- A working connection that drops is retried automatically after 1 s, then 2, 4, 8 … up to every 30 s, until it succeeds. The interface shows Reconnecting, with one notification if it lasts more than a couple of seconds. When the broker is back the plugin resubscribes and data resumes. A recording has a gap for the outage.
- The broker refusing you (wrong username or password, not authorised, client ID rejected) is never retried.
- Disconnect stops the retrying at any time.
Good to know
Section titled “Good to know”- A retained message (the broker’s stored last value, sent when you connect) is shown on the dashboard but not recorded, since its age is unknown. The signal is recorded from its first live message.
- An unreadable payload is reported and skipped; the connection carries on and the interface does not fail.
dataTypeis advisory: payloads arrive as text and are parsed the same either way. It decides how the value is displayed and recorded.- Not supported yet: loading MQTT signals from a signal file, typing a topic in by hand, client certificates (mutual TLS), and binary payloads such as Sparkplug B.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Where to look |
|---|---|
| Cannot connect | The error names the cause. Could not reach the broker: address, port, firewall. Username or password / Not authorised: credentials |
| Reconnecting over and over | The broker is unreachable, or another client uses the same Client ID and the broker keeps dropping one of you |
| Discovery finds nothing | Nothing is publishing while you browse, or the broker restricts wildcard subscriptions |
| A signal never updates | Its topic is misspelled, or the publisher is not running. Check discovery for the topic as the broker actually spells it |
| Errors about an unparseable payload | The payload is not a bare number or true/false. If it is JSON, discover the topic again and pick its fields. The connection stays up; the message is reported and skipped |
| A JSON field never updates | The field is missing from the payload or is not a number; the warning names the path. Topics are case-sensitive, and so are JSON keys |