You are currently viewing a new version of our website. To view the old version click .
Engineering Proceedings
  • Proceeding Paper
  • Open Access

16 January 2024

Towards Comprehensive Home Automation: Leveraging the IoT, Node-RED, and Wireless Sensor Networks for Enhanced Control and Connectivity †

,
,
and
1
Department of Information Science & Engineering, Prerana Educational Society Institute of Technology and Management (PESITM), Shimoga 577204, Karnataka, India
2
Department of Information Science & Engineering, Nitte Meenakshi Institute of Technology, Bangalore 560064, Karnataka, India
3
Department of Information Technology, Manipal Institute of Technology Bengaluru, Manipal Academy of Higher Education, Manipal 570064, Karnataka, India
*
Author to whom correspondence should be addressed.
This article belongs to the Proceedings Eng. Proc., 2023, RAiSE-2023

Abstract

Automation seems widespread today, yet it is not implemented in daily life. However, most home automation systems are expensive, object-dependent, and lacking in crucial features. The Internet of Things was enabled by this paper’s low-cost home automation system. For development of the IoT, the system used Node-RED, an open-source platform that uses nodes to visualize tasks. This innovation could operate home devices, including plugs, from anywhere. Wireless sensor network (WSN) technology would record and upload data to the web server from each room. Using the publish-and-subscribe Message Queuing Telemetry Transport (MQTT) protocol, these WSN technologies would communicate. The third feature can modify notifications. In situations of doubt, the house member would be notified by email. This proposal promotes home automation through the IoT.

1. Introduction

Electronics, software, and networking connect gadgets, homes, appliances, and other embedded systems on the Internet of Things (IoT) [1]. The IoT connects phones, appliances, laptops, smartphones, and tablets to share data. The variesrnet and human-free IoT vary in many ways. Computers and smartphones may handle key home activities with IoT-enabled wireless home automation. Unique wireless home automation solves various appliance issues [2,3]. This new online hardware control solves most problems. Smart home automation improves energy efficiency, convenience, and functionality [4]. Robotic housework involves less human intervention and more programmable electronics and technically feasible domestic operations. Home automation is trendy. Remote device control via workstations, tablets, and phones is home automation’s key feature.
Wired or wireless links connect devices to hardware languages termed home automation protocols or home control technologies [5]. Multiple communication protocols exist for home automation. MQTT links IoT devices to the network as an application layer. Browsers layer desktop, laptop, and mobile apps. IoT firmware or OS embedded may provide a UI dashboard. Low-bandwidth devices use MQTT, a basic protocol. This makes it the best IoT solution. It can read and publish sensor node data, send control output commands, etc., with MQTT. Connecting gadgets is straightforward.
Figure 1 depicts the architecture of MQTT. MQTT is the publish and subscribe protocol. A device can publish a message on a topic or subscribe to a certain topic in a publish and subscribe system to receive communications. The MQTT broker receives all the messages, filters them, determines who is interested in them, and then publishes the messages to all the clients who have subscribed.
Figure 1. General overview of the MQTT broker.
The Raspberry Pi, a small but feature-rich single-board computer, can run the Mos-quito broker, which this home automation application used [6]. The Raspberry Pi becomes a mini-PC with a keyboard, mouse, and display. The project to link home to Wi-Fi utilizes Raspberry Pi as the main processor. MQTT connects the Raspberry Pi to the ESP8266. Every household that has ESP8266 is Wi-Fi-connected. A Raspberry Pi will help these subsystems connect wirelessly and transform data using MQTT on Wi-Fi. The ESP’s subsystem control unit controls all house electrical devices. Wi-Fi links ESP and Raspberry Pi. The ESP oversees household electrical equipment. NodeRed, a workflow-based programming tool, connects hardware, APIs, and web services elegantly. It supports edge devices, PLC controllers, virtual computers, and cloud native services. The IoT wiring visual editor NodeRed is open source. It uses drag and wire icon-like “nodes” in the system. MQTT nodes subscribe to a message broker and insert data into the process, while simple debug nodes examine data flow. Table 1 compares MQTT’s efficacy to protocols. NodeRed can be upgraded with plug-ins. One dashboard with APIs and GUI dashboards for most home automation systems, including garden, room, garage, and kitchen, is possible with NodeRed. Controlling home appliances is simple [7].
Table 1. Comparison table to show the efficiency of the MQTT protocol over other traditional protocols.
Following is the arrangement of the sections of this paper: Section 2 discusses the research that has already been conducted on home automation systems and the technology that has been adopted. The proposed methodology is described in Section 3. Section 4 focuses on data security and cybersecurity measures for Internet of Things devices. Section 5 discusses the collected empirical findings. The emphasis in Section 6 is on the conclusions.

