# MQTT Engine Write Error

**URL:** <https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101>\
**Category:** 3rd Party Modules\
**Created:** [August 4, 2018, 12:35pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101 "2018-08-04T12:35:30Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [August 4, 2018, 12:35pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/1 "2018-08-04T12:35:30Z")

</div>

Hi All,  
I'm testing out the MQTT Engine and having a few difficulties.  
I can read fine, but every time I write to a MQTT tag I get this:

> [AWT-EventQueue-0] ERROR com.inductiveautomation.ignition.designer.sqltags.util.TagUtilities$WriteListener - Error writing to command.Value:  
> Access Denied

In Configure-\>MQTT Engine-\>Settings-\>General I've un-ticked "Block Node Commands", "Block Device Command" and "Block Property Changes'.

In Configure-\>Service Security-\>Edit-\>Tag Access I've set the following values:  
Service Access = Allow  
Trust Remote Roles = Ticked  
Default Provider Access Level = ReadWriteEdit  
Access Level: System = ReadWriteEdit  
Access Level: MQTT Test = ReadWriteEdit  
Access Level: MQTT Engine = ReadWriteEdit

What else do I need to do?

---

<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:40pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/2 "2019-05-14T18:40:58Z")

</div>

Definitely having the same issue. Subscribing to a topic works just fine, but trying to edit/publish and alter that topic from ignition is not working.

---

<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 19, 2019, 2:53am UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/3 "2019-05-19T02:53:02Z")

</div>

So I have done the following:

1. Enabled Read/Write in the Designer
2. Changed my MQTT tag to bidirectional
3. Changed, in Gateway Configuration/Service Security and changed Tag Access to Read/Write

Still get Access Denied error, that prevents me from changing the tag value from Ignition, this is where I get my access denied.

---

<div class="post-metadata">

**Author:** ![dcamp1](https://avatars.discourse-cdn.com/v4/letter/d/dc4da7/32.png) [@dcamp1](https://forum.inductiveautomation.com/u/dcamp1)\
**Post date:** [May 19, 2019, 11:22am UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/4 "2019-05-19T11:22:27Z")

</div>

In the Gateway configuration, under MQTT Distributor at the bottom of the page check “Show Advanced”  
then check mark “Enable anonymous MQTT connections”.

Now I use the Cirrus Link MQTT 3rd party module setup with “Sparkplug B” protocol and everythings works as expected.

Good Luck.

---

<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 19, 2019, 12:38pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/5 "2019-05-19T12:38:29Z")

</div>

@dcamp1 thanks for the advice, but did not change the outcome. Still getting Access Denied. I will try and set up everything through Cirrus components and see if that corrects it…

---

<div class="post-metadata">

**Author:** ![chris.roys](https://avatars.discourse-cdn.com/v4/letter/c/e9c0ed/32.png) [@chris.roys](https://forum.inductiveautomation.com/u/chris.roys)\
**Post date:** [June 7, 2019, 5:58am UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/6 "2019-06-07T05:58:27Z")

</div>

Hi  
I have the same problem. Any luck to solve it?  
As document said, we could be able publish on created tag by Mqtt engine module.

---

<div class="post-metadata">

**Author:** ![Alexey.Chekhovskiy](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Alexey.Chekhovskiy](https://forum.inductiveautomation.com/u/Alexey.Chekhovskiy)\
**Post date:** [October 15, 2019, 4:39pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/7 "2019-10-15T16:39:09Z")

</div>

Any solution yet?

---

<div class="post-metadata">

**Author:** ![Alexey.Chekhovskiy](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@Alexey.Chekhovskiy](https://forum.inductiveautomation.com/u/Alexey.Chekhovskiy)\
**Post date:** [October 15, 2019, 9:10pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/8 "2019-10-15T21:10:58Z")

</div>

Ok. Here is some problem what i find out.  
You can connect your device to MQTT. and Ignition will read all the data. But, while your device does not supports SparkPlug, you CAN’T do any changes on these tags or do publish via change tag.  
Here is a possible solution for now,  
You can setup memory tag and on action “ValueChange” use

```auto
system.cirruslink.engine.publish(String serverName, String mqttTopic, byte[] payload, int qos, boolean retain)

```

Talk with Cirrus Link guys, I hope in future we will have some option to use or not SparkPlug for talk to the device.

---

<div class="post-metadata">

**Author:** ![leland.falde](https://avatars.discourse-cdn.com/v4/letter/l/779978/32.png) [@leland.falde](https://forum.inductiveautomation.com/u/leland.falde)\
**Post date:** [June 10, 2021, 12:45pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/9 "2021-06-10T12:45:25Z")

</div>

Did you ever get this resolved?

---

<div class="post-metadata">

**Author:** ![DavidWisely](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/davidwisely/32/10482_2.png) [@DavidWisely](https://forum.inductiveautomation.com/u/DavidWisely)\
**Post date:** [June 10, 2021, 1:34pm UTC](https://forum.inductiveautomation.com/t/mqtt-engine-write-error/19101/10 "2021-06-10T13:34:55Z")

</div>

I never got it working. But haven’t tried for a while now. There may have been improvements since this post was made.
