C2webapp

C2webapp

C2 - Visit the Site

This webapp is designed to monitor sensors on a large campus. It integrates a map to provide location data along with the sensors and sends alerts to the user. Mock sensors are provided to mimic how actual sensors would behave in our app (see Mock Sensors below).

It requires meteorJS. To run/deploy, simply type meteor from the project root. For the sensor page to work, type meteor add session before deploying.

Meet the Team

Austin Aguliera - Linkedin Profile

Colby McHugh

Dylan Desai

Kevin Tracy - Senior Computer Engineering Student USC

Demo

Screenshots

Homepage

This Home page features a map that displays the location of sensors within a designated area. The map is interactive and clicking sensor icons will bring up more information about the sensor. This page also displays recent sensors returns, and alerts users when a sensor sends a warning.

C2 - Google Chrome 2020-04-22 23 44 24

Activity log

On this page users will silence the warnings by selecting an appropriate response to the event. The warning will only disappear once a response is chosen. This reduces the chance of a sensor warning going unnoticed. The platform logs each sensor warning and the response taken. This logged can be sorted by sensor which makes it easy to review past events.

C2 - Google Chrome 2020-04-23 00 43 51

Sensors

Upon selecting a sensor, users will be shown details about the status, type, operating schedule and location of the sensor. This particular sensor returns tempurature data. This thermometer shows a temp of 72deg F. Those with admin privileges will be able to edit these characteristics as well as delete sensors from the system.

C2 - Google Chrome 2020-04-22 23 27 04

Testing

All test files are located in the ‘tests’ directory in the root of this project. To run the tests, simply run ` meteor test –driver-package meteortesting:mocha (windows), or ./run -test` (linux) For behavioral tests with selenium you must have the project running locally and then run the selenium command line runner on C2Webapp.side in the tests directory. (Currently will only work once since it creates an admin account and there can only be one of each username.)

Mock Sensors

Inside the project there is a folder called mock-sensor. In this folder you will find all of the node.js programs that we use as mock sensors to test our app. How these are uses is you install the required npm binaries.(Should just be socket.io-client) and run them with node. eg. node thermometer.js or node camera.js. Each of these files will walk you through how to use them on the command line interface. Currently there are three. Sensor.js a generic sensor that sends boolean data of wether it is alerted. thermometer.js that sends numerical data about temperatures and camera.js that takes the Base64 representation of any jpg image and sends it to the webapps database.

Make sure you have meteor, python with socketio (for camera sensor), and nodeJS/NPM installed and running, then run node mock-sensor/sensor.js (general), node mock-sensor/thermometer.js (temperature) or python mock-sensor/Camera.py (camera). Set the coordinates to get the mock sensor to appear on the client/frontend, then send data/alert.