3. Methodology

The suggested system uses MQTT to allow global access to household devices. The proposed design uses the basic unit, which is connected to the house’s Wi-Fi. Each room is a node in the WSN, with sensors added accordingly. With IoT-enabled machine-to-machine connectivity, the real world may become virtual. The credit card-sized middle unit contains a Raspberry Pi. It will connect to the main processing center, the home Wi-Fi. This central device will be connected using ESP, a Wi-Fi microcontroller. The house will contain Wi-Fi-connected ESP8266 subsystems in every room. These components will wirelessly communicate with the Raspberry Pi via MQTT [15]. Table 3 lists MQTT broker installation commands. Control, data logging, and notification comprise this subsystem. Home electrical equipment will be connected to subsystems [13]. These subsystems are controlled by ESP. Wi-Fi connects ESP to the Raspberry. As such, a web server can control any electrical device. A web server with secure, inspectable Ngrok tunneling and debugging for local host webhooks can access the Raspberry Pi globally. The second function logs sensor data from temperature, humidity, light, LPG gas, and motion sensors.
Table 3. Commands to install the MQTT broker.
A Raspberry PI will receive all sensor values from the web server via ESP before uploading them. These readings make home visualization easy worldwide. Notification messages are essential to home automation, but not to the third feature. Sensor and electrical equipment thresholds will be set for respective conditions. So, users will be notified via email or Twitter of readings above this level [14]. IoT devices often have weak default logins. De-fault credentials should always be utilized. Secure objects need constant updating. Separating IoT devices from the main network prevents backdoors. These concerns require encrypted device–Node-RED communication. Connected devices should be scanned for vulnerabilities regularly, including advanced home automation with IoT, Node-RED, and WSNs for control and connectivity. Node-RED detects huge and subtle issues like sensor discrepancies using numerous data sources. Critical alerts and minor logs are sent by adaptive notifications in real time. This system provides precise environmental monitoring and adjustable warnings for home security and efficiency with user input and AI integration. The API and GUI are developed by Node-RED, a powerful open-source IoT solution. Node-RED creates graphical dashboards for home automation subsystems including the garage, garden, kitchen, and other rooms, allowing users to access their house from anywhere. Node-RED comes pre-installed with Raspberry Pi OS, but if you need to install or upgrade, the following commands can be used:
Ngrok will establish SSH connection through API or the dashboard to Raspberry Pi from outside the home. Raspberry Pi 3 will act as a central unit where control, data logging, and notification features will be processed through this unit. MQTT will act as a mediator to establish wireless communication between Raspberry Pi 3 and ESP8266. One effective technology that has acquired a lot of interest in the field is Node-RED, especially when it comes to home automation.
Node-RED is a visual programming tool that transforms home automation by allowing users to easily create custom workflows. It connects various smart home devices like sensors and lights through a user-friendly interface, where each node represents a different device or function. Node-RED supports numerous communication protocols and is versatile enough to work with a range of smart home gadgets. It enables personalized automation scenarios, such as adjusting thermostats based on occupancy or weather conditions. More than just connecting devices, Node-RED processes data and makes intelligent decisions for home management. It can run on multiple platforms, from Raspberry Pi to servers, offering a local, secure solution for home automation. The active Node-RED community continuously expands its capabilities, enhancing home comfort, convenience, and security in a highly customized way.
A sophisticated tool, Ngrok, provides a secure tunnel to your local host, exposing a local server to the internet. The main Ngrok features are as follows:
HTTP/HTTPS/TCP Tunnels: Ngrok tunnels HTTP/HTTPS and raw TCP traffic.
When Ngrok is running, we can access http://localhost:4040 to view a web interface that shows request details, replay requests, and more. We can use our own custom domain or reserve a particular ngrok.io subdomain to ensure it remains the same across sessions. We can run multiple tunnels simultaneously to expose more than one local service. We can choose a specific region for a tunnel to optimize latency. The whole concept of the proposed system is shown in Figure 4.
Figure 4. Block diagram of the proposed model.
Any IoT system can be illustrated this way. All sensor data is processed on the Raspberry Pi. ESPs connect this sensor to the Raspberry Pi via Wi-Fi using MQTT. Users can access control, data logging, and notification by API, graphical user interface, or the dashboard from anywhere in the world. When the user is away, Ngrok can connect to a Raspberry Pi over SSH after authentication. Event-triggered email notification systems deliver emails. Web applications, monitoring tools, e-commerce platforms, and other services use these systems to notify users of updates, alerts, and confirmations. The setting up of an email notification system is as follows: We can set up our own MQTT server; it is often easier and more reliable to use an email service provider like SendGrid, Mailgun, Amazon SES, etc. These platforms handle deliverability, scaling, and often provide features like templating and analytics. Most email service providers offer APIs. Their API can be integrated into your application so you can programmatically send emails. Email templates can be designed for different notifications. Modern email templates should be responsive and tested across various email clients. Then, it should be determined when emails should be sent. For example, if you are setting up a notification for user registration, the trigger would be the completion of the registration process [16,17,18].

