# Read subtopics with MQTT Engine

**URL:** <https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146>\
**Category:** Maker\
**Tags:** ignition80\
**Created:** [August 27, 2020, 9:42pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146 "2020-08-27T21:42:50Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![edoardo.manzardo](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@edoardo.manzardo](https://forum.inductiveautomation.com/u/edoardo.manzardo)\
**Post date:** [August 27, 2020, 9:42pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/1 "2020-08-27T21:42:50Z")

</div>

I have some Shellys inside my home and I configured its in MQTT protocol.  
I installed MQTT Enginde inside gateway and I want to read a subtopics.  
Below the situation inside my broker Mosquitto

 ![Broker](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/5/15e46ef4a7d92c89a31a2dea67da8940969ace2e.png)  
I want to read a status topic and the payload inside but the situation in my tags browser in Ignition is this  
 ![tagBrowser](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/4/143991ed74705ec4b9295048f66b85917a80058d.png)  
I can see only topic “0”.  
Why?  
Is there is some reason?  
Where am I wrong?

---

<div class="post-metadata">

**Author:** ![damean.thomas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/damean.thomas/32/11367_2.png) [@damean.thomas](https://forum.inductiveautomation.com/u/damean.thomas)\
**Post date:** [August 28, 2020, 2:20am UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/2 "2020-08-28T02:20:31Z")

</div>

Check read as json string in the name space

---

<div class="post-metadata">

**Author:** ![edoardo.manzardo](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@edoardo.manzardo](https://forum.inductiveautomation.com/u/edoardo.manzardo)\
**Post date:** [August 28, 2020, 5:27am UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/3 "2020-08-28T05:27:51Z")

</div>

Can you show me how to do it?

---

<div class="post-metadata">

**Author:** ![damean.thomas](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/damean.thomas/32/11367_2.png) [@damean.thomas](https://forum.inductiveautomation.com/u/damean.thomas)\
**Post date:** [August 28, 2020, 10:29am UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/4 "2020-08-28T10:29:34Z")

</div>

Gateway config page=\>MQTT Engine=\>Namespaces=\>Edit on your custom Namespace then click the check box on JSON Payload

 ![Capture](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/1701e0499fbbd49a1d6a3993a797211b50c69bae.png)

---

<div class="post-metadata">

**Author:** ![edoardo.manzardo](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@edoardo.manzardo](https://forum.inductiveautomation.com/u/edoardo.manzardo)\
**Post date:** [August 28, 2020, 11:11am UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/5 "2020-08-28T11:11:50Z")

</div>

I clicked there and I checked JSON Payload but I do not see any changing in the tags. In my first image about tags browser, JSON Payload was checked and I can not see under topic “0”.  
I do not see power, energy, status and so on.  
[Broker.html](https://forum.inductiveautomation.com/uploads/short-url/mr4b679SnRownlRk3IlPMGD3rXw.html) (208 Bytes)

Any ideas?

---

<div class="post-metadata">

**Author:** ![edoardo.manzardo](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@edoardo.manzardo](https://forum.inductiveautomation.com/u/edoardo.manzardo)\
**Post date:** [September 1, 2020, 8:31pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/6 "2020-09-01T20:31:14Z")

</div>

Now I understood the problem. I solved this issue by deleting the folder “Shellies” in my Tag Browser inside the designer. So Ignition ricreated the folders and I found all data.  
Now I have another problem, I do not able to change the value of the topic.  
Below the error

 ![Error](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/f/5f346a81e927dc5c7725ef22d1edbd27fbb84b2c.jpeg)

Who can help me?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 1, 2020, 8:39pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/7 "2020-09-01T20:39:41Z")

</div>

There is an advanced option on the custom namespace to make tags writable, however it’s my understanding that this only makes the tags _locally_ writable and the value will not be published to the broker.

I think only Sparkplug namespaces have the ability to write and publish values.

@wes0johnson can confirm

---

<div class="post-metadata">

**Author:** ![edoardo.manzardo](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@edoardo.manzardo](https://forum.inductiveautomation.com/u/edoardo.manzardo)\
**Post date:** [September 1, 2020, 8:49pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/8 "2020-09-01T20:49:49Z")

</div>

In fact I checked the property “Writeable Tags” but the result is the same error.

 ![NameSpace property](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/b/1b63c5b167810b279184627906bc65d3a7af29a9.png)

In the case of this possibility is only with Sparkplug namespaces is there other way to publish values?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [September 1, 2020, 8:55pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/9 "2020-09-01T20:55:45Z")

</div>

Looks like maybe there are scripting functions: [https://docs.chariot.io/display/CLD80/Gateway+Script+MQTT+Publishing](https://docs.chariot.io/display/CLD80/Gateway+Script+MQTT+Publishing)

---

<div class="post-metadata">

**Author:** ![edoardo.manzardo](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@edoardo.manzardo](https://forum.inductiveautomation.com/u/edoardo.manzardo)\
**Post date:** [September 1, 2020, 9:17pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/10 "2020-09-01T21:17:58Z")

</div>

Oh thank you so much, now work well.  
In any case do you let me know if there is same possibility to write and publish value directly?  
thank you so much for the support.

---

<div class="post-metadata">

**Author:** ![wes0johnson](https://avatars.discourse-cdn.com/v4/letter/w/7ab992/32.png) [@wes0johnson](https://forum.inductiveautomation.com/u/wes0johnson)\
**Post date:** [September 1, 2020, 9:24pm UTC](https://forum.inductiveautomation.com/t/read-subtopics-with-mqtt-engine/38146/11 "2020-09-01T21:24:10Z")

</div>

Yes - all of this is correct. Also as you noted later in the thread, scripting is the recommended way of publishing MQTT messages to non-Sparkplug compliant MQTT clients.
