# How to receive sparkplug B MQTT message in Ignition

**URL:** <https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716>\
**Category:** Ignition\
**Created:** [November 9, 2023, 3:05pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716 "2023-11-09T15:05:51Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 9, 2023, 3:05pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/1 "2023-11-09T15:05:51Z")

</div>

hello,  
I have some data like temperatures that are being published to my MQTT server but then I want to acces them in Ignition through sparkplugB. This is what I get in my MQTT server

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/5/c5c1f73fa482ffc1524b01d235f15e8b68fdc97b.png)  
and I want to have acces to the temperature value in my ignition. I have already set up a connection with the server in the websever and I can see the topic in the designer but it is like this  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/4/04d93700617f697d9cd38b85c9b35d4f4b6d3c76.png)  
I have no idea how to work with sparkplug B and cannot find it on the internet either so hope that there is someone here that can help me out.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [November 9, 2023, 3:30pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/2 "2023-11-09T15:30:20Z")

</div>

This doesn't look like sparkplug B to me. This is just a JSON string/document being passed over MQTT that you'll need to break out on your own. Sparkplug B will show up in your MQTT Engine tag provider with tags split out automatically for you with timestamps and quality being passed over the MQTT message.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 9, 2023, 3:34pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/3 "2023-11-09T15:34:07Z")

</div>

Okay but how can I transform this to sparkplug B and publish it back in the mqtt server so that it is visible in ignition? I see people use node red but I don't know how to translate the json topic into sparkplug B

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 9, 2023, 3:47pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/4 "2023-11-09T15:47:05Z")

</div>

If I write this to my ingition chariot mqtt server it is still not visible in ignition.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/f/8f0f38acc50c9506cfc41cda67c0ae4919f1fcb8.png)

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [November 9, 2023, 3:54pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/5 "2023-11-09T15:54:40Z")

</div>

Are you using the CirrusLink module to push this data to your MQTT server or are you trying to do it by manually? Sparkplug B entails more than just pushing a specially formatted topic payload. There's the birth, last will and testament, etc that all needs to be part of it. It's easier to just use the CirrusLink module (I haven't used NodeRed with anything besides JSON payloads for MQTT, so not sure how well it complies with Sparkplug B).

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 9, 2023, 4:02pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/6 "2023-11-09T16:02:01Z")

</div>

Do you mean these modules or?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/8/5839961b84a96ff2fc6b3fb51a0e3c82be7cd756.png)

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [November 9, 2023, 4:02pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/7 "2023-11-09T16:02:31Z")

</div>

If you've already got this data coming into your MQTT broker, perhaps you just need to enable a Custom Namespace in MQTT Engine?

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 9, 2023, 4:04pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/8 "2023-11-09T16:04:17Z")

</div>

I have...

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/4/a4f84f57bf76ee48ad1f07cd66b6b784d75b14ad.png)  
But it is not coming under this folder in the designer

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [November 9, 2023, 4:06pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/9 "2023-11-09T16:06:03Z")

</div>

Yes, you'll use the MQTT transmission module on the edge devices where the tags and data are collected (the spokes of a hub and spoke architecture). The MQTT engine module will be used to collect the data from all of the transmission modules and allows you to write to these same tags which will automatically write to the NCMD/DCMD topics to write data back. The engine module is the hub of a hub and spoke architecture. Finally the distributor module is the MQTT broker and facilitates the hub and spokes communications. This doesn't have to be the distributor module and can be any MQTT broker for the most part. I use EMQx, others use Mosquitto.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [November 9, 2023, 4:07pm UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/10 "2023-11-09T16:07:01Z")

</div>

