# Ignition-ReactJS-Django-JSON Realtime

**URL:** <https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307>\
**Category:** General Discussion\
**Created:** [June 5, 2018, 6:52pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307 "2018-06-05T18:52:18Z")\
**Posts on this page:** 20\
**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 5, 2018, 6:52pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/1 "2018-06-05T18:52:18Z")

</div>

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

Demo here:  
[http://decisive-destruction.surge.sh/](http://decisive-destruction.surge.sh/)

Git code here:

> **[alamsha/Ignition-React-Django-JSON-Realtime](https://github.com/alamsha/Ignition-React-Django-JSON-Realtime)**
>
> Aiming to build a JSON+OPC UA server on Django with Python - alamsha/Ignition-React-Django-JSON-Realtime

Download. play, modify and share. The game begins NOW !!!

---

<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 5, 2018, 8:30pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/3 "2018-06-05T20:30:21Z")

</div>

So the goal is to get an Ignition server to store OPC-UA data to a database. Then have your Apache server running your Django back-end that uses a PHP script to read the data directly from the database and return the JSON encoded version. Then you have a front-end react app fetch that JSON from the backend and put it in some components.

The main focus is for your Django application to eventually use TensorFlow’s Python API to perform sequential prediction on historical equipment data (RNN with LSTM units?) and serve up those predictions back to Ignition/React?

Any thoughts on how to architect your RNN and get the training data required?

---

<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, 9:19pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/4 "2018-06-05T21:19:39Z")

</div>

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/cee4cde9b95f077176339246dc05c33dffbee8f9.png)

---

<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 5, 2018, 9:35pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/5 "2018-06-05T21:35:10Z")

</div>

That helps, thanks.

Any thoughts on how to architect your RNN and get the training data required?

---

<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, 10:03pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/6 "2018-06-05T22:03:59Z")

</div>

I haven’t paid much attention on RNN and LSTM algorithms. My main focus for is:

1. Maintenance optimization.
2. Process optimization (includes work flow process also)
3. Asset optimization.

Plant and infrastructure managers understand these 3 key words very well and they get excited to share their ideas. I think, to dive deeper and tap the true power of ML algorithms for automation, SI’s must hire atleast one mathematician in their team.

---

<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 5, 2018, 10:16pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/7 "2018-06-05T22:16:06Z")

</div>

How do you plan to accomplish optimizations in those 3 areas of operation?

---

<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 5, 2018, 10:23pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/8 "2018-06-05T22:23:25Z")

</div>

Can you elaborate on the experimental results you found?

> [@Websocket for real time high performant SCADA](http://forum.inductiveautomation.com/t/websocket-for-real-time-high-performant-scada/18194/78):
>
> 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 slight_smile 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. O…

---

<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, 10:43pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/9 "2018-06-05T22:43:29Z")

</div>

My focus is Alarm delivery like “skype+twitter”, predictive maintenance, maintenance work flow automation and web based control room service for maintenance contractors to run a smart infrastructure. Alarm delivery server shall be optimized to manage atleast 20,000 manpower.

---

<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 5, 2018, 10:47pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/10 "2018-06-05T22:47:38Z")

</div>

Without the ML aspect figured out, what advantages does your proposed system have over existing alarm notification methods within Ignition?

---

<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, 11:13pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/11 "2018-06-05T23:13:49Z")

</div>

> [@bfuson](#):
>
> Without the ML aspect figured out,

You are right. This will NOT happen immediately. It's a deep learning process for both man and the machine.

---

<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 6, 2018, 12:55am UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/12 "2018-06-06T00:55:35Z")

</div>

> [@bfuson](#):
>
> The main focus is for your Django application to eventually use TensorFlow's Python API to perform sequential prediction on historical equipment data (RNN with LSTM units?) and serve up those predictions back to Ignition/React?

The biggest question in the minds of most of the SI's was, where to run Tensor flow?. I have demonstrated an affordable solution (zero cost for Django) which any Ignition SI can implement, preferably on Linux. I am NOT an expert on ML but i have to know the bigger picture and explain my client, what are the deliverables, in order to win the job. If that happens, i will hire a mathematician to do that job.

Life is too short, to know everything.

---

<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 6, 2018, 12:56pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/13 "2018-06-06T12:56:21Z")

