# MQTT Connection between Ignition and PLC device

**URL:** <https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 2, 2024, 7:43am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805 "2024-05-02T07:43:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 2, 2024, 7:43am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/1 "2024-05-02T07:43:28Z")

</div>

Hi, I'm test the MQTT connection for my project. I looking for information how to connect & read my PLC tags using MQTT instead of OPC-UA. Please refer the picture below, The connection between Ignition to Ignition I'm clear but I want know is there any way to connect the PLC to Ignition using MQTT communication.

I go through the 12 quick lessons topics but, that more discuss about connection between the Ignition.  
Please give me your suggestion Thanks.

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

> **[12 Quick Lessons on Implementing MQTT in Ignition](https://inductiveautomation.com/blog/12-quick-lessons-on-implementing-mqtt-in-ignition)**
>
> We are excited to announce the release of a brand new how-to video series on implementing MQTT in Ignition. We created this series as an easy-to-follow guide that will explain how this messaging protocol works, why it’s an ideal solution for SCADA,...

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 2, 2024, 2:05pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/2 "2024-05-02T14:05:44Z")

</div>

Only if your PLC supports MQTT. What brand/make/model of PLC are you working with? MQTT direct to/from PLCs isn't common. You would also need MQTT Engine and an MQTT broker (or MQTT Distributor) on the Ignition server, which I'm assuming you already know. There's always that middle piece in an MQTT system where Ignition or any system isn't talking directly to the other. MQTT clients always talk to a broker (even if the broker is installed on the same computer/server as Ignition), and Ignition is no different. Both the PLC and Ignition in this case are clients.

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 3, 2024, 3:33am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/3 "2024-05-03T03:33:16Z")

</div>

Thanks for the information. I have few question to clarify the MQTT using Ignition.  
With the Ignition can we achieve the redundancy communication with clients.  
If so, what is use of the Chariot MQTT server here.

Please share your experience.

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [May 3, 2024, 4:03am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/4 "2024-05-03T04:03:42Z")

</div>

You can't connect MQTT directly to PLCs, you need an Ignition Edge device in between the Ignition main server and PLCs. At the most you can connect multiple PLCs to an Edge Device if physically close,

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 3, 2024, 5:19am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/5 "2024-05-03T05:19:48Z")

</div>

Thanks for the reply. so do I need to use the Chariot MQTT server to connect the Ignition Edge.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/1/21ac946412cdfa9475dfcc285c8f0c17864da40d.jpeg)

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [May 3, 2024, 5:23am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/6 "2024-05-03T05:23:49Z")

</div>

yes that's already built into the cloud when you use Cirrus Link's MQTT.

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 3, 2024, 6:24am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/7 "2024-05-03T06:24:02Z")

</div>

Thanks lot. Can you please tell me how to connect my Primary Host to MQTT server#1 and MQTT Server#2. Also I have confusion on edge Client how to make automatically transfer my client to server#2 when Server#1 get failed.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/4/e42caafdd8531a64c40869bdfbfbceb3575832f9.jpeg)

---

<div class="post-metadata">

**Author:** ![PRAMANJ](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pramanj/32/66935_2.png) [@PRAMANJ](https://forum.inductiveautomation.com/u/PRAMANJ)\
**Post date:** [May 3, 2024, 3:59pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/8 "2024-05-03T15:59:06Z")

</div>

If you watch Travis Cox's videos carefully in the [MQTT you tube channe](https://www.youtube.com/playlist?list=PLXVg9kp06BdjyOLffHIBt_GKnipijJ6xh)l from video 4 onwards you will get your answers.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 3, 2024, 6:10pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/9 "2024-05-03T18:10:30Z")

</div>

You don't have to use Chariot MQTT. There are lots of MQTT brokers that work (including free ones). I personally use EMQx, some use Mosquitto, but whatever you use, just make sure it's secured properly and not publically exposed with no security at all or else you'll end up on Shodan with an exposed system with anyone able to read/write to your devices.

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 6, 2024, 1:56am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/10 "2024-05-06T01:56:43Z")

