Giter Site home page Giter Site logo

rickypatel38 / greatsage Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 51 KB

The purpose of GreatSage is to provide an automated greenhouse monitoring system.

Home Page: http://www.vayugreens.com

Python 94.75% Shell 5.25%
greenhouse gardening agriculture-automation agriculture-iot

greatsage's Introduction

README

Live Data Feed:

https://thingspeak.com/channels/1785291

What Is GreatSage?

The purpose of GreatSage is to provide an automated greenhouse monitoring system. The sensors in this project are utilized in order to provide insight into the conditions of the plant growing environment. The sensors will also provide insight in to the pH, electric conductivity, humidity and liquid temperature of the environment. The power for this equipment will be controlled via a "web-power switch" so that the user can control the greenhouse equipment remotely at any given time. The sensors in this system should provide enough data in order to calculate information such as the Vapor Pressure Deficit (VPD) in the growing environment.

Future Updates

Data Points

  • EC (Electric Conductivity)
  • Ambient Humidity
  • Liquid Temperature
  • pH

Hardware / Sensors

Read up on how the sensors work from the links below. Both pH and EC sensors are converted from EZO pins to USB data there is a github link on the atlas scientific website.

Architecture

How do I get set up?

  • Dependencies: The init.sh script will install all of the required dependencies for this project.

  • Pipenv: Run the Pipenv Install then Pipenv Update commands. From there all dependencies should be installed to run this project.

  • Database configuration: Run the db_init.py file within the "sqlite" folder. This will create your sqlite database with the approriate tables.

  • Deployment instructions: Once all the sensors have been wired run the sensor_main.py file in order to store data from the sensors in to the SQLite DB as a test to see if the sensors are properly connected.

  • A .env file with the variables below is required:

    • DLI_PASS = your webpower switch password for remote control of equipment
    • THINGSPEAK_KEY = apikey for thingspeak
  • Run the api_main.py file in order to run the API Service on 0.0.0.0 (your local area network).

Security

  • ToDo: Input validation on all API Endpoints (regex reccomended).
  • ToDo: More defensive coding for the Web Power Switch
  • ToDo: API Token based authentication.
  • Line 20 in api_main.py as * for CORS please replace the wildcard value with the address of the frontend endpoint which will utilize the API.
  • Unforutnately the temperature sensor requires admin access to read sys/bus/w1/devices/w1_slave. This will need to be re-written. A seperate service running on the OS should call the temperature sensor and store it into the DB.
  • It is bad practice to run the API service on a production environment as admin.

Code Cleanup

  • ToDo: More robust error logging on indidivual sensors.
    • pH Sensor Error Catching / Logging
    • EC Sensor Error Catching / Logging
    • DS18B20 Sensor Error Catching / Logging
    • WebPowerSwitch Error Catching / Logging
    • Create an alerting system that alerts if the Raspberry Pi or a sensor is down.

Features

  • Log when Powerswitch is turned off and on in ThingSpeak.
  • Add a "tags" for the powerswitch number i.e. Switch 1 is "Main Lights"

Contribution guidelines

  • To be created / performed:
  • Writing tests
  • Code review
  • Other guidelines

Who do I talk to?

Notes When Starting

  • Pipenv install --skip-lock will save a lot of headaches the pipfile.lock is bugged for this project.
  • Sudo raspi-config interface options enable 1 wire support in order to read from ds18b20 sensor.

greatsage's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

dalalsoham

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.