</div>

Can you elaborate on the experimental results you found with using Ignition/TensorFlow that you mentioned in another post?

---

<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 6, 2018, 5:38pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/14 "2018-06-06T17:38:44Z")

</div>

First, i am an ML enthusiast and learner. As a learner, whatever experiments i did are all available as free tutorials in youtube and tensorflow website. You can also do all those experiments. Honestly, i haven’t figured out yet how to use these tools to accomplish certain objectives. Every educated human knows this challenge. We believe in these tools because big giants like Google, Amazon etc have demonstrated the power of these tools and hope something good will emerge out over a period of time.

Today, SI business is not very profitable because supply exceeds demand everywhere. In IIOT business, if you try to sell SCADA alone, nobody will buy it. You need another layer which can deal with that huge amount of data.

So, when i said i did some experiments and found it amazing, don’t think that i have discovered something which may rewrite the history of mankind. It was just the excitement of an ordinary guy. Take it easy 🙂

---

<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 6, 2018, 8:16pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/15 "2018-06-06T20:16:33Z")

</div>

There was an excellent ignition webinar by Kevin McClusky and someone on ia using azure and ignition subsequently a beautiful blog by ignition. Btw JavaScript also supports Watson and tensorflow! No need of django!

---

<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 7, 2018, 1:17am UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/16 "2018-06-07T01:17:39Z")

</div>

JS is the language of browsers. Python runs on server. Django is the best server framework to run Python applications. Whatever was built with Java and c, can be built with Python today. There’s no code protection and both can be reverse engineered very easily. Nobody can claim any IP rights on applications built with open source technology. If you release an evaluation copy of your njscada, it will be reverse engineered immediately. You can’t sell even a single copy of njscada. Even MIcrosoft can’t make a single penny with windows any more.

Coding has become like lego building blocks. Very powerful development tools are available for free. You can build awesome applications by putting the right blocks together and upload it on Github for free. Coders are killing coders. I think, we have to accept the reality. Many software companies will be wiped off in a couple of years.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 7, 2018, 12:57pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/17 "2018-06-07T12:57:26Z")

</div>

> [@R.Alamsha](#):
>
> Coders are killing coders. I think, we have to accept the reality. Many software companies will be wiped off in a couple of years.

Please -- _ **please** _ -- show us a path into our future of non-coding, non-software employment. Blaze the trail for us poor souls to follow. We'll carry on as best we can while you do that.

---

<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 7, 2018, 2:57pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/19 "2018-06-07T14:57:39Z")

</div>

I mean, haven’t coders been killing coders for over 40 years now? It is truly amazing that we have jobs when this has been happening since the first computer was built. Maybe we should start looking into opening our potato farm Phil, I propose the name of P&K’s Outrageous Potatoes. We good?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 7, 2018, 3:02pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/20 "2018-06-07T15:02:26Z")

</div>

> [@Kyle\_Chase](#):
>
> We good?

A little more diversity, perhaps. I think we should grow kale, too. Then we can be P&K's Outrageous P&K. Better?

---

<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 7, 2018, 3:04pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/21 "2018-06-07T15:04:17Z")

</div>

I love it, but the question is, will we use automated harvesters? If they have been built with Ignition-ReactJS-Djanjo-JSON-AI-ML, it could be the beginning of the robot uprising…

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 7, 2018, 3:06pm UTC](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307/22 "2018-06-07T15:06:47Z")

</div>

> [@Kyle\_Chase](#):
>
> it could be the beginning of the robot uprising...

We'll just have to use our outdated skills to oppress the robots. Better that than digging potatoes by hand. I'm ready to be a robot oppressor.

[Next page](https://forum.inductiveautomation.com/t/ignition-reactjs-django-json-realtime/18307.md?page=2)
