# MQTT BIRTH - Creating Ignition Folders

**URL:** <https://forum.cirrus-link.com/t/mqtt-birth-creating-ignition-folders/107>\
**Category:** MQTT Modules\
**Created:** [August 25, 2021, 9:29pm UTC](https://forum.cirrus-link.com/t/mqtt-birth-creating-ignition-folders/107 "2021-08-25T21:29:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisgray](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@chrisgray](https://forum.cirrus-link.com/u/chrisgray)\
**Post date:** [August 25, 2021, 9:29pm UTC](https://forum.cirrus-link.com/t/mqtt-birth-creating-ignition-folders/107/1 "2021-08-25T21:29:41Z")

</div>

Just wondering what syntax is required to create additional folders within the DBIRTH Topic in NodeRed. We have some NodeRed nodes that are communicating to the Ignition Distributor where we would like to have additional subfolders created. You cannot use the “/” in the Topic: _deviceId_ /DBIRTH which builds the root folder of any data set. **Does anyone out there know the trick to creating a subfolder in Ignition?** (The Ignition Engine & Transmission module does this naturally, but there is some method to passing the entire Folder structure through MQTT).

Nodered reference:[node-red-contrib-sparkplug (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-sparkplug)

This reference refers to setting Properties on a Tag in Ignition

> [@MQTT BIRTH - Setting Ignition Tag Properties](https://forum.cirrus-link.com/t/mqtt-birth-setting-ignition-tag-properties/72):
>
> Just wondering if anyone knows how to set the Tag Properties in Ignition from the NBIRTH or DBIRTH message\_type elements (or other method)? I have an EoN device that is not Ignition (NodeRed - using Sparkplug node), but would like to send up some information to Ignition to provide more Meta data about the Tag. Example might be to add some description to the Documentation property of the Tag or Units of Measure (Engineering Units). [image]

---

<div class="post-metadata">

**Author:** ![nathan.davenport](https://avatars.discourse-cdn.com/v4/letter/n/3ab097/32.png) [@nathan.davenport](https://forum.cirrus-link.com/u/nathan.davenport)\
**Post date:** [August 25, 2021, 10:00pm UTC](https://forum.cirrus-link.com/t/mqtt-birth-creating-ignition-folders/107/2 "2021-08-25T22:00:22Z")

</div>

Device level folders are not included in the topic, but instead are a “prefix” on the metric name in the actual message payload. Take a look at the example Python code here - [tahu/example.py at develop · eclipse/tahu · GitHub](https://github.com/eclipse/tahu/blob/develop/sparkplug_b/stand_alone_examples/python/example.py)

In the publishDeviceBirth() method, see lines 218 - 221 where the input and output folders are included in the metric name. The result is that MQTT Engine will create those input and output folders and then create the appropriate tags within those folders.

This is the resulting DBIRTH message on the wire with the payload decoded.  
**Topic:**  
spBv1.0/Sparkplug B Devices/DBIRTH/Python Edge Node 1/Emulated Device

**Payload:**  
{“timestamp”:1629928453676,“metrics”:[{“name”:“input/Device Metric0”,“alias”:8,“timestamp”:1629928453676,“dataType”:“String”,“value”:“hello device”},{“name”:“input/Device Metric1”,“alias”:9,“timestamp”:1629928453676,“dataType”:“Boolean”,“value”:true},{“name”:“output/Device Metric2”,“alias”:10,“timestamp”:1629928453676,“dataType”:“Int16”,“value”:16},{“name”:“output/Device Metric3”,“alias”:11,“timestamp”:1629928453676,“dataType”:“Boolean”,“value”:true},{“name”:“My\_Custom\_Motor”,“alias”:12,“timestamp”:1629928453676,“dataType”:“Template”,“value”:{“version”:"",“reference”:“Custom\_Motor”,“isDefinition”:false,“metrics”:[{“name”:“RPMs”,“timestamp”:1629928453676,“dataType”:“Int32”,“value”:123},{“name”:“AMPs”,“timestamp”:1629928453676,“dataType”:“Int32”,“value”:456}],“parameters”:[{“name”:“Index”,“type”:“String”,“value”:“1”}]}}],“seq”:1}

---

<div class="post-metadata">

**Author:** ![chrisgray](https://avatars.discourse-cdn.com/v4/letter/c/ba9def/32.png) [@chrisgray](https://forum.cirrus-link.com/u/chrisgray)\
**Post date:** [August 25, 2021, 10:58pm UTC](https://forum.cirrus-link.com/t/mqtt-birth-creating-ignition-folders/107/3 "2021-08-25T22:58:39Z")

</div>

Awesome. I will take a deeper look at this. That’s great help. Thanks!