4. Cybersecurity Measures for IoT Devices and Data Security

Integrating IoT devices into home automation enhances convenience but introduces cybersecurity risks. Key security measures include two-factor authentication for devices like smart locks, regular software updates, and network separation to prevent cross-device attacks. Encrypting data ensures communication safety, while managing device permissions prevents unauthorized use. API security is crucial for safe third-party integrations, and the physical placement of devices like servers is important for added security. Staying informed about current cybersecurity threats and vulnerabilities is also essential for robust protection [19,20,21,22].

5. Result Analysis and Discussion

Raspbian Jessie with pixel or lite might be the firmware for the Raspberry Pi. Installing Node-RED on a Raspberry Pi is a prerequisite for using it. Overview of the Node-RED application is shown in Figure 5a. The commands to install Node-RED are shown in Figure 5b. After installing Node-RED on Raspberry Pi, open the browser, enter the address http://YOUR RPi IP ADDRESS:1880, and open the application window, which gives the platform to design the dashboard and graphical user interface as per the requirements. After the installation of Node-RED on Raspberry Pi, install the MQTT broker on Raspbian OS. Below are the commands to install the MQTT broker. A dashboard or app can be created for home automation after installing MQTT on a Raspberry Pi; Figure 5b displays an example dashboard for user-controlled light and fan control.
Figure 5. (a) Overview of the Node-RED application and (b) Sample dashboard for controlling light and fan by user.
The metric with the highest value data, 98%, has been highlighted in cyan as shown in Figure 6a. From thorough evaluation, we observed that lower response time values were better, indicating quicker responses and in terms of energy saving. The uptime obtained was closer to 100% meaning the system was more reliable. The data transmission speed was satisfactory and rate of data transmission between devices was faster. On a scale of 1 to 10, higher values indicate better user satisfaction.
Figure 6. (a) Graph representing the efficiency metrics for a comprehensive home automation system and (b) Visualization of error rates across various components using heat map.
A heatmap provides an intuitive visualization of error rates across various components and models, allowing for easy comparison. In this context, we have used a heatmap to compare error rates across different components/functions of the home automation system for various models or iterations. Darker shades indicate higher error rates, while lighter shades indicate lower error rates. The annotated numbers in each cell provide the exact hypothetical error rate percentages as shown in Figure 6b.

