Giter VIP home page Giter VIP logo

projectsmarthome's Introduction

The Project Smart Home

The project SmartHome is my project where I am implementing network for controlling home. This project includes:

Server:

ย 

The work of server is simple. This server just get data(json file which contains data that pins of Controller Devices need to turn on) and send to TCOD. Server works by using servlets. Server has two serlvets, the first servlet "Actions" is used for controlling pins of TCOD. The second servlet is used for devices which send commands for SmartHome. TCOD does GET request to Servlet "Actions" every 500 miliseconds,then gets json file, doing parsing and turn on/off pin which is needed. Android App and other apps which can controll SmartHome, does POST request to Servlet "ActionsByDevices". This servlet reads data(json) from difference Apps(which can controll SmartHome) and just write it to file ActionsFromDevices.json. After that, ActionsFromDevices.json rewrite to file Actions.json(this json file is for TCOD). Between ActionForm Device and Actions have to be Tasker(But it is not implemented at this moment) which does some actions with data. For instance, install timer for turn on/off pin of TCOD.

The Controller Of Devices(TCOD)

TCOD is microcontroller Arduino Mega with Ethernet Shield. The work of TCOD is simple. It does GET request to server and get json file from Servlet "Actions". The controller parses a json file and turn on/off pins by actions from this file. TCOD does request every 500 miliseconds to server with params:key,temperature,light. The parameter key contains key access to server. The parameter "temperature" contains value from Sensor(DHT11) of temperature.The parameter "light" contains value of light resistor. The Light resistor shows luminosity inside room and outside.

Android App "SmartHome"

The Android App "SmartHome" uses for controlling of smart home. The app does POST request to server. In the POST request contains json object element. In this json file is number of pin and status HIGH/LOW or VALUE(if it is a PWM pin). After that, the app does GET post every second for getting HashSum. HashSum is from json file ActionsByDevices. If after getting HashSum it differs from HashSum in App, App will do GET request to server for getting json file actions of all pins. The App contains dynamic user interface. Users can add dinamically Views(Buttons,SeekBars) and configurate it. For instance, user wants to connect a lamp to pin 22. He has to connect it to 22 pin by relay. Next he has to add Button/SeekBar and configurate: pin, id, icons, name in app. Also he can see example json object for TCOD. Users can remove or edit views.

(c) Yurii Alieksieiev 2018 Lodz,Poland

projectsmarthome's People

Contributors

alieksieievyurii avatar

Watchers

James Cloos 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.