Keywords

1 Introduction

Automation is an integral part of human life and it brings ease to the users by giving them the freedom to control and monitor their home appliances by just using a smartphone. It also gives tons of advantages to the old aged and handicapped people. A smart home is the integration of twenty-first century people. It is basically deploying technology into the home to improve quality of life [1]. Moreover, it also provides home security [2]. The improved lifestyle is one of the benefits of home automation. Household automation allows customers to manage and monitor many home appliances through a single system, providing more convenience, improved security, and increased energy. Consumers will regulate their home systems and conserve energy more effectively when home automation technologies are integrated into future smart grids [3]. Also, with the advancement of IoT, The Internet of Things is widely regarded as one of the most crucial areas of future technology and the IoT-connected devices are exponentially increasing [4, 5]. Smart homes have been recognized as one of the industrial areas with the greatest potential for IoT adoption, such as home automation and energy management [6].

Plenty of systems of home automation is documented in the literature. ZigBee-based home automation systems are proposed in [7, 8]. Although the ZigBee technology is inexpensive, the integration of different devices of different manufacturers is the main disadvantage associated with this technology [9].

Several methods based on Bluetooth technology and android are reported [10, 11]. Most of the methods require an Arduino board and a cell phone to form the system's hardware architecture, and the Arduino board and cell phone communicate wirelessly using Bluetooth technology. The major issue with these Bluetooth-based smart-home systems is that they can only operate household appliances within Bluetooth range [12].

The voice recognition-based home automation system is also studied and documented [13, 14]. A smartphone-based application is developed to control home appliances by recognizing the voice commands of the user. The android application communicates with microcontroller boards via Bluetooth or Wi-Fi technology. The voice recognition-based system is user-friendly. The major limitation of this method is that it requires a noise-free environment to operate. Moreover, it also demands the correct pronunciation; otherwise, the system will fail to execute the commands.

The global system of mobile communication (GSM) based home automation systems are also presented [15]. The GSM modem is equipped with a microcontroller to decode the SMS sent from the user’s mobile device. It has been established that using GSM in a home automation system provides the highest level of security [16]. Moreover, the GSM technology is vulnerable to power failure [9].

In wireless technology, Wi-Fi-based systems are also studied [17, 18]. The Wi-Fi technology enables the user to control home appliances from anywhere in the world. Wi-Fi technology makes home automation systems easier to adopt than ZigBee technology since Wi-Fi has lower connection latency than ZigBee [9].

It is known that IoT-based smart-home automation systems also suffer from the problem of security threats which is a very big challenge to protect the system from cyber-attacks and risk. According to [19], smart-home automation with the learning of human behavior can be secure by reducing the computation overheads, but they have used traditional and conventional methods. In the study [20] author has used the network security approach to protect the system from cyber-attack. They have used the central router concept, but if the attack on the main router becomes successful, all the connected devices will be easily manipulated. In the manuscript [21] author has told about the reference architecture of the smart home that facilitates the security analysis, along with the security attacked surfaces by providing the three viewpoints. Still, they have used old approaches to demonstrate the scenario. In comparison to others, our proposed system will contain multi-level security points that can provide the next level of security to the IoT devices. We will give multi-layered network security so that if the cracker can get the primary level, it cannot break the other layer easily.

In this work, an Arduino microcontroller-based dual-mode home automation system is being designed. The system is controlled via the smartphone/laptop through a Wi-Fi module. In addition to this, the user has control over the system to use it either in manual mode or in automatic mode. Four subsystems are designed, temperature control monitor, lighting control, door security, and fire-fighting systems. This research work is based on machine learning algorithms with the internet of things. IoT devices constitute a large number of devices and sensors that can monitor/control different physical quantities. With the dawn of Big Data, there is a need for proper automated data storage solutions and cloud-based applications to analyze and extract the required information from the data.

2 System Overview

