MQTT Tag Provider to Another Tag Provider

When using the MQTT modules I know the tags auto populate under the new MQTT tag providers. Which is great but what if you had a pump that is sending MQTT data and want it in a tag provider called pump?

Forgive me I haven’t worked that much with MQTT yet, just a practice run to get it working.
Would you then just use expression tags in the pump tag provider looking at data in the MQTT tag provider?

1 Like

John,

I’ll assume you are publishing from this pump device sending MQTT messages?

With the Engine module you would create an Engine Custom Namespace for this with the Root Tag Folder named ‘pump’ and define the Subscriptions appropriate to select and allow the incoming MQTT messages parsing as a JSON payload.

Dan

Yes the pump will be sending MQTT messages using SparkPlugB specs.

For the custom name space is that added from the configuration section of the Engine module on the gateway?
If so, I assume in the MQTT videos that are available will show how to do this?

John,

Sorry for the Custom Namespace reference. This does not apply for Sparkplug messages. I see you are using Sparkplug sending from Ranger?

I don’t believe there are any videos, but we have tutorial pages.

Getting back to the provider issue, I am at a loss as to why you’d want another separate Tag provider? All incoming messages coming into Engine hit the MQTT Engine Tag provider. My original answer did not get to that either but as your question is for Sparkplug, not MQTT messages the answers can get complicated, have caveats and need clarification.

You can create another Realtime Tag provider and create reference Tags from the MQTT Engine Tags. IA likely has a video for creating that Realtime Tag provider and those Reference Tags.

But I wonder the need for the separate ‘pump’ Tag provider?

Dan

Well I’m looking at organizing tags by equpment type. This is just a way of organizing tags.

John,

I would organize these Tags by Group and Edge Node under MQTT Engine provider. This is a far easier method and much less work to setup because it is there by default. The Sparkplug formatted messages that arrive are organized by Topic of Group and Edge Nodes. It’s what we call a Sparkplug ID. By default this is how they arrive.

You publish from the Edge with this format (configured at Ranger?) for the necessary structure.
In your case for Equipment types you might choose to name several Groups in which each represents an Equipment type.

Or you can have Group / Edge Node / Device Type folder structure depending on the configuration tools at Ranger. You’ll need to run tests in your lab to see what works best for you.

But the limitation of the Sparkplug ID structure requires that two Edge Gateway devices sending into an Engine will only allow for unique Group/EdgeNode combinations (ie G1/E1/D1 and G1/E2/D2 but not G1/E1/D1 and G1/E1/D2). The Group/Edge structure must be unique from each publishing Edge Gateway.

Dan

Thanks for the info. I see what your saying about the folder structure. I will re-watch some of the videos to refresh my memory on all of this and you’re right, getting this up in a lab will be the best way to get it organized the way I want.

Thank you.