Design and Implementation of a WiFi-Enabled Home Automation System

Design and Implementation of a WiFi-Enabled Home Automation System

Oluwabukola Ajayi Aaron Afan Izang* Chizitere Favour Osuji Chukwuebuka Timothy Umeozo Tamunotonye Albert-Sogules

Department of Computer Science, School of Computing and Engineering Sciences, Babcock University, Ogun State, Ilishan-Remo 121103, Nigeria

Department of Information Technology, School of Computing and Engineering Sciences, Babcock University, Ogun State, Ilishan-Remo 121103, Nigeria

Corresponding Author Email:
4 June 2023
8 October 2023
18 October 2023
Available online: 
31 October 2023
| Citation

© 2023 IIETA. This article is published by IIETA and is licensed under the CC BY 4.0 license (



Home automation represents the integration of computerized or automatic control into various commonplace electrical and electronic systems within residences. Beyond resolving lighting concerns, this sophisticated technology paves the way for a centralized home entertainment system and offers comprehensive mastery over home security. Given the rapid escalation in resource consumption, there exists a compelling inclination to conserve our resources through every feasible means. A significant contributor to energy wastage is the absence of remote control and access to appliances. This project unveils a user-friendly home automation system, operable wirelessly via wifi on a smartphone. The Firebase real-time database, a cutting-edge IoT solution, serves as the conduit between the hardware and the mobile application. Facilitating automated control of up to eight appliances through a mobile app, the system also incorporates sensors that enable gas leak detection within the home.


automation, home appliances, standards, technology, system, microcontroller, electrical appliances

1. Introduction

For a number of years, the term ‘home automation’ is being used. The term Smart Home, Intelligent Home’, was followed by the following words in order to introduce a concept of home networking appliances. Lighting, security systems, and other home appliances and systems can all be controlled from a single location with the help of home automation systems (HASs) [1]. HASs are able to optimize energy use, improve security systems and certainly make life easier for users.

HASs are becoming more well-liked and are piqueing users’ curiosity in the current, developing market. HASs have their difficulties. The intricacy and cost of the system are the main reasons why end users today, particularly the elderly and crippled, aren’t perceived as accepting it, despite the fact that they stand to benefit much.

Using home automation, it is now possible to have a “smart home”, or one that can open doors for you, play your favorite music, water your flowers in the morning, turn on the security lights at night and turn them off in the morning, heat water for baths and tea, and stream live video of what is happening in a region of the world to you from anywhere in the world [2]. It enables the integration of lighting, entertainment, security, telecommunications, heating, and air conditioning into a single system that can be managed from a central location. This enables you to manage your hectic life while involving your home actively.

Nowadays, it’s uncommon to find a house without some kind of home automation system. These systems can range from controlled air conditioners that maintain a specific temperature to burglar alarms, high-tech security gates, and television remote controls. These smart technologies help to assist elderly people and those with one disability or the other in term of operating and controlling the devices so that energy can be conserved when they are powered off automatically.

2. Statement of the Problem

People may find it inconvenient to physically check each room at home to see if any lights or fans have been turned on or off, especially older people. Another problem is monitoring infants left with a caregiver in the house according to reports most nannies tend to neglect their jobs when an adult isn’t present. There is a strong desire to save and conserve our resources in whatever manner possible because resource utilization is increasing so quickly [3]. People become negligent in the proper utilization of available energy. People frequently forget to turn off the lights and other equipment in their homes before leaving them. Sometimes people run out of time when going out, for example when they are running late to work, they won’t have time to go from one room to another to turn off the lights or appliances. Hence there is a need for home automation.

Smartphones, which are capable of carrying out many of the same duties as PCs, are also growing in popularity every day. We have consequently decided to develop a low-cost embedded technology to aid in home automation. All of the house’s systems can be accessed and managed remotely by the system’s user.

3. Home Automation Implementation Platforms

A multitude of systems, including Powerline, Ethernet, Bluetooth, Infrared, and GSM, can be used to create home automation. Every platform has a unique quirk and field of application.

3.1 Powerline communication

Powerline communication is a method of sending data over a cable that also transmits electrical power [4]. Powerline communication can be used at each level, even if electrical power is distributed on medium-voltage lines, transported over high-voltage lines, and used inside buildings at lower voltages.

A modulated carrier signal is imprinted on the wiring system to drive all powerline communication equipment. Depending on the signal transmission properties of the power cable utilized, different forms of powerline communications require different frequency bands. Since alternating current (AC) power transmission was the primary purpose of the power wiring system, higher frequency signals can only be carried to a limited extent by the power wire circuits when used conventionally.

Each type of powerline communication is constrained by the propagation issue. Data speeds in a powerline communications system can vary greatly. On low-frequency (between 100 and 200 kHz) carriers impressed on high-voltage transmission lines, one or two analog speech circuits, or telemetry and control circuits with an equivalent data rate of a few hundred bits per second, may be carried; however, these circuits could be several miles long.

3.1.1 Microcontroller

An affordable single-chip computer is a microcontroller [5]. All of the parts of a single-chip computer are located on the integrated circuit chip (Byte, 2002). The silicon chip’s microcontroller, which is covered in silver, contains features similar to those of a standard personal computer. It is incredibly adaptable and can simulate complex logic and electronic circuits thanks to its capacity for storing and running original programs as well as its ability to carry out mathematical and logical operations. Power tools, toys, office supplies, appliances, and remote controls for cars and other vehicles are just a few examples of the automatically operated products and devices that use microcontrollers. So, instead of operating in a vacuum, microcontrollers accept input from a variety of devices and output to more devices inside a system.

In reality, they are in charge of the majority of smart consumer electronics’ intelligence.

The microcontroller’s architecture can be categorized by its mode of operation and design. As follows:

3.1.2 Von-Neumann architecture

This architecture stores both data and program instructions in a single, shared memory space [6] Both data and instructions are fetched from a single data bus. Additionally, each time the CPU obtains a program instruction, it might need to do one or more read/write operations to the data memory space. Before it can fetch and decode the next program instruction, it must wait for these successive actions to finish. The simplicity and economy of this style are its advantages. On different Von Neumann computers, the software can read from and write to CPU registers, including the program counter.

This is a risk since you can tell the CPU to access memory locations outside of the program memory area, and doing so can cause issues that necessitate a hard reset.

3.1.3 Harvard architecture

This approach uses separate memory portions for program instructions and data. Simultaneous access to data and instructions is made possible by internal data buses that handle two or more. The program memory bus is retrieved by the CPU [7]. The CPU can fetch the next program instruction while using the da*ta bus for its data operation if the fetched instruction involves an operation on data memory. Faster execution times lead to more complicated hardware as a result. The bulk of modern microcontrollers use Harvard architecture [8].

3.2 Closely related work

This section considers various related works that developed systems similar to this study.

The X10 system, created by Linskell and Dewsbury [9], was the first all-purpose home automation system and is still well-liked as a practical substitute today. It was designed to carry control signals via the mains cable when it was first launched in the US in 1978. Simple unidirectional commands were sent from a 16-channel command console to a lamp module, an appliance module, and finally a timer module 2.

With this approach, the system responds slowly, and simultaneous instructions may interfere, resulting in lost commands. The system has changed, including the addition of bidirectionality, and the corporation has been behind numerous fascinating inventions over the years, but it continues to be a low-cost and straightforward system.

Baliga [4] designed the system they called smart socket and smart switch. In this study, it was determined that smart socket and smart switch technology has been promoted for home automation systems until all household appliances are manufactured with the ability to communicate with a central control unit and be remotely controlled. The graphic below depicts a smart socket complete with a remote control and monitoring device. The smart socket is designed for controlling high-power appliances like ovens and air conditioners. The smart switch is designed to manage home lighting equipment. Both gadgets are capable of wireless connection.

Taiwo and Ezugwu [10] designed a system which used machine learning techniques to control home appliance through the help of trained robots. The study considered automation as the automatic control of a variety of functioning devices, machinery, etc. This is a productive way to consume less energy and labor while simultaneously enhancing the effectiveness, precision, quality, and efficiency of any system. Numerous elements of life can be automated with the aid of a home automation system. The automation of many tasks in the home-often referred to as a “smart home”-is made possible by the development of cutting-edge technologies and computer methodologies. The user can easily keep a close eye on a variety of activities taking place at home thanks to this automated approach. Home behaviors can be analyzed, predicted, and intelligently monitored machine learning (ML) algorithms, the Internet of Things, evolutionary algorithms, and data science are some examples of computing technologies that can help. The management of a smart home is increasingly integrating machine learning (ML) and artificial intelligence (AI). Energy management, burglar detection, fire detection, gas leak detection, and any unusual activity in or around the home can all be assisted by home automation. For instance, the integration of AI and ML can be used to modernize our home kitchens and enhance the efficiency of our cooking, refrigerators, stoves, and pantries. The market for home automation is already seeing the emergence of smart refrigerators, stoves, and cooking technologies. The projects, uses, and applications of AI and ML in numerous sectors have been covered in this work.

Narayanan and Gayathri [11] developed a system which uses voice recognition to control home appliances. The primary benefit of this system is that it may be operated by speech recognition for those who have hand limitations. This function turns this home automation system into a completely hands-free device. The majority of persons who use this technique are older people and people with impairments who frequently have trouble moving their limbs or have hand-related issues. This technology is cost-effective and user-friendly. Vocal signals are the initial kind of input that the system accepts; these signals are then saved in the system’s memory. The system again accepts the user’s voice command when they want to control a specific device, compares it to the directory that has previously been saved, and if it matches, activates the PIR sensor to detect human presence. If the human presence test is successful, the relay is then activated to carry out the user’s requested action. Mandula et al. [12] study focuses on a system that provides simple home automation features, as well as camera functionality and house security. In essence, the Android app transforms a smartphone into a universal remote for all home appliances. With motion sensors, security is established if movement is detected at the home’s entrance; a notification is delivered that includes a real-time photo of the front door. The owner of the home will receive this notification online, enabling the app to start sending notifications. Therefore, the owner can activate the alarm system in the event of an intruder or switch on the appliances, such as opening the door if a visitor. The system makes use of a Raspberry Pi, a little computer that serves as the system’s server. There are two modules in a smart house. Fan light and door controllers, as well as a security module with a smoke sensor, motion sensor, and camera module, are all parts of home automation [13].

The suggested surveillance system is a video-based surveillance system that may record individuals whose temperature is not below a predetermined level or who are not wearing masks [14]. It also intends to recognize the masks on individuals using a cascade classifier created using machine learning techniques.

In the quick-paced digital world, where video-based surveillance systems for security and monitoring have dramatically increased, it is imperative to have an effective and skilled surveillance system.

The epidemic has increased the importance of surveillance and highlighted the need for it. The AI-based surveillance system suggested in this research is capable of carrying out the standard surveillance system tasks as well as determining whether someone is wearing a mask and whether their body temperature is below a predetermined threshold. The planned surveillance system uses cameras to record individuals who are not wearing masks or whose body temperatures are not below a predetermined level. The Raspberry Pi is used in the implementation of this system as the main processing, extraction, and analysis center for the video stream from a camera. By employing a cascade classifier created using machine learning techniques, the suggested system seeks to recognize masks on people, mitigating the impacts of outside elements (such as illumination, position, etc.) that impair the performance of a conventional video surveillance system.

Sriskanthan et al. [15] developed a system that Any paralyzed person, with the exception of quadriplegics, can manage the room’s appliances without the regular assistance of a caregiver or nurse thanks to a human-centered, cost-effective home automation system.

People who are paralyzed face a variety of challenges and issues every day. Even something as simple as using electrical equipment might be very difficult for them. The primary objective of this study is to provide an accessible home automation system based on human-centered design (HCD) that might make some people’s challenges easier. The suggested method receives input from voice or gesture and conducts the appropriate actions based on the data. Except for quadriplegics, all paralyzed people can operate the room’s appliances with the help of the suggested system without requiring frequent assistance from a caregiver or nurse [16].

4. Methodology

Figure 1. Flowchart diagram

Figure 2. Circuit diagram

Figure 3. System block diagram

A home automation system entails giving some electrical and electronic equipment in the house some level of computerized or automatic control.

One or more appropriate platforms are utilized in the design of a home automation system to create a dependable and adaptable system that can be simply operated and customized for a new household appliance. Therefore, certain conscious decisions regarding the kind of platforms, hardware components, and manner of operation of the home automation system were made for this project. The microcontroller used in this project is the ESP32 and it is the brain of the system. ESP32 outperforms Arduino in terms of speed and power. A potent 32-bit microcontroller, the ESP32 has Bluetooth 4.2, built-in Wi-Fi, and a complete TCP/IP stack for connecting to the internet. Ten inbuilt capacitive touch sensors are present. The diagram below Figure 1 shows the flow chart diagram of the home automation system, Figure 2 shows the circuit diagram highlighting the connection of the integrated circuit (ICs) used in designing the project while Figure 3 shows the systems block diagram.

5. Implementation

This section contains how the various devices, components and software were used to build the home automation system. The system has two main parts. They are:

1. Software component or mobile application.

2. Hardware component.

5.1 Software component

The software or mobile application was designed and built using and online mobile application development platform called Kodular.

5.1.1 Kodular designer interface

Figure 4 illustrates how the mobile application’s user interface was created using this Kodular interface. Basically, it is made up of arrangements of shapes, texts colors and images.

Figure 4. Designer interface of Kodular

5.1.2 Kodular blocks interface

This interface is used to give functionalities to the mobile application. The interface contains blocks with various functions which are arranged in specific patterns to give the application the required functionalities as shown in Figure 5.

Figure 5. Blocks interface of Kodular

5.1.3 The mobile application

The program is utilized by the hardware component of the home automation system to monitor and control it. The various parts of the mobile application are described in the sections below.

  1. Welcome interface

This is the landing page of the mobile application. The user gets to enter a password to be able to login to the application. This is necessary for security reasons. Figure 6 below shows the welcome interface of the application.

  1. Settings interface

The setting interface is where the user gets to save or change the password of the mobile application. Figure 7 below shows the settings interface of the application.

  1. Switch interface

This is the main page of the mobile application. The page contains eight buttons that are used to control the lighting points on the hardware. When a button is tapped, the application stores its state on Firebase database. The hardware then reads this state and switched on/off the respective lighting point. The interface also contains the texts showing the ambient temperature and humidity. This data is stored on the database by the hardware and the application reads and displays it. Figure 8 below shows the switch interface of the application. The buttons with red borders indicate that the lighting point they connect to is on. The lighting point corresponding to the buttons with gray borders is off.

Figure 6. Welcome interface

Figure 7. Settings interface

Figure 8. Switch interface

5.2 Hardware component

The hardware is the part of the system that is installed where the user wants to us the system. This can be in the home or office. The hardware is made up of devices and components which include the microcontroller which acts as the brain of the system, the LCD screen that shows the activities going on in the system, the relays that control the lighting points and sockets, the batteries that power the hardware and several other devices and components. The hardware receives and carries out commands that are being stored on the database by the mobile application. The hardware also stores the weather data on the database for the mobile application to read and display.

The microcontroller was programmed using Arduino Independent Development Environment (IDE).

5.2.1 Arduino IDE

The Arduino Software (IDE) [17], also referred to as the Arduino Integrated Development Environment (IDE), is another option that comes with a text editor for writing code, a message box, a text console, a toolbar with buttons for frequently used actions, and a number of menus. To upload applications and communicate with them, it establishes a connection with the Arduino hardware. The microcontroller’s operating system, or program, was created and written using the Arduino IDE. The microcontroller acts as the brain of the hardware [18]. Figure 9 below shows Arduino IDE being used to write the program of the home automation system.

Figure 9. Arduino IDE

5.2.2 The database

The database serves as a bridge between the system’s hardware and software. It provides the same data to them in real-time while storing data from both hardware and mobile applications. Firebase database is the one that is utilized. The database including information from the hardware and mobile application is seen in Figures 10 and 11.

Figure 10. Firebase database 1

Figure 11. Firebase database 2

Google’s Firebase consists of a number of frameworks and backend cloud computing services [19]. For a range of applications, including Android, iOS, Javascript, Node.js, Unity, PHP, and C++, it hosts databases, services, authentication, and integration.

The database displays the states of the hardware’s relay channels, as seen in the figures. Additionally, it displays the temperature and humidity information read and shown by mobile applications.

5.3 System evaluation and result

To make sure the system complies with the standards, it must be physically observed and verified at various points across the system and as a whole. The testing was conducted using the black box method [20]. The testing was done by various users who were unaware of the internal workings of the system. The test was conducted at several system levels, as will be explained below.

5.3.1 Unit testing

To make sure they are in good functioning order and suitable for use in the building, testing was done on individual parts and gadgets. Various electronics testing instruments and tools were used for this test [21].

5.3.2 Integration testing

After performing a temporary assembly of the devices and components, this testing was conducted. The results from this stage were utilized to tweak the final assembly as needed in Figure 12.

Figure 12. Final image of the project

5.3.3 System testing

After the hardware was completely put together and the mobile application was developed, testing was done. The system underwent testing to confirm that it complies with both functional and non-functional requirements. It was satisfactory to see the results of this testing.

6. Conclusions

In conclusion, we successfully built a working home automation system with state-of-the-art technology. The system will help to solve problems associated with control and monitoring of residential and commercial buildings. Our system makes it easy to do controls and monitoring from anywhere.

The home automation system that was developed has shown the great potential of helping elderly people and people living with disabilities. This system was developed to tackle energy conservation problem which is prevalent in developing nations like ours. Therefore, this system was able to overcome that challenge when it was deployed and tested. The implication of this study to home users is that it will make them save the scares resources they do not have instead of having to engage the services of care givers to carry out this simple task, this system can help. Also, energy challenges will be tackled through the use of our system as many developing countries still face energy crisis. Lastly the system may be created in a manner that individual lighting points and sockets can be centrally controlled rather than have them managed individually, it was connected to the main hardware device, this help for a more centralized control of the entire system.

7. Recommendation

The developed system was implemented for mobile users because it was discovered that the number of mobile phone users keeps increasing every day, however, we significant improvements to the home automation system can be created. First, we advise that a web application be created for the system for users who enjoy working with computers. Secondly, for users without access to Wi-Fi, GPRS connectivity could be incorporated into the system. The system might be set up to control a large number of outlets and lighting spots as our solution only implement with seven outlets for light and sockets. For better aesthetics, the hardware design might be modified. Instead of having them connected to the main hardware device, the lighting points and sockets could be incorporated within the system so that they can be individually managed.


[1] Adhiya, Y., Ghuge, S., Gadade, H.D. (2017). A survey on home automation system using IoT. International Journal on Recent and Innovation Trends in Computing and Communication, 5(3): 225-228.

[2] Hasan, N., Khan, A.A.M., Uddin, N., Mitul, A.F. (2013). Design and implementation of touchscreen and remote control based home automation system. In 2013 2nd International Conference on Advances in Electrical Engineering (ICAEE), IEEE, pp. 347-352.

[3] Al-Kuwari, M., Ramadan, A., Ismael, Y., Al-Sughair, L., Gastli, A., Benammar, M. (2018). Smart-home automation using IoT-based sensing and monitoring platform. In 2018 IEEE 12th International Conference on Compatibility, Power Electronics and Power Engineering (CPE-POWERENG), pp. 1-6.

[4] Baliga, B.J. (2015). The IGBT device: Physics, design and applications of the insulated gate bipolar transistor. William Andrew.

[5] Das, S., Das, I., Shaw, R.N., Ghosh, A. (2021). Advance machine learning and artificial intelligence applications in service robot. In Artificial Intelligence for Future Generation Robotics, Elsevier, 83-91.

[6] Langhammer, N., Kays, R. (2012). Performance evaluation of wireless home automation networks in indoor scenarios. IEEE Transactions on Smart Grid, 3(4): 2252-2261.

[7] Sunehra, D., Veena, M. (2015). Implementation of interactive home automation systems based on email and bluetooth technologies. In 2015 International Conference on Information Processing (ICIP), IEEE, pp. 458-463.

[8] Gupta, P., Chhabra, J. (2016). IoT based smart home design using power and security management. In 2016 International Conference on Innovation and Challenges in Cyber Security (ICICCS-INBUSH), IEEE, pp. 6-10.

[9] Linskell, J., Dewsbury, G. (2019). Assisted living. In Handbook of Electronic Assistive Technology, Academic Press, 215-258.

[10] Taiwo, O., Ezugwu, A.E. (2021). Internet of things-based intelligent smart home control system. Security and Communication Networks, 2021, 1-17.

[11] Narayanan, V.S., Gayathri, S. (2013). Design of wireless home automation and security system using PIC microcontroller. International Journal of Computer Applications in Engineering Sciences, 3(13): 135-140.

[12] Mandula, K., Parupalli, R., Murty, C.A.S., Magesh, E., Lunagariya, R. (2015). Mobile based home automation using internet of things (IoT). In 2015 International Conference on Control, Instrumentation, Communication and Computational Technologies (ICCICCT), IEEE, pp. 340-343.

[13] Pang, Z.B., Cheng, Y.X., Johansson, M.E., Bag, G. (2014). Preliminary study on wireless home automation systems with both cloud-based mode and stand-alone mode. In 2014 IEEE 17th International Conference on Computational Science and Engineering, pp. 970-975.

[14] Palattella, M.R., Accettura, N., Vilajosana, X., Watteyne, T., Grieco, L.A., Boggia, G., Dohler, M. (2012). Standardized protocol stack for the internet of (important) things. IEEE Communications Surveys & Tutorials, 15(3): 1389-1406.

[15] Sriskanthan, N., Tan, F., Karande, A. (2002). Bluetooth based home automation system. Microprocessors and Microsystems, 26(6): 281-289.

[16] JeyaPadmini, J., Kashwan, K.R. (2015). Effective power utilization and conservation in smart homes using IoT. In 2015 International Conference on Computation of Power, Energy, Information and Communication (ICCPEIC), IEEE, pp. 195-199.

[17] Baraka, K., Ghobril, M., Malek, S., Kanj, R., Kayssi, A. (2013). Low cost arduino/android-based energy-efficient home automation system with smart task scheduling. In 2013 Fifth International Conference on Computational Intelligence, Communication Systems and Networks, IEEE, pp. 296-301.

[18] ESP32 (2018). Espressif., accessed on Aug. 1, 2018.

[19] Lamine, H., Abid, H. (2014). Remote control of a domestic equipment from an android application based on raspberry PI card. In 2014 15th International Conference on Sciences and Techniques of Automatic Control and Computer Engineering (STA), IEEE, pp. 903-908.

[20] Somani, S., Solunke, P., Oke, S., Medhi, P., Laturkar, P.P. (2018). IoT based smart security and home automation. In 2018 Fourth International Conference on Computing Communication Control and Automation (ICCUBEA), IEEE, pp. 1-4.

[21] Ruta, M., Scioscia, F., Loseto, G., Di Sciascio, E. (2017). KNX: A worldwide standard protocol for home and building automation: State of the art and perspectives. Industrial Communication Technology Handbook, 58: 1-19.