Obtaining data from non-Sparkplug MQTT

Hello.
I have two questions about the MQTT engine:

  1. How can we get data from other MQTT clients(custom namespace) like Lora data? I know how to get data when it’s published from Ignition Transmission, but when I try to use other topics, I see the payload in logs but the tag is not created.

  2. When I want to get both Sparkplug data and a custom namespace, it doesn’t work. When I add any custom namespace, the connection breaks, and I don’t receive any payload from SPB either.

Hello Jonas,

I’ll answer nr.2 first. If you add a Custom Namespace and you get disconnected check the log for a “Failed (to) Subscribe on …” and the Topics are listed there but may not show which it failed on unless you are using Distributor.

Your Server must have ACL entries for these additional MQTT Client Topics used by your Custom Namespace.

For nr.1 I am not sure I follow the fact that you see payload in logs. I suspect you are referring to another tool’s log such as MQTT Explorer.

Custom Namespace need a specific Topic such as mqtt/# or other designated Topics coming from the Client to match the Server/Broker ACL for this User. Don’t use ‘#’ as this will also attempt to parse the spBv1.0 encoded messages and it will fail with log entries.

Daniel

Hi Daniel

Thank you for your response. I was away for a week and couldn’t reply sooner.

I have two connections to the EMQX broker: Test1 (SM/#) and Test3 (spBv1.0/#). I publish data from Ignition Transmission to Test3, while we use LoRa to publish data to Test1.

On the other ignition side, we have MQTT Engine set up to receive data from both Test1 and Test3. However, I’m having trouble getting both to work together.

If I enable Sparkplug B, I have to remove the custom namespace to receive data from Test3, but this causes an error with Test1. On the other hand, if I disable Sparkplug B and add the namespace (SM/#), I can receive data from Test1, but Test3 stops working.

Here are some screenshots of what I did:
MQTT Engine:


Ignition designer:

MQTT Broker:


Ignition Namespace:


BR