6. Conclusions

The market’s home automation system’s software architecture was replaced with cutting-edge technology. This system aims to provide a comfortable home and an effective home management system. This system employs MQTT, a lightweight protocol that speeds up device communication. Node-RED is a powerful open-source IoT tool for creating IoT applications. This system has an outlet control system, a web server for sensor data, and an email notification system. These capabilities are accessible worldwide via a web server. The Ngrok API will establish the SSH connection. Raspberry Pi 3 will be the main processor for control, data logging, and notifications.

Author Contributions

Each author of this paper have made substantial and distinct contributions. L.T. took the lead in conceptualizing and initiating the project, designing the low-cost home automation system, and implementing IoT components alongside the Node-RED platform for task visualization. M.K.M. offered critical insights into existing home automation challenges, contributed to system design, and assisted in remote device control. S.D.S. participated in system design and development, optimizing the Node-RED platform, and refining remote control features. P.B. collaborated on system design and optimization, focusing on enhancing remote control and connectivity. All authors actively participated in integrating Wireless Sensor Network (WSN) technology, data recording, MQTT communication, and notification features, collectively promoting home automation through the IoT. Additionally, they jointly contributed to manuscript preparation and finalization, ensuring the accurate representation of their individual roles. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not Applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Stolojescu-Crisan, C.; Crisan, C.; Butunoi, B.-P. An IoT-based smart home automation system. Sensors 2021, 21, 3784. [Google Scholar] [CrossRef] [PubMed]
  2. Islam, R.; Rahman, M.W.; Rubaiat, R.; Hasan, M.M.; Reza, M.M.; Rahman, M.M. Lora and server-based home automation using the internet of things (IoT). J. King Saud Univ. Comput. Inf. Sci. 2022, 34, 3703–3712. [Google Scholar]
  3. Parameshachari, B.D.; Gopy, S.K.; Hurry, G.; Gopaul, T.T. A study on smart home control system through speech. Int. J. Comput. Appl. 2013, 69, 30–39. [Google Scholar]
  4. Popa, D.; Pop, F.; Serbanescu, C.; Castiglione, A. Deep learning model for home automation and energy reduction in a smart home environment platform. Neural Comput. Appl. 2019, 31, 1317–1337. [Google Scholar]
  5. Priya, S.S.; Rachana, P.; Manoj, B.M.; Aramoti, S.; Fathima, S. Home automation by speech detection system using deep learning. In Proceedings of the 2022 International Conference on Smart Technologies and Systems for Next Generation Computing (ICSTSN), Virtual, 25–26 March 2022; pp. 1–5. [Google Scholar]
  6. Ngerem, E.; Misra, S.; Oluranti, J.; Castillo-Beltran, H.; Ahuja, R.; Damasevicius, R. A home automation system based on bluetooth technology using an android smartphone. In Evolving Technologies for Computing, Communication and Smart World; Springer: Berlin/Heidelberg, Germany, 2021; pp. 527–536. [Google Scholar]
  7. Gladence, L.M.; Anu, V.M.; Rathna, R.; Brumancia, E. Recommender system for home automation using IoT and artificial intelligence. J. Ambient. Intell. Humaniz. Comput. 2020, 7, 1–9. [Google Scholar]
  8. Shafeer, T.; Arumugam, M.S.; Sasikala, A. On the design and applications of an integrated smart home automation. In Data Intelligence and Cognitive Informatics; Springer: Berlin/Heidelberg, Germany, 2021; pp. 35–52. [Google Scholar]
  9. Kunal, D.; Tushar, D.; Pooja, U.; Vaibhav, Z.; Lodha, V. Smart home automation using IoT. Int. J. Adv. Res. Comput. Commun. Eng. 2016, 5, 19–33. [Google Scholar]
  10. Santhi, H.; Gayathri, P. A review of home automation using IoT applications. Int. J. Comput. Sci. Eng. Technol. 2016, 3, 2229–3345. [Google Scholar]
  11. Rimavicius, M. Literature Review of the Internet of Things: Anticipating Tomorrow’s Challenges for Privacy and Security; Washington University: St. Louis, MO, USA, 2015. [Google Scholar]
  12. Kaur, R.; Vats, P.; Mandot, M.; Biswas, S.S.; Garg, R. Literature survey for IoT-based smart home automation: A comparative analysis. In Proceedings of the 2021 9th International Conference on Reliability, Infocom Technologies and Optimization (Trends and Future Directions) (ICRITO), Noida, India, 3–4 September 2021; pp. 1–6. [Google Scholar]
  13. Gomez, C.; Paradells, J. Wireless home automation networks: A survey of architecture and technologies. IEEE Commun. Mag. 2010, 48, 92–101. [Google Scholar] [CrossRef]
  14. Chowdhury, M.N.; Nooman, M.S.; Sarker, S. Access control of door and home security by raspberry pi through internet. Int. J. Sci. Eng. Res. 2013, 4, 550–558. [Google Scholar]
  15. Molloy, D. Wireless communication and control. In Exploring Raspberry Pi; John Wiley & Sons, Inc.: Hoboken, NJ, USA, 2016; pp. 535–575. [Google Scholar]
  16. Krishnamoorthy, R.; Kumar, N.; Grebennikov, A.; Ramiah, H. A high-efficiency Ultra-Broadband mixed-mode Gan HEMT power amplifier. IEEE Trans. Circuits Syst. II Express Briefs 2018, 65, 1929–1933. [Google Scholar] [CrossRef]
  17. Vitee, N.; Ramiah, H.; Mak, P.-I.; Yin, J.; Martins, R.P. A 3.15-MW +16.0-DBM IIP3 22-DB CG inductively source degenerated balun-lna mixer with integrated transformer-based gate inductor and IM2 injection technique. IEEE Trans. Very Large Scale Integr. (VLSI) Syst. 2020, 28, 700–713. [Google Scholar]
  18. Eswaran, U.; Ramiah, H.; Kanesan, J. Power amplifier design methodologies for Next Generation Wireless Communications. IETE Tech. Rev. 2014, 31, 241–248. [Google Scholar] [CrossRef]
  19. Chong, G.; Ramiah, H.; Yin, J.; Rajendran, J.; Wong, W.R.; Mak, P.-I.; Martins, R.P. CMOS cross-coupled differential-drive rectifier in subthreshold operation for ambient RF Energy Harvesting—Model and analysis. IEEE Trans. Circuits Syst. II Express Briefs 2019, 66, 1942–1946. [Google Scholar]
  20. Tan, G.H.; Ramiah, H.; Mak, P.-I.; Martins, R.P. A 0.35-V 520- μW 2.4-GHz current-bleeding mixer with inductive-gate and forward-body bias, achieving >13-DB conversion gain and >55-DB port-to-port isolation. IEEE Trans. Microw. Theory Tech. 2017, 65, 1284–1293. [Google Scholar] [CrossRef]
  21. Kumar, S.; Gupta, U.; Singh, A.K.; Singh, A.K. Artificial Intelligence: Revolutionizing Cyber Security in the Digital Era. J. Comput. Mech. Manag. 2023, 2, 31–42. [Google Scholar] [CrossRef]
  22. Kumar, S. Reviewing Software Testing Models and Optimization Techniques: An Analysis of Efficiency and Advancement Needs. J. Comput. Mech. Manag. 2023, 2, 43–55. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.