Giter Club home page Giter Club logo

wateringofthings's Introduction

WateringOfThings

Repository for the web application course.

React Native Application

Requirements

Installation

  1. Install dependencies:

    cd ReactNativeApp
    npm install
    react-native link
  2. Configure the host of your REST API under app\network\host.{platform}.js

Troubleshooting

Server

Requirements

  • Python 3
  • Sqlite
  • Running Redis server

Installation

  1. Create a virtualenv to isolate our package dependencies locally

    cd server
    virtualenv env
  2. Start virtual environment

    source env/bin/activate  # On Windows use `env\Scripts\activate`
  3. Install dependencies

    pip install -r requirements.txt
  4. Init database

    python manage.py makemigrations api
    python manage.py migrate api
  5. Adjust the config files for your setup

  6. Start server

    python manage.py runserver
  7. Start Celery beat and worker (for regular moisture measurements)

    celery -B  -A watering_of_things worker -l info
  8. Add a valid controller id, e.g.

    python manage.py shell # Switch to the python shell
    from watering_of_things.api.models import MicroController
    MicroController(’<your valid id>’).save()
    exit()

Hardware

Requirements

Installation

  1. Create a file called WifiConfig.h (see WifiConfig_example.h for an example) which stores the credentials for your wifi
  2. Create a filed called MqttConfig.h (see MqttConfig_example.h for an example) which stores the credentials for your mqtt broker
  3. Create a filed called ID.h (see ID_example.h for an example) which stores the unique ID of the hardware controller. Note: This unique ID should also be stored on the server as valid controller id
  4. Install the following libraries through the Arduino IDE:
    • PubSubClient (Nick O’Leary)
    • ArduinoJson (Benoit Blanchon)
  5. You might change the pin settings to fit your hardware
  6. Compile it and load it on your hardware

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.