The system is designed so that four subsystems are coupled with an Arduino microcontroller via sensors and the home appliances are connected to the Arduino microcontroller via a relay system for their respective operation. The system is controlled via smartphone/laptop with the help of a Wi-Fi module. The basic system design is shown in Fig. 1.

Fig. 1
figure 1

System architecture

The proposed methodology has two modes; one is manual mode, in which the user has a choice to operate appliances on his own. The other is an automatic mode in which the home appliances will automatically operate without any interference of humans or can be called a dehumanized mode.

The ESP8266 takes the whole system to the Wi-Fi system mode, where all the developed algorithms and methods are being utilized. The information exchanged among the heterogeneous devices will be taking place in the network-secured manner to fulfill the CIA triad of security.

3 Subsystems

The components of the system are connected with a microcontroller. A 16 × 2 Liquid Crystal Display (LCD) is used to display the data like room temperature, object distance, and the information about the number of devices connected, etc. The hardware of the system is successfully implemented and its various subsystems are verified. An android application Blynk is used to monitor the connected home appliances.

3.1 Temperature Control Monitoring System

In a temperature control system, an LM35 temperature sensor is used along with the infrared (IR) sensor, the LM35 is used for the purpose of measuring the ambient temperature of the room. The IR sensor is used to improve the accuracy. The temperature is adjusted to be less than 30 °C; if the temperature exceeds 30 °C, the microcontroller will turn on the fan or Air Conditioner to reduce the temperature.

3.2 Lighting Control System

A LED will turn on according to the place’s luminosity. It is performed through a light-dependent resistor (LDR). As the light impinging on the photoresistor gets stronger, the resistance decreases, and the voltage output of the divider increases. The reverse happens when the impinging light gets weaker.

3.3 Door Automatic Opening System

The HC-SR04 is a complete ultrasonic distance measurement device. The HC-SR04 works simply by sending a pulse to the trigger input and waiting for a pulse from the echo output. The length of this pulse allows the calculation of the distance to the detected object.

3.4 Fire-Fighting System

In the fire-fighting system, an MQ-2 gas sensor is to operate when the amount of smoke or gas exceeds 400%, when this condition occurs, the Arduino will operate the buzzer first and then the fire-fighting system will operate.

3.5 System of Other Appliances

The other appliances like refrigerators, microwave ovens, and geysers can be connected with the home automation system in such a way, they operate in accordance with the user.

4 Cyber-Attack on Home Automation System

The problem with the Wi-Fi-connected home automation devices is that it is remotely controlled when we are away from home. To communicate with them, they need to be connected to the internet (cloud database) from outside the home network. They are controlled by smartphones or laptops that detect the devices and are connected. This availability of the device on the internet through Wi-Fi makes it vulnerable to hackers and attackers to manipulate. It can be done in the following manners, as shown in Fig. 2.

Fig. 2
figure 2

Process leading to security happenings

4.1 Man-In-The Middle

In this attack, the attacker can breach, interrupts or spoofs communications between two systems. The attacker can send the fake temperature data generated by the device to be spoofed and sent to the cloud; similarly, the attacker can disable vulnerable devices during heat waves, creating a disastrous situation for the system users.

4.2 Data and Identity Stealing

When unprotected wearable and smart devices generate data, they can provide important personal information to the hackers that can be exploited for fraud, transactions, and identity hacks.

4.3 Device Hijacking

In this type of attack, the attacker can hijack the device and control the device effectively. These attacks are quite difficult to detect because the attacker does not change the device's basic functionality. It simply controls a single major device and can get access to others as well.

4.4 Distributed Denial-of-Service

It is the advanced version of the Denial-of-service (DoS) attack. The attacker can flood the incoming traffic coming from multiple sources to a targeted network. It can block the simple source to get access to the data. This attack is now common in IoT devices nowadays due to the lack of security of the devices. Another version called Permanent Denial-of-service (PDoS) attack is a lethal attack. It can damage the device badly the device cannot recover, it can replace, or reinstallation takes place.

5 Protection from Cyber-Attacks of Home Automation System

