Professional Documents
Culture Documents
Submitted to
Batch (2021-2024)
Submitted by
This work has not been submitted elsewhere for the award of a degree/diploma/certificate.
This is to certify that the above-mentioned statement in the candidate’s declaration is correct
to the best of my knowledge.
HOD
ii
Acknowledgement
A student of a university will have to write the acknowledgement for their project or research
paper stating that the submission is done and is not copied. The acknowledgement sample for
the university project is mostly attached after the dedication page thanking all the faculty
members of the department, HOD, the Dean and the mentor.
I would like to express my profound gratitude to Mr. Sanjiv Chauhan Sir, HOD Computer
Application department(UG).
I would like to express my special thanks to my mentor Mr Anmol Chaudary Purohit for his
time and efforts he/she provided throughout the year. Your useful advice and suggestions
were really helpful to me during the project’s completion. In this aspect, I am eternally
grateful to you.
I would like to acknowledge that this project was completed entirely by me and not by
someone else.
Candidate’s Declaration ii
Acknowledgement iii
s
Table of Contents iv
Abstract v
Chapter1. 1
1.1 Introduction 1
1.2 Background 2
1.3.1 Scope 3
Chapter 2. Prerquisites 5
Chapter 4. Deploying on 32
AWS EC2
Chapter 6. Conclusion 40
iii
ABSTRACT
This project presents the overall design of Home Automation System (HAS) with low cost
and wireless system. It specifically focuses on the development of an IOT based home
automation system that is able to control various components via internet or be automatically
programmed to operate from ambient conditions. In this project, we design the development
of a firmware for smart control which can successfully be automated minimizing human
interaction to preserve the integrity within whole electrical devices in the home. We used
Node MCU, a popular open source IOT platform, to execute the process of automation.
Different components of the system will use different transmission mode that will be
implemented to communicate the control of the devices by the user through Node MCU to
the actual appliance. The main control system implements wireless technology to provide
remote access from smart phone. We are using a cloud server-based communication that
would add to the practicality of the project by enabling unrestricted access of the appliances
to the user irrespective of the distance factor. We provided a data transmission network to
create a stronger automation. The system intended to control electrical appliances and devices
in house with relatively low cost design, user-friendly interface and ease of installation. The
status of the appliance would be available, along with the control on an android platform.
This system is designed to assist and provide support in order to 1fulfil the needs of elderly
and disabled in home. Also, the smart home concept in the system improves the standard
living at home.
v
Chapter 1
Introduction
1.1 Introduction
As seen in recent developments, major tech companies like Meta are adopting
ChatGPT-style AI chatbots for platforms like WhatsApp, Instagram, and
Facebook. This indicates a growing trend towards utilizing advanced language
models to improve user interactions and provide more sophisticated services
within messaging applications.
1
1.2 Background
1.3.1 SCOPE
3
Chapter 2
Prerequisites
5
6
2.1.2 C
IOT encourages the communication between devices, also famously known as
Machine-to-Machine(M2M) communication. Because of this, the physical devices
can stay connected and hence the total transparency is available with lesser
inefficiencies and greater quality.
Automation and Control
Due to physical objects getting connected and controlled digitally and centrally
with wireless infrastructure, there is a large amount of automation and control in
the workings. Without human intervention, the machines are able to
communicate with each other leading to faster and timely output.
Monitor
The second most obvious advantage of IOT is monitoring. Knowing the exact
quantity of supplies or the air quality in your home, can further provide more
information that could not have previously been collected easily. For instance,
knowing that you are low on milk or printer ink could save you another trip to the
store in the near future. Furthermore, monitoring the expiration of products can
and will improve safety.
Time
As hinted in the previous examples, the amount of time saved because of IOT
could be quite large.And in today’s modern life, we all could use more time.
Money
The biggest advantage of IOT is saving money. If the price of the tagging and
monitoring equipmentis less than the amount of money saved, then the Internet of
Things will be very widely adopted.
IOT fundamentally proves to be very helpful to people in their daily routines by
making the appliances communicate to each other in an effective manner thereby
saving and conserving energy and cost. Allowing the data to be communicated
and shared between devices and thentranslating it into our required way, it makes
our systems efficient.
Automation of daily tasks leads to better monitoring of devices.
7
The IOT allows you to automate and control the tasks that are done on a daily
basis, avoiding human intervention. Machine-to-machine communication helps to
maintain transparency in the processes. It also leads to uniformity in the tasks. It
can also maintain the quality of service. We canalso take necessary action in case
of emergencies.
Efficient and Saves Time
The machine-to-machine interaction provides better efficiency, hence; accurate
results can be obtained fast. This results in saving valuable time. Instead of
repeating the same tasks every day, itenables people to do other creative jobs.
Saves Money
Optimum utilization of energy and resources can be achieved by adopting this
technology andkeeping the devices under surveillance. We can be alerted in case
of possible bottlenecks, breakdowns, and damages to the system. Hence, we can
save money by using this technology.
Better Quality of Life
All the applications of this technology culminate in increased comfort, convenience, and
bettermanagement, thereby improving the quality of life.
8
maybe a bug in the software ends up automatically ordering a new ink cartridge
for your printer each and every hour for a few days, or at least after each power
failure, when you only needa single replacement.
Privacy/Security
With all this IOT data being transmitted, the risk of losing privacy increases. For
instance, howwell encrypted will the data be kept and transmitted with? Do you
want your neighbors or employers to know what medications that you are
taking or your financial situation?
Safety
Imagine if a notorious hacker changes your prescription. Or if a store
automatically ships you an equivalent product that you are allergic to, or a flavor
that you do not like, or a product that is already expired. As a result, safety is
ultimately in the hands of the consumer to verify allautomation.
As all the household appliances, industrial machinery, public sector services like
water supply and transport, and many other devices all are connected to the
Internet, a lot of information is availableon it. This information is prone to attack
by hackers. It would be very disastrous if private and confidential information is
accessed by unauthorized intruders.
Lesser Employment of Menial Staff
The unskilled workers and helpers may end up losing their jobs in the effect of
automation of daily activities. This can lead to unemployment issues in the society. This
is a problem with the advent ofany technology and can be overcome with education.
With daily activities getting automated, naturally, there will be fewer requirements of
human resources, primarily, workers and less educated staff. This may create
Unemployment issue in the society.
9
2.2 Application Grounds of
IOT Wearables
Smart homes
Health care
IOT applications have turned reactive medical based system into proactive
wellness-based system. IOT focuses on creating systems rather than equipment.
IOT creates a future of medicine and healthcare which exploits a highly integrated
network of sophisticated medical devices. The integration of all elements provides
more accuracy, more attention to detail, faster reactions to events, and constant
improvement while reducing the typical overhead of medical research and
organizations.
Agriculture
A greenhouse farming technique enhances the yield of crops by controlling
environmental parameters. However, manual handling results in production loss,
energy loss, and labor cost, making the process less effective. A greenhouse with
embedded devices not only makes it easier tobe monitored but also, enables us to
control the climate inside it. Sensors measure different.
10
2.2.1 IOT Technologies and
Protocols Bluetooth
Zigbee
Z-Wave
Wi-Fi
Wi-Fi connectivity is one of the most popular IOT communication protocol, often
an obvious choicefor many developers, especially given the availability of Wi-Fi
within the home environment within LANs. There is a wide existing
infrastructure as well as offering fast data transfer and the ability to handle high
1
1
quantities of data. Currently, the most common Wi-Fi standard used in homes and
many businesses is 802.11n, which offers range of hundreds of megabit per
second, which is fine for file transfers but may be too power-consuming for many
IOT applications.
Cellular
Any IOT application that requires operation over longer distances can take
advantage of GSM/3G/4G cellular communication capabilities. While cellular is
clearly capable of sending high quantities of data, especially for 4G, the cost and
also power consumption will be too high for manyapplications. But it can be ideal
for sensor-based low-bandwidth-data projects that will send very low amounts of
data over the Internet.
NFC
NFC (Near Field Communication) is an IOT technology. It enables simple and
safe communicationsbetween electronic devices, and specifically for smartphones,
allowing consumers to perform transactions in which one does not have to be
physically present. It helps the user to access digitalcontent and connect electronic
devices. Essentially it extends the capability of contactless card technology and
enables.
Lora WAN
12
IOT software
IOT software addresses its key areas of networking and action through platforms,
embedded systems, partner systems, and middleware. These individual and
master applications are responsible for data collection, device integration, real-
time analytics, and application and process extension within the IOT network.
They exploit integration with critical business systems (e.g., ordering systems,
robotics, scheduling, and more) in the execution of related tasks.
Data Collection
This software manages sensing, measurements, light data filtering, light data
security, and aggregation of data. It uses certain protocols to aid sensors in
connecting with real-time, machine- to-machine networks. Then it collects data
from multiple devices and distributes it in accordance with settings. It also works
in reverse by distributing data over devices. The system eventually transmits all
collected data to a central server.
Device Integration
Real-Time Analytics
These applications take data or input from various devices and convert it into
feasible actions or clear patterns for human analysis. They analyse information
based on various settings and designsin order to perform automation-related tasks
or provide the data required by industry.
1
3
2.2.2 Application and Process Extension
These applications extend the reach of existing systems and software to allow a
wider, more effective system. They integrate predefined devices for specific
purposes such as allowing certain mobile devices or engineering instruments
access. It supports improved productivity and more accurate data collection.
NodeMCU is an open source firmware for which open source prototyping board
designs are available. The name “NodeMCU” combines “node” and “MCU”
(micro-controller unit). The term “NodeMCU” strictly speaking refers to the
firmware rather than the associated development kits.
Both the firmware and prototyping board designs are open source.
14
The firmware uses the Lua scripting language. The firmware is based on the eLua
project and built on the Espressif Non-OS SDK for ESP8266. It uses many
open source projects, such as lua- cjson and SPIFFS. Due to resource
constraints, users need to select the modules relevant for their project and build a
firmware tailored to their needs. Support for the 32-bit ESP32 has also been
implemented.
The prototyping hardware typically used is a circuit board functioning as a dual in-
line package (DIP) which integrates a USB controller with a smaller surface-
mounted board containing the MCU and antenna. The choice of the DIP format
allows for easy prototyping on breadboards. The design was initially was based
on the ESP-12 module of the ESP8266, which is a Wi-Fi SoC integrated with
a Tensilica Xtensa LX106 core, widely used in IOT applications.
This module provides an access to the GPIO subsystem. All the access is based on
I/O index number of Node MCU kits, not the internal GPIO pins. For example, the
D0 pin on the development kit is mapped to GPIO pin 16. Node MCU provides
access to the GPIO pins, and the following pin mappingtable is a part of the API
documentation.
1
5
2.4 Installation of Node MCU
Mostly these days devices download and install drivers on their own,
automatically. Windows doesn’t know how to talk to the USB driver on the Node
MCU so it can’t figure out that the board is a Node MCU and proceed normally.
Node MCU Amica is an ESP8266 Wi-Fi module based development board. It has
got Micro USB slot that can directly be connected to the computer or other USB
host devices. Ti has got 15X2 header pins and a Micro USB slot, the headers can
be mounted on a breadboard and Micro USB slot is to establish connection to USB
host device. It has CP2120 USB to serial converter. In order to install CP2120
(USB to serial converter), user is needed to download thedriver for the same. Once
user downloads drivers as per its respective operating system, the system
establishes connection to Node MCU. The user needs to node down the COM post
allotted to newlyconnected USB device (Node MCU) from device manager of the
system. This com port number will be required while using Node MCU Amica. As
the CP2120 driver has been installed, the Node MCU can be programmed using
Arduino IDE software by coding in embedded C. this requires ESP8266 board
installation in Arduino IDE from board manager, and assigning communication
port.
16
BLOCK DIAGRAM
1
7
Proposed system
The android OS provides the flexibility of using the open source. The inbuilt
sensors can be accessedeasily. The application used to control the system has the
following features. Android Phone acts as a client and data are sent via sockets
programming. The application takes command from user in twodifferent modes.
Switch mode: Switch mode uses the radio buttons that are used to control the
home appliances. The radio button sends the status of the switch.
Voice mode: Voice Mode is used to control the home appliances using voice
command. Usingthe inbuilt microphone of Smartphone, the application creates an
intent that fetches the speech data to the Google server which responds with a
string data. The string data are further analysed and then processed.
More detailed discussion about the modes of control and how they actually control the
system isdiscussed if coming chapters.
18
CHAPTER 3
The prototype uses Wi-Fi to establish wireless control, which gives an indoor
range to about150 feet.
The command to switch on and off an appliance can be given from radio
buttons on theapplication from one’s smartphone.
Any device capable of Wi-Fi connectivity can be used to control the prototype.
The control over home appliances is obtained over secure connections, by SSL over TCP,
SSH.
Simple design easy to integrate into a verity of appliances and extend on further range.
Cost effective.
1
9
3.2 Google Firebase
Take note of your Firebase project's credentials, including the database URL.
Set up ESP8266:
Install the Arduino IDE (if not already installed) and open it.
2
1
Go to "File" -> "Preferences" and enter the following URL in the "Additional Boards
Manager URLs" field:
"http://arduino.esp8266.com/stable/package_esp8266com_index.json".
Go to "Tools" -> "Board" -> "Boards Manager" and search for "esp8266". Install the
"esp8266" board package.
Select the appropriate ESP8266 board from the "Tools" -> "Board" menu.
In the Arduino IDE, go to "Sketch" -> "Include Library" -> "Manage Libraries".
Firebase ESP8266
ArduinoJson
ESP8266WiFi
ESP8266HTTPClient
22
In the Arduino sketch, include Firebase and define Firebase credentials:
Note: Replace "your-project" with your actual Firebase project name and "your-auth-token"
with the authentication token from your project's settings.
Connect to Wi-Fi:
.begin
delay 500
Initialize Firebase:
You can now read or write data from/to Firebase using Firebase methods.
getString "node/path"
2
3
Open the serial monitor to see the ESP8266's connection status and any debugging
information.
#include <ESP8266WiFi.h>
#include <FirebaseArduino.h>
int led = 5;
int fan=4;
void setup()
Serial.begin(9600);
delay(1000);
pinMode(led, OUTPUT);
pinMode(fan,OUTPUT);
WiFi.begin(WIFI_SSID, WIFI_PASSWORD);
Serial.print("Connecting to ");
24
Serial.print(WIFI_SSID);
Serial.print(".");
delay(500);
Serial.println();
Serial.print("Connected to ");
Serial.println(WIFI_SSID);
Firebase.begin(FIREBASE_HOST, FIREBASE_AUTH);
Firebase.setString("LED_STATUS", "OFF");
Firebase.setString("FAN_STATUS", "OFF");
void loop()
fireStatus = Firebase.getString("LED_STATUS");
if (fireStatus == "OFF")
delay(1000);
digitalWrite(led, HIGH);
2
5
}
delay(1000);
digitalWrite(led, LOW);
else
fireStatus = Firebase.getString("FAN_STATUS");
if (fireStatus == "OFF")
delay(1000);
digitalWrite(fan, HIGH);
delay(1000);
26
digitalWrite(fan, LOW);
else
Register your Android app with Firebase by providing the package name and SHA-1
fingerprint.
In the Project view, right-click on the app module and select "Open Module Settings" (F4).
Click on the "Dependencies" tab, then the "+" button, and choose "Library Dependency".
Search for "firebase" and select the desired Firebase libraries to include in your project.
Click on the "google-services.json" download button to obtain the configuration file for your
Android app.
Move the downloaded file to the "app" module of your Android project.
2
7
In your project's build.gradle file (project-level), add the following classpath dependency:
'com.google.gms:google-services:4.3.10'
In your app's build.gradle file (module-level), add the following plugins and apply plugin:
'com.google.gms.google-services'
Depending on the Firebase services you want to use, you may need to add additional
dependencies or configurations.
'com.google.firebase:firebase-auth:21.0.1'
Follow the documentation and guides provided by Firebase to integrate and use specific
services in your app.
this
Monitor the logs and verify the Firebase integration by checking the Firebase Console for
data updates and events.
Remember to follow the Firebase documentation and specific guides for each Firebase
service you want to integrate. Each service may have additional steps, such as configuration,
authentication setup, and API usage.
package com.example.myhomeapp;
28
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
Button b1,b2,b3,b4;
@Override
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b1=findViewById(R.id.button3);
b2=findViewById(R.id.button4);
b3=findViewById(R.id.button5);
b4=findViewById(R.id.button6);
b1.setOnClickListener(new View.OnClickListener() {
@Override
2
9
public void onClick(View view) {
LED.setValue("ON");
});
b2.setOnClickListener(new View.OnClickListener() {
@Override
LED.setValue("OFF");
});
b3.setOnClickListener(new View.OnClickListener() {
@Override
30
FAN.setValue("ON");
});
b4.setOnClickListener(new View.OnClickListener() {
@Override
FAN.setValue("OFF");
});
3
1
Chapter 4
Testing
UNIT TESTING
Unit testing includes the plan of experiments that approve that the inner program rationale is
working legitimately and that program inputs produce substantial yields. All decision
branches and interior code stream ought to be approved. It is the trying of person
programming units of the application .it is done after the fruition of an individual unit prior to
incorporation. This is basic testing, that depends on information about its construction and is
obtrusive. Unit tests perform fundamental tests at part level and test a particular business
procedure, application, or potentially framework setup. Unit tests guarantee that each one of a
kind way of a business procedure performs precisely to the archived determinations also,
contains obviously characterized data sources and anticipated outcomes.
INTEGRATION TESTING
Combination tests are intended to test incorporated programming parts to decide whether they
really keep running as one program. Testing is occasion driven and is progressively
Concerned with the fundamental result of screens or fields. Mix tests exhibit that despite the
fact that the parts were separately fulfillment, as appeared by effectively unit testing, the mix
of parts is right and steady. Coordination testing is explicitly gone for uncovering the issues
that emerge from the mix of segments.
FUNCTIONAL TESTING
Blend tests are planned to test fused programming parts to choose whether they truly continue
running as one program. Testing is event-driven and is dynamically Concerned with the
major aftereffect of screens or fields. Blend tests show that regardless of the way that the
parts were independently satisfaction, as showed up by adequately unit testing, the blend of
32
parts is correct and unfaltering. Coordination testing is unequivocally gone for revealing the
issues that rise up out of the blend of portions.
SYSTEM TESTING
Framework testing guarantees that the whole incorporated programming framework meets
necessities. It tests an arrangement to guarantee known and unsurprising outcomes. A case of
framework testing is the setup situated framework incorporation test. Framework testing
depends on process portrayals and streams, accentuating pre-driven procedure connections
and combination focuses.
WHITEBOX TESTING
White Box Testing is a trying in which the product analyzer knows about the inward
activities, structure, and language of the product, or possibly its motivation. It is the reason. It
is utilized to test zones that can't become to from a discovery level
Discovery Testing will be trying the product with no learning of the inward functions,
structure or language of the module being tried. Discovery tests, as most different sorts of
tests, must be composed of a conclusive source report, for example, particular or necessities
report, for example, particular or prerequisites record. It is a trying in which the product
under test is dealt with, as a discovery you can't "see" into it. The test gives data sources and
reacts to yields without thinking about how the product works.
INTEGRATION TESTING
Programming joining testing is the gradual combination testing of at least two integround
programming segments on a solitary stage to create disappointments brought about by
interface abandons. The undertaking of the mixed test is to watch that parts or programming
applications, e.g: segments in a product framework or – one stage up – programming
applications at the organization level – associate without mistake.
3
3
ACCEPTANCE TESTING
Client Acceptance Testing is a basic period of any task and requires huge standard ticipation
by the end client. It additionally guarantees that the framework meets the practical
requirements.
ALPHA TESTING
In programming improvement, alpha test will be a test among the groups to affirm that your
item works. Initially, the term alpha test implied the main period of testing in a product
improvement process. The primary stage incorporates unit testing, part testing, and
framework testing. It additionally empowers us to test the item on the most reduced normal
denominator machines to ensure download times are satisfactory and preloads work.
BETA TESTING
Define a set of test cases to cover different functionalities and scenarios of the project.
Create a test plan that outlines the objectives, test cases, and expected outcomes.
Perform functional testing to verify that all features and components work as intended.
Conduct performance testing to evaluate the system's responsiveness, latency, and scalability.
Test the system under various network conditions, including both local and remote
connections.
34
Validate the integration between the ESP8266 hardware, Firebase Realtime Database, and the
Android application.
Objective: Ensure that the ESP8266 module can establish a stable connection to the Wi-Fi
network.
Objective: Verify that the ESP8266 can retrieve data from the Firebase Realtime Database.
Expected Result: ESP8266 reads the correct data from the designated Firebase database node.
Actual Result: ESP8266 successfully retrieves the expected data from Firebase.
Objective: Ensure that the ESP8266 can write data to the Firebase Realtime Database.
Expected Result: ESP8266 writes the specified data to the designated Firebase database node.
Actual Result: ESP8266 successfully writes data to the Firebase Realtime Database.
Objective: Validate the integration between the Android application and the ESP8266.
3
5
Expected Result: The Android app can send commands to the ESP8266 and receive real-time
updates from the device.
Actual Result: The Android application effectively communicates with the ESP8266 module.
Objective: Evaluate the system's performance and scalability under various loads.
Expected Result: The system maintains consistent performance and responsiveness, even
with multiple concurrent users and data updates.
Actual Result: The system handles increased loads and multiple users, maintaining
satisfactory performance.
36
Chapter 5
5.1 RESULT
The experimental model was made according to the circuit diagram and the results
were as expected. The home appliances could be remotely switched over Wi-Fi
network. Both the switch mode and the voice mode control methodologies were
successfully achieved. The Blynk application was also successful in displaying the
status of every application.
5.2 LIMITATIONS
Android devices having lower API version than 16 requires internet access to
convert the speech data to string data. Currently, the application is made for
Android Smart Phones; other OS platform doesn’t support our application. During
voice mode, external noises (voice) may affect our result. The speech instruction
that we command in our voice mode may not give exact result as expected. There
hence lies an ambiguity in result.
Looking at the current situation we can build cross platform system that can be
deployed on various platforms like iOS, Windows. Limitation to control only
several devices can be removed by extending automation of all other home
appliances. The prototype can include sensors to implement automatic control of
the home appliances like; an LDR that can sense daylight and switch lamp
accordingly, a PIR to detect motion and be used for security purposes making an
alarm buzz, or a DHT11 sensor that’s senses ambient temperature and humidity of
atmosphere and switch fan/air conditioner accordingly. Scope of this project can
be expanded to many areas by not restricting to only home, but to small offices
3
7
CONCLUSION
It is evident from this project work that an individual control home automation
system can be cheaply made from low-cost locally available components and can
be used to control multifarious home appliances ranging from the security lamps,
the television to the air conditioning system and even the entire house lighting
system. And better still, the components required are so small and few thatthey
can be packaged into a small inconspicuous container. The designed home
automation system was tested a number of times and certified to control different
home appliances used in the lighting system, air conditioning system, home
entertainment system and many more . Hence, this system isscalable and flexible.
38
Image Representation of Project
Chapter 6
3
9
References
“Smart Energy Efficient Home Automation System using IOT”, by Satyendra K.
Vishwakarma, Prashant Upadhyaya, Babita Kumari, Arun Kumar Mishra.
“IOT Based Smart Security and Home Automation”, by Shardha Somani, Parikshit
Solunke, Shaunak Oke, Parth Medhi, Prof. P. P. Laturkar.
“Visual Machine Intelligence for Home Automation”, by Suraj, Ish Kool, Dharmendra
Kumar, Shovan Barman.
“A Low Cost Home Automation System Using Wi-Fi based Wireless Sensor Network
Incorporating internet of Things”, by Vikram.N, Harish.K.S, Nihaal.M.S, Raksha
Umesh, ShettyAashik Ashok Kumar; in 2017 IEEE 7th International Advance
Computing Conference.
“Voice Controlled Home Automation System using Natural Language Processing and
Internetof Things”, by Mrs. Paul Jasmin Rani, Jason Bakthakumar, Praveen
Kumaar.B, Praveen Kumaar.U, Santhosh Kumar; in 2017 Third International
Conference on Science Technology Engineering & Management (ICONSTEM)
40
Thank You
4
1