</div>

Thanks for the suggestion.

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 6, 2024, 1:59am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/11 "2024-05-06T01:59:05Z")

</div>

Thanks for suggestions

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 6, 2024, 9:26am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/12 "2024-05-06T09:26:46Z")

</div>

Hi, I try to setup test environment for MQTT communication, Please refer the picture below for architecture. I have trouble from my transmission gateway, I couldn't connect to primary server. I have attached the log screen-shot. Please give me your suggestions.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/3/e30cb0fc86eb99fbe3546399b0fb371a2107f83b.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/4/c480180ef06f9de95a7cbb3a1e6f8597350e9d76.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/1/e11cd64ab2beab5e73c65bb3e26a20da6038826a.png)

---

<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 6, 2024, 1:52pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/13 "2024-05-06T13:52:15Z")

</div>

Make sure that you've got firewall ports open for `1883/tcp` and `8883/tcp`, as a "Connection timed out" error could be a result of dropped inbound packets on your MQTT Distributor gateways. Also keep in mind that at your `.102` Transmission gateway, you'll want to define two servers, one for the Primary (`.100`) and one for the Backup (`.101`). You'll add those two servers to a server "set", and then point your transmitter at that server set. This will then allow Transmission to failover to the Backup when it takes over (and starts listening on port `1883/tcp`).

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 7, 2024, 5:20am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/14 "2024-05-07T05:20:48Z")

</div>

Hi, Thanks for the reply, it's working fine now. I have attached pic of my settings at transmission side. I have one more questions, In case my Primary, Secondary & transmission in different location how can I make this communication. Please share your experience.

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

---

<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 7, 2024, 1:46pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/15 "2024-05-07T13:46:12Z")

</div>

I'm not sure I understand your question. One thing that you'll want to do is to make sure that your _Primary Host ID_ matches the setting that you configure in MQTT Engine.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 7, 2024, 2:43pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/16 "2024-05-07T14:43:34Z")

</div>

If you're just saying they're in different networks, you just need to be sure you have a VPN or some network connecting them. One of our clients we have set up to go across VPN as the primary connection, but the secondary server on transmission is set to go across encrypted MQTT on port 8883 as the secondary if the VPN ever goes down. In this way all communications are encrypted no matter what, and we're covered by a VPN outage to allow it to connect across the internet (their MQTT server is open on the internet, but we have it pretty locked down between individual user accounts with like 20-character passwords, topic security using ACLs (each device only has write permissions to their own topic), and encryption.

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 9, 2024, 4:00am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/17 "2024-05-09T04:00:03Z")

</div>

I mean In case my devices are in different locations. Is the same settings is enough to achieve this communication.

---

<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 9, 2024, 2:15pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/18 "2024-05-09T14:15:57Z")

</div>

If you're devices are in different locations, you'll want to setup TLS certificates and use secure MQTT over port `8883/tcp`, as @michael.flagler described above

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [May 9, 2024, 2:23pm UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/19 "2024-05-09T14:23:02Z")

</div>

That really depends on how you set it up. If you're going over the internet, you may want to use a domain name instead of an IP. If you have a static IP you should be OK, but I've also seen where if you're hosting it yourself on your own servers, and you change ISPs, you'll get a new IP address and everything will break. I would consult with your IT department to make sure your network is figured out on how you'll be connecting so that you don't set it all up to only find out things aren't going to be networked the way you thought they would be.

---

<div class="post-metadata">

**Author:** ![Alagumani\_Kaliyaperu](https://avatars.discourse-cdn.com/v4/letter/a/8baadc/32.png) [@Alagumani\_Kaliyaperu](https://forum.inductiveautomation.com/u/Alagumani_Kaliyaperu)\
**Post date:** [May 10, 2024, 1:50am UTC](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805/20 "2024-05-10T01:50:22Z")

</div>

Thanks for your information I will check with IT about communication medium, based on it I will set up it.

[Next page](https://forum.inductiveautomation.com/t/mqtt-connection-between-ignition-and-plc-device/89805.md?page=2)
