Giter Club home page Giter Club logo

wateringsystem2-controller-esp32's Introduction

wateringsystem controller 2.0 with ESP32

Description

This controller is the heart of my new wateringsystem.

Features

  • Monitoring weather data (temperature, humidity and air pressure)
  • Monitoring th soil moisture of the plant
  • Monitoring of energy consumption
  • super long deepsleep times to save energy
  • easy to configurable with the help of Node-RED
  • Controllable via MQTT
  • widely-used sensors
  • completly asynchron programming
  • host by your own: complete control over your data (no external cloud service needed)
  • OTA updates

Setup

  • connect all parts to the ESP32
  • connect power
  • the ESP32 starting an own Wifi access point named "wateringsystem-{device ID}"
  • connect to this Wifi with your smartphone
  • use waaatering for Wifi password
  • you will redirected to a config page
  • insert your Wifi and MQTT broker credentials
  • click on "save"
  • the ESP32 will restarting and connect to your MQTT broker
  • after about 1 minute you should see a new topic in your MQTT broker wateringsystem/{device ID}/out/info with a lot of information in the payload

MQTT API

The whole module is controllable via MQTT protocol. So it's easy to integrate in existing SmartHome systems (like Home Assistant or Node-Red).

Incoming commands

Topic: wateringsystem/{device ID}/in/{command}

command description payload
watering Start watering for specific duration (in milliseconds!) { duration: number }
abort-watering Abort watering before timer ends -
sleep Start deep-sleep for specific duration (in milliseconds!) { duration: number }
info Send info via MQTT topic wateringsystem/out/info package -
hard-reset Reset config with WiFi and MQTT settings and start internal hotspot to reconfigure device. -

Outcoming commands

Topic: wateringsystem/{device ID}/out/{command}

command description payload
info status info complex JSON. See "info-state" chapter
sleep was send if sytem enter deep-sleep { duration: number }
wakeup was send if sytem wakeup from deep-sleep reason "timer"

Info state

field description type
version version number of module firmware string
soilMoisture analog value of soil-moisture sensor number
system.deviceId Unique ID of the device. Will used also in MQTT topics. string
system.freeHeap free heap memory of CPU number
energy.shuntVoltage voltage between V- and V+ (in mV) number
energy.busVoltage voltage of power input pin (in V) (optimal value between 3.6 and 4.0) number
energy.current current (in mA) number
energy.power energy consumption (in mW) number
energy.loadVoltage load voltage (in V) number
network.wifiRssi wifi signal strength (RSSI) number
network.wifiQuality quality of signal strength (value between 0 and 100%) number
network.wifiSsid SSID of connected wifi string
network.ip ip address of the module string

Sketch

sketch

TODOs

  • buy sensor and ESP32
  • soldering first prototype of the sketch
  • test firmware
  • test OTA updates
  • create housing (3D print)
  • create example flow with Node-RED
  • add part list
  • add video doc
  • add WifiManager to easy setup

wateringsystem2-controller-esp32's People

Contributors

coding-lemur avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  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.