/monitoring-automated-hydroponics-system

Raspberry pi sensor data for hydroponic plants such as pH, temperature, humidity, nutrient solution and dissolved oxygen. This repository will include the code for pulling the sensor data to the web app/site, determining if the data is at optimum levels and if not, the systems such as sun lamps, oxygen pumps, sprinklers etc will be triggered to act and get the humidity/temperature/pH/dissolved oxygen/nutrient solution to an optimum level.

Primary LanguagePython

Polling Raspberry Pi Sensors and Updating Firebase Database Using Raspberry Pi

This repository contains code that interfaces with and returns the results of various sensors on a Raspberry Pi, and pushes these results in 2 minute increments to Firebase DB. An Abstract Sensor class allows for the easy addition of various sensors, by requiring consistent methods between them for read(). In addition, a Firebase class was created using the Database abstract class, requiring the authenticate() and push() methods. This increases the maintainability, testability and modularity of the system.

The Product Manual can be found here on how to get started with your RPiDronics and for details on setting up the various sensors and probes.


Requirements

  1. Pyrebase- A simple python wrapper for the Firebase API.

Usage

  1. Run git clone https://github.com/PiDronics/monitoring-automated-hydroponics-system.git
  2. Run cd monitoring-automated-hydroponics-system
  3. Edit the env.py file with the relevant credentials.
  4. Run pip install -r requirements.txt to install the required libraries.
  5. Assuming pH sensor is properly connected to the Raspberry Pi, run python runner.py. The Raspberry Pi will begin polling the sensor based on the interval set during System creation, and the reading will be viewable on the app