Final Year Project Report Project On Android Base Home Automation System
Final Year Project Report Project On Android Base Home Automation System
BY
Mostakim Islam
ID: 141-15-3337
This Report Presented in Partial Fulfillment of the Requirements for the Degree of
Bachelor of Science in Computer Science and Engineering
Supervised By
This Project titled “Project on Android Base Home Automation System”, submitted by
Mostakim Islam ID:141-15-3337 to the Department of Computer Science and Engineering,
Daffodil International University, has been accepted as satisfactory for the partial fulfillment of
the requirements for the degree of B.Sc. in Computer Science and Engineering (BSc) and
approved as to its style and contents. The presentation has been held on April, 2018.
BOARD OF EXAMINERS
I hereby declare that, this project has been done by me under the supervision of
Ms. Refath Ara Hossain, Lecturer, Department of CSE Daffodil International University. I
also declare that neither this project nor any part of this project has been submitted elsewhere for
award of any degree or diploma.
Supervised by:
Submitted by:
Mostakim Islam
ID: -141-15-3337
Department of CSE
Daffodil International University
First I express my heartiest thanks and gratefulness to almighty God for His divine blessing
makes us possible to complete the final year project successfully.
I really grateful and wish my profound my indebtedness to Supervisor Ms. Refath Ara
Hossain, Lecturer, Department of CSE Daffodil International University, Dhaka. Deep
Knowledge & keen interest of my supervisor in the field of “Android Base Home Automation
System” to carry out this project. Her endless patience ,scholarly guidance ,continual
encouragement , constant and energetic supervision, constructive criticism , valuable advice
,reading many inferior draft and correcting them at all stage have made it possible to complete
this project.
I would like to express my heartiest gratitude to Dr.Syed Akhter Hossain, and Head,
Department of CSE, for his kind help to finish our project and also to other faculty member and
the staff of CSE department of Daffodil International University.
I would like to thank my entire course mate in Daffodil International University, who took part
in this discuss while completing the course work.
Finally, I must acknowledge with due respect the constant support and patients of our parents.
Education plays a great role in development of any country. Many of education organizations is
trying to increase education quality. One of the aspects of this implementation allows learners to
attend this paper currents the not in particular design of Home Automation System (HAS) with
few value and Radio remote control. This system is designed to support and provide support in
order to fulfil the needs of elderly and impuissant in home. Also, the smart home idea in the
system developed the standard living at home. The main control system equipment’s wireless
Bluetooth technology to provide remote access from PC/laptop or Android Phone. The design
remains the subsist electrical switches and provides more safety control on the switches with low
voltage activating method. The switches status is synchronized in all the control system whereby
every user interface indicates the real time existing switches status. The system intended to
control electrical appliances and devices in house with relatively low cost design, user-friendly
interface and ease of installation.
Board of examiners i
Declaration ii
Acknowledgements iii
Abstract iv
CHAPTER
1.4 Objective 4
1.5 Applications 5
2. IDLE 6
3. RPI-GPIO library 6
2.1 Introduction 7
2.2.2 Automation 9
5.2 Procedures 29
6.1 Discussion 33
6.2 Conclusion 33
REFERENCES 34-35
PLAGRAMME 36
TABLES PAGE NO
LIST OF FIGURES
FIGURES PAGE NO
In present it world home automation is being popular due to comfort ability flexible means of
monitoring and controlling the infections and other things according to users comfort and needs.
The challenging part lies in simplify and cost of installing them in home and various with
increasing number of services to be monitored and controlled . The project named “Home
Automation” is idea of home automation using android phone
The popularity of home automation has been rising comprehensively because of considerable
capability and simplicity through android phone and tablet connectivity. A home automation
system integrates electrical devices with each other. The technique applied in home automation
include those in building automation and the control of house old activities such as lighting
control system and the use of other electrical appliance devices may be connected via a home
network to offer the restraint by a pc and may permit remote access from the internet. Through
the integration of information technologies with the home environment , method and appliance
can be connected in as mobilized process which results in convenience power efficiency and
security benefits.
Due to development of wireless technology. Various kind of bracing are initialed such as GSM,
WIFI and Bluetooth. Each of the connection has their own unique specification and application.
Among the four popular connection that often implemented in HA project. WIFI is being
selected with its compatible capability. The capabilities of wifi are more than enough to be
implemented in the design. Also most of the current of the notebook or smartphone come with
built in WIFI adapter. It will indirectly help to alleviated the cost of the system.
People are early and late running from place to place, working to accomplish everything on our
never ending to-do list. Because of the HA system. We never have to take tension about opening
the door, switching off the appliances and so on. In short we can save valuable time and
experiences more daily productivity.
1.4 Objectives
The main objectives of our object are as follows:
3. Considerable reduction in
6. Gas alarm
7. Fire alarm
To build the android application to send the control signal to control the HA
Way and to received the live video feed from the camera.
2 IDLE
-IDLE for python programming used to code the server side program.
3. RPI-GPIO library
-GPIO interface library for the aprotic Pi.
2.1 Introduction
Home automation is anything that enables you to use your home's lighting, heating and
appliances more conveniently and efficiently. It can be as simple as remote or automatic control
of a few lights, or it can be a complete system that controls all major parts of your home, custom
set to your own personal preference. [1]
Home automation gives you access to control devices in your home from a mobile device
anywhere in the world. The term may be used for isolated programmable devices, like
thermostats and sprinkler systems, but home automation more accurately describes homes in
which nearly everything -- lights, appliances, electrical outlets, heating and cooling systems --
are hooked up to a remotely controllable network. From a home security perspective, this also
includes your alarm system, and all of the doors, windows, locks, smoke detectors, surveillance
cameras and any other sensors that are linked to it. [3]
Until fairly recently, automated central control of building-wide systems was found only in
larger commercial buildings and expensive homes. Typically involving only lighting, heating
and cooling systems, building automation rarely provided more than basic control, monitoring
and scheduling functions and was accessible only from specific control points within the
building itself.
Home automation is a step toward what is referred to as the "Internet of Things," in which
everything has an assigned IP address, and can be monitored and accessed remotely.
The first and most obvious beneficiaries of this approach are "smart" devices and appliances that
can be connected to a local area network, via Ethernet or Wi-Fi. However, electrical systems and
even individual points, like light switches and electrical outlets, were also integrated into home
automation networks, and businesses have even explored the potential of IP-based inventory
tracking. Although the day is still far off when you'll be able to use your mobile browser to track
down a lost sock, home networks are capable of including an increasing number of devices and
systems.
Automation is, unsurprisingly, one of the two main characteristics of home automation.
Automation refers to the ability to program and schedule events for the devices on the network.
The programming may include time-related commands, such as having your lights turn on or off
at specific times each day. It can also include non-scheduled events, such as turning on all the
lights in your home when your security system alarm is triggered.
Once you start to understand the possibilities of home automation scheduling, you can come up
with any number of useful and creative solutions to make your life better. Is that west-facing
window letting in too much light? Plug your motorized blinds into a "smart" outlet and program
it to close at noon each day. Do you have someone come by at the same time each day to walk
the dog? Program your home automation system to unlock the front door for them, and lock it up
again when they're done.
The other main characteristic of cutting-edge home automation is remote monitoring and access.
While a limited amount of one-way remote monitoring has been possible for some time, it's only
since the rise in smartphones and tablets that we've had the ability to truly connect to our home
networks while we're away. With the right home automation system, you can use any Internet-
connected device to view and control the system itself and any attached devices.
Even simple notifications can be used to perform many important tasks. You can program your
system to send you a text message or email whenever your security system registers a potential
problem, from severe weather alerts to motion detector warnings to fire alarms. You can also get
notified for more mundane events, such as programming your "smart" front door lock to let you
know when your child returns home from school. Show the figure 2.2 in Remote control home.
[4]
Day by day the work and life of human being's are increasingly busy and complicated with the
rapid growth in communications and information technology. As the economic expansion is
growing rapidly, the standard of living also keeps on rising up and the people are requiring more
living functions. The concept of smart home has focused the attention of re-searchers. A lot of
efforts have been done for the development of home automation to control that remotely. Smart
Home is an advanced technology to make a house to become intelligent and automated. Usually,
that technology has automation systems for lighting, temperature control, security and many
other functions. Here in this paper a comparative study has done on different types of home
automation system. We have gone through different techniques for the implementation of smart
home such as; phone-based remote controller for home and office automation, PC remote control
Home automation devices typically don't solve any problems by itself, because most of them are
usually single purpose devices. However, when it comes to a home automation system that
connects different devices and processes the data from each one, it's a different story.
Just having smart devices installed does not necessarily mean you've got a smart home. It's what
you do with this system, what you teach and program it to do and it takes some efforts and
creative thinking to get good results. Ability to use your cell phone to view camera footage,
unlock your door or turn lights on/off are just some basic connected home features. Teaching
your home to react and adjust based on your preference is where the true potential is.
A basic home automation solves many simple problems effectively, from saving energy easily,
to removing the possibility of being locked out by losing a physical key, from checking if you
had locked your door or turned that appliance off after you actually leave, to informing you
about the foot traffic on your porch when you're not home, - you name it.
The true potential though is in discovering the problems that you may not even think are there
and solving them for you with the help of Machine Learning.
Think about the enormous success of Nest thermostat. With programmable thermostats before
Nest, a person first had to track their own habits for some time to later implement the rules for
automating their climate control to fit their habits. That is a highly manual process! Nest learns
by itself suggesting and implementing these rules on your behalf. Continuous optimization was
not even a problem, you just kept your thermostat always on and heated/or cooled your house
whether it was needed or not, wasting the energy and money. [6]
Manual thermostats, and dial-up connections that take too long to open a single email. With the
available of reliable broadband connection, WiFi-connected gadgets, and smartphones that house
every app that you need to control just about any device, smart homes are now easier to build.
With this technology, you can turn on or off your lights in the house or close the garage door
wherever you are in the world. All you need is open an app in your smartphone and click few
buttons.
Although smart homes offer a number of benefits, they also present challenges. For them to be
efficient, it is important that you have a highly reliable internet connection. If your WiFi is down
and you need to open the door to grant access to your kids, for example, while you are in the
office, they might be sitting on the front lawn for quite sometime. Also, smart homes are
vulnerable to hackers who can hack into your gadgets and gather information that they can use to
harm or extort money from you.
Further, these systems can be extremely expensive and learning how to use them could be a huge
challenge, especially for older users who are not tech-savvy. [7]
REQUIREMENT SPECIFICATION
First of all you need to know about the home automation market insights. Get a industry reports
which will help you to obtain clarity about their business environment and enable them to
undertake strategic growth initiatives
The global home automation market is expected to reach USD 39.88 billion by 2024, driven by
rising necessity of consumers for protection against fire and break-ins. Availability of automated
systems that can be operated over high-speed Wi-Fi, powerful smart phone ubiquitous, and
growing popularity of Internet-connectable gadgets is expected to drive market growth.
Moreover, reduced energy consumption and availability of a broad range of products is
anticipated to boost the home automation market. [8] Show the figure 3.1 in Global HA
marketing chat.
0
2018 2019 2020 2021 2022 2023 2024
Understand the new tech and be up to date with all the trends. Be up to date.
• Goal a customer: today Smart Homes are not just to the top income in the country. It
now is a reality and you can definitely goal middle class.
• Like an equipment to work that is not too complex, because on your instruction
curve you can screw up with your customers and it will not be good for your
business’ image. Do a training! And keep all the data in a safe place to use it in the
long term.
• Like a technology that shows your differential for the end-consumer but that is also
good for you to save time as doing remote maintenance and so on.
• Choose technologies that are already in the market but not the ones that are
saturated, because if so, all your competitors will work with the same thing as you.
This way your competition will be stronger than if you have something different. Be
different.[9]
This section of the report explains about what are we going to do and how are we going to do
it. We will be following incremental improved model for the completion of this project which is
discussed below briefly.
We have closely followed this model of software development in our project. As the
requirements change or new features are to be added to enhance the functionality as a whole, we
integrate them as they come up. As for the hardware aspect of the project, there is limited
flexibility in design and implementation. We cannot go on producing and then redesigning the
end products upon changes or failures, so we model the complete design conceptually in
diagrams plus in temporary, easy to integrate and disintegrate bread boards.
Version 1.0
At first, we developed an app with basic facility of making Http requests to the local Apache
server hosted on the PC. This version could make changes to the MySQL database on the server.
Version 1.1
Next, we uploaded and hosted the MySQL database on the Apache server on the Raspberry Pi.
And, both android app and Raspberry pi were connected over a LAN. Further, server script was
coded on the Raspberry pi to react to the changes made on MySQL database.
After that, we integrated the live streaming part to the android app and also on the Raspberry pi
to capture and stream live video to the YouTuber server. Similarly, we designed and fabricated
PCB to interface Raspberry pi with AC appliances.
Final Version
After all these intermediate version, at last, the final version of system was developed. This
version facilitated the database on the cloud and both android app and Raspberry pi could
communicate with each other over the internet. Hence, android app facilitated remote controlling
of appliances with live video streaming.
In our system, user acts as a primary actor who can read status of appliances either in ‘’ON’’
state or ‘’OFF’’ state through the database. Further, the user may change the state of appliances
and control them according to the need by sending the status signals to the database and
raspberry pi gets access to the database and send control signals to the appliances. Also watching
the live stream video can be done by the user through the YouTube stream server whenever
required
The android OS provides the flexibility of using the open source. The inbuilt sensors can be
accessed easily. An application with the feature to control the home appliances and watch the
live stream of the site for monitoring purposes is developed. Android Phone acts as a client and
data are sent via sockets programming. The app has two basic modes: control mode and video
streaming mode. Control mode uses the toggle buttons that are used to control the home
appliances. The toggle button sends the status of the switch. Video streaming mode shows the
live stream of the room. The captured video is streamed on the android application.
The major hardware required for this project are Raspberry Pi, camera module, router, android
phone and the power strip circuit. Raspberry pi is the central part of the whole system and pretty
much acts at the core processing and control system. The camera module is used to capture video
and stream it online. Likewise, router is used to create a LAN, which connects pi and the android
phone to a common network. Similarly, android phone is necessary to run the android app and
finally power strip connects the electrical appliances to the electronic control logic of the system.
The power strip is designed on a PCB and it contains various electronic elements like capacitors,
resistors, LEDs and relays. One end of the power strip is connected to the electronic logic part of
the raspberry pi while next end to the electrical home appliances. So, basically it controls the
home appliances based on the logic of GPIO pins of pi. Show the figure 3.8 Block Diagram of
the power strip.
The push buttons of loads or home appliances are interfaced to 8051 series microcontroller
through which the command signals transmitted through RF transmitter after encoding command
signals. The RF transmitter end is an RF remote can be used by the user as a remote control for
operating home appliances. The receiver end consists of the RF receiver circuit which consists of
a decoder to decode the encoded command signals received from the transmitter. The decoded
signals are fed to the microcontroller and then the commands are sent to operate loads through
Opto-Isolators.
Android App
Java Programming Language
Transformer
Bluetooth module
Arduino Programming Language C
Rectifier
Android Studio is the comprehensive IDE for the android application development by Google.
We developed our android app entirely in android studio.
5.2 Procedures
In this section of the report, we discuss how we achieved the aforementioned targets
We created a YouTube account and using live streaming option got a private key and the server
address to which the video is to be streamed. This combination is later supplied to the Ffmpeg
encoder to start the streaming.
We used the Android Studio IDE for the design and development of android application which is
used to communicate with the Raspberry Pi and control the home appliances. Further, it streams
the live video feed from the raspberry pi camera using YouTube API. This process involves the
layout design of the app to give the look and feel of the android app and the coding part that does
the actual task behind the scene in the background.
This figure only can show the testing time. When I set my project then my project can only mood
off. Figure 5.3(a) shown the testing picture & the 5.3(b) figure shown the code run.
The final outcome of this project is a prototype for a simple home automation system which can
control home AC appliances with a touch of a finger and is equally capable of monitoring with
live stream video feed of the site. On the front end, there is an android app to control the home
appliances and PCB board to which a number of home appliances are connected. Figure 5.4(a)
shown the output result & figure 5.4(b) , 5.4(c) shown the Android app home page.
6.1 Discussion
The final outcome of this project is a prototype for a simple home automation system which can
control home AC appliances with a touch of a finger and is equally capable of monitoring with
live stream video feed of the site. On the front end, there is an android app to control the home
appliances and PCB board to which a number of home appliances are connected. Then on the
backend, there is raspberry which has been programmed to control the status of GPIO pins and
thereby controlling the appliances, and also capture video using camera module and stream it
live to YouTube server.
6.2 Conclusion
Hence, the idea to create a fully working home automation system with facility to control and
monitor appliances has been finally realized. The output of this project is an array of home
appliances that are controlled over the smartphone with connection to Bluetooth module. This
project is a successful outcome of continuous and tireless effort from all the project members,
supervisors, college faculty, colleagues and other helping hands. This project has been a really
great experience and opportunity to learn and to experiment. Moreover, the authors got the
chance to closely experiment and learn about what goes into designing and developing home
automation systems. We are very much delighted that we explored this topic as our major project
title and in a way, created a version of home automation system of our own, and to be closely
related with the technology that is of a great interest of study and research today and is sure to
revolutionize the way of living of people in the days to come.
By interfacing various sorts of sensors, we can program the automatic controlling of the
appliances. As for example, using temperature sensors to log the current temperature of a room,
we can control the automatic turning ON/OFF of the heater or fan. Likewise, for the continuous
As per our survey, there exist many systems that can control home appliances using android
based phones/tablets. Each system has its unique features. Currently certain companies are
officially registered and are working to provide better home automation system features.
Following models describes the work being performed by others.
N. Sriskanthan [10] explained the model for home automation using Bluetooth via PC. But
unfortunately the system lacks to support mobile technology.
Muhammad Izhar Ramli [11] designed a prototype electrical device control system using Web.
They also set the server with auto restart if the server condition is currently down.
Hasan [10] has developed a telephone and PIC remote controlled device for controlling the
devices pin check algorithm has been introduced where it was with cable network but not
wireless communication. Amul Jadhav [12] developed an application in a universal XML format
which can be easily ported to any other mobile devices rather than targeting a single platform.
Pratik Gadtaula of Telemark University College, Faculty of Technology has done a Master’s
thesis on “Home Automation” [13].
The following section consists of the budget analysis of the project, that is, the total budget for
the development of the project and the operational and maintenance cost that follows after the
implementation of the project.
The development cost can be categorized into software and hardware development cost.
[1].internet: <<https://medium.com/@smarthomeguru/introduction-to-home-automation-
6bdd0a4783c >> [ Last accessed March, 28, 18 at time 11.45pm]
[2]. https://www.livinium.com/en/product-category/smarthome/home-automation/
<< http://ieeexplore.ieee.org/document/7503308/>>
[7] Marcia Stipanich Martins, B.A. Smart Home & IoT, Home Automation, Smart Home<<
https://www.quora.com/profile/Marcia-Stipanich-Martins>>
[9] N. Sriskanthan and Tan Karand. “Bluetooth Based Home Automation System”. Journal of
Microprocessors and Microsystems Conference on Science and Technology: Application in
Industry and Education [April 1, 2018 at 9pm]
[10] Muhammad Izhar Ramli, Mohd Helmy Abd Wahab, Nabihah, “TOWARDS SMART
HOME: CONTROL ELECTRICAL DEVICES ONLINE”, Nornabihah Ahmad International
[12] Amul Jadhav, S. Anand, Nilesh Dhangare, K.S. Wagh “Universal Mobile Application
Development (UMAD) On Home Automation” Marathwada Mitra Mandal’s Institute of
Technology, University of Pune, India Network and Complex Systems ISSN 2224-610X (Paper)
ISSN 2225-0603 (Online) Vol 2, No.2,[ last accesses april 2,2018 at 10 pm]