# Websocket for real time high performant SCADA

**URL:** <https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194>\
**Category:** General Discussion\
**Created:** [May 29, 2018, 4:56am UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194 "2018-05-29T04:56:31Z")\
**Posts on this page:** 20\
**Page:** 4

<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:** [June 3, 2018, 7:31am UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/61 "2018-06-03T07:31:14Z")

</div>

Which post? Which projects?

---

<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:** [June 3, 2018, 9:10am UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/62 "2018-06-03T09:10:43Z")

</div>

HA is not in my mind at the moment.

---

<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, 3:17pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/64 "2018-06-04T15:17:41Z")

</div>

> [@R.Alamsha](#):
>
> Please go through my specs once again patiently and it's final. My reply above to Kyle\_Chase is what i wanted from Ignition and i hope IA can do it.

> [@R.Alamsha](#):
>
> I agree with you. I think, IA can build a custom Ignition data server which simulates a big software Modbus Master/Slave RTU on Linux + retain last tag values + serve Alarms and Tag data as JSON Payload to IT servers + serve web pages to Ignition clients. Other things IT will take care.

> [@R.Alamsha](#):
>
> I would like to call the front end data server as Commander 🙂 My first preference for Commander is customized Ignition. If IA can't do that, i will look into your offer.

Yes, Ignition can already do the things you listed in your specs. There is no need for a customized version of Ignition,  
just integration work to fit the needs of your client.

> [@R.Alamsha](#):
>
> > [@PRAMANJ](#):
> >
> > HA devices I guess communicate over zigbee,modbus, backnet ,modems and rtus We need drivers for these in opc ua server in ignition edge or njscada
> 
> No. All those projects have failed and trashed. I have updated my post above. Pls check it.

There is nothing wrong with any of those protocols. Z-Wave and Wifi to sensors and switches works well. For building automation systems, Modbus and BacNet are popular options. While I dislike Zigbee as a general protocol, none of those methods have "failed".

---

<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, 3:27pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/65 "2018-06-04T15:27:25Z")

</div>

> [@R.Alamsha](#):
>
> > [@PRAMANJ](#):
> >
> > In reply to you question "python scripts also use wesocket?' I guess python scripts on server will update ignition tag values using its appropriate communication library,
> 
> > [@Kyle\_Chase](#):
> >
> > MQTT was built for industrial use, and there is a lot of successful use cases of MQTT in industry.
> 
> [MQTT Issues in Ignition - #8](http://forum.inductiveautomation.com/t/mqtt-issues-in-ignition/16789/8)
> 
> Please post your views there. Thanks.

I am not going to threadjack that thread. First, you can not use JavaScript inside Ignition. Secondly, the MQTT Engine module from Cirrus Link already handles JSON payloads and creates tags from the structure accordingly. Iff you want to talk to MQTT servers, you need to use Cirrus Links' modules. They have the domain specific expertise, and the modules work very well.

---

<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, 4:58pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/66 "2018-06-04T16:58:11Z")

</div>

> [@Kyle\_Chase](#):
>
> Cirrus Link already handles JSON payloads

Jython can handle JSON payload very well inside Ignition via web socket. So why do we need Cirrus Link module?.

---

<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:03pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/67 "2018-06-04T17:03:04Z")

</div>

Your question inside that thread was

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

I am stating that the existing MQTT modules written by Cirrus Link and handle JSON payloads.

---

<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:11pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/68 "2018-06-04T17:11:15Z")

</div>

> [@Kyle\_Chase](#):
>
> I am stating that the existing MQTT modules written by Cirrus Link and handle JSON payloads.

* * *

Let's continue the discussion in the topic below. It will be more relevant. Thanks.

> [@Is there a way to consume MQTT JSON payload in Ignition without cirrus link driver?](http://forum.inductiveautomation.com/t/is-there-a-way-to-read-mqtt-json-payload-into-ignition-tags-without-cirrus-link-driver/18280):
>
> 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:** ![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:** [June 4, 2018, 8:25pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/69 "2018-06-04T20:25:17Z")

</div>

I guess mr Alamsha wants to know if ignition can receive/send Json payloads directly using Jython without the intervention of mqtt.

---

<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:** [June 4, 2018, 8:32pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/70 "2018-06-04T20:32:00Z")

</div>

My solution is using nodejs server in berween ignition and json payloads (from mr Alamsha!) . It will communicate with ignition on tcp/up socket using my gatewaycomm ignition module and json on the other end.

---

<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, 8:36pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/71 "2018-06-04T20:36:08Z")

</div>

> [@PRAMANJ](#):
>
> My solution is using nodejs server in berween ignition and json payloads (from mr Alamsha!) .

I always eagerly wait for your reply. You are a very good teacher and i have learnt certain subtle things in technology from you which is not very obvious. This is the reason, i believe that you know what you claim. Let's discuss the MQTT stuff in the above link. A hot topic is going on and i would like to know your answer. Thanks..

---

<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:** [June 4, 2018, 8:57pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/72 "2018-06-04T20:57:09Z")

</div>

Well I have nothing to say there as it’s mqtt stuff which I am not conversant with. But I think there is a way of achieving it using jython.

---

<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, 9:02pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/73 "2018-06-04T21:02:00Z")

</div>

> [@R.Alamsha](#):
>
> My solution is using nodejs server in berween ignition and json payloads

I will use Django because it speaks the natural language of Ignition. I can use Python on both side. Ignition+Djanago = IgnitionML.

---

<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:** [June 4, 2018, 9:14pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/74 "2018-06-04T21:14:26Z")

</div>

I have no problem with django if jython 2.5 supports it? Some scripting expert like Kevin McClusky or Phil or Kyle may be able to comment in that. I only need existing jyton server side library for my purpose of handling your json payloads.

---

<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, 9:35pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/75 "2018-06-04T21:35:08Z")

</div>

Django 2.x supports Python 3.4+. Ignition is currently running on Jython 2.5.3. They are light years apart. It will get closer when Ignition moves to the 2.7 branch, but afaik, Jython will not be moving to 3.x any time soon.

---

<div class="post-metadata">

**Author:** ![bfuson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bfuson/32/4597_2.png) [@bfuson](https://forum.inductiveautomation.com/u/bfuson)\
**Post date:** [June 4, 2018, 9:35pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/76 "2018-06-04T21:35:28Z")

</div>

[https://docs.djangoproject.com/en/2.0/howto/jython/](https://docs.djangoproject.com/en/2.0/howto/jython/)

Django 1.11 was the last release to support Python 2, specifically 2.7.  
Ignition’s Jython implementation is based on python version 2.5.

---

<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, 9:47pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/77 "2018-06-04T21:47:21Z")

</div>

> [@bfuson](#):
>
> Django 1.11 was the last release to support Python 2, though it's for 2.7.Ignition's Jython engine is version 2.5.

This is the reason i chose Django as the ML engine for Ignition. All the heavy stuff i can do on Django and leave Ignition to do the normal SCADA stuff. Django+Ignition for ML stuff commands very high respect in the minds of big clients(especially IBM guys). SI's must look into this opportunity seriously.

---

<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, 10:14pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/78 "2018-06-04T22:14:13Z")

</div>

I am trying to use ML for maintenance optimization aka predictive maintenance. One of the interesting challenge is, using tensor flow to predict possible Alarms in the next 72 hours by analysing the plant history of, say, past 3 yrs. Decision makers get excited about this possibility. They get hooked 🙂 I haven’t picked up the tips and tricks of ML yet but certain correlation results i found in my experiment were quite shocking. Very good learning material is available on Youtube.

One thing for sure. ML and AI are the buzz word to make money with old data lying unused in the corner of a control room 🙂

---

<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:** [June 5, 2018, 12:14am UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/79 "2018-06-05T00:14:26Z")

</div>

AI and ML stuff as I said before is over rated and hyped in industrial automation world. But I guess analysis of past alarm data can certainly give some actionable insight for future by analysing outliers in present alarms from past data! Only question is which tools to use for training and for online? Will Watson work ? Is tensorflow the solution or other tools required?

---

<div class="post-metadata">

**Author:** ![ignitionuser0](https://avatars.discourse-cdn.com/v4/letter/i/5f9b8f/32.png) [@ignitionuser0](https://forum.inductiveautomation.com/u/ignitionuser0)\
**Post date:** [June 5, 2018, 5:20pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/80 "2018-06-05T17:20:56Z")

</div>

Excellent idea. If you’re really trying to get those ‘’‘Decision makers’’’ riled up about your ‘’’’‘solution’’’’’ then it’s almost a necessity to implement blockchain in some fashion. When dealing with such costly errors, it is important to make sure your results are both replicated and validated. [https://www.youtube.com/watch?v=aqAajTpzK3o](https://www.youtube.com/watch?v=aqAajTpzK3o)

---

<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 5, 2018, 6:56pm UTC](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/81 "2018-06-05T18:56:42Z")

</div>

> [@Ignition-ReactJS-Django-JSON Realtime](http://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307):
>
> Demo here: [http://decisive-destruction.surge.sh/](http://decisive-destruction.surge.sh/) Git code here: Download. play, modify and share. The game begins NOW !!!

[Previous page](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194.md?page=3)

[Next page](https://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194.md?page=5)
