Skip to content

Latest commit

Β 

History

History
84 lines (64 loc) Β· 3.52 KB

File metadata and controls

84 lines (64 loc) Β· 3.52 KB

🌿 Smart Plant Monitoring System (NodeMCU + NETPIE + Telegram)

An IoT project that monitors soil moisture, temperature, and humidity using NodeMCU (ESP8266) and DHT22. It automatically alerts you on Telegram and controls a servo shade to protect your plant when needed.

projectFinal


πŸš€ Features

  • 🌑️ Reads temperature & humidity from DHT22.
  • 🌱 Detects soil moisture using an analog sensor.
  • πŸ€– Sends Telegram alerts (dry, perfect, or wet).
  • πŸ’‘ RGB LED indicator for plant condition.
  • ☁️ Publishes data to NETPIE using MQTT.
  • βš™οΈ Smooth servo movement for shade control.

πŸ”§ Setup

  1. Copy secrets_example.h β†’ secrets.h.
  2. Fill in your WiFi, NETPIE, and Telegram credentials.
  3. Open SmartPlant.ino in Arduino IDE and upload it to your NodeMCU board.
  4. View live data on the NETPIE dashboard and get Telegram alerts instantly.

🌐 NETPIE Setup (Required)

To use this project, you need a NETPIE (broker.netpie.io) account for MQTT communication and dashboard visualization.

🧩 1. Create a NETPIE Account


βš™οΈ 2. Create a New Device

  1. In the dashboard, click Create Device β†’ choose a name (e.g., SoilMoist).
  2. Copy the following credentials:
    • Client ID
    • Username
    • Password
  3. Paste them into your local secrets.h file:
    const char* MQTT_CLIENT_ID = "your_client_id";
    const char* MQTT_USERNAME  = "your_username";
    const char* MQTT_PASSWORD  = "your_password";

✨ 3. Build Your Dashboard

Go to the Dashboard tab and click β€œ+ Widget” to start adding widgets. Configure each widget with the corresponding Topic/Configuration string for easy copy-paste:

Widget Type Display Name (Example) Topic/Configuration String Control Action (If applicable)
Gauge 🌑️ Temperature Gauge #["SoilMoist"]["shadow"]["temperature"] N/A
Gauge πŸ’§ Humidity Gauge #["SoilMoist"]["shadow"]["humidity"] N/A
Gauge 🌱 Moisture Gauge #["SoilMoist"]["shadow"]["moisture"] N/A
Text Display 🧾 Moisture Value #["SoilMoist"]["shadow"]["moisture"] N/A
Chart πŸ“Š Trends Over Time #["SoilMoist"]["feed"] N/A
Slider βš™οΈ Servo Shade Control #["SoilMoist"]["shadow"]["shade"] On Slide Action: #["SoilMoist"].publishMsg("shade", value)
On/Off Toggle 🌀️ Servo Shade Toggle (#["SoilMoist"]["shadow"]["shade"] == "0") ? true : false ON Action: #["SoilMoist"].publishMsg("shade", "0")
OFF Action: #["SoilMoist"].publishMsg("shade", "180")

πŸ“˜ For more details, refer to the official NETPIE Documentation


🧰 Hardware

Component Description
NodeMCU ESP8266 Main microcontroller (WiFi enabled)
DHT22 Sensor Measures temperature & humidity
Soil Moisture Sensor Detects soil water levels
Servo Motor Controls plant shade
RGB LED Indicates moisture level visually

πŸ–ΌοΈ Example Dashboard

netpie

πŸ“œ License

MIT License Β© 2025 whoosh09 See LICENSE for details.