Skip to main content

Introduction

The Aqua-IoT web dashboard is your central hub for monitoring and managing all connected IoT sensors in real-time. Built with Django and Django REST Framework, it provides a powerful interface for tracking environmental conditions across your aquaponics and plant monitoring systems.

Key Features

Real-Time Monitoring

Track sensor data in real-time across all connected devices with automatic updates

Multi-Sensor Support

Monitor 6 different sensor types: temperature, humidity, water level, light, and water quality

Secure Authentication

Enterprise-grade authentication system to protect your sensor data

RESTful API

Full REST API access for integrating with IoT devices and external systems

Dashboard Architecture

The dashboard is built on Django’s MVT (Model-View-Template) architecture with REST API capabilities:
# Main dashboard view from sensores/views.py
def home(request):
  if request.user.is_authenticated:
    # Temperatura Plantas
    temperaturap = TemperaturaPlantas.objects.all()  
    # Nivel Agua 
    nivel = NivelAgua.objects.all()   
    # Umidade
    umidade = Umidade.objects.all() 
    # TDS
    tds = Tds.objects.all()  
    # Temperatura Aquario 
    temperaturaa = TemperaturaAquario.objects.all() 
    # LDR
    ldr = Ldr.objects.all()  
    # Dados  
    context = {
              'temperaturas': temperaturap,
              'nivels': nivel,
              'umidades': umidade,
              'tdss': tds,
              'temperaturaas': temperaturaa,
              'ldrs': ldr,
       }
    return render(request, "index.html", context)
  else:    
   return redirect(userLogin)
The home view at sensores/views.py:13 automatically redirects unauthenticated users to the login page for security.

Supported Sensor Types

The dashboard supports six distinct sensor types, each with specialized monitoring capabilities:

Temperature (Plants)

Monitor temperature conditions for plant environments in degrees

Temperature (Aquarium)

Track water temperature for aquatic systems in degrees

Humidity

Measure environmental humidity levels in percentage

Water Level

Monitor water levels with customizable minimum thresholds in centimeters

Light (LDR)

Track ambient light conditions in lumens with average calculations

Water Quality (TDS)

Measure total dissolved solids in water quality monitoring in ppm

URL Routes

The dashboard provides dedicated routes for each monitoring function:
# URL configuration from sensores/urls.py
urlpatterns = [    
    path('', views.home, name='home'),
    path('login/', views.userLogin, name='login'),
    path('logout/', views.logOut, name='logout'),    
    path('temp-aquario/', views.temperaturaAquario, name='temp-aquario'),
    path('temp-plantas/', views.temperaturaPlantas, name='temp-plantas'),
    path('umidade/', views.umidade, name='umidade'),
    path('nivel/', views.nivelAgua, name='nivel'),
    path('ldr/', views.ldr, name='ldr'),
    path('tds/', views.tds, name='tds'),
    path('api/', include(router.urls)),         
]

Getting Started

1

Access the Dashboard

Navigate to your dashboard URL and you’ll be redirected to the login page if not authenticated
2

Authenticate

Log in with your credentials to access the monitoring interface
3

View Sensor Data

The home dashboard displays all sensor readings in a unified view
4

Navigate to Specific Sensors

Use the navigation menu to view detailed data for specific sensor types

Next Steps

Authentication

Learn about user authentication and login workflows

Monitoring Sensors

Explore detailed sensor monitoring capabilities

Data Visualization

Understand how to visualize and analyze sensor data

API Reference

Connect IoT devices using the REST API

Build docs developers (and LLMs) love