Skip to content

ajumalp/Smart-Home

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Home

Complete solution for home automation

Logo

Logo

Development tools required

Visual Studio Code Extensions used

Hardware Requirements

Languages used

Automate your Home/Office

This application helps to control electronic devices remotely. This can be installed in your localnetwork, and if you have a static IP you can access your devices from any where. You need a WiFi/Ethernet at Home/Office to connect Arduino devices. Then from your phone, you can control connected appliances

This app is tested using Google Chrome in both Windows 10 and Android only

  1. This support PWA [Progressive Web App]. So this can be easily installed into any OS supporting PWA
  2. The Arduino code for the devices is also included in the Hardware folder.
  3. Mainly supporting ESP8266 devices
  4. You are always free to modify the code for your requirements

Below are few screnshots of the Application

Main Screen [Android] Main Screen [Other] Devices Main Menu Login Screen
Main Screen Main Screen Main Screen Main Screen Main Screen

Below are few supporting Devices

1 Channel Module 1 Channel Module 4 Channel Module 1 Channel Module

Installing Software

  1. Install XAMPP with Apache MySQL Download here
  2. Install Mosquitto MQTT Doanload here
  3. Download the complete source code and place it inside XAMPP/htdocs folder. [You should place it inside a folder say "sa"]
  4. Make sure XAMPP is installed properly and also Apache and MySQL is working. Link localhost/phpmyadmin should open MySQL Manager
  5. Inside the res/db fodler you can see the query to create the tables.
  6. Execute this query in phpmyadmin. You can see the tables created
  7. The MySQL user and password will be automatically set in the above query. If you want to set a different password, you can change it in the config file
  8. Now run the mosquitto.exe file in the mosquitto folder you installed earlier
  9. It should be ready now. Open the index.html in the htdocs/sa folder in your Google Chrome. [I tested this in Google Chrome only, so I suggest you to use Google Chrome]
  10. You will see the Main Screen now. You should move to Devices screen and add device before adding switchs.

How to program devices

Click here to learn more

There are different types of ESP8266 modules. Here we are mainly using the ESP01S with the relay relay modules

If you don't know how to install ESP8266 into Arduino IDE, please refer this link
How to install ESP8266 in Arduino

If you don't know how to program ESP01S, please refer this link
How to program ESP01S

You need a USB to TTL Converter to program ESP01S or you can buy any ESP01S programmer or you can also program ESP01S using [TTL converter in] Arduino Uno as shown.

Please note: In the above image, the Tx or Arduino is directly connected to Rx of ESP01S which not recomended for long time use. You should use a 5v to 3v3 logic converter

Once you have the programmer or TTL to USB converter you can start programming ESP01S

  1. Go to Hardware folder
  2. Open the SS-ESP01S.ino in Arduino IDE
  3. Select the Board Type as ESP8266 Generic
  4. Select the port
  5. Upload the code