Skip to content

wochinge/WateringOfThings

Repository files navigation

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

About

Repository for the web application course.

Resources

Stars

Watchers

Forks

Packages

No packages published