Overview
Aqua-IoT is a Django-based web application for monitoring aquaponics systems. This guide will walk you through installing the application on your development or production environment.Prerequisites
Before installing Aqua-IoT, ensure you have the following installed on your system:- Git - Version control system (Download & Install Git)
- Python 3.7+ - Programming language runtime (Download & Install Python)
- pip - Python package manager (included with Python)
- PostgreSQL - Database server (recommended for production)
- MQTT Broker - For IoT device communication (e.g., Mosquitto, HiveMQ)
Installation Steps
Install Dependencies
The application requires the following Python packages (defined in
Pipfile):- Django - Web framework
- Django REST Framework - API toolkit
- psycopg2 - PostgreSQL database adapter
Configure Database
Set up your PostgreSQL database. See the Configuration page for detailed database settings.
Create Superuser (Optional)
Create an admin user to access the Django admin panel:Follow the prompts to set username, email, and password.
Verify Installation
After completing the installation:- Access the Web Interface: Open your browser and navigate to
http://localhost:8000 - Check Admin Panel: Visit
http://localhost:8000/adminand log in with your superuser credentials - Test API Endpoints: Verify that the REST API is accessible
MQTT Broker Setup
For IoT device communication, you need to set up an MQTT broker:Arduino Setup
To connect Arduino sensors to the system:- Install the Arduino IDE
-
Install required libraries:
- DHT sensor library
- OneWire
- DallasTemperature
- GravityTDS
-
Upload the sensor code from the
Arduino/directory to your Arduino board - Configure the MQTT broker connection in the Arduino code
Troubleshooting
Common Issues
ImportError: No module named 'psycopg2'
ImportError: No module named 'psycopg2'
The PostgreSQL adapter is not installed. Run:On some systems, you may need to install
psycopg2-binary instead:Database connection error
Database connection error
Ensure PostgreSQL is running and the database exists:
Port 8000 already in use
Port 8000 already in use
Specify a different port when running the server:
Static files not loading
Static files not loading
Run collectstatic again and ensure
STATIC_ROOT is properly configured:Next Steps
Configuration
Configure database, security, and application settings
Production Setup
Deploy Aqua-IoT to a production environment
