IMD SolutionComputing LibraryShop main store

Troubleshooting

Why Ignition Edge MQTT payloads look like unreadable bytes

Edge computing and IIoT Published 6 min read

Short answer

The unreadable characters are Sparkplug B's Protocol Buffers encoding rendered as text, which means the broker delivered the message intact. Fix the subscriber: select the Sparkplug decoder in MQTT.fx or use a Sparkplug-capable release such as MQTT Explorer v0.4.0-beta4. Leave the Edge Transmission format and the broker unchanged.

On this page
  1. What the unreadable bytes actually are
  2. Why MQTT Engine reads it and MQTT.fx does not
  3. Enable Sparkplug decoding in the subscriber
  4. Rule out delivery only when the window is empty
  5. Four ways to get readable data
  6. When changing the Transmission format is the right call
  7. The decision, case by case
  8. Questions asked

The unreadable characters are not a fault in your Edge gateway, your broker, or the message itself: the Cirrus Link MQTT modules Ignition uses publish Sparkplug B, which encodes every payload as Google Protocol Buffers binary, and a generic subscriber renders those bytes as text. The broker delivered the message intact — MQTT Engine reads the same tags because it decodes Sparkplug, while MQTT.fx and MQTT Explorer show raw bytes. Fix the subscriber: select the Sparkplug decoder in MQTT.fx, or use a Sparkplug-capable release such as MQTT Explorer v0.4.0-beta4. Leave the Transmission format and the broker alone; changing either to cure a display problem creates an interface problem instead.

What the unreadable bytes actually are #

Ignition Edge publishes through its MQTT Transmission module, and those messages follow the Sparkplug B specification: metrics, timestamps, and sequence numbers ride as Protocol Buffers fields — compact binary, not text. A text renderer treats each byte as a character code, and bytes that are not valid UTF-8 become the replacement character U+FFFD, the repeated placeholder in the output you saw. Metric names survive visibly because they are stored as plain strings inside the binary structure, so a tag name prints normally while the numbers around it collapse into garbage.

Worked example (Protobuf varint, illustrative value): a metric value of 300 is stored as a varint, least-significant 7 bits first, with a continuation bit on every byte except the last.

  1. 300 in binary is 100101100.
  2. Split from the low end into 7-bit groups: 0101100 (44) and 10 (2).
  3. Set the continuation bit on the first group: 44 + 128 = 172 = 0xAC; the last group stays 0x02.
  4. The wire bytes are 0xAC 0x02, and decoding gives (2 × 128) + 44 = 300.

In a text view, 0xAC is a continuation byte that cannot begin a UTF-8 character, so it renders as the replacement character, and 0x02 is a control character that renders as nothing. One integer becomes one placeholder glyph plus one invisible byte; scale that to dozens of metrics and you get the screen you saw.

Why MQTT Engine reads it and MQTT.fx does not #

Sparkplug-aware applications add birth and death message handling and Protobuf payload decoding on top of ordinary MQTT client behavior. MQTT Engine does both, so the same broker, topic, and bytes turn into tags and values. MQTT.fx and MQTT Explorer are general-purpose clients: they receive the bytes correctly and simply do not know what the fields mean. The broker — HiveMQ in this setup — forwards payload bytes to matching subscribers without translating them, which is why MQTT broker support is not Sparkplug support. Swapping HiveMQ for MQTT Distributor appears to fix the display only when the receiving application changes to MQTT Engine at the same time: two variables moved, and the decoder was the one that mattered.

Enable Sparkplug decoding in the subscriber #

  1. Leave the Edge gateway, broker, and Transmission settings untouched. Note the topic of one garbled message — Sparkplug B topics begin with spBv1.0/ — and save the raw payload as your reference.
  2. In MQTT.fx, select Sparkplug from the payload decoder drop-down shown with the received message; the same bytes then display as decoded fields.
  3. In MQTT Explorer, use v0.4.0-beta4 or later, the release that added Sparkplug B support and decodes the Protobuf payload to JSON for display.
  4. Verify the decode: metric names and values must match what MQTT Engine shows for the same edge node and topic.
  5. Trust the JSON only on topics inside the Sparkplug namespace. MQTT Explorer's decoding has been observed applying Sparkplug decoding to payloads that are not Sparkplug, so a decoded-looking message on another topic proves nothing.

Rule out delivery only when the window is empty #

A subscriber window full of garbage proves that connectivity, authentication, and the subscription all worked: the message arrived, and only its interpretation failed. An empty window is the opposite situation and a different fault — fixing an MQTT client that never reaches the broker is the diagnosis for that path. Before going there, confirm:

  • The host is reachable and the physical link is up.
  • Broker address, listener port, transport setting, and credentials in the Edge connection and in the diagnostic client point at the same intended listener.
  • Authentication actually succeeded; a reachable host is not an accepted connection.
  • The subscription filter matches the publisher's topic, for example spBv1.0/# to capture everything from the edge node.
  • The message you are judging is a fresh publication, not one buffered from an earlier session.

