The Plant Monitoring System consists of a web application that continuously receive data from a monitoring node. The web app should also display the data received and secure the access to the information. All the automated tasks should have a manual mode, in which the user himself start the task.
The system is separated 4 parts: the Server, the Database, the Mobile App and the Monitoring Node.
The system is physically separated in 4 parts. These parts are: * Server ― AWS EC2 Instance (t2-micro) running Windows Server 2012 * Database ― AWS RDS Instance (db.t2.micro) running MySQL 5.6.23 * Mobile App ― Any Android 4.X.X Smartphone * Monitoring Node ― Raspberry Pi 2 running Raspbian
The components connected to the monitoring node are: * Adafruit MCP3008 - 8-Channel 10-Bit ADC With SPI Interface * DIYmall DHT11 Temperature Relative Humidity Sensor Module * Waterproof Probe with DS18B20 Temperature Sensor * Arrela® Soil Hygrometer Detection Module (Soil Moisture Sensor) * Light Dependent Resistor (LDR) * Water Pump * 5W Lamp * 2-Channel Relay Module
Besides this components, a GPIO Extension Board was used to connect the Raspberry Pi to an 800-points breadboard and additional resistors and jumpers were used to wire the components together.
GPIO (for the DHT11 sensor and Relay Module control) * I2C (for the DS18B20 sensor) * SPI (for the ADC MCP3008)
The Monitoring Node uses a WIFI dongle to post data to the server through WAN, but it can work through LAN if an Ethernet cable is connected to it. The project also has a mobile app, which make it possible for the user to also use his mobile network to access information from the server.
The communication is based on requests and responses using REST architecture. The web server acts most of the time as a proxy for the database, making sure that only authenticated users can access the system information. There is no direct access to the database. Instead, every app (mobile, web or local) must perform authenticated requests to the server.
An authenticated request is a HTTP Request containing a X-Auth-Token header with a valid authentication token, a GUID given by the server after the authentication URI is called if the parameters (username and password) are correct. The following image shows how the Monitoring Node acts as it is initialized, asking for credentials and storing the authentication token for future requests.
The Monitoring Node code supports readings the measurements: Humidity, Light Level, Soil Moisture and Temperature (of the air and soil). All the readings are stored in a RDS machine on Amazon Web Service. The machine runs MySQL and has 20Gb of SSD storage.
The system is capable of generating an overview of the reading for some periods of time. When using the mobile app, the user can see 3 charts. The first contains average readings from the last hour. The second shows the last 24 hours and the third shows the last 7 days.
AngularJS * CoffeeScript * Less * Ionic Framework * Apache Cordova * Python 2.7 * C# and .NET Framework
Raspberry Pi B+ by Tom Medley from the Noun Project * Thermometer by Evan Shuster from the Noun Project * Humidity by Evgeniy Artsebasov from the Noun Project * WiFi by Yamini Ahluwalia from the Noun Project * Cloud Secure by iconsmind.com from the Noun Project * Photo Resistor by Arthur Shlain from the Noun Project * Light by Creative Stall from the Noun Project * Pipe valve by Creative Stall from the Noun Project * Valve by Sergey Demushkin from the Noun Project * Water Tank by Adam Zubin from the Noun Project * Statistics by Hermine Blanquart from the Noun Project
- Equalizer by Dominique Vicent from the Noun Project
Smartphone by Martin Jordan from the Noun Project * Laptop by Pham Thi Dieu Linh from the Noun Project * Sprout by Agne Alesiute from the Noun Project