Giter Club home page Giter Club logo

smarthome's Introduction

SmartHome

SmartHome made for the course Programming Project Databases at the University of Antwerp.

##Build instructions ###Dependencies

sudo apt-get install nodejs nodejs-legacy npm python python-pip python-mysqldb

###Server

sudo pip install python-dateutil django djangorestframework==3.2.0 markdown django-filter djangorestframework-jsonapi==2.0.0-beta.2 django-rest-auth[with_social] django-cors-headers django-crispy-forms

###Client

None

##Run instructions ###Server

Your database should run on localhost and have the user smarthome with pass smarthome

cd server
./manage.py migrate                 # create database tables
./manage.py loaddata initial             # load users and tags
./manage.py runserver               # run the server on http://localhost:8000

Load pregenerated sample data

You can simply load pregenerated data into the database:

First load the configuration:

./manage.py loaddata example_configuration

Then load the sample data for 10 homes over 5 years:

./manage.py loaddata sample_data

Populate with ElecSim

You can also populate the database with a given configuration file (generated by ElecSim). The following command will parse an ElecSim configuration file, generate the data and store it in the database:

./populate.py [json_config_file] [from_date] [to_date]

to_date defaults to the present datetime. E.g.:

./populate.py homes_config.json 2013-01-01T00:00

You can generate your own configurations using ElecSim (found on Blackboard and in the directory '/ElecSim').

###Client

cd client
npm install
npm start

Then open your browser to localhost:3000

smarthome's People

Contributors

ddanssaert avatar jbijtebier avatar danh95 avatar inventrax avatar

Watchers

James Cloos avatar Avery Smets avatar  avatar  avatar  avatar  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.