Giter VIP home page Giter VIP logo

iot-watering-system's Introduction

IOT watering system

Watering system with moisture sensor and firebase database.

Firebase

This project uses Firebase from Google to store the data collected from the moisture sensor. The Arduino code only uploads the value from the moisture sensor and whether the pump is on to the database. There is a Nodejs project include which, when uploaded as a cloud function to the Firebase database will add a datetime to the newly added values. Another function is added to clean the measurements that are older than one month. This data is not valuable to me so remove it.

The JSON structure

The cloud function will format a datetime based on the machine time. the format is a YYYY-MM-DD HH:mm:ss, e.g.: 2017-04-13 16:59:23. The Arduino codes add a boolean based on whether the pump is currently active. And the value the value of the moisture sensor is added. This all combined gives the following data structure:

{
  "measurement" : {
    "-KgQiGUIjxPrxezXVW1H" : {
      "dateTime" : "2017-04-13 16:59:23",
      "isWatering" : 0,
      "value" : 2.72
    }
  }
} 

The Hardware

Parts list:

I bought most of the things on Ali Express so thats where I will provide links for.

Schematic:

Schematic

PCB:

pcb

The final product:

Related

How to plot the sensor data: Systems.maartens.website

License: MIT

iot-watering-system's People

Contributors

gewoonmaarten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

iot-watering-system's Issues

Firebase Functions cleanDatabase not working

Error:
TypeError: Cannot read property 'replace' of undefined at exports.cleanDatabase.functions.database.ref.onWrite.event (/user_code/index.js:35:42) at /user_code/node_modules/firebase-functions/lib/cloud-functions.js:35:20 at process._tickDomainCallback (internal/process/next_tick.js:135:7)

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.