Giter Club home page Giter Club logo

plant_soil_moisture's Introduction

Monitor the soil moisture of your plants with an ESP32

Cloning

git clone --recurse-submodules https://github.com/m0by314/plant_soil_moisture.git

Summary

How it works

The tool performs a measurement every 6 hours, in order to have the evolution of the soil moisture during the day.
The data is stored on an Adafruit IO feed to be visualized in a dashboard.

If the percentage of soil moisture is below than the threshold, an alert watering for your plant is sent by email using an IFTTT webhook.

Between each measurement, the ESP goes into deep sleep mode.

I use the Adafruit IO platform because the free account offers 10 feeds, (which allows to monitor 10 plants), 5 dashboards and the data are stored for 30 days

Connect the soil moisture sensor

image

Create IFTTT webhooks

  • Go to the link: https://ifttt.com/

  • Then click on the "create" button image

  • Then click on "add" in the "If This" section image

  • Search for the "Webhooks" service image

  • Select trigger "Receive a web request" image

  • Define the event name (to keep aside it will be used in the configuration file) then create the trigger image

  • In the "Then that" section click on "add image

  • Search for the Gmail service

  • Then select action "send an email" image

  • Complete action fields like this: image

  • Go to the following link to get your key: https://ifttt.com/maker_webhooks/settings
    The key is at the end of the URL image

Create Adafruit IO Dashboard

Setup

  • First copy the template:
    cp config_template.h config.h

  • Configure the following variables with your credentials:

/* Soil sensor */
#define MOISTURE_SENSOR_PIN 36 
#define DRY_VALUE "value obtained in air" 
#define WET_VALUE "value obtained after immersing it in water" 

/* WIFI Setting */
#define WIFI_SSID "YOUR_WIFI_SSID"     /* Replace with your wifi ssid. */
#define WIFI_PWD "YOUR_WIFI_PASSWORD"  /* Replace with your wifi password */

/* Plant name */
#define PLANT_NAME "YOUR PLANT NAME"   /* Replace with your plant name, use for the subject of the mail.*/

/* Adafruit IO settings */
#define IO_USERNAME "YOUR ADAFRUIT USERNAME" /* Replace with your adafruit username. */
#define IO_KEY "YOUR ADAFRUIT KEY"           /* Replace with your adafruit key.      */
#define IO_FEED_NAME "YOUR FEED NAME"        /* Replace with your adafruit feed name. */

// IFTTT Setting
#define IFTTT_KEY  "YOUR_IFTTT_KEY"          /* Replace with your unique IFTTT Key, can be obtained at this link: https://ifttt.com/maker_webhooks/settings. */
#define IFTTT_EVENT_NAME "YOUR_EVENT_NAME"  /* Replace with your IFTTT event name. */

/* Mail Setting */
#define MAILTO "YOUR_MAIL" /* Replace with your email. */

/* Moisture alert threshold */
#define THRESHOLD "YOUR_MOISTURE_THRESHOLD" /* Replace with your moisture threshold alert */

Built with

  • ESP32 DevKitC V4
  • Soil Moisture Sensor Hygrometer Module V1.2 capacitive

plant_soil_moisture's People

Contributors

m0by314 avatar

Stargazers

 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.