> [@Stef\_Velers](#):
>
> But it is not coming under this folder in the designer

Time to look at the logs.. I'm not sure of which ones off the top of my head, but I know there are some DEBUG/TRACE loggers in MQTT Engine that you can enable to get more visibility of when messages are published to topics that you're subscribing to with your Custom Namespace configuration.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 10, 2023, 7:04am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/11 "2023-11-10T07:04:29Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/93ea23a097f1de277cfc401b08686f5719127057.png)  
these maybe?

---

<div class="post-metadata">

**Author:** ![Jon\_Forbord](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@Jon\_Forbord](https://forum.inductiveautomation.com/u/Jon_Forbord)\
**Post date:** [November 10, 2023, 7:34am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/12 "2023-11-10T07:34:19Z")

</div>

Sparkplug B will come under "Edge Nodes/Group ID/Node ID/Device ID/" in the MQTT Engine tag provider. MQTT engine is by default setup to subscribe to SpB topic, so you only need to connect MQTT engine to the MQTT server. The setup you show there, is for custom namespaces. SpB is not a custom namespace. From what I see on the broker, you're at a minimum missing the Birth Certificate.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 10, 2023, 8:08am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/13 "2023-11-10T08:08:44Z")

</div>

> [@Jon\_Forbord](#):
>
> Birth Certificate

where can i get that or use it?

---

<div class="post-metadata">

**Author:** ![Jon\_Forbord](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@Jon\_Forbord](https://forum.inductiveautomation.com/u/Jon_Forbord)\
**Post date:** [November 10, 2023, 8:25am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/14 "2023-11-10T08:25:33Z")

</div>

The easiest "intro" to Sparkplug B is to use the Cirrus Link modules. Transmission you use to primarily convert Ignition-tags into Sparkplug B payloads. MQTT engine consumes the SpB namespace and converts SpB payloads into Ignition-tags.

_If_ you want to send SpB payloads and topics writing a custom application, I highly recommend getting a descent grasp on the Sparkplug B specification prior to beginning. There are a few good resources on Youtube and some blogs around. Look for Kudzai Manditereza's content, it's good and technically detailed.

A Birth Certificate is an MQTT payload sent to a specific topic that announces to the "world" what tags/metrics/data is contained in the "node". It needs to be formatted according to the SpB specification.

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 10, 2023, 8:32am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/15 "2023-11-10T08:32:51Z")

</div>

I have added this and now I can see a spBv1.0 poping up in my chariot mqtt server with DBIRTH, NBIRTH and NDEATH topics.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/8/9832ff140536bdc7ca26aecf914cfcd4be455d70.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/17f33c7ab78b13df2ee3e37dd60528396ead3c64.png)

How does this work? Can I just upload payloads in the sparkplug B format and then they are usable in ignition?

---

<div class="post-metadata">

**Author:** ![Jon\_Forbord](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@Jon\_Forbord](https://forum.inductiveautomation.com/u/Jon_Forbord)\
**Post date:** [November 10, 2023, 8:53am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/16 "2023-11-10T08:53:42Z")

</div>

Kind of. MQTT engine takes payloads from a sparkplug B compliant MQTT client, and turns them into Ignition-tags. These Ignition-tags are "useable" in Ignition. Have you read through the manual on how to setup a transmitter?

[https://docs.chariot.io/display/CLD80/MT%3A+Configuration](https://docs.chariot.io/display/CLD80/MT%3A+Configuration)

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 10, 2023, 10:15am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/17 "2023-11-10T10:15:59Z")

</div>

I have read it but still not sure how to use it properly.  
I tried posting a topic with node red to my mqtt server but it is just not coming under edge nodes/plc 1

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/9/6969a0255228cc5174933e42a4f3e08ade7a0f77.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/3/93e6aa52f7557c4c16053efe50741bc63e06c9f9.png)

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 10, 2023, 10:45am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/18 "2023-11-10T10:45:30Z")

</div>

the transmitter is giving all the tags I have in a certain tag provider to my MQTT server but I want a way to send data from the MQTT server to ignition. For example, I have a temperature in our office that is being published to my mqtt broker and I want to use that temperature in my ignition. I'm just not getting it available in ignition. Not even when I try to publish a sparkplug b formatted topic with node red to mqtt.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/6/a64c017777aa439218ea4c41711448492dfa4698.png)  
This is the last topic I tried to send and it is visible in mqtt but not in ignition tag browser.

---

<div class="post-metadata">

**Author:** ![Jon\_Forbord](https://avatars.discourse-cdn.com/v4/letter/j/d9b06d/32.png) [@Jon\_Forbord](https://forum.inductiveautomation.com/u/Jon_Forbord)\
**Post date:** [November 10, 2023, 10:57am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/19 "2023-11-10T10:57:37Z")

</div>

> [@Stef\_Velers](#):
>
> the transmitter is giving all the tags I have in a certain tag provider to my MQTT server but I want a way to send data from the MQTT server to ignition. For example, I have a temperature in our office that is being published to my mqtt broker and I want to use that temperature in my ignition. I'm just not getting it available in ignition. Not even when I try to publish a sparkplug b formatted topic with node red to mqtt.

Sounds like you don't need to use Sparkplug B. You can publish regular mqtt instead. Back to the original post you sent, it seems you just need to active "json-payload" in your custom namespace configuration, and the values should show up as Ignition-tags. It's under MQTT Engine settings in the gateway config.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/a/aa752e44bb7491105ada83ae446ea8cc5b805e01.png)

---

<div class="post-metadata">

**Author:** ![Stef\_Velers](https://avatars.discourse-cdn.com/v4/letter/s/bc8723/32.png) [@Stef\_Velers](https://forum.inductiveautomation.com/u/Stef_Velers)\
**Post date:** [November 10, 2023, 11:26am UTC](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716/20 "2023-11-10T11:26:09Z")

</div>

This worked! But not exactly like I want it to be. This is how I posted it:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/c/7c5dce2f41da038767ab1627667a441ee401c174.png)

and this is how I'm receiving it in Ignition  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/2/92ce385843cdacf49772e1447109ffdf56513132.png)

It is an improvement but is it possible to get the tag TEMP with the dataType Float instead of it being two tags?

Thanks for your help so far!!!

[Next page](https://forum.inductiveautomation.com/t/how-to-receive-sparkplug-b-mqtt-message-in-ignition/81716.md?page=2)
