INTRODUCTION:-
In this tutorial, we are going to make a home automation product that can interact with the online Server, So that we can control our home appliances from anywhere along the globe.
Before starting the project lets have a look at some basic factors:-
- IOT: IOT stands for the internet of things.The vast network of devices connected to the Internet, including smartphones and tablets and almost anything with a sensor on it – cars, machines in production plants, jet engines, oil drills, wearable devices, and more. These “things” collect and exchange data.
- Server: A server is a computer designed to process requests and deliver data to another computer over the internet or a local network
Theory:-
In our Normal Home, We have direct access thing our devices using Normal Electric Switches. But such type of Process Requires our Physical presence in the Home to Operate the Device. But When we are not physically present in the home at that time the problem arises. But No need to worry about that problem, due to the advancement of the technology we can control monitor our home appliances from any place. For that, we need a third party. So that we can communicate with our home appliance through that third party. Here we are going to use the server as the third party for us. So for the communication, we have to communicate with the server and then the server will communicate with our home appliances to execute our instructions.
Explanation:-
First of all, we have to make a website or app that can communicate with our online server. For you, we have developed a Basic PHP & MYSQL Website that communicates with your online server.
So to make that website online follow these process:-
- Download the Scripting File.
- Now Go to your PhpMyAdmin in your Cpanel. and create a database for your project.
- Now Upload the Script File to your public_html.
- Extract the zip file and open "connection.php" in the Editor.
- Now You have to change three things in that connection file, i.e USERNAME, USER PASSWORD, Data Base Name in that Connection file.
- Now DOWNLOAD the SQL File.
- Import this SQL file to your Phpmyadmin Data Base.
- Now browse your desired file location in the Web browser, then you will find a Login Panel For that use "admin@autofy.in" as ID and "12345" as a password.
- Then you can access the control panel for the Device. Till now we have completed the Software part of this Project. Now let's Jump to the Hardware Part.
Part's Required:-
- Node MCU.
- 4 channel Relay Board.
- Jumper Wire
- 5v Power Supply.
Procedure:-
- Now First Of all Download the Arduino Code.
- Now Open the Arduino code in your Arduino IDE. Change your Wifi SSID, and Password in the Arduino Code. and your Domain name with www.xyz.com as present in the Arduino Code.
- Now Go to Arduino IDE-> FILE -> Prefernces
- Copy ---> " http://arduino.esp8266.com/stable/package_esp8266com_index.json "
- Past the above URL in Additional Board Manager Url.
- Then Go to Tools-> Boards -> Boards Manager in Arduino IDE and Search for esp8266, and install it in your Arduino IDE.
- After installing the Esp8266 module in your Arduino IDE Now again go to Tools -> Boards -> Then select Adafruit HUZZA ESP826 as your Board.
- Now Upload the Code to your NodeMCU Module.
- Now Connect the D0, D1, D2, D3 of the Node MCU to Data input 1, 2, 3, 4 of the 4 channel relay board.
- Now connect VIN of Node MCU and Relay Board Along with their GND and Connect them to the 5v VCC and GND respectively.
- Now Turn on your Wifi. And LOGIN trough the website we have made previously and the turn on/off the slider switch of each device listed there to turn on or off the relay button. And Enjoy Your IOT Project.
Please Like, Share & Comment
Thank you.
Recent Comments
marlon
2018-05-02Hello, I would like to ask you if do you offer full support for creating a full complete system with categories like ALARM, LIGHTS DIMMING, and so on? What s your cost for this? My email is NWSTM8890@GMAIL.COM
Sait Tat Sat Mishra
2018-05-02Hi sir thanks to you. Just contact me in my contact number 8339829343
marlon
2018-05-03Hello, can you help me with full server code that I purchased from you? Do you offer services or customization? My email is: NWS8890@GMAIL.COM
Intelli
16-07-2020 01:28:13 amHello, I know this post is old. Hope I can still get a response.. I tried making this project and all works fine. I would like to know if there is a link which I can use to change the status in my sql table.. something like ......./index.php?id=1&status=0 I am trying to activate the switches using another device using the link. Hope I can get some help.. Thanks in advance..
Sai Tat Sat Mishra
16-07-2020 01:22:28 amHi you have to install xamp in your local system then you have to host the website there and then only you can get the url to access the switch, for more details contact us on Facebook we will definitely help you.
Intelli
16-07-2020 09:17:02 amHi, Thanks for your response.. I actually have a hosting account and I installed it on the server along with the SQL tables etc. Now I want one of my devices to send a URL to turn the switches on and off. Please let me know if this is possible. If so, how can I get the URL Thanks in advance..