# MQTT - Publish/Subscribe

**URL:** <https://forum.inductiveautomation.com/t/mqtt-publish-subscribe/22603>\
**Category:** Ignition\
**Created:** [February 15, 2019, 1:06pm UTC](https://forum.inductiveautomation.com/t/mqtt-publish-subscribe/22603 "2019-02-15T13:06:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcamp](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dcamp](https://forum.inductiveautomation.com/u/dcamp)\
**Post date:** [February 15, 2019, 1:06pm UTC](https://forum.inductiveautomation.com/t/mqtt-publish-subscribe/22603/1 "2019-02-15T13:06:54Z")

</div>

I’m trying to do some testing with MQTT, I have a Maple Systems HMI screen that is set up to publish and subscribe to topics using mqtt protocol.

I have a very simple test screen in Ignition with a single “numeric text box”. Now I do think I have all of the connection setup correct because when I input a value on the HMI 12.56(Example) the numeric text box gets updated.

My problem is when I make a change in the Numeric Text box and it tries to write back to the hmi - ignition will give me a “Write error” access denied.

I have set my security zone for the cirrus link MQTT modules to readwriteedit for all 3 modules.

Is there something simple I may be missing.

Thanks

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 15, 2019, 1:29pm UTC](https://forum.inductiveautomation.com/t/mqtt-publish-subscribe/22603/2 "2019-02-15T13:29:26Z")

</div>

Does the HMI document that its variables are bi-directional? If not, the MQTT modules can’t override the permissions.

---

<div class="post-metadata">

**Author:** ![dcamp](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dcamp](https://forum.inductiveautomation.com/u/dcamp)\
**Post date:** [February 15, 2019, 2:51pm UTC](https://forum.inductiveautomation.com/t/mqtt-publish-subscribe/22603/3 "2019-02-15T14:51:40Z")

</div>

Yes, the hmi is enabled for “Publish/Subscribe” and I have set it up accordingly and I have tested using [m2m.eclipse.org](http://m2m.eclipse.org) as my broker and it all works like it should.

I suspect I have a Iginition/MQTT-engine/transmission setting incorrect.

---

<div class="post-metadata">

**Author:** ![dcamp](https://avatars.discourse-cdn.com/v4/letter/d/a88e4f/32.png) [@dcamp](https://forum.inductiveautomation.com/u/dcamp)\
**Post date:** [February 15, 2019, 6:22pm UTC](https://forum.inductiveautomation.com/t/mqtt-publish-subscribe/22603/4 "2019-02-15T18:22:32Z")

</div>

![error](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0d70254ecb1a74748814a29c7042fac539b63343.jpeg)

Would I be getting this error because Ignition is trying to write back a STRING “99” to a INT datatype?

How would I convert the “99” or even a “123.85” back to the correct datatype?

Thanks

---

<div class="post-metadata">

**Author:** ![dwhite](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dwhite/32/8479_2.png) [@dwhite](https://forum.inductiveautomation.com/u/dwhite)\
**Post date:** [May 14, 2019, 6:38pm UTC](https://forum.inductiveautomation.com/t/mqtt-publish-subscribe/22603/5 "2019-05-14T18:38:29Z")

</div>

I am having the same problem. Was this ever resolved, if so, could you explain how?
