# Send MQTT from Perspective

**URL:** <https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368>\
**Category:** 3rd Party Modules\
**Tags:** ignition81, perspective\
**Created:** [June 21, 2023, 10:39pm UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368 "2023-06-21T22:39:35Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Filip\_Olsen1](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Filip\_Olsen1](https://forum.inductiveautomation.com/u/Filip_Olsen1)\
**Post date:** [June 21, 2023, 10:39pm UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368/1 "2023-06-21T22:39:35Z")

</div>

I have installed an MQTT engine and an MQTT Transmission module.  
Within Ignition, I am able to read MQTT topics (tags) and have enabled the Read/Write option.

Additionally, I have enabled the WRITE TO feature in the MQTT settings of the gateway. However, I am still unable to write or send MQTT commands from Ignition's perspective.

I would greatly appreciate some assistance with this issue, if there is someone that have any advice.

Thank you

---

<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:** [June 22, 2023, 6:30am UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368/2 "2023-06-22T06:30:00Z")

</div>

Only SparkplugB tags can be written back.

You will have to call `system.cirruslink.engine.publish()` to publish the value to the MQTT engines

---

<div class="post-metadata">

**Author:** ![Filip\_Olsen1](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Filip\_Olsen1](https://forum.inductiveautomation.com/u/Filip_Olsen1)\
**Post date:** [June 23, 2023, 6:17pm UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368/3 "2023-06-23T18:17:54Z")

</div>

Do you have an example ?

---

<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:** [June 23, 2023, 6:35pm UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368/4 "2023-06-23T18:35:33Z")

</div>

[https://docs.chariot.io/display/CLD80/MQTT+Publishing+via+MQTT+Engine](https://docs.chariot.io/display/CLD80/MQTT+Publishing+via+MQTT+Engine)

---

<div class="post-metadata">

**Author:** ![Filip\_Olsen1](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Filip\_Olsen1](https://forum.inductiveautomation.com/u/Filip_Olsen1)\
**Post date:** [June 23, 2023, 7:31pm UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368/5 "2023-06-23T19:31:00Z")

</div>

Thank you

Will test this.  
I tried before, but I could not find my TAGs\MQTT topics in the Sparkplug B from Node-red.  
Not sure if I can use Mosquito MQTT server (or if I need to add some settings to allow Sparkplug B)

maybe I need to use HiveMQ to get Sparkplug B to work.

---

<div class="post-metadata">

**Author:** ![Filip\_Olsen1](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Filip\_Olsen1](https://forum.inductiveautomation.com/u/Filip_Olsen1)\
**Post date:** [June 23, 2023, 8:11pm UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368/6 "2023-06-23T20:11:56Z")

</div>

Hmm cant`t figure out what I am supposed to write in the script.

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

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

replace serverName ? or write my servername after the "ServerName" .

---

<div class="post-metadata">

**Author:** ![Filip\_Olsen1](https://avatars.discourse-cdn.com/v4/letter/f/eada6e/32.png) [@Filip\_Olsen1](https://forum.inductiveautomation.com/u/Filip_Olsen1)\
**Post date:** [June 23, 2023, 8:21pm UTC](https://forum.inductiveautomation.com/t/send-mqtt-from-perspective/75368/7 "2023-06-23T20:21:51Z")

</div>

Do I also need to use tha Transmission plugin on the Gateway to send MQTT ?  
And if so, do I use that Server in the script, or my default MQTT ?

[https://docs.chariot.io/display/CLD80/MQTT+Transmission](https://docs.chariot.io/display/CLD80/MQTT+Transmission)

I also wonder, if anyone actually send MQTT from Ignition with positive results, as I find this extremely hard to figure out.

Cheers
