← Back to projects
Kent State University

Systems · Group Alpha · Kent State

Greenhouse Monitoring System

GMS

A full-stack monitoring platform for tracking and visualizing environmental conditions inside a greenhouse. The first prototype collects data through an API, stores readings in a database, and shows insights on a web dashboard — built to scale toward real IoT sensors.

Live Demo ↗GitHub ↗
PythonStreamlitMongoDB AtlasOpenWeather APIpymongopython-dotenv
Overview

GMS collects environmental data (currently via API, later via sensors), stores readings in MongoDB Atlas, and displays them through a Streamlit dashboard. The system is designed to move from simulated API data to real IoT integration, such as Raspberry Pi and Shelly devices.

It collects environmental data, stores it efficiently, and visualizes it clearly — a scalable first prototype for greenhouse monitoring.

Objectives
  • Monitor environmental conditions across greenhouse zones
  • Visualize temperature and humidity data
  • Build a scalable system for IoT sensor integration
  • Transition from API-based simulation to real sensor data
Architecture

01 · Data source

OpenWeather API as a temporary simulation for greenhouse readings.

02 · Backend

Fetch, transform, and store environmental data in MongoDB.

03 · Database

MongoDB Atlas in the cloud for scalable storage.

04 · Frontend

Streamlit dashboard for visualization and insights.

Process

Phase 1 · API simulation

Use the OpenWeather API to simulate sensor data, collect readings, store them, and display them on the dashboard.

Phase 2 · IoT integration

Replace simulated data with real devices such as Raspberry Pi and Shelly sensors.

Phase 3 · Zones and analytics

Expand to more greenhouse zones and add deeper analytics over historical readings.

Process uploads

Process photos, diagrams, and screenshots will show up here once they are uploaded.

Documentation

Backend setup

Python 3.10+, pip, and a MongoDB Atlas account (or local MongoDB).

Clone and environment

git clone https://github.com/Alpha-Project-Horticulture-Sensor/greenhouse-monitoring-system.git
cd greenhouse-monitoring-system/backend

# Mac / Linux
python3 -m venv .venv
source .venv/bin/activate

# Windows
python -m venv .venv
.\.venv\Scripts\Activate.ps1

pip install -r requirements.txt

.env

MONGO_URI=your_mongodb_connection_string
DB_NAME=greenhouse_db

OPENWEATHER_API_KEY=your_openweather_api_key
OPENWEATHER_CITY=Akron
OPENWEATHER_COUNTRY=US
OPENWEATHER_UNITS=metric

ZONE=zone1

Run backend

python -m app.ingest_openweather_live

Frontend setup

Python 3.10+ and Git. Locally the Streamlit app runs at http://localhost:8501. The live Zone 1 dashboard is also deployed on Streamlit Cloud.

Setup and run

cd frontend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
streamlit run streamlit_app/Home.py

Tests

Backend tests follow a TDD approach with Python unittest and mocks, so no live API or external services are required. The scheduler loop is not tested.

  • Weather API fetching (get_weather)
  • Data transformation (transform_data)
  • Database saving (save_data)
  • Full pipeline (collect_data_to_db)
  • Database connection (init_db_collection)

Run tests

source backend/.venv/bin/activate
python -m unittest discover -s tests
python -m unittest discover -s tests -p "test_*.py"
Future
  • Real-time sensor integration (Shelly H&T, Raspberry Pi)
  • Alerts and notifications for abnormal conditions
  • Historical analytics and trends
  • Multi-zone scalability
  • Mobile-friendly UI
Team

Built by Group Alpha at Kent State University as an academic prototype.