The IoT devices can be protected by comprehensive IoT security solutions that do not disrupt home or service providers’ smart devices. It can include the following things to get a more secure system.

5.1 Multi-level Authentication

As the smart device is ready to connect with the network, it should be authenticated before information exchange with the cloud. This can ensure the data generated from the device is not fraud and corrupt. Hashing algorithms SHA-256 can be used for symmetric keys and Elliptic Curve Digital Signature Algorithm (ECDSA) for asymmetric keys cryptography (Fig. 3).

Fig. 3
figure 3

ECDSA algorithm

5.2 Network Data Communication Security

Data transmission between the device and cloud can be done in encryption key authentication mode. It can be protected by ensuring or allowing those with the secret decryption key to communicate with the cloud data. The information sent to the cloud by the smart device must be protected from digital eavesdropping (Fig. 4).

Fig. 4
figure 4

Security layered model of IoT

5.3 Analysis of Security Monitoring

The cloud system or smartphone will capture the data from the various smart devices, including endpoint devices and network traffic data. Our system can analyze whether any threat or vulnerability occurs or not if necessary actions can be formulated for the system security policy like isolation of vulnerable devices. This analyzing cycle can be run in real-time or later to detect the attack pattern and scenarios.

5.4 Machine Learning Approach

Detecting the anomalies and vulnerability of attacks in the smart-home systems through a traditional approach like traffic pattern recognition, it is better to use dynamic machine learning methods to classify the data flows. It is because the unknown attack detection possibility can also be enhanced by using this approach.

Our proposed model can be secured in the techniques mentioned above. The overall demonstration of the cyber security portion of the proposed model can be seen in Fig. 5. The device present at the device layer and the most important layer, i.e., network, has the vulnerability from multi-level attacks. We have to apply security in data transmission on the second layer by using ECDSA and SHA-256 algorithms for encrypted data transfer and IP-address verification through verification code generation technique along with the anomaly detection using machine learning approach in which we can apply Support Vector Machine (SVM) technique to classify the anomalies in the unknown data. It can classify defective and non-defective datasets, which can save our time to manual and traditional classification and more accuracy so that the information exchange can occur securely.

Fig. 5
figure 5

Overall cyber security demonstration of home automation devices

6 Experimental Evaluation

The Arduino is powered via the USB cable through a laptop or PC. The relays are connected to the output ports of the Arduino. The appliances are connected to the relays; the relays are behaving just like a switch. The system has three main components, the Arduino board, sensors, and a Wi-Fi module. Figure 6 shows an experimental evaluation of the Hardware model of the proposed home automation system. The hardware model is successfully tested on various smartphones and laptops.

Fig. 6
figure 6

Experimental setup of proposed home automation system

7 Conclusion and Future Research Challenges

This paper proposes a fundamental design of a cyber-secured and smart-home automation system based on Arduino microcontroller and the hardware model is successfully implemented. The key features of this design are low cost, effective, scalable, fast responsive, straightforward implementation, and online compatibility. Moreover, the user can use the system with the help of a smartphone by just downloading an application named Blynk. The system is capable of performing tasks on its own. In security aspects, the proposed system is smart and cyber-secured with multi-level security that can produce a tangible innovation roadmap with real impact, and the system can maintain the security triad, i.e., Confidentiality, Integrity, and Availability (CIA). If anyone wants to get unauthorized access or manipulate the exchanged information, it cannot be done easily; it has to crack the multi-layered security of the system.

In the future, there will be the use of some AI-based techniques to automate the system's security that can detect and correct if any vulnerabilities occur in the system. Because the Arduino MEGA has more pins than the Arduino Uno, the same work may be expanded. Controlling only a few items can be addressed by expanding automation to all other home appliances. Security cameras may be operated, allowing the user to watch what is going on around their home or company. Motion sensors may be used in security systems to detect any illegal movement and alert the user. Through Wi-Fi and sensor signals, the scope of this work may be expanded to numerous locations, rather than being limited to only the home.