Skip to content

RinaldoHalliburton/hydromonitor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hydromonitor

Internet of Things (IoT) Template - Hydroponics Monitoring System(Hydromonitor)

Description

The hardware is tasked with the remote control of the colour spectrum (frequency of light), the number of activated LEDs, and the brightness of the lighting within the Hydroponics system. To monitor the farm environment, the hardware employs a DHT22 temperature and humidity sensor. The heat index must be calculated based on the sensor's data. The collected sensor data must be published to a topic subscribed to by both the backend and frontend segments of the system. Furthermore, the hardware must process and execute actions in response to messages published to the topics to which it is subscribed. This comprehensive functionality ensures seamless control, monitoring, and responsiveness within the hydroponic cultivation environment.

The backend is tasked with storing data, published by the hardware, in the database following the schema specified in the hardware specifications. Additionally, it is responsible for making the stored data in the database accessible to the frontend through API routes.

The frontend plays a pivotal role in delivering three distinct user interfaces. These interfaces encompass controls for managing the system's lighting, real-time visualization of data generated by the environmental monitoring sensors, and the ability to visualize as well as perform statistical analysis on the data stored in the database. This multifaceted approach ensures a comprehensive and user-friendly experience, empowering users to efficiently interact with and derive insights from the hydroponics system.

Hardware Setup

Download and install Arduino IDE if you haven't already done so. Subsequently, install the following Arduino IDE libraries if they are not currently installed, following the tutorial here:

  1. FastLED by Daniel Garcia
  2. esp32 by Espressif Systems, from the Board Manager tab in the Arduino IDE
  3. ArduinoJson by Benoît Blanchon
  4. PubSubClient by Nick O’Leary
  5. DHT sensor library by Adafruit

Backend Setup

Always ensure to establish a virtual environment and install the necessary packages from your requirements file if you haven't already done so. Following that, activate your virtual environment and proceed to run your Flask API.

The commands below must executed from a command line terminal in the hydromonitor/backend/ folder

Create a virtual environment

Windows

python -m venv env  

Linux

python3 -m venv env  

Activate virtual environment

Windows

.\env\Scripts\activate 

Linux

source env/bin/activate

Install API requirements in the virtual environment

pip install -r requirements.txt 

Create .env file

Create a .env file in the backend/ folder to store the application's environment variables. Refer to the lab manual for the specific information that must be added to this file.

Start Flask API

Windows

py run.py 

Linux

python3 run.py

Frontend Setup ( Vue js, Vuetify, Vite)

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Customize configuration See Vite Configuration Reference.

In a command line terminal, execute the first commands in the hydromonitor/frontend/ folder to initiate the dev server for the initial setup.

For all subsequent instances, only run the second command to start the dev server.

Once development is complete, run the final command to generate production files. Please be aware that the generation of production files is not part of this course.

Project Setup

npm install

Run dev server (Compile and Hot-Reload for Development)

npm run dev

Create a production bundle (Compile and Minify for Production)

npm run build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Vue 35.4%
  • Python 19.1%
  • JavaScript 18.4%
  • C++ 16.2%
  • C 10.3%
  • HTML 0.4%
  • Other 0.2%