/ go

Simple SCADA: A distributed fog-computing control system

Last quarter, I took a course titled Next Generation Search Systems, and our main project was to come up with a search approach for solving a problem. After throwing a few ideas around, one of my teammates suggested Simple SCADA. Supervisory control and data acquisition is not new, but the current systems are outdated, so we decided to see what we could do about it in a few weeks. Our goals were really simple. First, it needed to be decoupled and distributed. Second, we wanted to be able to record tags such as temperature, light, and sound. And finally, we wanted it to be controllable from our phones. So, we got to work. One of my partners (the lead who recommended the project) worked on the IOT devices & IOServer, the other started work on an Android prototype app, while I got to work on the backend for both of them.

IOT devices & IO server

This was clearly the core of the entire project. We wanted to be able to deploy several physical boards that reported to an intermediate IO server. He ended up using Gobot on some Edison boards. The final product is pictured below.

The DIM light turned on when the room got dark, AC when the temperature got high, and LOUD when the room was noisy. It pushed frequent updates to the IO server which computed delta values before publishing changes to the backend I was working on.

Android App

The android app was simple. We wanted a quick way to view the data being published by the IOT devices. It did this by hitting an endpoint on the backend server.

Backend


My job was simple. Receive and index tags from the IO server, and accept requests from the android app. Our index needed to be somewhat unstructured and open so we could support more tags in the future. I wrote the server in Python using Sanic, and used Elasticsearch as our primary datastore. This was a no-brainer. Sanic was fast and simple, and Elasticsearch was perfect for the type of data we were handling. In fact, I didn't modify the data, I indexed it exactly how it came in after generating custom IDs for individual tags.

Bringing it all together

This was a fun project to work on. I love the internet of things but never had the time to actually work on one. We presented it, and the parts worked as one but the project as a whole could use a lot of work.

Open Source

IOT Gobot - https://gitlab.com/wrry/scada-iot
IO Server - https://gitlab.com/wrry/scada-io
Android App - https://github.com/dpocheng/Android-SCADA-Prototype
Backend Server - https://github.com/tolusalako/cs125_webserver