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

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

What's the advantage over Jython?.

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.

  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.

1 Like

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.

3 Likes

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.

Yes. That is the idea behind my ActiveMQ project. [project] ActiveMQ Integration - #7 by dmdrendall

http://recordit.co/1IQLCetu9s

http://recordit.co/PFDz9ObMsR

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

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

Eclipse Paho Java Client
https://www.eclipse.org/paho/clients/java/

May be interesting for module developers.

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.