Forum

Ignition MQTT Engin...
 
Notifications
Clear all

[Solved] Ignition MQTT Engine shows no tags, broker sees every message from the gateway

8 Posts
3 Users
0 Reactions
82 Views
(@mira88)
New Member
Joined: 1 year ago
Posts: 0
Topic starter   [#99]

Ignition 8.1 with the Cirrus Link MQTT Engine module, Mosquitto broker on a VM, and an edge gateway publishing values off an S7-1500 as JSON on topics like plant removed link I subscribed to # with mosquitto_sub on the broker and the messages come through every second, payload is clean JSON.

On the Ignition side MQTT Engine says connected, the Servers page shows Connected, one connection. The MQTT Engine tag provider is empty though. Not a single folder.

So I changed the broker credentials from anonymous to a user and password on both sides, no change, then set QoS 1 on the gateway instead of 0 and restarted the module, same again. Certificates are off for now, plain 1883, so it isn't that either.

Why does the broker see everything and the Engine see nothing? Does the Engine maybe want the topics in a particular shape before it'll build any folders, because plant/line2/temp is all we publish?


Advertisement

   
Quote
(@eddieb)
New Member
Joined: 1 year ago
Posts: 0
 

Post one full topic and one payload exactly as mosquitto_sub prints them. And on 8.1 the Engine has a Namespaces page, is there anything under Custom Namespaces, or only the default Sparkplug one? I think that's where this goes wrong.


Advertisement

   
ReplyQuote
(@mira88)
New Member
Joined: 1 year ago
Posts: 0
Topic starter  

plant/line2/temp {"value": 41.2, "ts": 1757923200}

Namespaces page has the Sparkplug B one enabled, nothing under Custom. And the broker log shows the Engine subscribing to spBv1.0/#, not #. So it isn't even listening on my topics. Is that it?



   
ReplyQuote
(@redgum)
New Member
Joined: 2 years ago
Posts: 0
 

The subscription line you found is the answer. The Engine isn't a generic MQTT client. Out of the box it speaks Sparkplug B, subscribes to spBv1.0/# and builds its tags from the birth certificates an edge node sends, group, edge node, device, metrics. Raw JSON on plant/line2/temp is traffic on a topic it never asked for. Credentials and QoS were never in it.

Two ways. Better one, if the gateway can do it, switch the gateway to Sparkplug B and the tags turn up under Edge Nodes with the birth and death handling that comes with it. Otherwise add a Custom Namespace, subscribe to plant/#, JSON payload on, and it builds tags from the keys.

There's a writeup on the MQTT side here: https://plctr.com/utilizing-iiot-industrial-internet-of-things-with-plc-systems/



   
ReplyQuote
(@mira88)
New Member
Joined: 1 year ago
Posts: 0
Topic starter  

Added a Custom Namespace, plant/# with JSON on. Folders appeared, plant, line2, temp, with value and ts as tags. Values update, so that works.

Quality stays Good even when I stop the gateway though, which bothers me. Broker log still shows the Engine on spBv1.0/# alongside it.



   
ReplyQuote
(@eddieb)
New Member
Joined: 1 year ago
Posts: 0
 

That's why Sparkplug exists.

A custom namespace has no death certificate, so the last value just sits there. If the gateway can publish Sparkplug, do the smallest test you can. One metric, and watch for NBIRTH and NDEATH on spBv1.0 in the broker log.



   
ReplyQuote
(@mira88)
New Member
Joined: 1 year ago
Posts: 0
Topic starter  

Gateway has a Sparkplug B option. One metric first, then the lot. Tags turned up under Edge Nodes with the group and node ID as I'd set them, and pulling the gateway's cable takes them stale inside the keepalive. That's what I wanted.

Turns out the Engine was never listening to me at all. It sits on spBv1.0/# and builds its tags from birth certificates, so my JSON topics may as well not have existed. Sparkplug on the gateway is the real fix. The custom namespace works, it just leaves everything Good forever, which is worse than nothing on a dashboard.

The gateway's Sparkplug node name has a space in it and the Engine takes it. I'm not sure that's allowed. Leaving it until it breaks.

Thanks redgum, eddieb.



   
ReplyQuote
(@redgum)
New Member
Joined: 2 years ago
Posts: 0
 

The broker log telling you what it subscribed to. Nice catch.



   
ReplyQuote
Share: