GithubHelp home page GithubHelp logo

axel-ex / feed_my_plant Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 35.53 MB

Smart watering system for your plant to stay hydrated!

JavaScript 1.80% Makefile 59.31% C 0.01% C++ 38.73% CMake 0.14%
esp32 iot

feed_my_plant's Introduction

Alt text

Feed My Plant is a smart watering system that ensures your little plants stay hydrated at all times based on environmental conditions without needing your intervention! This project is the result of a collaborative effort and was develop during the innovation week 2024 organised by Critical software.

Table of Contents

  1. Project Overview
  2. How It Works
  3. Hardware Requirements
  4. Software Setup
  5. Usage
  6. Docker Compose Services
  7. Contributing
  8. License

Project Overview

Feed My Plant automates the watering process for your plants, ensuring they receive the right amount of water based on various environmental factors. The system uses sensors to monitor rain and ambient conditions, triggering the watering process as needed.

How It Works

The system consists of several interconnected services running in Docker containers:

  • Mosquitto acts as an MQTT broker for communication between components (esp32 and docker network).
  • Node-RED manages the logic and workflows.
  • Telegraf consume mqtt message and send it to the database.
  • InfluxDB stores the collected data.
  • Grafana provides a dashboard for visualizing the data.

Hardware Requirements

To set up the Feed My Plant system, you will need the following hardware:

  • An ESP32
  • BME680, rain detector
  • Electrovalve
  • 12 volts relay
  • 12 volts transformator
  • Tubing and connectors
Alt text

Here above the setup without the rain detector. The BME280 sensor is connected via I2C (SDA 21, SCL 22). The relay is connected to GPIO26, and the rain sensor (not shown) uses GPIO33. The valve and rain sensor are powered by an external 12V power supply.

Software Setup

Prerequisites

Before setting up the software, ensure you have the following installed on your machine:

Installation

  1. Clone the Repository:

    git clone https://github.com/Axel-ex/Feed_my_plant.git
    cd feed-my-plant
  2. change the Wifi credentials in .cpp files and upload the code to the board

    cd code
    pio run --target upload && pio device monitor
  3. Start the Docker Containers:

    cd docker_compose
    docker-compose up -d
  4. Set up your database

    • Go to your database page (http://localhost:8086)
    • Create a profile and copy your API token

  1. Modify credentials:

    • Make sure to modify environment variable in the .env file with the value you just entered when creating your influxdb user.

  1. Restart your services
    docker-compose restart

Usage

Once the Docker containers are up and running:

  1. Access Grafana at http://localhost:3000 to visualize sensor data.
  2. Access Node-RED at http://localhost:1880 to manage and customize the automation workflows. Access the Node-RED UI at http://localhost:1880/ui to interact with your microcontroller.
  3. Ensure Telegraf, InfluxDB, and Mosquitto are running and properly configured to collect and route data from your sensors.
Alt text Alt text

Docker Compose Services

Telegraf

  • Image: telegraf
  • Ports: 8125
  • Configuration:
    volumes:
      - ./data/telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro

InfluxDB

  • Image: influxdb
  • Ports: 8086
  • Volumes:
    volumes:
      - influxdb_data:/var/lib/influxdb

Grafana

  • Image: grafana/grafana
  • Ports: 3000
  • Volumes:
    volumes:
      - grafana_data:/var/lib/grafana

Node-RED

  • Image: nodered/node-red:latest
  • Container Name: node-red
  • Ports: 1880
  • Volumes:
    volumes:
      - ./data/node-red:/data

Mosquitto

  • Image: eclipse-mosquitto:latest
  • Container Name: mosquitto
  • Ports: 1883
  • Volumes:
    volumes:
      - ./data/mosquitto/config:/mosquitto/config
      - ./data/mosquitto/data:/mosquitto/data
      - ./data/mosquitto/log:/mosquitto/log

feed_my_plant's People

Contributors

axel-ex avatar joaoteixeiragit avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.