HydroponicOne

HydroponicOne is a production-grade IoT control system for hydroponic environments, utilizing ESP32 microcontrollers for real-time sensor monitoring and actuator automation. It features a modern technical stack including a React dashboard, a Node.js backend, and a dual-database architecture using PostgreSQL and InfluxDB.

HydroponicOne

HydroponicOne is an open-source IoT control system designed for the precise monitoring and automation of hydroponic environments. It aims to bridge the gap between basic DIY setups and industrial automation by integrating high-precision sensor data with a modern web-based management stack. The project provides a complete ecosystem for tracking essential parameters like pH, electrical conductivity (EC), water levels, and climate conditions.

System Architecture

The system architecture is divided into three primary layers: the firmware, the backend infrastructure, and the user interface.

Firmware and Hardware

The firmware runs on ESP32 microcontrollers, which act as the edge devices responsible for interfacing with sensors and actuators. Built using the Arduino framework and managed via PlatformIO, the firmware supports a variety of hardware configurations. This includes I2C devices like the BME280 or BMP280 for atmospheric data, DHT sensors for humidity, and OneWire-based Dallas temperature sensors for nutrient solution tracking. Data from these sensors is transmitted via MQTT, using TLS for secure transport and RSA-2048 signed Over-the-Air (OTA) updates to ensure firmware integrity.

Backend and Data Management

On the server side, the project utilizes a Node.js backend built with the Fastify framework. A dual-database approach is employed to handle different types of data efficiently. PostgreSQL, managed through the Prisma ORM, stores relational data such as device configurations, system states, and user settings. For performance-heavy telemetry data, the system integrates InfluxDB, a time-series database optimized for storing and querying high-frequency sensor readings. This separation allows for efficient historical analysis and long-term data retention without impacting system performance.

User Interface

The frontend is a React-based single-page application (SPA) that provides real-time visualization of the growing environment. Using WebSockets via Socket.io, the dashboard receives instant updates from the backend, allowing users to monitor system health and sensor trends through interactive charts. The interface also allows for manual or automated control of actuators, including dosing pumps for nutrient management, circulation fans, and grow lights.

Key Features

  • Real-Time Environment Monitoring: High-precision tracking of pH, EC, water level, temperature, and humidity.
  • Automated Actuator Control: Smart relays manage dosing pumps, main circulation, grow lights, and ventilation systems.
  • Secure Communication: Features asynchronous MQTT with TLS encryption and offline-robust modes for reliable operation.
  • Enterprise Data Management: Utilizes PostgreSQL for configuration and InfluxDB for time-series telemetry.
  • Modern Web Stack: A lightning-fast React SPA communicating over real-time WebSockets to a Fastify backend.

Getting Started

The project is designed to be modular and extensible. Developers can get started by cloning the repository and setting up the backend and frontend environments using Node.js. The firmware is configured through a config.h template where network and MQTT details are defined before flashing to an ESP32 using PlatformIO. Comprehensive documentation is provided in the repository to guide users through hardware assembly, sensor calibration, and integration with third-party platforms like Home Assistant or Telegram.