# Is there a way to consume MQTT JSON payload in Ignition without cirrus link driver?

**URL:** <https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280>\
**Category:** Ignition\
**Created:** [June 2, 2018, 3:52am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280 "2018-06-02T03:52:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [June 2, 2018, 3:52am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/1 "2018-06-02T03:52:32Z")

</div>

Is there a way to read MQTT JSON payload into Ignition tags without cirrus link driver?

**Using the JavaScript MQTT Webscokets Client- Example1**

  
…

**Using the JavaScript MQTT Websockets Client- Example 2**

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [June 4, 2018, 5:06pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/2 "2018-06-04T17:06:56Z")

</div>

> [@Websocket for real time high performant SCADA](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/67):
>
> I am stating that the existing MQTT modules written by Cirrus Link and handle JSON payloads.

What's the advantage over Jython?.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [June 4, 2018, 5:54pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/3 "2018-06-04T17:54:14Z")

</div>

Well, there is no way currently to use the Paho MQTT stack on Jython 2.5. Secondly, the module have the whole lifecycle management portion of the client maintained, instead of you having to do that in Jython. The modules can create their own tag provider, which you can not do easily from Python.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [June 4, 2018, 6:08pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/4 "2018-06-04T18:08:46Z")

</div>

> [@Kyle\_Chase](#):
>
> Well, there is no way currently to use the Paho MQTT stack on Jython 2.5.

1. To consume JSON payload, you don't MQTT inside Ignition. You can run MQTT on Django, Django can collect JSON from MQTT and reserve the JSON payload to any consumer.

2. Ignition can "serve and consume" JSON payload via websocket. I don't see any need for any kind of MQTT driver inside Ignition at all.

3. Ignition and Django run on the same Linux server. Zero cost to run Django.

4. You can do full stack Python ML on Django and serve it to other consumers. Ignition+Django is a deadly combo.

---

<div class="post-metadata">

**Author:** ![Kyle\_Chase](https://avatars.discourse-cdn.com/v4/letter/k/9de0a6/32.png) [@Kyle\_Chase](https://forum.inductiveautomation.com/u/Kyle_Chase)\
**Post date:** [June 4, 2018, 7:04pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/5 "2018-06-04T19:04:18Z")

</div>

So, you want to take a protocol, where there is already native support to do the thing you want, and you want to abstract that out in a different application altogether, then build another protocol/transport to move the data into the desired system, then you want to code the creation of all the tags and maintaining their state? You are right, you don’t have to pay for Cirrus Link’s modules. However, you will spend far more time and spend more money making your solution work, and it will be more unreliable than just using the modules built into the system.

Also, in the world of control systems, I do not think we want a deadly combo. We try to prevent those types of things.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [June 4, 2018, 7:53pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/6 "2018-06-04T19:53:52Z")

</div>

> [@Kyle\_Chase](#):
>
> You are right, you don;t have to pay for Cirrus Link's modules.

I have a far better solution tham cirrus link. For me. Django is like MQTT OPC UA server for Ignition. It's rock solid, highly secured and the world's most powerful Python server. You can run state of the art ML algorithms like Tensor flow on Django. This makes Ignition as "ML powered SCADA".

I am NOT sure if you paid attention to this link. 2 wonderful solutions are available. Pay attention to "ductsoup/forecast-io-ignition" post.

> [@Alarm data integration](http://forum.inductiveautomation.com/t/alarm-data-integration/17544/6):
>
> Thank you for tips and links. Simple and efficient way could be also using pure Tcp connection, and some binary protocol. import SocketServer import time class MyTCPHandler(SocketServer.BaseRequestHandler): def handle(self): self.data = self.request.recv(1024).strip() print self.data #read data from connection, parameters f.ex. #and here alarm data could be read and sent to active connection self.request.send(self.data.upper()) time.sleep(2) #connection is closed after sending data b…

---

<div class="post-metadata">

**Author:** ![cmisztur2](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmisztur2/32/4243_2.png) [@cmisztur2](https://forum.inductiveautomation.com/u/cmisztur2)\
**Post date:** [June 14, 2018, 2:00am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/7 "2018-06-14T02:00:05Z")

</div>

> [@](#):
>
> Is there a way to read MQTT JSON payload into Ignition tags without cirrus link driver?

Yes. That is the idea behind my ActiveMQ project. [[project] ActiveMQ Integration - #7 by dmdrendall](http://forum.inductiveautomation.com/t/project-activemq-integration/15535/7)

[http://recordit.co/1IQLCetu9s](http://recordit.co/1IQLCetu9s)

[http://recordit.co/PFDz9ObMsR](http://recordit.co/PFDz9ObMsR)

Although, there is much to be said for SparkplugB support in CirrusLink modules.

---

<div class="post-metadata">

**Author:** ![cmisztur2](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/cmisztur2/32/4243_2.png) [@cmisztur2](https://forum.inductiveautomation.com/u/cmisztur2)\
**Post date:** [June 14, 2018, 2:00am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/8 "2018-06-14T02:00:53Z")

</div>

> [@Kyle\_Chase](#):
>
> Well, there is no way currently to use the Paho MQTT stack on Jython 2.5. Secondly, the module have the whole lifecycle management portion of the client maintained, instead of you having to do that in Jython. The modules can create their own tag provider, which you can not do easily from Python.

easy, hard, meh... it can be done.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [June 16, 2018, 3:27am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/9 "2018-06-16T03:27:09Z")

</div>

**Eclipse Paho Java Client**  
[https://www.eclipse.org/paho/clients/java/](https://www.eclipse.org/paho/clients/java/)

May be interesting for module developers.

---

<div class="post-metadata">

**Author:** ![R.Alamsha](https://avatars.discourse-cdn.com/v4/letter/r/e5b9ba/32.png) [@R.Alamsha](https://forum.inductiveautomation.com/u/R.Alamsha)\
**Post date:** [June 29, 2018, 10:02am UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/10 "2018-06-29T10:02:40Z")

</div>

> [@Turn on History on a Dataset](http://forum.inductiveautomation.com/t/turn-on-history-on-a-dataset/16944/11):
>
> If you don't have a reliable MQTT driver for Ignition, i would recommend this solution: Log MQTT payload to a database. Consume it with query tags into Ignition. [[Learn, How to save MQTT messages into a MySQL Database] ](https://www.youtube.com/watch?v=Tp5EFG4W5WU)[https://www.raviyp.com/embedded/233-learn-how-to-save-mqtt-messages-into-a-mysql-database](https://www.raviyp.com/embedded/233-learn-how-to-save-mqtt-messages-into-a-mysql-database) Personally, i think this is far better than loading a "Ignition MQTT engine" because: You have excellent open source MQTT clients which are well supported and used by a…

---

<div class="post-metadata">

**Author:** ![zackscriven](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zackscriven/32/7213_2.png) [@zackscriven](https://forum.inductiveautomation.com/u/zackscriven)\
**Post date:** [December 21, 2018, 6:02pm UTC](https://forum.inductiveautomation.com/t/is-there-a-way-to-consume-mqtt-json-payload-in-ignition-without-cirrus-link-driver/18280/11 "2018-12-21T18:02:17Z")

</div>

> [@Kyle\_Chase](#):
>
> However, you will spend far more time and spend more money making your solution work

As the number of clients approaches infinity it become more cost effective to develop it (anything for that matter) yourself. Whether that is 1 or 100 depends on how long it takes to develop and how much you value your time, but certainly at some-point it would be cheaper to rewrite entirely.
