Giter Site home page Giter Site logo

hsandid / inf535-plant_companion Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 27.98 MB

Codebase & Documentation for our INF535 project (Plant Companion)

C++ 1.58% Hack 0.59% PHP 4.93% JavaScript 2.09% CSS 10.33% HTML 77.21% SCSS 3.27% Batchfile 0.01%

inf535-plant_companion's Introduction

INF535 - Plant Companion

  • Group Members : Chinonso Stanislaus Ngwu, Hadi Rayan Al-Sandid

  • The code for the Plant Companion is in the "Controller/" folder; the code fo the web-server is under the "server files/" folder.

Description:

  • The Plant Companion is an Arduino-based system that uses sensors to collect data relevant to maintaining a plant & irrigates the plant when necessary to do so. Data about soil humidity, soil temperature, and light intensity is collected by the sensors.
  • This data will be used to (1) automatically water the plant if needed, with a local water pump; (2) warn users of any abnormality in environment which could affect the plant

Activation Process for the Plant Companion

  • When the device is powered on for the first time, the ESP sends a HTTP request to the server to retrieve configuration information.

  • The server replies with a json file containing all the configuration parameters such as Activation status, Moisture Level Threshold and Manual Pump Status and Wi-Fi Credentials.

  • This JSON file is decoded by the ESP and saved inside a file locally on the ESP after which it restarts with the newly saved configuration parameters.

  • The ESP keeps checks for this configuration periodically and updates the files accordinly. (This can be likened to software updates where the system is usually restarted after the new updates to pick up the new configuration)

Sending Data

  • When readings are taken from the sensors, it is encoded in a request string and sent to the server via a HTTP POST request, the server processes this request and saves them to the DB.

Loading Configuration Data

  • The configuration data includes;
  1. Wi-Fi SSID
  2. Wi-Fi Password
  3. Device Status: 1(Activated), 0(Not Activated)
  4. Minimum Soil Mositure
  • The configurations from the server are saved to a files permanently on the ESP file system and is loaded during the setup process of the controller.

How to run the server

  • Download the server files

  • Install XAMP

  • Start Apache and MySQL from the XAMP control panel

  • Copy project documents and paste inside the htdocs folder in your XAMP directory <C:\xampp\htdocs>

  • Open your browser and navigate to http://localhost/phpmyadmin

  • Create a database plant_companion, click on import and select the DB.sql file from the downloaded server files to import your DB files

  • Open your browser and navigate to http://localhost/ or http://localhost/the_folder_pasted_the_server_files

  • Your website should be running with no issues

inf535-plant_companion's People

Contributors

hsandid avatar mrscan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.