Skip to content

This Hydroponic Monitoring Telegram Bot🌿, is designed for automating and remotely managing hydroponic systems through a Telegram bot. It integrates sensors and actuators to monitor critical environmental parameters such as water levels, pH, and nutrient concentrations.

License

Notifications You must be signed in to change notification settings

Customize5773/Hydroponic-Monitoring-Telegram-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

47 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hydroponic Monitoring and Control System 🌿

Image Hyroponic Monitoring and Control1

A standalone, WiFi-based monitoring and automation system for hydroponic farming using Arduino/ESP32.
This project provides real-time monitoring and automated control of nutrient levels (pH, EC), water temperature, and water level across 4 hydroponic tanks, integrated with a Telegram Bot interface for remote access and control.


πŸš€ Features

βœ… Monitor pH, EC, and temperature per tank
βœ… Automatic dosing using 4 peristaltic pumps (1 per tank)
βœ… Shared solenoid valve for automatic draining
βœ… Shared refill pump for automatic water level refill
βœ… Threshold-based automation per tank (stored in SPIFFS JSON config)
βœ… Telegram Bot integration for:

  • Scheduled data reporting every 15 minutes
  • Manual data request
  • Changing threshold parameters remotely βœ… Notification alerts if pH or EC is out of range
    βœ… Standalone operation (ESP32, no external PC/server)

πŸ—οΈ Project Structure

β”œβ”€β”€ src/                  # Main source code
β”‚   β”œβ”€β”€ main.ino
β”‚   β”œβ”€β”€ config.h
β”‚   β”œβ”€β”€ sensors/          # Sensor modules
β”‚   β”œβ”€β”€ actuators/        # Actuator controllers
β”‚   β”œβ”€β”€ telegram/         # Telegram Bot handler
β”‚   β”œβ”€β”€ utils/            # Utility modules
β”‚   └── README.md         # Source-level documentation
β”œβ”€β”€ test/                 # Test sketches
β”‚   β”œβ”€β”€ test_ph_sensor.ino
β”‚   β”œβ”€β”€ test_ec_sensor.ino
β”‚   └── test_telegram.ino
β”œβ”€β”€ data/                 # SPIFFS data (upload via SPIFFS uploader)
β”‚   └── thresholds.json
β”œβ”€β”€ docs/                 # Documentation & diagrams
β”‚   β”œβ”€β”€ README.md
β”‚   β”œβ”€β”€ Graphic Schematic Drawing.svg
β”‚   └── flowchart.png
└── README.md             # Project overview

πŸ“ Hardware Requirements

  • ESP32 Dev Board
  • 4x pH Sensors (analog)
  • 4x EC Sensors (analog)
  • 4x DS18B20 Waterproof Temperature Sensors
  • 1x Ultrasonic Sensor (water level)
  • 4x Peristaltic Pumps (12V)
  • 1x Solenoid Valve (12V)
  • 1x Refill Pump (12V)
  • Relay modules or MOSFET drivers for actuators
  • 12V Power Supply for actuators
  • 5V Regulator for ESP32
  • Waterproof enclosures for outdoor environment

⚑ Wiring Overview

Refer to docs/README.md for detailed wiring pinout and schematic flow.

Key connections:

Sensor/Actuator Pin Mapping
pH 1–4 A0–A3
EC 1–4 A4–A7
Temp sensors D1 (1-Wire)
Ultrasonic D5/D6
Pumps 1–4 D7–D10
Solenoid valve D11
Refill pump D12

πŸ’¬ Telegram Bot Integration

  • Uses Universal Arduino Telegram Bot library

  • Responds to commands:

    • /status β†’ current sensor data
    • /setph [tank] [min] [max] β†’ update pH threshold
    • /setec [tank] [min] [max] β†’ update EC threshold
  • Sends automatic updates every 15 minutes

  • Sends alerts if pH/EC outside thresholds


πŸ”§ Configuration

Thresholds per tank are stored in /data/thresholds.json (uploaded via SPIFFS uploader):

{
  "tanks": [
    { "id": 1, "ph_min": 5.8, "ph_max": 6.5, "ec_min": 1.2, "ec_max": 1.8 },
    ...
  ]
}

Update thresholds either by:

  1. Editing and re-uploading thresholds.json
  2. Using Telegram /setph and /setec commands

πŸƒβ€β™‚οΈ Getting Started

  1. Clone the repository

  2. Open in Arduino IDE or PlatformIO

  3. Install dependencies:

    • ArduinoJson
    • Universal Telegram Bot
    • WiFi
    • SPIFFS
  4. Configure WiFi credentials and Telegram token in config.h

  5. Upload /data/thresholds.json via SPIFFS uploader

  6. Flash firmware

  7. Verify Telegram Bot responds and sensors function


πŸ§ͺ Testing

Use provided test sketches in /test to validate individual sensors and modules before full deployment.


πŸ“„ Documentation

  • Flowchart and technical docs available in docs/

πŸ“’ License

MIT License


πŸ‘¨β€πŸ’» Contribution

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


About

This Hydroponic Monitoring Telegram Bot🌿, is designed for automating and remotely managing hydroponic systems through a Telegram bot. It integrates sensors and actuators to monitor critical environmental parameters such as water levels, pH, and nutrient concentrations.

Topics

Resources

License

Stars

Watchers

Forks