GithubHelp home page GithubHelp logo

lgcyaxi / ece513_iot_project Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 7.68 MB

ECE513 IOT Project Server

License: Mozilla Public License 2.0

JavaScript 53.20% HTML 22.35% CSS 13.53% Pug 0.11% C++ 10.00% C 0.81%

ece513_iot_project's Introduction

SMART HOME Project

This repertory contains files of SMART HOME Project.

ABOUT

Team information

AWS address

Video demo information

link of video demo

link of video demo Youtube

Particle Device Information

Device Type: Photon

Description of Our Project

The intelligent home application web page for a project monitors the temperature, humidity, and door open/close, controls a thermostat and a lighting system, and simulates power consumption using IoT sensors (such as a photon, photoresistor, and DH11). It is also a web application for the project to understand the basic architecture of smart homes and data process flow between each configuration.

Methods

Website redirect

Endpoint Description
signup Signup page
login Login page
account account page
dashboard dashboard
edit edit account information page
devices devices page
instruction instruction for Webhook

Account

Endpoint Description
user/signup Handle process of signup return 401 for unauthorized 201 for Created
user/lgoin Handle process Login of return 400 for bad request, 401 for unauthorized 201 return 200 for success
user/account Handle process of loading account information return 200 for success
user/updatezip It will update the zip code of user return 200 for succes
user/updatepreference Handle process of updating account preference panel after login, return 200 for success
user/updateall Handle process of updating account information return 200 for success
user/deleteaccount Deleting Account return 201 for success

Device

Endpoint Description
device/register Handle process of registering device, return 401 for unauthorized 201 for created
device/remove Handle process of registering device, return 401 for unauthorized 201 for removed
device/list Return registed device stored in database

Cloud

Endpoint Description
cloud/ping Ping the device if device is Online otherwise return 201 with failed operation, 200 as successful
cloud/read Read value from device
cloud/report Device sends value to server when device published
cloud/publish Send a request to publish device
cloud/value Get method to request a value from cloud
cloud/write send a write request for changing value return 201 with failed operation, 200 as successful

Local Serial

Endpoint Description
serial/scan Scan the device in ports
serial/open Open a device port
serial/close Close a device port
serial/write device send a write request for changing value
serial/read Read value from device
serial/scanPorts Handle process of scaning availble ports
serial/openPort A process of open ports of device
serial/closePort A process of close ports of device
serial/writePort A process of write ports of device

Response Codes

Recommended HTTP response code

Code response status
200 OK (request succeeded)
201 Created
400 bad request
401 Unauthorized
404 Not found
500 Internal server errors

Instruction

Directory Structure

Smart Home
│   README.md
│   README.txt    
│
├───AWS
│   │   package.json
│   │   db.js
│   │   app.js
│   │   ...
│   │
│   ├───bin 
│   │   │ ...
│   │
│   ├───models
│   │   │ ...
│   │
│   ├───public
│   │   │ ...
│   │
│   ├───routes
│   │   │ ...
│   │
│   └───views
│       │ ...
│    
├───Localhost
│   │
│   ├───public
│   │   │ ...
│   │
│   └───routes
│       │ ...
│
│
├───Particle
│   │
│   └───src
│       │ ...    
│
│
└───docs
    │   index.md
    │   ...

Installation

setup AWS

# go to directory of AWS server
cd AWS
# Install all dependencies
npm install
# Run server 1
npm start
# Debug mode
Debug=AWS:* npm start

setup Localhost

# go to directory of Localhost
cd Localhost
# install dependencies
npm install
# run local serial communication
node Localhost.js

ece513_iot_project's People

Contributors

lgcyaxi avatar

Watchers

Nasser Albalawi 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.