xscotophilic

Smart Greenhouse

Overview

In Smart Greenhouse, we can maintain certain moisture and desired range of temperature for optimal plant growth. Sensors can sense changes in just a few seconds and report to the caretaker. This project is to make it easier to grow plants at the greenhouse. Also, it can be reassuring to know that the plants are taken care of while one is on vacation or not around the greenhouse for a longer period.

About project

The goal is to introduce Smart Greenhouse to all farmers and people, as well as the benefits it provides. According to The Wire, 11,379 farmers committed suicide in India in 2016. This amounts to 948 suicides per month, or 31 suicides per day. The goal is to try to reduce this rate. To lead the transformation, we collaborate with the government, non- governmental organizations, and communities.

Given the current state of agriculture, which is plagued by a slew of issues, IoT-based Smart Farming is an absolute necessity. To introduce smart farming in the real world, IoT- based products must be produced and implemented at regular intervals and at a rapid rate.

- GitHub Project Link

Architecture

arch

User management

arch

Setup

arch

Opt in to use our service

arch

Circuit diagram

Python program flowchart

arch

DIY

Database Setup
  • Create a mongoDB cluster. create database on mongodb.com
  • Create a user to access the database config
  • Create a database config config
  • To authenticate (Add) farmer/ user in database -> add document in users collection with ID, PASSWORD and TOKEN.
    config

Local API and Front-end setup
  • Node version 14 is used for this project. So you need to install node version 14. We prefer using nvm.
    nvm install 14
    nvm alias default 14
  • Download Repo from GitHub
  • Update the root_of_project/config/dev.js vars (in config directory).
  • const mongo_uri = `mongodb+srv://username_to_access_database:password_to_access_database@greencluster.mongodb.net/database_name?retryWrites=true&w=majority`;

    module.exports = {
      MONGO_URI: mongo_uri,
    };
    Where above highlighted fields are to be replaced by your own credentials, database name and cluster.
  • This project uses concurrently to run both server and client at the same time.
  • Install dependencies, run below command in root of project:
    npn install
  • Install dependencies for client, run below command in root of project:
    npn install --prefix client
  • To run both server and client at the same time, run below command in root of project:
    npn run dev
  • For login, use token and password. "Do not use userid."
  • To Add farmer/ user in database -> add document in users collection with ID, PASSWORD and TOKEN.
    config
  • Host GitHub repo on heroku or any other hosting service. You need to update the ENV variables in heroku.

Setup IoT kit
  • Connect the circuit (refer circuit diagram).
  • Change the REST API url (self.API_ENDPOINT) in python code (root/SmartGreenhouse.py).
  • In the python code (root/SmartGreenhouse.py) replace sg1.login() line with sg1.login("token", "password"). For login, use token and password. "Do not use userid."
  • run the SmartGreenhouse.py in RPi everytime RPi is started.
to top