Code Monkey home page Code Monkey logo

iot-smart-home-system-'s Introduction

Project overview

This is a smart solution to control home appliances through two options :

  • Web server through HTML page.
  • Mobile app through UDP protocol.

Features

  • Each device can control up to 5 appliances.
  • Unlimited number of devices can be installed as they connect with eachother over udp protocol.
  • Each device can connect to a local area network (LAN) in station mode such as home wifi router and can generate its own LAN network in access point mode.
  • The devices can be controlled from anywhere in the world through static IP address as long as they're connected to the internet.
  • You can reboot, reset to defaults, change mode to ST or AP mode, change SSID & PW of the networks and change the IP address all from the mobile app.

Components

  • ESP8266
  • Relays
  • Resistors
  • Diodes
  • BC547 transistors
  • Terminal blocks
  • LEDs
  • PCB
  • 220v-5v adaptor
  • 1 A fuse

Tools and languages

  • Android Studio (Flutter / Dart ).
  • Arduino IDE (Arduino C).
  • Proteus (PCB design).

Code

  • Due to the size of the code, feel free to check the ESP8266 code here
  • Due to the size of the code, feel free to check the flutter app here

PCB

Here is the process of making the PCB :

and here is the final look:

here is a 1-channel mini version of the device :

New version !!!

This is a newer version that requires less wiring which makes the installation process faster and easier.

User Interface

There are 2 options to control the smart home device:

  • First Through a web server hosted by the esp8266 IP address as shown below:

  • The other option is a Flutter-based mobile App that controls the devices over UDP/IP.

Mobile App

This app displays location-based weather forcasts and time along with 8 custom-designed buttons to control the projects 8 devices.The App can be edited to add more buttons to control more devices.The App is designed on Android Studio Flutter project using Dart language.The App UI is shown below:

Code

  • After creating a new flutter project i edited the dependencies in pubsec.yaml file to add the libraries i need to import as shown:

    dependencies:
    flutter:
      sdk: flutter
    udp: ^3.0.3
    get_ip: ^0.4.0
    path_provider: ^1.6.14
    http: ^0.12.2
    intl: ^0.15.8
    flutter_icons: ^1.0.0+1
    weather: ^1.2.3
    
  • Then created two dart files inside lib/pages folder, design.dart to custom-design cool buttons and designTest.dart to cutom-design buttons fonts.

  • And here is the main code

  • The whole project can be found here.

Notes

  • Change IP address written as "xx.xx.xx.xx" in lines 38, 82 and 84 with your esp8266 IP address as shown:

    String destination = 'xx.xx.xx.xx';
  • Change the location code and city name in line 39 with yours to get precise weather forcast as shown:

    String roomName, key = 'YourLocationKey', city = 'YourCityName';
  • Change devices names D1,D2,..etc as desired.

iot-smart-home-system-'s People

Contributors

eslam-rizk avatar

Stargazers

 avatar

Watchers

 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.