# MQTT Engine to Mosquitto

**URL:** <https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864>\
**Category:** Maker\
**Tags:** ignition81\
**Created:** [May 21, 2022, 8:15am UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864 "2022-05-21T08:15:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [May 21, 2022, 8:15am UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/1 "2022-05-21T08:15:23Z")

</div>

I’m having trouble subscribing to topics on a Mosquitto broker. Node Red is publishing to this broker without issues and it seems like the Engine is connected, yet tags don’t work.

See screenshots below:

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

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

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/8/6807cff61a20d2af33d87a64af03f00e8369e509.png)

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

This was working, and now failed.

The Mosquitto cofig is as basic as it can get. Only the listener specified and no ACL.

@wes0johnson, @kcollins , you what else can I look at?

---

<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:** [May 23, 2022, 1:19pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/2 "2022-05-23T13:19:54Z")

</div>

I don’t see any errors in your logs. Are values being published to [any of those] topics regularly? If the topics were not published with retain=true, they might not immediately populate tags upon connection/subscription (and instead when a data value is published).

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [May 23, 2022, 1:23pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/3 "2022-05-23T13:23:03Z")

</div>

Retain is set on the tags and the temperature tags are published every 10s.

What I find strange is that the Engine module can subscribe to the tags when I use the Distributor. All topics remain exactly the same (I just make Node Red publish to the Distributor)

---

<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:** [May 23, 2022, 1:31pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/4 "2022-05-23T13:31:51Z")

</div>

Interesting.. Can you review the thread here for insights?

> [@MQTT Engine automatic tag generation not working as expected](https://forum.inductiveautomation.com/t/mqtt-engine-automatic-tag-generation-not-working-as-expected/59583):
>
> I’m using the latest version of Ignition and the Cirrus Link MQTT Engine to try to ingest data from an MQTT broker (normal MQTT topics with simple JSON payloads, not Sparkplug B) into Ignition tags. I created a custom namespace in the MQTT Engine config, with a wildcard subscription. I expected that the MQTT Engine would parse any topics received and convert them to folders/tags, but it only converts one of them. I can’t imagine that I’d need to create a separate custom namespace for each tag…

It feels like some of the same troubles we saw there... 🤔

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [May 23, 2022, 1:34pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/5 "2022-05-23T13:34:32Z")

</div>

I did. Disabled all default namespaces as I’m only using normal MQTT.

Also enabled TRACE on the CirrusClient logger, but that was too noisy for me spot anything. Set it down to DEBUG

Sorry, should have mentioned that.

---

<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:** [May 23, 2022, 2:32pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/6 "2022-05-23T14:32:40Z")

</div>

Can you confirm your subscription configurations? It looks like you’re subscribing to:

- `Pool/#`
- `Geyser/#`
- `Electricity/#`

And the topics you’re publishing to are discrete values (i.e. not JSON)? Therefore you have _JSON Payload_ unchecked in your three custom namespace configurations?

![2022-05-23 at 9.32 AM](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/26e9040e36745a57a25efc3504291c9a17186957.png)

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [May 24, 2022, 6:35am UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/7 "2022-05-24T06:35:33Z")

</div>

Subscriptions are as you have it.

I don’t have access to the system right now, so can’t confirm the JSON payload option. The namespace config did not change between Mosquitto and Distributor, though, and works in Distributor.

Out of interest, is there an advantage over JSON payload parsing or not if I have control over the publishing? I can easily change the payloads to be JSON if they aren’t.

---

<div class="post-metadata">

**Author:** ![deon.korb](https://avatars.discourse-cdn.com/v4/letter/d/8c91f0/32.png) [@deon.korb](https://forum.inductiveautomation.com/u/deon.korb)\
**Post date:** [May 31, 2022, 5:04pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-to-mosquitto/59864/8 "2022-05-31T17:04:04Z")

</div>

Sorry about the long break.

I changed the option not to parse as JSON, and the behaviour is the same: Distributor works, Mosquitto doesn’t.

I spotted this:

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