Problem with Sparkplug and Ignition Tag Browser


I setup a non-secured Mosquitto MQTT Server on My Linux.
I created an Integer and set it to Public: nTestPublicVar.

I configured MQTT on EPIC to “String payload” and successfully published tag value.
using MQTT spy:

using MQTT FX:

But when EPIC MQTT is set to “SparkPlug” mode
MQTT tool does not react. Why there is no data?
I was hopping to see a encrypted data.

On ignition side:
I am connected to broker:

but cannot see data on
Tag Browser:

  1. When you use Sparkplug, the topic path changes a great deal.
  2. I am not familiar with ‘MQTT Spy’ or ‘MQTT Tool’. Do they decode Sparkplug payloads?
    The only tool I know that does is MQTTFX.

Hi Ben,

I refer MQTT Tool to Both MQTT-SPY and MQTT.FX

Seems that when I set EPIC MQTT setting to “Sparkplug Payload”, both MQTT tools does not react to change in variable value.

But when I set EPIC MQTT setting “String Payload” both MQTT returns new value of variable.

Is the a way to troubleshoot, EPIC is indeed publishing Sparkplug Payload?

I even updated to the latest firmware, 2.0.2-b.139

Thank you.

So many (many) customer and all of us here at Opto are using EPIC with Sparkplug, so we know for sure it works… We just need to trouble shoot your end.

Are you using the native MQTT built in to groov Manage or Ignition?
You mention both.
It would be good to take a step back and troubleshoot one at a time.

This makes it more intriguing to solve. Points to note are, I am not using chariot but Mosquitto broker.
2nd point is, String Payload works (MQTT.FX returns change in value) but Sparkplug payload does not.

Do we have to prepare anything to the variable for sparkplug to work?
Do we have to make special configuration on the broker side?
Do we have to make special configuration on MQTT.FX to accept sparkplug?

By the way, does EPIC has a setting to specify QoS of sent messages?

Thank you.

Taking your questions from the top;

  1. No. A variable is a variable regardless of if you are publishing it as a string or as a Sparkplug payload.
  2. No. The broker is transparent to the MQTT payload. It does not unpack or inspect the payload in any way.
  3. Sort of. If you want to decode the Sparkplug payload in MQTT.FX, you need to select Sparkplug from the drop down list as per the image in my second post in this thread. (If you don’t change the payload decoder type, you will see the payload compressed)
  4. No. I don’t know of any setting in groov Manage MQTT configuration to set the QoS.

So, why is it working for me and not you?
Here is my configuration ;

The key is to leave the Primary Host ID blank.
If you put ANYTHING in there, you will not connect to the Mosquitto broker and thus you will never see any data.

The Primary Host ID will inform the broker if it is accepting connections or not, if you don’t have any other subscribers with the EXACT same Primary Host ID, then the broker will reject your clients connection and no data will be published.

In all your screenshots, you never included this config area, so we don’t know if you have a Primary Host ID or not. (I suspect you do have something in there - given that it will publish string payloads Ok, but not sparkplugB payloads)

Here is a screenshot of MQTT tools showing the compressed SparkplugB payload from my Mosquitto broker.

It is just as you expressed in your first post, you clearly see it compressed, and indeed you do.

So, to summarize…
I am using EPIC firmware 2.0.2.
I have ‘Make Public’ selected on some PAC Control variables (floats, ints and strings).
I have configured my Mosquitto broker in the groov Manage interface being sure to leave the Primary Host ID blank.
I have set the the device type as ‘Controller’.

You should be up and running with those similar settings on your EPIC.

1 Like

Solved it. MQTT Broker must be configured to enable authentication, that is with Username and Password.

Solved by learning, Ignition comes with a broker module called MQTT Distributor, while setting this up, it require you to enter username and password.
So I setup Mosquitto MQTT to require password as well, and it worked. :slight_smile:

Thank you for the time, Ben.

Sweet. Glad you got it working. Thanks for letting us know.

My Mosquittto did not have any user/pass setup.
Worked fine.

Fun and games.