Four ways to get readable data #

Approach What changes Choose it when Limit
Select the Sparkplug decoder in MQTT.fx Subscriber display only You need to inspect existing Edge messages without touching production Changes the display interpretation only; publisher and broker stay untouched
Use MQTT Explorer v0.4.0-beta4 or later Subscriber application You want decoded JSON fields in a general-purpose browser Decoding can be applied to non-Sparkplug payloads; confirm the topic namespace first
Receive through MQTT Engine Receiving application The tags must land in Ignition as tags, screens, or history Requires the Sparkplug-aware module, with MQTT Distributor supplying the broker role when Ignition hosts it
Change the Transmission server data format Publisher payload representation A downstream system cannot consume Sparkplug at all Offered formats depend on the installed Transmission release; earlier releases supported Sparkplug only

When changing the Transmission format is the right call #

Only when a downstream consumer genuinely cannot parse Sparkplug. The data format setting lives in the Transmission server settings, and which formats it offers depends on the installed module release. Treat the change as an interface redesign, not a repair: every Sparkplug subscriber, MQTT Engine included, expects the Sparkplug topic namespace, the birth and death lifecycle, and the Protobuf payload, so list every subscriber before you flip it. A payload that merely looks readable in a generic client is not a reason to change the publisher, because the client can generate that view from the binary it already receives.

The decision, case by case #

  • Garbled bytes in a connected subscriber: delivery is proven and decoding is missing. Select the Sparkplug decoder in MQTT.fx, or open the topic in the MQTT Explorer release named above. Do not touch the Edge gateway, the broker, or Transmission.
  • Empty subscriber window: delivery is the fault. Work the connection, credentials, and topic filter before any payload question.
  • A downstream system that cannot parse Sparkplug: change the Transmission server data format on a release that offers what that system needs, as a planned interface change with every subscriber accounted for.
  • Swapping the broker to fix the display: no. HiveMQ forwarded the bytes correctly; only the receiving application's decoder was missing.

Questions asked

Is the unreadable payload compressed or encrypted?

Neither. Sparkplug B carries structured data as Google Protocol Buffers binary, with no compression or encryption of its own. If your broker link uses TLS, that protects the transport and does not change how the payload bytes represent values. The message is intact and decodable; the text view is what makes it look damaged.

Where exactly is the Sparkplug decoder setting in MQTT.fx?

It is a drop-down list of payload decoders attached to the received-message view; choosing Sparkplug re-renders the message you already hold, so nothing needs resubscribing. The control belongs to payload viewing, not to the broker connection panel.

Can Node-RED decode these Sparkplug payloads?

Yes. Feed the MQTT output into a protobuf decode node, load the Sparkplug proto file in its Proto File field, and set the protobuf type to Payload. The node then emits the decoded message structure, which downstream function nodes can read for routing or storage.

Will switching the client to a different character encoding fix it?

No. Re-labelling the same bytes as Latin-1 or another code page yields different garbage, because the message is a binary schema rather than text saved in the wrong encoding. Only something that understands the Protobuf structure turns the bytes into fields; character-set selection just changes which glyphs stand in for the same bytes.

Is there another client with Sparkplug support built in?

The Chariot MQTT server ships a bundled client that renders Sparkplug payloads, free to use independently of the broker's own trial mode. It is not a standalone application, though, so weigh running the server component against using the MQTT.fx decoder or a recent MQTT Explorer build for bench diagnostics.

Keep reading

  • Comparison

    Getting Wonderware Historian data into Ignition Edge for MQTT

    Yes — Ignition Edge can publish this data as MQTT Sparkplug, but through two separate routes. Live values come from the existing DAServer acquisition layer behind a DA-to-UA gateway, because Edge's OPC client is UA-only. History and aggregates come from SQL queries against the Historian Runtime database, using its documented stored procedures.

    Edge computing and IIoT

  • Troubleshooting

    Trace Ignition Edge MQTT values that only update on refresh

    Values that appear only after a refresh mean the Edge transmitter publishes nothing on its own: the forced republish masks a stalled change-driven path. Set a 10,000 ms scan rate with a 0.00000001 deadband and a moving signal publishes at the scan rate, then verify by counting 6 updates per minute with no refresh anywhere. Trace tag value and timestamp at each hop to find where it stops.

    Edge computing and IIoT

  • How-to

    Bridging OPC UA PLC data to MQTT with an edge PC

    Keep the OPC UA server on the PLC side and give MQTT publishing its own role on a separate edge PC that acts as the OPC UA client and MQTT publisher. Commission the two links independently — first a verified tag read, then a verified subscriber message — and only then widen the tag set.

    Edge computing and IIoT