Integrations & Setup
...
MQTT
Testing an MQTT connection
this guide shows how to connect and read data with mqtt explorer for both mqtt collector types in factry historian mqtt (generic) free form topics with json payloads mqtt (sparkplug b) sparkplug v1 0 topics/payloads the goal see paths/topics and payloads arriving we won’t publish anything example broker uses unencrypted tcp tcp\ //mqtt realfakedata com 1883 in production, use tls (e g , ssl //host 8883) with authentication prerequisites mqtt explorer installed (windows/macos/linux) network access to mqtt realfakedata com 1883 steps add new connection in mqtt explorer host mqtt realfakedata com port 1883 protocol mqtt/tcp (no tls) in advanced → topic , add an initial topic (see below per collector) connect and watch the left topic tree ; click nodes to inspect payloads on the right note the exact topic paths and payload fields you’ll use when configuring historian mqtt (generic) subscribe filters start broad to discover, then narrow discovery # (briefly, for exploration only) typical factry/demo/# narrow factory/line 1/mixer 01/metrics wildcards \+ = one level (factory/+/metrics) # = multi level, last (factory/#) what to look for topic paths under your filter payload format — usually json value fields (e g , temperature, pressure) timestamp field (e g , ts) quality/status (e g , status) identifiers/tags (e g , machineid, line) example payload you might see map to historian (generic) collector mqtturl tcp\ //mqtt realfakedata com 1883 topics the filter you confirmed (e g , factry/demo/#) qos 1 (recommended) timestamplayout (default) rfc3339 (or unix/unixmillis/unixmicros/unixnanos) measurement (per datapoint) measurementpath $ temperature timestamppath $ ts timestamplayout rfc3339 statuspath $ status tagnamesandtagvaluepaths {"machine" "$ machineid"} if timestamppath / timestamplayout are omitted on the measurement, the collector’s timestamplayout is used mqtt (sparkplug b) subscribe filters (sparkplug v1 0) sparkplug topic schema spbv1 0/\<group>/\<message type>/\<edgenode>\[/\<device>] \<message type> ∈ nbirth, ndeath, dbirth, ddeath, ndata, ddata, ncmd, dcmd start with one of discovery (group) spbv1 0/\<group>/# all node data for an edge node spbv1 0/\<group>/ndata/\<edgenode>/# all device data under an edge node spbv1 0/\<group>/ddata/\<edgenode>/+ what to look for birth messages (nbirth/dbirth) inventory of metrics and initial state data messages (ndata/ddata) live metric updates payload binary map to historian (sparkplug b) collector mqtturl tcp\ //mqtt realfakedata com 1883 topics your confirmed sparkplug filter (e g , spbv1 0/\<group>/ndata/\<edgenode>/#) timestamplayout (default) set per your publisher (e g , unixmillis) measurement (per metric) groupid \<group> edgenodeid \<edgenode> deviceid \<device> (if applicable) metricname e g , temperature troubleshooting connected, no data widen your filter (# briefly to discover), then narrow again some topics only update periodically too much noise tighten the filter (e g , factry/demo/hello or spbv1 0/\<group>/ndata/\<edgenode>/+) connection blocked ensure mqtt realfakedata com 1883 is reachable (firewall/vpn/proxy) once you can see the paths and payloads in mqtt explorer, copy those exact topics and json fields into your historian collector/measurement settings