0% found this document useful (0 votes)
8 views113 pages

Sample Project Report by OM Baval

The project report titled 'Smart Lifestyle Automation' presents a prototype system aimed at enhancing home automation through interconnected devices and sensors, leveraging artificial intelligence and machine learning to adapt to user preferences. It addresses existing challenges in home automation, such as interoperability and limited intelligence, and proposes solutions to improve energy efficiency and user convenience across various settings. The project is a collaborative effort by students at Parul University, guided by faculty, and supported by various mentors and organizations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views113 pages

Sample Project Report by OM Baval

The project report titled 'Smart Lifestyle Automation' presents a prototype system aimed at enhancing home automation through interconnected devices and sensors, leveraging artificial intelligence and machine learning to adapt to user preferences. It addresses existing challenges in home automation, such as interoperability and limited intelligence, and proposes solutions to improve energy efficiency and user convenience across various settings. The project is a collaborative effort by students at Parul University, guided by faculty, and supported by various mentors and organizations.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

SMART LIFESTYLE AUTOMATION

A Project Report

Submitted By

Om Nilesh Baval
200303124037

Riya Maheshkumar Koradia


200303124053

Dwijen Nilesh Mehta


200305113006

in Partial Fulfilment For the Award of

the Degree of

BACHELOR OF TECHNOLOGY

COMPUTER SCIENCE AND ENGINEERING

Under the Guidance of

Prof.(Dr.) Chintan Thacker

Assistant Professor

PARUL UNIVERSITY

VADODARA

October - 2023
PARUL UNIVERSITY
C ERTIFICATE
This is to Certify that Project - 2 -Subject code 203105400 of 7th Semester entitled “Smart Lifestyle
Automation” of Group No. PIET CSE 111 has been successfully completed by

• OM NILESH BAVAL- 200303124037

• RIYA MAHESHKUMAR KORADIA- 200303124053

• DWIJEN NILESH MEHTA- 200305113006

under my guidance in partial fulfillment of the Bachelor of Technology ([Link]) in Computer


Science and Engineering of Parul University in Academic Year 2023- 2024.
Date of Submission :-

Prof.(Dr.) Chintan Thacker, Head of Department,

Project Guide Dr. Amit Barve

CSE, PIET

Project Coordinator:- Parul University

External Examiner

ii
Acknowledgements

“The single greatest cause of happiness is gratitude.”

-Auliq-Ice

We are writing to express our sincere appreciation and gratitude to several individuals who
have supported us in the completion of our project.

Firstly, we would like to thank our parents, who have always been our pillars of strength,
encouragement, and inspiration. Their unwavering love, support, and guidance have been
instrumental in helping us achieve our academic goals. We are truly grateful for their continuous
encouragement and belief in us.

Secondly, we would like to thank God for providing us with the strength and perseverance to
complete this project. We are grateful for the blessings and opportunities that have come our way
and for guiding us through every step of this journey.

Thirdly, we would like to extend our gratitude to the faculty mentor Dr Chintan Thacker. He
has been with us every time we needed his support and guidance. We thank him from bottom of our
heart.

Under aegis of Alumni Student Mentorship Program ASMP we have been allocated an alumni
mentor Mr. Umang Baraiya who have provided us with the necessary guidance, support, and
feedback throughout the project. We also express our sincere gratitude towards Dr Gaurav Ameta,
Mr. Bharat Tank and Dr Vipul Dabhi. Their expertise and guidance have been invaluable in
helping us achieve our research goals and producing a high-quality report. We also express our
gratitude towards Student Start-up and Innovation Policy (SSIP), Ministry of Education
Government of Gujarat and Parul Innovation and Entrepreneurship Research Centre (PIERC) for
providing us financial support to make this project a reality and tirelessly working towards
commercialization of this product . We thank Mr. Jay Sudani, Mr. Apurva Bhayani, Mr. Hutesh
Baviskar and Mrs. Sonal Sudani of Entrepreneurship Development Cell (EDC), Parul University
for their idea inputs towards this project.

During this project we got an opportunity to join a prestigious Indian Summer School Young
Entrepreneur’s Exchange project by Parul University, India and Bern University of Applied
Sciences, Switzerland. We express heartfelt thanks to Aron Braun and Claudia Vogel. Along with
these mentors we extend our gratitude to our Swiss team members Maxime Charrière and Lizette
Mülchi

We thank Head of the Department of CSE (PIET), Dr Amit Barve and Head of the Department
of Mechatronics (PIT) and our faculty guide from the Department of Mechatronics, Dr Heli Shah
for supporting us.

Lastly, we would like to acknowledge all the other individuals who have provided me with
support and assistance in various forms during the project.

Once again, thank you to everyone who has supported me throughout this project. We are
grateful for your contributions and could not have done it without you.

Om Nilesh Baval
Dwijen Nilesh Mehta
Riya Maheshkumar Koradia
[Link].
Parul University,
Vadodara

iv
Abstract

Existing home automation systems have been around for several years and have provided users
with a wide range of benefits, such as convenience, energy savings, and increased security.
However, these systems have also faced several challenges that have limited their adoption and
effectiveness. One of the main problems with existing home automation systems is their lack of
interoperability. Many systems rely on proprietary technologies that do not communicate with other
systems, making it difficult for users to integrate and control multiple devices and appliances from
different manufacturers. Another problem with existing home automation systems is their limited
intelligence. Many systems rely on preprogrammed rules and schedules, which may not always
reflect users’ preferences and habits. This limited intelligence also means that the system cannot
adapt to changing conditions or learn from users’ behaviours. Lifestyle automation refers to the use
of technology and automation to simplify and optimize various aspects of our daily lives, such as
managing our homes, health, and productivity. This project aims to explore the potential benefits of
lifestyle automation and to develop a prototype system that can automate various tasks and
activities. The prototype system will consist of various interconnected devices and sensors,
including smart home devices, wearable. These devices will be integrated with a central automation
platform that will enable users to control and monitor various aspects of their lifestyle, such as
temperature control, lighting and sleep. The system will leverage artificial intelligence, machine
learning and Reinforcement Learning algorithms to learn users’ preferences and habits and to
automate tasks accordingly. For example, the system may adjust the temperature and lighting based
on users’ preferences and schedule.

This system can also be utilized in other settings as well. Such as, commercial complexes,
Hospitality Industry, Industrial Plants, Manufacturing Units and many more. Versatility of this
system make it more novel in nature. One thing common in the above industries is there significantly
high energy consumption. These systems can play a pivotal role in enhancing energy efficiency and
optimizing the process.
Table of Contents

Acknowledgements iii

Abstract v

Table of Contents vi

List of Tables xi

List of Figures xii

List of Algorithms xiv

1 Introduction 1

1.1 Drawbacks of the existing solution . . . . . . . . . . . . . . . . . . . . . . . . . . 2

1.2 Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.1 Energy efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.2 Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

1.2.3 Comfort and convenience . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2.4 Entertainment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.2.5 Predictive Maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

1.3 Aim and Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Literature Survey 6

vi
TABLE OF CONTENTS

2.1 Critical Evaluation of available literature . . . . . . . . . . . . . . . . . . . . . . . 6

2.1.1 Paper 1: “Smart Home Automation: A Literature Review” by Vaishnavi S.

Gunge and Pratibha S. Yalagi [10 ] . . . . . . . . . . . . . . . . . . . . . . 6

2.1.2 Paper 2: “Voice Controlled Home Automation System using Natural

Language Processing (NLP) and Internet of Things (IoT)” by Mrs. Paul

Jasmin Rani, Jason Bakthakumar, Praveen Kumar B., Praveen Kumar U.

and Santosh Kumar [23 ] . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2.1.3 Paper 3: ”Home Automation System with the use of Internet of Things and

Artificial Intelligence” by Yukti Arora, Harsh Pant, Dr Banita [3 ] . . . . . . 8

2.1.4 Paper 4: ”Automation of Home (IoT) using Raspberry Pi” by Prajakta

Khairnar, Sukanya Bansode, Balveen Sahota, Priyanka Chourasia. [14 ] . . . 9

2.1.5 Paper 5: ”Smart Energy Efficient Security and Intelligent Home Automation

Using IoT with Cloud Organizing” by Himanshu Chandak, Prof. Ayushi

Jaiswal, Hitesh Dhoke, Pranay Kumar Juwar and Chandan Singh [5 ] . . . . 9

2.1.6 Paper 6: ”iHAS: An Intelligent Home Automation Based System for Smart

City” by Shaik Mulla Shabber, Mohan Bansal, P. Mrudula Devi and Prateek

Jain [24 ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

2.1.7 Paper 7: ”A Smart and Intelligent Home Automation System” by Rahat

Bin Aziz Tonoy, Mahmudunnabi, Hasan Mohiuddin Zilany and Rashedur

M. Rahman [26 ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2.1.8 Paper 8: ”Intelligent Home Automation System Using BitVoicer” by

Muhammad Aamir Aman, Md. Nauman Naeem, Ali Shahab, Fazl e Jamil

and Mehr E Munir [15 ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

2.1.9 Paper 9: ”A Security Framework for IoT based Smart Home Automation

System” by Nazmul Hossain, Md. Alam Hossain, Rafia Sultana and Farzana

Akter Lima [11 ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

vii
TABLE OF CONTENTS

2.1.10 Paper 10: ”Smart Home Personalizing Services Based on Adaptive Cloud

IoT Devices with Bigdata and Deep Learning Technique” Jain-Shing Wu,

Member, IEEE and Ming-Shen Jian, Member, IEEE [27 ] . . . . . . . . . . 13

2.1.11 Paper 11: ”Speech Recognition using AI” by Swanand Raje, Gaurang Joshi,

Ameya Dolas, Sukrut Lagu and Prof. Smita Lonkar [21 ] . . . . . . . . . . 14

2.1.12 Paper 12: ”Design and Implementation of Artificial Intelligence (AI) Based

Home Automation” Mehul Manhas, Divij Sanduja, Nikhil Aggarwal and

Rashmi Vashisth [17 ] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

2.1.13 Paper 13: ”A Review on Advanced Home Automation System using GSM

and AI” by Shruti S. Gulkari, Snehal R. Raut, Manthan M. Meshram,

Siddhanth S. Wase and N.M. Chore [9 ] . . . . . . . . . . . . . . . . . . . 15

2.1.14 Paper 14: “HomeIO: Offline Smart Home Automatic System with

Automatic Speech Recognition and Household Power Usage Tracking” by

I.B.C. Irugalbandara, A.S.M. Naseem, M.S.H. Perera and V. Logeeshan [12 ] 15

2.1.15 Paper 15: “Analysis and Design of Energy Efficient Protocols for Wireless

Sensor Networks” by Gaurav P. Dave and Dr Jayshankar N. [7 ] . . . . . . . 16

2.2 Other Papers Reviewed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3 Project Flow and Methodology 18

3.1 Hardware Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3.1.1 Development Boards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

3.1.2 Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

3.1.3 Sensor Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3.1.4 Assistive Debugging and User-Facing hardware . . . . . . . . . . . . . . . 32

3.2 Cloud Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.2.1 Comparison of AWS with other major cloud services . . . . . . . . . . . . 36

3.3 Artificial Intelligence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

viii
TABLE OF CONTENTS

3.3.1 Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

3.3.2 Deep Reinforcement Learning . . . . . . . . . . . . . . . . . . . . . . . . 42

3.3.3 Proposed Algorithm: Proximal Policy Optimization . . . . . . . . . . . . . 45

3.3.4 Natural Language Processing . . . . . . . . . . . . . . . . . . . . . . . . 48

3.3.5 Computer Vision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

3.3.6 AI/ML on AWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

3.3.7 Why is deep learning better than ML for unstructured data . . . . . . . . . 54

3.4 Mobile Application and Website . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

3.4.1 UI/UX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56

3.4.2 Flutter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

3.4.3 MERN Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

3.4.4 Postman API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

3.4.5 AWS API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58

3.5 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

3.6 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60

3.7 Communication Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

3.7.1 Wired Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

3.7.2 Wireless Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . 69

3.7.3 Communication Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 73

3.8 AWS Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74

3.8.1 AWS Data Processing and Integration Pipeline . . . . . . . . . . . . . . . 75

3.8.2 AWS Lambda . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

3.8.3 Amazon S3 (Simple Storage Service) . . . . . . . . . . . . . . . . . . . . 78

3.8.4 Amazon DynamoDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

3.8.5 Amazon SageMaker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

3.8.6 AWS IoT Core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81

ix
TABLE OF CONTENTS

3.8.7 AWS IoT Greengrass . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

4 Results and Analysis 85

4.1 Tools and Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85

4.2 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

4.2.1 Quantitaive Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87

4.3 List of Research Paper Publication . . . . . . . . . . . . . . . . . . . . . . . . . . 91

5 Conclusion and Future Works 92

5.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

5.2 Future Prospectus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

x
List of Tables

3.1 Comparison of AWS, GCP, and Azure services. . . . . . . . . . . . . . . . . . . . 36


3.2 Comparison of AWS, GCP, and Azure IoT services. . . . . . . . . . . . . . . . . . 37
3.3 Key Reasons to choose AWS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
3.4 Comparison of DRL with other Deep Learning architectures for home automation. 45
3.5 Comparison of PPO with other Deep Learning architectures for reinforcement
learning tasks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.6 Table of comparison of the main features between Deep Learning and Machine
Learning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.7 Comparison of UART, I²C, and SPI . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.8 Development Boards and Their Communication Protocols . . . . . . . . . . . . . 73

4.1 Tools and Technologies Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85


4.2 Comparative analysis of traditional home automation systems vs. Smart Lifestyle
Automation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4.3 RNN vs PPO Results Table for Complex Case Scenerio . . . . . . . . . . . . . . . 89
4.4 List of Research Paper Publications . . . . . . . . . . . . . . . . . . . . . . . . . 91

xi
List of Figures

1.1 Overview of AI based Smart Lifestyle Automation System . . . . . . . . . . . . . 1


1.2 Block Diagram of the system to overcome these Traditional Drawbacks . . . . . . 2

2.1 Connected Papers diagram for other literature reviewed . . . . . . . . . . . . . . . 17

3.1 Raspberry Pi 4 Model B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20


3.2 Node MCU ESP 8266 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3 UNO R3 WIFI ESP8266 ATMEGA328 CH340G . . . . . . . . . . . . . . . . . . 22
3.4 UNO R3 WIFI ESP8266 ATMEGA328 CH340G DIP Switch . . . . . . . . . . . . 23
3.5 Speak (Voice) Recognition Module V3 . . . . . . . . . . . . . . . . . . . . . . . . 24
3.6 GY-7620 Gesture Recognition PAJ7620U2 . . . . . . . . . . . . . . . . . . . . . 25
3.7 DFRobot DHT22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.8 SeeedStudio Grove digital PIR Motion Sensor . . . . . . . . . . . . . . . . . . . . 26
3.9 FlexiForce FlexiPort Ring Position Sensor . . . . . . . . . . . . . . . . . . . . . . 27
3.10 TTP226 8-way capacitive touch switch . . . . . . . . . . . . . . . . . . . . . . . . 27
3.11 NFC Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.12 4 Channel AC programmable light dimmer module . . . . . . . . . . . . . . . . . 29
3.13 SparkFun Wi-Fi IR Blaster . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.14 RFID Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.15 L298 Bidirectional Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.16 4 Channel 5V Relay Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.17 RGB LED Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.18 I2C Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.19 4 Digit 7 Segment Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.20 Waveshare 10.1-inch Resistive HDMI LCD Display 1024x600 . . . . . . . . . . . 35
3.21 Sub Divisions of Artificial Intelligence . . . . . . . . . . . . . . . . . . . . . . . . 39

xii
3.22 Recurrent Neural Networks (RNNs) . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.23 Convolutional Neural Networks (CNNs) . . . . . . . . . . . . . . . . . . . . . . . 41
3.24 Deep Reinforcement Learning (DRL) . . . . . . . . . . . . . . . . . . . . . . . . 42
3.25 Autoencoder Neural Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.26 Natural Language Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.27 Computer Vision as subset of AI . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.28 System Hardware (IoT) Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.29 RobotDyn UNO R3 Schemetic diagram . . . . . . . . . . . . . . . . . . . . . . . 61
3.30 RobotDyn UNO R3 ESP Pool Pin diagram . . . . . . . . . . . . . . . . . . . . . . 61
3.31 Node MCU ESP 8266 Schemetic diagram . . . . . . . . . . . . . . . . . . . . . . 62
3.32 Raspberry Pi 4 Schemetic Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.33 Raspberry Pi 4 Pin Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.34 SparkFun WiFi IR Blaster Pinout . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.35 Circuit Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.36 Serial VS Parallel Communication . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.37 Protocols available in Serial Communication . . . . . . . . . . . . . . . . . . . . . 67
3.38 UART (Tx/Rx) Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.39 I2C Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.40 ATmega ESP internal UART (Tx/Rx) Communication . . . . . . . . . . . . . . . . 69
3.41 Modes of communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.42 MQTT Publish and Subscribe Model . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.43 Basic MQTT Communication Protocol working . . . . . . . . . . . . . . . . . . . 71
3.44 MQTT Raspberry Pi and Arduino/NodeMCU Example . . . . . . . . . . . . . . . 72
3.45 MQTT SN System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.46 Communication Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
3.47 AWS Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

4.1 RNN vs PPO in simple case scenario . . . . . . . . . . . . . . . . . . . . . . . . . 88


4.2 RNN vs PPO in Complex case scenario . . . . . . . . . . . . . . . . . . . . . . . 89
4.3 Original Project Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.4 Miniature Environment setting for the system . . . . . . . . . . . . . . . . . . . . 91
List of Algorithms

1 Proximal Policy Optimization (PPO) . . . . . . . . . . . . . . . . . . . . . . . . . 48

xiv
Chapter 1

Introduction

Home automation is the process of using technology to automate various tasks and functions in
your home, such as turning lights on and off, adjusting the temperature, and even opening and
closing your blinds. An AI-based lifestyle automation project takes this concept one step further by
incorporating artificial intelligence to create a more intelligent and intuitive system.

The basic idea behind a Smart Lifestyle Automation project is to use machine learning algorithms
to learn your behaviour and preferences over time, and then use that information to automate tasks
and make suggestions to improve your living experience. For example, if you typically turn on your
lights at a certain time each day, the AI system can learn that pattern and automatically turn the
lights on for you in the future.

Figure 1.1: Overview of AI based Smart Lifestyle Automation System

1
CHAPTER 1. INTRODUCTION

1.1 Drawbacks of the existing solution


1. Lack of Interoperability: Many home automation devices and platforms don’t work
seamlessly with each other. Even with standard protocols like Zigbee and Z-Wave, there are
devices that aren’t compatible.

2. Reliance on Internet Connectivity: Many systems need an active internet connection to


function. Areas with unreliable or spotty internet service can experience disruptions. If the
internet connection is lost, access to the home automation system might also be lost.

3. Limited Intelligence: Many home automation systems depend on preset rules and schedules.
They might not always align with users’ preferences and habits. The systems generally can’t
adapt to changing conditions or learn from user behavior.

4. Problem of Semi-Automation: Some tasks can be controlled by voice or touch but still need
a specific command to execute. Users need to actively remember to give the command or
manually complete the task.

5. Issues with Semi-Automation: Requires effort and attention from the user, which can negate
the convenience of automation. Limits the benefits of automation, such as energy savings, if
users forget to issue commands.

The points outline the key challenges and limitations of current home automation systems.
The following diagram shows the block diagram of the proposed system in order to overcome above
mentioned drawbacks of traditional Home Automation System

Figure 1.2: Block Diagram of the system to overcome these Traditional Drawbacks

2
CHAPTER 1. INTRODUCTION

1.2 Scope
The scope of a smart lifestyle automation project is vast and encompasses a wide range of
possibilities. At its core, a lifestyle automation system uses machine learning algorithms to analyse
data from various sensors and devices within the home to learn and anticipate the behaviour and
preferences of the occupants. This information can then be used to automate tasks, adjust settings,
and provide personalized suggestions to improve the living experience.

The project should also incorporate energy efficiency features, such as smart lighting and
temperature controls, to reduce energy consumption and save costs. The system should be capable
of monitoring energy usage and adjusting settings based on occupancy, time of day, and weather
conditions.

The project should prioritize comfort and convenience for the occupants by automating various
tasks, such as adjusting the lighting and temperature in a room based on the time of day, or
controlling entertainment systems such as music or television. Additionally, the system should be
customizable to the preferences of the occupants, allowing them to set up personalized settings for
each room.

The potential scope of smart lifestyle automation project includes:

1.2.1 Energy efficiency

A lifestyle automation system can monitor energy usage and optimize energy consumption based on
the occupancy of the home, weather conditions, and other factors. For example, the system could
automatically adjust the temperature of the home to conserve energy when no one is present.

1.2.2 Security

A lifestyle automation system can incorporate security features such as smart locks, cameras, and
motion sensors to monitor the home and alert the occupants of any potential security breaches.
The system could also use machine learning algorithms to identify unusual behaviour and alert the
occupants of potential threats.

3
CHAPTER 1. INTRODUCTION

1.2.3 Comfort and convenience

A lifestyle automation system can automate various tasks to create a more comfortable and
convenient living experience. For example, the system could adjust the lighting and temperature in
a room based on the time of day and the amount of natural light coming in through the windows.

1.2.4 Entertainment

A lifestyle automation system can integrate with entertainment devices such as televisions, speakers,
and streaming services to create a seamless and personalized entertainment experience.

1.2.5 Predictive Maintenance

A lifestyle automation can create a system that can detect potential issues before they become major
problems. This helps to improve the reliability and performance of home appliances and systems,
reduce costs. Using machine learning algorithms to predict potential failures or malfunctions in
home appliances and systems. This includes HVAC systems, water heaters, refrigerators, and other
appliances.

1.3 Aim and Objectives


1. Primary Aim: Simplify and enhance the daily living experience for individuals. Automate
daily tasks for increased convenience. Personalize settings based on individual preferences.
Create a seamless and comfortable environment for users.

2. Optimization of Daily Life: Focus on energy consumption, aiming to make it more efficient.
Enhance security features for a safer living environment. Incorporate and manage
entertainment systems for an enjoyable experience.

3. Creation of Personalized Environment: The system should be adaptable to cater to the


unique needs and preferences of users. Incorporate machine learning algorithms to analyze
data from sensors and devices. Learn and adapt based on the behavior and preferences of the
individual.

4. Automated Task Management: Adjust lighting based on individual’s presence and


preferences. Control temperature for optimal comfort. Manage entertainment systems for
user’s entertainment.

5. Energy Efficiency: Monitor real-time energy usage. Optimize energy consumption based on
user’s habits and external factors.

4
CHAPTER 1. INTRODUCTION

6. Tailored Living Environment: Design an environment tailored to the individual’s needs and
preferences. Include features enhancing energy efficiency, security, and convenience. Ensure
the system remains user-friendly and adaptable to lifestyle changes.

7. Overall Goal: To offer a seamless, adaptable, and enjoyable living experience. Simplify and
optimize everyday living to elevate the quality of life and overall well-being.

5
Chapter 2

Literature Survey

The purpose of this literature review is to explore the current state of home automation technology,
its applications, and the challenges associated with its adoption. In this report, we will examine
the literature related to home automation, including its historical development, technological
advancements, and future prospects. We will also examine the potential benefits and drawbacks of
home automation, including its impact on energy efficiency, security, and privacy. By reviewing the
available literature, this report aims to provide a comprehensive understanding of the current state
of home automation and its potential to revolutionize the way we interact with our homes.

2.1 Critical Evaluation of available literature

2.1.1 Paper 1: “Smart Home Automation: A Literature Review” by Vaishnavi S. Gunge and
Pratibha S. Yalagi [10 ]

The research paper ”Smart Home Automation: A Literature Review” by Vaishnavi S. Gunge and
Pratibha S. Yalagi provides a comprehensive review of existing literature on smart home
automation.

The paper begins by discussing the concept of smart homes and the benefits of smart home
automation, including energy efficiency, increased security, and improved quality of life. The
authors then review the various technologies used in smart home automation, including sensors,
actuators, and communication protocols.

The paper also covers the challenges associated with smart home automation, such as
interoperability, security, and privacy concerns. The authors discuss various approaches to

6
CHAPTER 2. LITERATURE SURVEY

addressing these challenges, such as using standard communication protocols and implementing
robust security measures.

The literature review covers a range of topics related to smart home automation, including
energy management, health monitoring, and entertainment systems. The authors provide detailed
descriptions of existing smart home automation systems and their features, as well as their
advantages and limitations.

Overall, the paper provides a comprehensive overview of the current state of smart home
automation and the challenges and opportunities associated with it. The review of existing literature
can be useful for researchers and practitioners in the field of smart home automation, providing
insights into the latest developments and trends in the field.

2.1.2 Paper 2: “Voice Controlled Home Automation System using Natural Language
Processing (NLP) and Internet of Things (IoT)” by Mrs. Paul Jasmin Rani, Jason
Bakthakumar, Praveen Kumar B., Praveen Kumar U. and Santosh Kumar [23 ]

The research paper ”Voice Controlled Home Automation System using Natural Language
Processing (NLP) and Internet of Things (IoT)” by Mrs. Paul Jasmin Rani. proposes a system that
allows users to control their home appliances using voice commands. The system utilizes natural
language processing (NLP) and IoT technologies to provide a user-friendly interface and enhance
the automation process.

The proposed system consists of a user interface, a natural language processing module, and an
IoT module. The user interface is used to receive voice commands from the user, which are then
processed by the NLP module. The NLP module analyses the user’s command and translates it into
machine-readable instructions. These instructions are then sent to the IoT module, which controls
the home appliances accordingly.

The authors conducted experiments to evaluate the proposed system’s performance in terms of
accuracy, response time, and energy consumption. The experiments showed that the system had
high accuracy in recognizing voice commands and a fast response time, making it an efficient
solution for home automation. The system also consumed less energy, making it cost-effective and

7
CHAPTER 2. LITERATURE SURVEY

environmentally friendly.

Overall, the research paper presents a promising solution for home automation using voice
commands and NLP. The proposed system can enhance the user experience by providing a user-
friendly interface and reducing the effort required to control home appliances. The use of IoT
technology ensures efficient energy consumption and cost-effectiveness, making it a valuable
addition to smart homes.

2.1.3 Paper 3: ”Home Automation System with the use of Internet of Things and Artificial
Intelligence” by Yukti Arora, Harsh Pant, Dr Banita [3 ]

The research paper ”Home Automation System with the use of Internet of Things and Artificial
Intelligence” by Yukti Arora. proposes a system that utilizes IoT and artificial intelligence (AI)
technologies to automate home appliances and improve energy efficiency.

The proposed system consists of sensors, a microcontroller, and a cloud-based AI module. The
sensors are used to monitor the environment, such as temperature and light intensity, and send data
to the microcontroller. The microcontroller processes the data and sends commands to the home
appliances accordingly. The cloud-based AI module analyses the data received from the sensors
and makes decisions based on pre-defined rules to optimize energy consumption.

The authors conducted experiments to evaluate the proposed system’s performance in terms of
energy consumption and user satisfaction. The experiments showed that the system was effective in
optimizing energy consumption and reducing electricity bills. The system was also user-friendly
and easy to use, enhancing the user experience.

Overall, the research paper presents a promising solution for home automation using IoT and AI
technologies. The proposed system can enhance energy efficiency and reduce electricity bills while
providing a user-friendly interface. The use of cloud-based AI ensures that the system is adaptable
and can make intelligent decisions based on real-time data.

8
CHAPTER 2. LITERATURE SURVEY

2.1.4 Paper 4: ”Automation of Home (IoT) using Raspberry Pi” by Prajakta Khairnar,
Sukanya Bansode, Balveen Sahota, Priyanka Chourasia. [14 ]

The research paper titled ”Automation of Home (IoT) using Raspberry Pi” explores the
implementation of a smart home automation system using Raspberry Pi as the central device. The
study is conducted by a team of researchers and students from the Dr. D Y Patil School of
Engineering in Pune, Maharashtra, India.

The paper begins by discussing the concept of the Internet of Things (IoT) and its potential to
transform various aspects of daily life, including home automation. It then provides a detailed
explanation of the hardware and software components required to build the system, which includes
Raspberry Pi, sensors, relays, and a mobile application.

The researchers explain the various functionalities of the system, such as controlling lights, fans,
and air conditioning, monitoring temperature and humidity levels, and receiving notifications on a
mobile device. They also discuss the programming languages and tools used to develop the system.

The paper concludes by highlighting the benefits of using Raspberry Pi for home automation,
such as low cost, flexibility, and ease of use. The researchers also suggest potential future
enhancements to the system, such as integrating voice recognition and machine learning.

Overall, the research paper provides a comprehensive overview of building a smart home
automation system using Raspberry Pi and demonstrates the potential for using IoT technology to
enhance daily life.

2.1.5 Paper 5: ”Smart Energy Efficient Security and Intelligent Home Automation Using
IoT with Cloud Organizing” by Himanshu Chandak, Prof. Ayushi Jaiswal, Hitesh
Dhoke, Pranay Kumar Juwar and Chandan Singh [5 ]

The research paper ”Smart Energy Efficient Security and Intelligent Home Automation Using IoT
with Cloud Organizing” by Himanshu Chandak. proposes a system that utilizes IoT and cloud
computing to automate home appliances, enhance security, and improve energy efficiency.

9
CHAPTER 2. LITERATURE SURVEY

The proposed system consists of sensors, a microcontroller, and a cloud-based server. The
sensors are used to monitor the environment, such as temperature, humidity, and motion, and send
data to the microcontroller. The microcontroller processes the data and sends commands to the
home appliances accordingly. The cloudbased server is used to store and analyse the data received
from the sensors and make intelligent decisions to optimize energy consumption and enhance
security.

The authors conducted experiments to evaluate the proposed system’s performance in terms of
energy consumption and security. The experiments showed that the system was effective in
optimizing energy consumption and reducing electricity bills. The system was also effective in
detecting and alerting security breaches, enhancing the security of the home.

Overall, the research paper presents a promising solution for home automation using IoT and
cloud computing. The proposed system can enhance energy efficiency, improve security, and
reduce electricity bills while providing a comfortable living environment. The use of cloud
computing ensures that the system is adaptable and can make intelligent decisions based on
real-time data. The system can be integrated with other smart home devices to provide a complete
home automation solution.

2.1.6 Paper 6: ”iHAS: An Intelligent Home Automation Based System for Smart City” by
Shaik Mulla Shabber, Mohan Bansal, P. Mrudula Devi and Prateek Jain [24 ]

The research paper ”iHAS: An Intelligent Home Automation Based System for Smart City” by
Shaik Mulla Shabber. proposes a system that utilizes intelligent home automation technology to
create a smart city environment.

The proposed system consists of sensors, a microcontroller, and an AI module. The sensors are
used to monitor the environment, such as temperature, humidity, and motion, and send data to the
microcontroller. The microcontroller processes the data and sends commands to the home
appliances accordingly. The AI module is used to analyse the data received from the sensors and
make intelligent decisions to optimize energy consumption and provide a comfortable living
environment.

10
CHAPTER 2. LITERATURE SURVEY

The authors conducted experiments to evaluate the proposed system’s performance in terms of
energy consumption and user satisfaction. The experiments showed that the system was effective in
optimizing energy consumption and reducing electricity bills. The system was also user-friendly
and easy to use, enhancing the user experience.

Overall, the research paper presents a promising solution for home automation using AI
technology, which can be scaled up to create a smart city environment. The proposed system can
enhance energy efficiency and reduce electricity bills while providing a comfortable living
environment. The use of AI ensures that the system is adaptable and can make intelligent decisions
based on real-time data. The system can be integrated with other smart city technologies to provide
a complete solution for creating a smart city environment.

2.1.7 Paper 7: ”A Smart and Intelligent Home Automation System” by Rahat Bin Aziz
Tonoy, Mahmudunnabi, Hasan Mohiuddin Zilany and Rashedur M. Rahman [26 ]

The research paper ”A Smart and Intelligent Home Automation System” by Rahat Bin Aziz Tonoy.
proposes a system that utilizes smart and intelligent technologies to create an automated home
environment.

The proposed system consists of several components, including a sensor network, a controller
unit, and an intelligent decision-making module. The sensor network includes temperature,
humidity, and light sensors, which are used to collect data about the home environment. The
controller unit receives the data from the sensors and makes decisions on how to control the
appliances in the home based on the collected data. The intelligent decision-making module utilizes
machine learning algorithms to optimize the home automation system’s efficiency.

The authors conducted experiments to evaluate the proposed system’s performance in terms of
energy consumption, cost, and user satisfaction. The experiments showed that the system was
effective in reducing energy consumption and cost, while providing a comfortable living
environment. The system was also userfriendly, easy to use, and customizable to meet different user
needs.

Overall, the research paper presents a promising solution for home automation using smart and

11
CHAPTER 2. LITERATURE SURVEY

intelligent technologies. The proposed system can enhance energy efficiency, reduce cost, and
provide a comfortable living environment. The use of machine learning algorithms ensures that the
system is adaptable and can make intelligent decisions based on real-time data. The system can be
customized to meet different user needs and can be integrated with other smart home technologies
to create a complete solution for home automation.

2.1.8 Paper 8: ”Intelligent Home Automation System Using BitVoicer” by Muhammad


Aamir Aman, Md. Nauman Naeem, Ali Shahab, Fazl e Jamil and Mehr E Munir [15 ]

The research paper ”Intelligent Home Automation System Using BitVoicer” by Muhammad Aamir
Aman. presents a system that uses voice recognition technology to control and automate various
devices in the home environment.

The proposed system consists of a voice recognition module that uses the BitVoicer software to
interpret voice commands from the user. The system can recognize commands related to turning
devices on and off, adjusting temperature, and controlling lighting. The system also includes a
central control module that receives the interpreted voice commands and sends control signals to
the appropriate devices.

The authors conducted experiments to evaluate the system’s performance in terms of accuracy
and response time. The experiments showed that the system had a high accuracy rate in interpreting
voice commands and responded quickly to user commands. The system was also found to be
user-friendly and easy to use.

Overall, the research paper presents a promising solution for home automation using voice
recognition technology. The proposed system can enhance user convenience and comfort by
allowing users to control various devices in their home environment using voice commands. The
system’s high accuracy rate and quick response time ensure that users can rely on the system to
perform the desired actions. The system can be further improved by integrating it with other smart
home technologies to create a complete home automation solution.

12
CHAPTER 2. LITERATURE SURVEY

2.1.9 Paper 9: ”A Security Framework for IoT based Smart Home Automation System” by
Nazmul Hossain, Md. Alam Hossain, Rafia Sultana and Farzana Akter Lima [11 ]

The research paper ”A Security Framework for IoT based Smart Home Automation System” by
Nazmul Hossain. proposes a security framework to address the security challenges in smart home
automation systems based on IoT technology.

The proposed security framework consists of four layers: the device layer, network layer,
application layer, and user layer. Each layer is responsible for addressing specific security
challenges related to IoT-based smart home automation systems. The device layer includes security
measures to protect devices from physical attacks, malware, and firmware modification. The
network layer provides security measures to ensure secure communication between devices and the
central control unit. The application layer includes security measures to ensure that applications
used in the system are secure and do not pose a threat to the system’s overall security. Finally, the
user layer includes security measures to ensure that user data and privacy are protected.

The authors evaluated the proposed security framework by conducting a simulation experiment.
The results showed that the framework could effectively protect the smart home automation system
from various security threats and attacks.

Overall, the research paper presents a comprehensive security framework for IoT-based smart
home automation systems. The proposed framework can help to address the security challenges
faced by such systems, ensuring that users can trust the system’s security and privacy. The
framework can also be used as a guideline for developers and manufacturers of smart home
automation systems to improve the security of their products.

2.1.10 Paper 10: ”Smart Home Personalizing Services Based on Adaptive Cloud IoT Devices
with Bigdata and Deep Learning Technique” Jain-Shing Wu, Member, IEEE and
Ming-Shen Jian, Member, IEEE [27 ]

“Smart Home Personalizing Services Based on Adaptive Cloud IoT Devices with Bigdata and Deep
Learning Technique” ain-Shing Wu, Member, IEEE and Ming-Shen Jian, Member, IEEE. The paper
proposes a smart home personalization system that uses adaptive cloud Internet of Things (IoT)

13
CHAPTER 2. LITERATURE SURVEY

devices, big data, and deep learning techniques. The system aims to provide customized services
to homeowners based on their preferences and habits. The proposed system uses a cloud-based
architecture that allows it to collect data from various IoT devices and analyse it to create user
profiles. Deep learning algorithms are used to analyse the data and make predictions about the user’s
preferences, behaviours, and needs. The system then uses this information to provide personalized
services such as adjusting the lighting, temperature, and music to match the user’s preferences. The
authors demonstrate the effectiveness of their approach through a case study that shows significant
improvements in user satisfaction compared to a traditional smart home system

2.1.11 Paper 11: ”Speech Recognition using AI” by Swanand Raje, Gaurang Joshi, Ameya
Dolas, Sukrut Lagu and Prof. Smita Lonkar [21 ]

The research paper ”Speech Recognition using AI” discusses the implementation of a speech
recognition system using artificial intelligence. The authors propose a system that uses machine
learning algorithms, particularly a deep learning neural network, to recognize and process speech.
The system was trained on a dataset of voice samples and tested for accuracy and efficiency. The
results showed that the proposed system was able to accurately recognize speech with high accuracy
rates. The authors suggest that this system can be used in a variety of applications, including home
automation, smart assistants, and other voice-controlled devices. They also discuss the potential of
combining this system with other technologies such as natural language processing and internet
of things (IoT) to create more intelligent and efficient systems. Overall, the paper provides a
detailed insight into the development and implementation of a speech recognition system using AI,
highlighting its potential benefits and future applications.

2.1.12 Paper 12: ”Design and Implementation of Artificial Intelligence (AI) Based Home
Automation” Mehul Manhas, Divij Sanduja, Nikhil Aggarwal and Rashmi Vashisth
[17 ]

The research paper ”Design and Implementation of Artificial Intelligence (AI) Based Home
Automation” presents an AI-based home automation system designed to make life more convenient
and secure. The system consists of various sensors and devices, including motion detectors,
temperature sensors, and smart plugs, which can be controlled using a mobile application. The AI
algorithms are implemented using a Raspberry Pi, which analyses the data collected from sensors
and takes actions accordingly. The authors have used Python programming language and
TensorFlow deep learning framework to train the AI model. The system can be further improved by

14
CHAPTER 2. LITERATURE SURVEY

incorporating voice commands and using natural language processing techniques. The proposed
system can be implemented in homes to achieve better energy efficiency, security, and convenience.

2.1.13 Paper 13: ”A Review on Advanced Home Automation System using GSM and AI” by
Shruti S. Gulkari, Snehal R. Raut, Manthan M. Meshram, Siddhanth S. Wase and
N.M. Chore [9 ]

The paper ”A Review on Advanced Home Automation System using GSM and AI” discusses the
current state of home automation systems and the integration of GSM and AI technologies. The
authors describe the benefits of using these technologies for home automation, including increased
energy efficiency and convenience. The paper provides an overview of the architecture of a home
automation system and describes various sensors and devices that can be integrated into the system.
The authors also discuss the challenges associated with implementing a home automation system,
such as security concerns and interoperability issues. Finally, the paper discusses the potential
for future research and development in the field of home automation, particularly in the areas of
machine learning and artificial intelligence.

2.1.14 Paper 14: “HomeIO: Offline Smart Home Automatic System with Automatic Speech
Recognition and Household Power Usage Tracking” by I.B.C. Irugalbandara, A.S.M.
Naseem, M.S.H. Perera and V. Logeeshan [12 ]

The paper presents the design and implementation of a smart home automation system named
HomeIO, which can be operated offline using automatic speech recognition (ASR) and tracks
household power usage. The proposed system uses a Raspberry Pi and a USB microphone to
capture voice commands, and an ASR engine to recognize them. The system can perform various
tasks such as turning on/off lights, controlling home appliances, and locking/unlocking doors.
Additionally, the system has the capability to track power usage of home appliances and devices,
which can help users to monitor and optimize their energy consumption. The authors also provide
a detailed description of the hardware and software components of the system, along with the
experimental results that demonstrate the effectiveness of the proposed system. Overall, the
HomeIO system presents a simple and cost-effective solution for smart home automation, which
can be controlled using voice commands without requiring an internet connection

15
CHAPTER 2. LITERATURE SURVEY

2.1.15 Paper 15: “Analysis and Design of Energy Efficient Protocols for Wireless Sensor
Networks” by Gaurav P. Dave and Dr Jayshankar N. [7 ]

The research paper focuses on the design and analysis of energy-efficient protocols for wireless
sensor networks (WSNs). The paper discusses the limitations of traditional protocols used in
WSNs, such as the energy consumption problem, and proposes an energy-efficient solution for
the same. The paper analyses the energy consumption patterns of different nodes in a WSN and
proposes protocols that are optimized for the energy consumption of these nodes. The paper also
discusses various existing protocols and their limitations and provides a comparative analysis of
these protocols. The proposed solution is designed to improve the network lifetime and energy
efficiency of WSNs. The authors have conducted simulations to evaluate the performance of the
proposed solution, and the results show significant improvements in terms of network lifetime,
energy efficiency, and data transmission.

2.2 Other Papers Reviewed


The below mentioned diagram shows the connected papers view of the the other papers reviewed
during this process. This show the concentration and growth of this technology.

16
CHAPTER 2. LITERATURE SURVEY

Figure 2.1: Connected Papers diagram for other literature reviewed

419622281201318825216

17
Chapter 3

Project Flow and Methodology

This project aims to design and implement a home automation system that utilizes various smart
technologies to control and monitor household appliances and systems. To accomplish this goal,
we will follow a systematic approach that involves multiple stages, including design, development,
testing, and evaluation. In this section, we will provide an overview of our project flow and
methodology. By following this approach, we aim to develop a robust and reliable system that
meets the user requirements and enhances the overall quality of life for homeowners.

3.1 Hardware Dependencies


To develop a home automation system prototype, several hardware components are required.
Firstly, a development board is needed, which is a hardware platform that allows developers to
prototype and test their designs. Popular development boards for home automation projects include
Arduino, Raspberry Pi, and ESP32.

In addition to the development board, various sensors and actuators are required. These include
temperature sensors, humidity sensors, motion sensors, light sensors, and relays. Temperature
sensors are used to monitor the temperature inside a room or house, while humidity sensors can
detect changes in humidity levels. Motion sensors can detect movement in a room and trigger an
action, such as turning on the lights. Light sensors can be used to adjust the brightness of the lights
based on the ambient light levels.

Actuators, such as relays, are also essential components in a home automation system prototype.
Relays are used to control appliances and devices such as lights, fans, and air conditioners. By
using a relay, the device can be turned on or off remotely using the development board.

18
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Finally, a power supply is needed to power the development board and the connected sensors
and actuators. A 5V power supply is typically used for development boards such as Arduino or
ESP32, while Raspberry Pi requires a 5V and 2.5A power supply.

3.1.1 Development Boards

A development board is a physical hardware platform that includes various components such as a
microcontroller or microprocessor, memory, input/output interfaces, and other supporting hardware.
It is designed to facilitate the development and testing of new hardware and software systems.

Raspberry Pi

The Raspberry Pi 4 Model B 8GB RAM is the latest version of the popular single-board computer.
It comes with several hardware upgrades and features that make it a powerful tool for a wide range
of applications.

The processor has also been upgraded to a quad-core Broadcom BCM2711 processor running at
1.5GHz. This processor is more powerful than the previous version, and it supports dual 4K
displays at 60Hz, providing improved video performance and sharper visuals.

In terms of connectivity, the Raspberry Pi 4 Model B 8GB RAM includes dual-band 802.11ac
wireless networking, Bluetooth 5.0, and Gigabit Ethernet. It also has two USB 3.0 ports and two
USB 2.0 ports, providing fast data transfer and flexible connectivity options.

The board includes a Micro-HDMI port for video output and a 3.5mm audio jack for audio
output. Additionally, it includes a MicroSD card slot for storage, which can be used to store the
operating system and other data.

19
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.1: Raspberry Pi 4 Model B

NodeMCU (ESP8266)

The NodeMCU ESP8266 is a popular development board that is widely used in IoT and home
automation projects. It is based on the ESP8266 Wi-Fi module and is designed to be easy to use,
with a built-in USB port for programming and debugging.

The NodeMCU ESP8266 has a powerful 32-bit Tensilica L106 microcontroller, which runs at
80 MHz. It has 4MB of flash memory for program storage and 80KB of RAM for program
execution. This makes it capable of running complex programs and applications, including web
servers, MQTT clients, and more.

One of the key features of the NodeMCU ESP8266 is its built-in Wi-Fi module, which supports
both 2.4GHz and 5GHz Wi-Fi networks. It also supports WPA/WPA2 authentication and
encryption, making it ideal for secure IoT applications

20
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.2: Node MCU ESP 8266

UNO R3 WIFI ESP8266 ATMEGA328 CH340G

The UNO R3 WIFI ESP8266 ATMEGA328 CH340G is a development board that combines the
functionalities of an Arduino UNO R3 board, an ATmega328 microcontroller, and an ESP8266
WiFi chip with 8 MB flash memory . The board has a supply voltage of 6 to 9V and a USB-TTL
converter based on CH340G . The board includes a 5V and 3.3 V voltage regulator to allow for the
differing voltage requirements for the ESP8266 and ATMega328 . The board has numerous
advantages over similar solutions, including easy implementation of WiFi communication in
Arduino projects, compatibility with many Arduino shields available, and greater range of
processing power available due to two processors incorporated on the board.

The ATmega328 is a microcontroller that is used in many Arduino boards. It has 32 KB of flash
memory for storing code, 2 KB of SRAM for data storage, and 1 KB of EEPROM for non-volatile
storage . The ESP8266 is a low-cost Wi-Fi microchip with full TCP/IP stack and microcontroller
capability produced by Espressif Systems . It has a clock speed of 80 MHz and supports up to 16
GPIO pins . The CH340G is a USB-to-serial adapter that allows the computer to communicate with
the microcontroller on the board

21
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.3: UNO R3 WIFI ESP8266 ATMEGA328 CH340G

The UNO R3 WIFI ESP8266 ATMEGA328 CH340G board has a mode selection switch
consisting of an 8-switch DIP mounted in the center of the board 123. The mode switch allows for
four possible settings:

1. Mode 1: USB Serial connected to ATMega328 for both programming and serial
communication.

2. Mode 2: USB Serial connected to ESP8266 for programming and ATMega328 for serial
communication.

3. Mode 3: USB Serial connected to ESP8266 for both programming and serial communication.

4. Mode 4: USB Serial connected to ATMega328 for programming and ESP8266 for serial
communication.

The mode selection switch is crucial to the operation of the board, and it allows users to select the
appropriate mode based on their requirements

22
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.4: UNO R3 WIFI ESP8266 ATMEGA328 CH340G DIP Switch

3.1.2 Sensors

Sensors work by converting physical parameters into electrical signals that can be measured and
analysed by other electronic devices, such as microcontrollers or computers. They are used in a
wide range of applications, from monitoring environmental conditions in smart homes and buildings
to controlling the operation of complex industrial systems.

Speak (Voice) Recognition Module V3

The Speak (Voice) Recognition Module V3 is an electronic device that is designed to recognize and
respond to voice commands. It is a compact and easy-to-use module that can be integrated into a
wide range of applications, such as home automation systems, robotics, and IoT devices.

The module uses a complex algorithm to analyse and interpret human speech. It is capable of
recognizing up to 15 voice commands, which can be customized by the user using a simple
programming interface. The module is also capable of learning new voice commands, making it a
flexible and adaptable solution for voice control applications.

The Speak Recognition Module V3 has a built-in microphone that can detect human speech
from a distance of up to 3 meters. It also includes an audio output interface, which can be used to
play back pre-recorded messages or other audio signals.

23
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.5: Speak (Voice) Recognition Module V3

GY-7620 Gesture Recognition sensor module PAJ7620U2

The GY-7620 Gesture Recognition sensor module, also known as the PAJ7620U2, is an electronic
device that is designed to detect and respond to hand gestures. It is a compact and easy-to-use
module that can be integrated into a wide range of applications, such as home automation systems,
robotics, and gaming devices.

The module uses a sophisticated algorithm to analyse and interpret hand gestures. It is capable
of recognizing up to 9 different gestures, including moving up, down, left, right, clockwise, and
counter clockwise. The module also includes a proximity sensor, which can detect when a hand is
near the module.

The Gesture Recognition sensor module has a built-in infrared sensor that can detect hand
gestures from a distance of up to 20cm. It also includes an I2C interface, which can be used to
communicate with other electronic devices, such as micro controllers or computers.

24
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.6: GY-7620 Gesture Recognition PAJ7620U2

DFRobot Gravity DHT22 Temperature & Humidity Sensor

The module uses a high-precision DHT22 sensor to measure temperature and humidity levels. It is
capable of measuring temperature levels from -40°C to 80°C with an accuracy of ±0.5°C and
humidity levels from 0% to 100% with an accuracy of ±2%. The module also includes a built-in
thermistor for temperature compensation.

The DHT22 Temperature & Humidity Sensor has a simple 3-pin interface that can be easily
connected to other electronic devices, such as micro controllers or computers. It can be powered
using a 3.3V to 5V DC power supply and requires minimal setup or configuration.

Figure 3.7: DFRobot DHT22

25
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

SeeedStudio Grove digital PIR Motion Sensor

The module uses a passive infrared sensor to detect motion. It is capable of detecting motion up to
6 meters away and has a detection angle of 120 degrees. The module also includes a digital output,
which can be used to trigger an alarm or other actions when motion is detected.

The Grove digital PIR Motion Sensor has a simple 4-pin interface that can be easily connected
to other electronic devices, such as microcontrollers or computers. It can be powered using a 3.3V
to 5V DC power supply and requires minimal setup or configuration.

Figure 3.8: SeeedStudio Grove digital PIR Motion Sensor

FlexiForce FlexiPort Ring Position Sensor

The sensor uses a flexible circuit to detect changes in position and force. It is capable of measuring
positions with a resolution of up to 1024 counts per revolution and can measure forces ranging from
0 to 25 pounds. The module also includes a built-in microcontroller and a digital output, which can
be used to communicate with other electronic devices.

The FlexiForce FlexiPort Ring Position Sensor has a simple 3-pin interface that can be easily
connected to other electronic devices, such as microcontrollers or computers. It can be powered
using a 3.3V to 5V DC power supply and requires minimal setup or configuration.

26
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.9: FlexiForce FlexiPort Ring Position Sensor

TTP226 8-way capacitive touch switch

The module uses capacitive sensing technology to detect touch or proximity. It is capable of
detecting up to 8 touch points simultaneously and includes a built-in LED indicator for each touch
point. The module also includes a digital output, which can be used to trigger an action when a
touch is detected. The TTP226 8-way capacitive touch switch has a simple 8-pin interface that can
be easily connected to other electronic devices, such as microcontrollers or computers. It can be
powered using a 2.4V to 5.5V DC power supply and requires minimal setup or configuration.

Figure 3.10: TTP226 8-way capacitive touch switch

NFC Tags

NFC (Near Field Communication) tags are small electronic devices that store information and can
communicate wirelessly with other NFC-enabled devices, such as smartphones, tablets, and other
electronic devices. They use a wireless protocol that allows for short-range communication
between devices, typically within a range of a few centimetres.

27
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

NFC tags come in various shapes and sizes, and can be embedded in a variety of materials, such
as stickers, cards, and keychains. They are a popular technology for creating interactive and
user-friendly experiences in a variety of industries, including retail, hospitality, and transportation.

Figure 3.11: NFC Tag

3.1.3 Sensor Modules

Sensor modules are electronic devices that include one or more sensors, along with additional
electronic components, such as micro controllers, amplifiers, and interfaces. They can be easily
integrated into electronic circuits and systems, and can provide accurate and reliable measurements
of physical parameters in real-time. Sensor modules are typically designed to be easy to use and
integrate into projects, with simple interfaces that can be connected to micro controllers, computers,
or other electronic devices. They can be powered using a variety of power sources, such as batteries
or external power supplies, and may include additional features, such as on-board memory,
communication protocols, or built-in algorithms for processing and analysing data.

4 Channel AC programmable light dimmer module

The 4 Channel AC programmable light dimmer module is an electronic device designed to control
the brightness of AC-powered lights. It can be used to create custom lighting effects in a wide range
of applications, such as home automation, stage lighting, and commercial lighting systems.

28
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.12: 4 Channel AC programmable light dimmer module

SparkFun Wi-Fi IR Blaster

The SparkFun Wi-Fi IR Blaster is an electronic device designed to control infrared (IR) devices
using WiFi. It is a compact and easy-to-use module that enables users to control their home
entertainment devices, such as TVs, DVD players, and audio systems, using a smartphone or other
Wi-Fi-enabled device.

The module includes an IR receiver and transmitter, which can be used to capture and transmit
IR signals to control various devices. It also includes a Wi-Fi module, which enables wireless
communication between the module and other electronic devices, such as smartphones or
computers.

Figure 3.13: SparkFun Wi-Fi IR Blaster

29
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

RFID Module

An RFID (Radio Frequency Identification) module is an electronic device that uses radio waves to
identify and track objects or people. It consists of a reader and a tag, which contains a microchip
and an antenna.

The reader emits a radio frequency signal, which is received by the tag’s antenna. The tag’s
microchip then processes the signal and responds with its unique identification information. The
reader captures this information and sends it to a computer or other electronic device for
processing.

Figure 3.14: RFID Module

L298 Motor Driver

The L298 motor driver is a dual full-bridge driver primarily designed to drive inductive loads, with
its most common application being in controlling DC motors. Notably, its dual-channel capability
allows the L298 to simultaneously manage two DC motors. This motor driver typically operates
within a voltage range of 5V to 46V and is adept at handling currents up to 2A for each channel. A
standout feature of the L298 is its capacity for both directional and speed control; users can dictate
the rotation direction (whether clockwise or counterclockwise) and modulate the speed using Pulse
Width Modulation (PWM). Additionally, the L298 is fortified with protective features, including
thermal protection and diodes that guard against back-EMF.

30
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.15: L298 Bidirectional Motor Driver

4 Channel 5V Relay Module

The 4 Channel 5V Relay Module is an electronic device that allows for low-voltage logic, such
as signals from a microcontroller, to control higher voltage or current loads. Comprising four
individual relays on a single board, each relay can be used to switch various devices or components
independently. Operating at 5V, this module is commonly used in tandem with microcontrollers like
Arduino to control household appliances, motors, and other higher-powered circuits, providing a
bridge between digital logic and high-power operations. Its design ensures that the microcontroller
remains electrically isolated from the potentially damaging higher-voltage circuitry it controls.

Figure 3.16: 4 Channel 5V Relay Module

31
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

RGB LED Module

The RGB LED module is a compact electronic component that combines red, green, and blue
(RGB) light-emitting diodes (LEDs) in a single package. By varying the intensity of each color,
the module can produce a wide spectrum of colors. Controlled using low-voltage signals, it’s often
integrated into various electronics to provide multicolor indicators or ambiance lighting. Commonly
interfaced with microcontrollers or dedicated LED drivers, the RGB LED module offers a versatile
solution for customizable lighting and color blending in tech applications.

Figure 3.17: RGB LED Module

3.1.4 Assistive Debugging and User-Facing hardware

A lifestyle automation system can integrate with entertainment devices such as televisions,
speakers, and streaming services to create a seamless and personalized entertainment experience.
Assistive debugging and user-facing hardware are electronic devices designed to improve the
debugging and user experience of software applications and systems.

User-facing hardware, is designed to improve the user experience of software applications and
systems. This hardware includes devices such as touchscreens, keyboards, and mice, which allow
users to interact with software systems in an intuitive and efficient manner.

32
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

I2C LED Display

I2C (Inter-Integrated Circuit) displays are electronic devices that use the I2C protocol to
communicate with micro controllers or other electronic devices. They typically consist of an LCD
(Liquid Crystal Display) screen, a micro controller, and an I2C interface.

I2C displays come in various sizes and resolutions, making them suitable for a wide range of
applications. They are commonly used in projects that require a visual interface.

Figure 3.18: I2C Display

4 Digit 7 Segment Display

The 4-Digit 7-Segment Display is an electronic component used to show numbers and some letters.
It contains four individual displays, each made up of seven segments arranged in a figure-eight
pattern. These displays can either have common cathode or common anode configurations. They’re
frequently used in devices like digital clocks and calculators due to their compactness and efficiency
in displaying numeric data. Multiplexing is a common technique employed to control them with
fewer pins.

33
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.19: 4 Digit 7 Segment Display

Waveshare 10.1-inch Resistive HDMI LCD Display 1024x600

The Waveshare 10.1-inch Resistive HDMI LCD Display is an electronic display device with a
1024x600 resolution and a resistive touch panel. It is designed to be used with single-board
computers such as the Raspberry Pi and Beaglebone Black.

The display features a 10.1-inch diagonal screen size and uses HDMI for video input. It has a
wide viewing angle and a high-quality image output. The resistive touch panel allows users to
interact with the display using a stylus or fingertip.

The Waveshare 10.1-inch Resistive HDMI LCD Display also includes an onboard backlight
control circuit and supports backlight adjustment, making it suitable for use in a variety of lighting
conditions. It is powered by a 5V DC power supply and has low power consumption, making it an
energy-efficient solution for displaying information in electronic projects.

34
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

(a) Waveshare 10.1-inch Resistive (Front) (b) Waveshare 10.1-inch Resistive (Back)

Figure 3.20: Waveshare 10.1-inch Resistive HDMI LCD Display 1024x600

3.2 Cloud Deployment


Cloud deployment refers to the process of deploying and hosting applications, services, or
resources on cloud computing infrastructure, such as servers, storage, databases, and other services
that are available over the internet.

In cloud deployment, users can access resources and services on-demand, without the need to
purchase and manage physical infrastructure, such as servers and data centres.

• Infrastructure as a Service (IaaS): A cloud deployment model in which users rent virtualized
computing resources, such as servers, storage, and networking, from a cloud provider to build
and run their own applications.

• Platform as a Service (PaaS): A cloud deployment model that provides users with a platform
to develop, run, and manage their own applications without the need to manage the underlying
infrastructure.

• Software as a Service (SaaS): A cloud deployment model in which users’ access and use
software applications that are hosted and managed by a cloud provider over the internet.

For this application we are using AWS as our public cloud provider.

35
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

3.2.1 Comparison of AWS with other major cloud services

Comparison of services

Table 3.1: Comparison of AWS, GCP, and Azure services.

Service AWS GCP Azure

Compute EC2, Lambda, Compute Engine, Virtual Machines,


Services Elastic Beanstalk Kubernetes Engine Azure Functions
Storage Cloud Storage, Blob Storage, Disk
S3, EBS, Glacier
Services Persistent Disk Storage
Database RDS, DynamoDB, Cloud SQL, Cloud SQL Database,
Services Aurora Spanner Cosmos DB
Analytics Athena, EMR, BigQuery, HDInsight, Data
Services Redshift Dataflow Lake
Machine SageMaker, AI Platform, Azure Machine
Learning Rekognition AutoML Learning
Internet
IoT Core, IoT IoT Core, Cloud IoT Hub, IoT
of
Analytics IoT Edge Central
Things
Virtual Private
Networking VPC, CloudFront, Virtual Network,
Cloud, Cloud Load
Services Route 53 Azure CDN
Balancing
Cloud Build,
DevOps CodePipeline, DevOps, Azure
Cloud Deployment
Services CodeDeploy Boards
Manager
Cloud Identity-
Security IAM, GuardDuty, Azure Security
Aware Proxy,
Services WAF Center
Security Scanner
Hybrid AWS Outposts, Anthos, Cloud Azure Arc, Azure
Cloud Storage Gateway VPN Stack

36
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Key IoT Performance Matrices Comparison

Table 3.2: Comparison of AWS, GCP, and Azure IoT services.

Metric AWS GCP Azure

Edge
Edge TPU, IoT IoT Edge, Azure
Processing AWS Greengrass
Edge Stream Analytics
Capabilities

Device IoT Core, Cloud


AWS IoT Device IoT Hub, IoT
Management IoT Device
Management Central
Capabilities Manager

Horizontal Scaling, Horizontal Scaling, Horizontal Scaling,


Scalability
Auto Scaling Auto Scaling Auto Scaling

Data

Ingestion
AWS IoT Core, Cloud Pub/Sub, IoT Hub, Stream
and
AWS IoT Analytics Dataflow Analytics
Processing

Capabilities

Analytics
AWS IoT BigQuery, Cloud Azure Stream
and
Analytics, Amazon Data Studio, Data Analytics, Power
Visualization
QuickSight Studio BI
Capabilities

Security and AWS IoT Security, Cloud IoT Security, Azure Security

Compliance AWS IoT Device Security Command Center, Azure IoT

Capabilities Defender Center Security Center

Integration
AWS Lambda, Azure Functions,
with Other Cloud Functions,
Amazon Kinesis, Logic Apps, Event
Services and Pub/Sub, Firebase
Amazon SNS Grid
Applications

37
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Key Reasons to choose AWS

Table 3.3: Key Reasons to choose AWS.

Reason AWS GCP Azure

Breadth of Over 200 fully


Over 90 services Over 200 services
Services featured services
Market Over 30% market Over 9% market Over 17% market
Share share share share
Amazon
Machine AI Platform, Tensor
SageMaker, Azure Machine
Learning Processing Unit,
Elastic Inference, Learning, Batch AI
Capabilities Edge TPU
Inferentia
AWS Greengrass, Cloud IoT Core, IoT Hub, IoT
IoT
AWS IoT Core, Edge TPU, IoT Central, Azure
Capabilities
AWS IoT Analytics Edge Stream Analytics
80 Availability 64 regions across
Global 26 regions across 6
Zones across 25 21 countries and
Infrastructure continents
geographic regions regions
Hybrid Anthos, Cloud Azure Stack,
AWS Outposts,
Cloud VPN, Cloud ExpressRoute,
AWS Snow Family
Capabilities Interconnect VPN Gateway
Partner Over 90,000 Over 4,000 partners Over 68,000
Ecosystem partners worldwide worldwide partners worldwide
Dedicated Dedicated
Enterprise
enterprise support 24/7 support enterprise support
Support
team team

AWS has a global infrastructure of 25 regions and 80 availability zones, which is the largest of
the three cloud providers. AWS also offers AWS Global Accelerator and AWS Lambda@Edge for
edge computing, which can help reduce latency. In terms of network performance testing, AWS
Global Accelerator Network Health Check can provide detailed information on network latency

3.3 Artificial Intelligence


The role of Artificial Intelligence (AI) in smart home automation systems has revolutionized the
way people interact with their homes. Smart home automation systems are designed to make life
easier, more convenient, and more efficient for homeowners, and AI technology is a critical
component of achieving these goals. One of the key benefits of AI in smart home automation is the
ability to learn and adapt to user behaviour over time. By analysing user patterns and preferences,
AI can optimize a smart home’s systems to provide the most efficient and comfortable living

38
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

experience possible.

For example, AI can learn a homeowner’s temperature preferences and automatically adjust the
thermostat to maintain the desired temperature throughout the day. AI can also analyse a
homeowner’s energy usage patterns and recommend ways to reduce energy consumption, such as
by turning off lights when they’re not needed or adjusting the temperature when no one is home.

Moreover, AI can enable smart home automation systems to be more intuitive and responsive to
user needs. Through natural language processing and voice recognition technology, homeowners
can control their smart home devices with voice commands, eliminating the need for manual inputs.
AI can also anticipate a homeowner’s needs based on past behaviours and proactively suggest
actions, such as turning off appliances or adjusting the lighting.

Figure 3.21: Sub Divisions of Artificial Intelligence

3.3.1 Neural Networks

Neural networks, a subfield of artificial intelligence, can play an important role in adapting to
human lifestyle for home automation. Neural networks are designed to simulate the functioning of
the human brain and learn from data, making them well-suited for analysing complex patterns and

39
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

making predictions about human behaviour. In the context of home automation, neural networks
can help automate and optimize various aspects of daily life by learning and adapting to the
homeowner’s preferences.

For example, neural networks can learn a homeowner’s daily routine and adapt the home’s
lighting, temperature, and other features to optimize comfort and energy efficiency. They can also
learn a homeowner’s entertainment preferences and automatically suggest and play music or TV
shows based on past behaviour. Additionally, neural networks can be used to monitor and optimize
home security by learning the patterns of household activity and flagging any unusual or
unexpected events.

One of the key advantages of using neural networks for home automation is their ability to
adapt to changes in human behaviour and preferences over time. As a homeowner’s lifestyle and
preferences evolve, neural networks can learn and adapt accordingly, providing a more personalized
and efficient living experience. They can also be trained to recognize and respond to new input and
patterns, enabling them to adapt to new situations and environments.

There are several neural network architectures that can be used to adapt to human lifestyle for
home automation, depending on the specific task and requirements. Here are some examples:

• Recurrent Neural Networks (RNNs): RNNs are a type of neural network designed to
work with sequential data. They are well-suited for analysing time-series data, such as daily
routines, and can learn to predict future behaviour based on past patterns. In the context of
home automation, RNNs can be used to learn a homeowner’s daily routines and adapt the
home’s systems accordingly.

40
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.22: Recurrent Neural Networks (RNNs)

• Convolutional Neural Networks (CNNs): CNNs are a type of neural network commonly
used in image and video recognition tasks. In the context of home automation, CNNs can be
used to analyse video feeds from cameras installed in the home and detect unusual activity or
potential security threats.

Figure 3.23: Convolutional Neural Networks (CNNs)

• Deep Reinforcement Learning (DRL): DRL is a type of neural network that can learn to
make decisions based on rewards or punishments received during training. In the context of
home automation, DRL can be used to optimize energy consumption by learning to adjust
lighting and temperature based on a reward signal that indicates energy efficiency.

41
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.24: Deep Reinforcement Learning (DRL)

• Autoencoder Neural Networks: Autoencoder neural networks are a type of neural network
architecture that can learn to compress and reconstruct data. In the context of home automation,
autoencoder neural networks can be used to learn a homeowner’s preferences and patterns of
behaviour and use that information to optimize home systems and recommend new products
or services.

Figure 3.25: Autoencoder Neural Networks

3.3.2 Deep Reinforcement Learning

Deep Reinforcement Learning (DRL) is a type of machine learning where an agent learns to make
decisions by interacting with an environment. The agent receives feedback in the form of rewards or
penalties, which it uses to adjust its decision-making process over time. DRL combines the strengths

42
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

of deep learning (for approximating complex functions) with those of reinforcement learning (for
decision-making in environments with uncertain outcomes).
Here’s a simplified explanation of the DRL process:

• State (s): At any given time, the environment is in a certain state. This state can be represented
by raw data, such as images, which deep learning excels at processing.

• Action (a): Based on the current state, the agent chooses an action. The choice of action is
determined by a policy, which can be represented by a deep neural network.

• Reward (r): After taking an action, the agent receives a reward (or penalty) from the
environment. The reward is a signal that tells the agent how good or bad its action was
concerning its objectives.

• New State (s’): After the action, the environment transitions to a new state.

• Policy Update: Based on the received reward and the transition to the new state, the agent
updates its policy (the neural network weights) to make better decisions in the future.

The objective of DRL is to find the optimal policy that will result in the maximum cumulative
reward over time.

Reasons to choose Deep Reinforcement Learning Architectures

Deep Reinforcement Learning (DRL) has distinct advantages when it comes to certain applications,
including intelligent home automation systems. Here are some reasons why one might choose DRL
over other neural network architectures for such a system:

1. Sequential Decision Making: DRL excels in environments where decisions must be made
sequentially over time to achieve a certain objective. In home automation, sequences of
actions (e.g., adjusting lighting, heating, or cooling) often lead to a desired outcome like
energy savings or comfort.

2. Learning from Interaction: DRL agents learn by interacting with their environment. In
home automation, this means the system can learn optimal policies by interacting with the
home’s various devices and observing the results, without needing extensive labeled training
data.

3. Delayed Rewards: DRL operates on the principle of maximizing cumulative rewards over
time. This is ideal for home automation scenarios where the benefit of an action (e.g., turning

43
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

down the thermostat) may not be immediately apparent but results in long-term gains (e.g.,
reduced energy bills).

4. Adaptability: Home environments and user preferences can change. DRL systems can adapt
to new situations or changes in the environment, making them suitable for homes that evolve
over time.

5. End-to-End Learning: DRL can map raw inputs (like sensor readings) directly to valuable
actions (like adjusting a thermostat) without the need for handcrafted features or complex
intermediate representations.

6. Complex Environment Handling: Homes are dynamic environments with many factors at
play, from changing weather conditions to the varying number of occupants. DRL can handle
the complexity and unpredictability of such environments.

7. Exploration vs. Exploitation: DRL algorithms inherently balance exploration (trying new
actions) with exploitation (repeating known beneficial actions). This allows home automation
systems to occasionally test new strategies while mostly sticking to known optimal behaviors.

8. Multi-objective Optimization: A home automation system may have multiple goals, such as
minimizing energy consumption while maximizing occupant comfort. DRL can be tailored to
handle such multi-objective problems.

9. Scalability: As more devices and sensors are added to a smart home, the state and action
space can grow exponentially. DRL, especially when combined with deep neural networks,
can scale to handle these large state and action spaces.

10. Real-time Decision Making: DRL can operate in real-time, making decisions on-the-fly
based on the current state of the environment. This is crucial for home automation systems
that need to react promptly to changes.

While DRL offers many advantages, it’s essential to note that its success in a home automation
system also depends on factors like the quality of the reward function, the amount of data available
for training, and the specific DRL algorithm employed. Also, while DRL can be powerful, it might
not always be the best choice for every aspect of home automation. Some tasks might be better
suited to simpler rule-based systems or other types of machine learning models.
Post careful consideration and deliberation out proposed algorithm belonging to the family of
Deep Reinforcement Learning is Proximal Policy Optimization

44
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Table 3.4: Comparison of DRL with other Deep Learning architectures for home automation.

Deep
Convolutional NN
Feature/Reason DRL Feedforward
(CNN)
NN

Sequential

Decision Making
Learning from

Interaction
Delayed Rewards ✓
Adaptability ✓ ✓ ✓
End-to-End
✓ ✓ ✓
Learning
Complex
Environment ✓
Handling
Exploration vs.

Exploitation
Multi-objective

Optimization
Partial (for image
Scalability ✓ ✓
data)
Real-time Decision Partial (depends on
✓ ✓
Making model size)
Handles Temporal
Data
Handles Spatial

Data (e.g., images)

3.3.3 Proposed Algorithm: Proximal Policy Optimization

PPO is an algorithm used in reinforcement learning, and it falls into the family of policy optimization
methods. It’s particularly known for being more stable and efficient than some older methods due
to certain tricks it employs to keep updates stable.

Background: Before diving into PPO, it’s essential to understand the broader context. In policy
optimization, an agent learns a policy πaSs which tells it which action ’a’ to take in a given state
’s’. One way to learn this policy is to use gradient ascent on the expected return (i.e., the sum of
rewards). However, large updates to the policy can be harmful, leading the agent to perform much
worse than before.

45
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Trust Region Methods: One approach to keeping updates small is to use trust region methods. The
idea is to limit the change to the policy in each update to be within a ’trust region’. This can be
done by adding a KL-divergence constraint which measures the difference between the old and new
policy. The aim is to prevent the policy from changing too much and to keep it close to the previous
policy.

Clipping in PPO: PPO takes a simpler approach than the trust region method. Instead of adding

a KL-divergence constraint, PPO penalizes changes in the policy that move too far from the old
policy. This is done by taking the minimum of the clipped and unclipped objective function. By
doing this, PPO avoids making too large policy updates.
Specifically, let the probability ratio be:

πat Sst , θ
rt θ = (3.1)
πat Sst , θold

The PPO objective is:

LCLIP θ = Et min rt θ Ât , cliprt θ , 1 − ε, 1 + ε Ât




where rt θ is the probability ratio,


(3.2)
Ât is an estimate of the advantage function,

ε is a hyperparameter (e.g., 0.2).

Benefits of PPO:

1. Stability: PPO tends to be more stable than some other policy optimization methods. This
means it’s less likely to produce policies that perform much worse than previous iterations.

2. Efficiency: PPO can achieve good results with fewer samples than some other methods.

3. Simplicity: PPO is conceptually simple and doesn’t require complex modifications like a
second-order optimization as in some trust region methods.

Applications: PPO has been successfully applied to a wide range of tasks, including robotics, game
playing, and various simulations.

46
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Table 3.5: Comparison of PPO with other Deep Learning architectures for reinforcement learning tasks.

Feature/
PPO A2C Deep RNN
Characteristic

Policy optimization ✓ ✓

Stability of training High Moderate Varies

Sample efficiency High Low Varies

Handles partial

observability

Simplicity of
High Moderate Moderate
implementation

Gradient clipping ✓

Trust region update Approximate

Suitable for

continuous action ✓ ✓ Varies

spaces

Scalability High High Moderate

Exploration vs.

Exploitation ✓

balance

Dependency

on initial Moderate High Moderate

hyperparameters

47
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Algorithm 1 Proximal Policy Optimization (PPO)


1: Initialize policy parameter θ and old policy parameter θold

2: for iteration = 1, 2, . . . do

3: ▷ Gather trajectories using the current policy

4: trajectories ← empty list

5: for t = 1 to T do

6: state ← current environment state()

7: action, action probability ← select action with policy(θ , state)

8: next state, reward ← step environment(action)

9: Add (state, action, reward, action probability, next state) to trajectories

10: state ← next state

11: ▷ Calculate advantages and returns for each trajectory

12: advantages, returns ← calculate advantage and returns(trajectories)

13: ▷ Update the policy using PPO

14: for epoch = 1 to EPOCHS do

15:

16: for i = 1 to length of trajectories do

17: trajectory ← trajectories[i]

18: advantage ← advantages[i]

19: return value ← returns[i]

20: state, action, reward, old action probability, next state ← trajectory

21: action probability ← policy(θ , state, action)

22: ratio ← action probability / old action probability

23: clip fraction ← min(ratio × advantage, clip(ratio, 1-ε, 1+ε) × advantage)

24: policy loss ← -mean(clip fraction)

25: value loss ← mean squared error(value function(θ , state), return value)

26: loss ← policy loss + value loss

27: θ ← optimize(loss, θ )

28: θold ← θ

3.3.4 Natural Language Processing

Natural Language Processing (NLP) plays a crucial role in home automation by enabling users to
interact with their smart homes using natural language commands. With NLP, smart home devices

48
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

can understand and interpret human language, allowing users to control various aspects of their
homes, such as temperature, lighting, and security, simply by speaking. NLP-powered voice
assistants like Amazon Alexa, Google Assistant, and Apple Siri are some of the most common
examples of this technology in action.

NLP also enables smart home devices to respond to user requests with appropriate actions. For
instance, a user can issue a command like ”turn off the lights” to a voice assistant, and it will send
the appropriate signal to the smart bulbs in the room to turn off. Additionally, NLP allows users to
customize their interactions with smart home devices by creating personalized routines and
commands. This means that users can set up their devices to respond to specific phrases that they
prefer and perform the desired actions, making the interaction with their smart homes more
intuitive and efficient.

Moreover, NLP can enhance the security of smart homes by enabling devices to recognize and
respond to specific voice commands or unique speech patterns. This feature makes it difficult for
intruders to control the devices and gain unauthorized access to the home. NLP-powered smart
home devices also have the potential to improve the quality of life for individuals with disabilities,
as they can use voice commands to control devices and appliances without requiring physical input.

In recent years, speech recognition technology has become more advanced, allowing devices to
better understand natural language and even recognize different voices. This enables users to
personalize their interactions with their devices, creating a more tailored experience.

Furthermore, speech recognition can be combined with other technologies such as NLP and
machine learning to create more sophisticated home automation systems. For example, by
analysing speech patterns and other linguistic cues, these technologies can detect changes in mood
and behaviour, providing a more personalized and responsive user experience.

49
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.26: Natural Language Processing

3.3.5 Computer Vision

Computer vision is a technology that allows machines to interpret and understand visual data from
the world around them. In the context of home automation, computer vision can be used to analyse
and interpret images or video footage captured by cameras installed in the home. This technology
has many potential applications in home automation systems, including security, energy efficiency,
and personalization.

One of the primary applications of computer vision in home automation is in security. Cameras
equipped with computer vision technology can detect and recognize faces, identify intruders, and
alert homeowners of any suspicious activity. This can provide an extra layer of protection for the
home, giving homeowners greater peace of mind.

Computer vision can also be used to improve energy efficiency in the home. For example,
cameras can be used to monitor the occupancy of rooms, automatically adjusting heating and
cooling systems to optimize energy usage. Additionally, computer vision can be used to detect and
alert homeowners of any open windows or doors, helping to prevent energy waste

Another potential application of computer vision in home automation is personalization. By

50
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

analysing visual data, computers can learn about a user’s preferences and habits, and adjust devices
and systems in the home accordingly. For example, lights and music can be automatically adjusted
based on the time of day or the user’s mood, creating a more comfortable and personalized living
environment.

Computer vision technology can also be used to detect and interpret human gestures, providing
a new and intuitive way for users to interact with their home automation systems. With gesture
detection, users can control various devices in their homes using hand movements, eliminating the
need for physical buttons or touchscreens.

In home automation systems, computer vision can be used to detect and recognize specific
gestures, allowing users to perform a variety of tasks such as turning on/off lights, adjusting the
volume on a speaker, or opening/closing blinds. Additionally, gestures can be combined with other
technologies such as voice recognition and NLP to create more sophisticated and responsive
systems.

One of the primary benefits of gesture detection in home automation is its convenience. By
using hand movements, users can control their devices from a distance, without the need to
physically interact with them. This can be particularly useful for individuals with mobility issues or
disabilities.

51
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.27: Computer Vision as subset of AI

3.3.6 AI/ML on AWS

AWS cloud services provide a powerful platform for implementing AI/ML-powered home
automation systems using Raspberry Pi. By leveraging the computing power and scalability of the
cloud, developers can create sophisticated home automation solutions that can be remotely
monitored and controlled.

One of the primary benefits of using AWS cloud services is the ability to easily train and deploy
machine learning models. For example, by using Amazon SageMaker, developers can create and
train machine learning models for tasks such as facial recognition or natural language processing,
and then deploy those models to run on the Raspberry Pi.

Additionally, AWS cloud services can be used to manage and store large amounts of data
collected by home automation systems. For example, data collected from sensors or cameras can be
stored in Amazon S3, and then analysed using tools such as Amazon Athena or Amazon
QuickSight to gain insights into home usage patterns and behaviour.

52
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Furthermore, AWS IoT services can be used to connect and manage IoT devices such as
Raspberry Pi, allowing for secure and reliable communication between devices and the cloud. This
can enable real-time monitoring and control of home automation systems, providing a more
responsive and personalized user experience. Deploying AI and deep learning models on the cloud
has become increasingly popular in recent years due to several advantages over deploying
on-premises. The cloud offers several benefits, including scalability, flexibility, and
cost-effectiveness.

One of the primary benefits of deploying AI and deep learning models on the cloud is
scalability. The cloud provides virtually unlimited computational power, allowing organizations to
scale their AI and deep learning models easily. This means that organizations can quickly and
easily adjust their computing resources based on demand, without having to invest in expensive
hardware and infrastructure.

Another advantage of deploying AI and deep learning models on the cloud is flexibility. Cloud
providers offer a range of services that can be tailored to specific needs, including machine learning
services, data storage, and analysis tools. This allows organizations to select the services that best
fit their needs, and quickly integrate them into their existing workflows.

Additionally, deploying AI and deep learning models on the cloud can be more cost-effective
than deploying on-premises. Cloud providers offer a range of pricing options, including
pay-as-you-go and subscription-based models. This means that organizations can avoid the upfront
costs of purchasing and maintaining hardware, and only pay for the computing resources they
actually use.

Moreover, deploying on the cloud provides better access to a range of tools and resources, such
as pre-built models, data sets, and developer tools. These resources can help organizations accelerate
the development and deployment of AI and deep learning models, reducing time-to-market and
increasing productivity.

53
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

3.3.7 Why is deep learning better than ML for unstructured data

Deep learning is better than traditional machine learning for unstructured data because it can
automatically extract features from data, handle high-dimensional data, and learn from large datasets,
resulting in higher accuracy and better results. Deep learning is also effective for processing various
types of unstructured data, including images, text, and audio. On the other hand, machine learning
may require manual feature engineering, struggle with high-dimensional data and large datasets,
and may be limited to certain types of unstructured data. Machine learning models may also need
to be simpler to achieve good results

54
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Table 3.6: Table of comparison of the main features between Deep Learning and Machine Learning.

Feature/
Deep Learning Machine Learning
Characteristic

Ability

to handle
Better Limited
unstructured

data

Feature Requires manual feature


Automatic feature extraction
engineering engineering

High-
Can handle very high- May struggle with high-
dimensional
dimensional data dimensional data
data

Learning May require subsampling or

from large Effective for large datasets dimensionality reduction for

datasets large datasets

Can achieve higher accuracy and May struggle to achieve high


Performance
better results accuracy on complex tasks

Suitable for

different Effective for images, text, audio,


May be limited to certain types
types of and other types of unstructured
of unstructured data
unstructured data

data

Model Can handle complex models with Simpler models may be more

complexity many layers and nodes appropriate for machine learning

3.4 Mobile Application and Website


A mobile application plays a critical role in home automation by providing users with the ability to
control their smart home devices remotely using their mobile devices. A mobile application serves

55
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

as a user interface that allows users to interact with their smart home devices, control their home’s
environment, and receive real-time updates on the status of their devices.

One of the primary advantages of a mobile application in home automation is convenience.


With a mobile application, users can control their smart home devices from anywhere, at any time,
as long as they have an internet connection. This means that users can easily turn off lights, adjust
temperature settings, and even monitor their home’s security while they are away.

Another important role of a mobile application in home automation is the ability to create
customized settings and scenarios. For example, users can create personalized scenes that combine
multiple smart home devices to create a specific environment, such as turning off all lights and
locking doors when leaving the house. These personalized settings can be easily accessed and
activated through the mobile application, making it easy for users to manage their smart home
devices and automate their routines.

Mobile applications can also provide real-time updates and notifications to users, allowing them
to stay informed about the status of their smart home devices. For example, users can receive alerts
when a door or window is opened or closed, when the temperature changes, or when a motion
sensor is triggered. These real-time updates help users stay connected to their home and ensure that
they are aware of any unexpected changes.

3.4.1 UI/UX

Good UI/UX design is essential for the success of a mobile app and website of a home automation
system. A well-designed user interface makes it easy for users to interact with their smart home
devices and control their home environment. A good UI/UX design provides intuitive navigation,
clear and concise information, and well-organized layout that makes it easy for users to find what
they need quickly. This helps users to stay engaged and avoid frustration while interacting with
their smart home devices. Additionally, a visually appealing design and smooth user experience can
enhance user satisfaction and encourage users to continue using the home automation system.
Ultimately, good UI/UX design can make a significant difference in the overall success and
adoption of a home automation system.

56
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

3.4.2 Flutter

Flutter is a popular mobile app development framework that offers several advantages over native
development and other cross-platform development options for home automation apps and
websites.

Firstly, Flutter enables developers to create visually appealing and high-performance


applications that work seamlessly on both Android and iOS platforms. With Flutter, developers can
use a single codebase to build apps for multiple platforms, which saves time and reduces
development costs.

Secondly, Flutter provides a fast development cycle with a hot-reload feature that allows
developers to make changes to the code and instantly see the results without having to recompile
the entire app. This feature significantly speeds up the development process and helps developers to
quickly iterate on their ideas.

Thirdly, Flutter offers a rich set of customizable widgets and tools that enable developers to
create beautiful and responsive user interfaces. This helps to improve the user experience and
engagement with the app.

Finally, Flutter has a growing community of developers and extensive documentation that
makes it easy for developers to learn and use the framework. Additionally, Flutter provides
excellent support for integrating with various third-party APIs, which is essential for developing a
home automation app or website that interacts with different devices and platforms

3.4.3 MERN Stack

The MERN stack (MongoDB, Express, React, and [Link]) is a popular tech stack for building
modern web applications, including home automation websites, due to several advantages it offers
over other tech stacks.

Firstly, the MERN stack offers an efficient development process that allows developers to build
a scalable and robust application quickly. [Link], the backend technology in the MERN stack, is

57
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

known for its fast-processing speed and event-driven architecture, making it ideal for building
real-time applications like home automation websites. The use of JavaScript across the entire tech
stack allows developers to write code more efficiently, reducing development time and increasing
productivity.

Secondly, the MERN stack provides excellent scalability and flexibility. MongoDB, the
database technology in the MERN stack, is a NoSQL database that offers flexible data modelling
and easy horizontal scaling, making it well-suited for handling large volumes of data generated by
home automation systems. Additionally, React, the frontend library in the MERN stack, provides
excellent flexibility in terms of creating reusable components, which can be used to build a modular
and scalable architecture for a home automation website.

Finally, the MERN stack provides a consistent and streamlined development process, with all
the technologies in the stack using JavaScript. This means that developers do not need to learn
multiple languages or technologies, reducing the learning curve and making it easier to build
high-quality home automation websites.

3.4.4 Postman API

Postman is a popular tool for testing and interacting with APIs, and it is well-suited for interfacing
with AWS APIs for several reasons. Firstly, Postman provides a user-friendly interface for making
HTTP requests to AWS APIs, making it easy for developers to test API endpoints and troubleshoot
issues. Secondly, Postman offers extensive support for AWS APIs, with pre-built API collections
available for a range of AWS services, including S3, DynamoDB, and Lambda. These collections
provide developers with a set of pre-configured requests that can be used as templates for building
custom requests. Thirdly, Postman provides a range of features that can help developers to automate
API testing, such as the ability to write test scripts and set up workflows. Finally, Postman
provides excellent collaboration features, making it easy for developers to share API collections
and collaborate on testing and development.

3.4.5 AWS API

AWS APIs offer several advantages over APIs of other cloud providers. Firstly, AWS has a much
larger market share than other cloud providers. This community has developed a range of tools

58
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

and resources to support developers using AWS APIs, including pre-built API collections, SDKs,
and documentation. Secondly, AWS offers a wide range of services, including compute, storage,
networking, and security, with APIs available for each of these services. This allows developers
to build complex, multi-tier applications using a single cloud provider. Thirdly, AWS has a global
presence, with data centres located in multiple regions worldwide. This allows developers to build
applications that are close to their users, reducing latency and improving performance. Finally,
AWS APIs are backed by a range of service level agreements (SLAs), which guarantee high levels of
availability and performance. Overall, AWS APIs are a comprehensive, reliable, and well-supported
option for building cloud-based applications.

3.5 System Architecture


This system consist of Raspberry Pi 4 as the Hub and gateway for the entire automation system.
Two UNO R3 boards, a NodeMCU ESP 8266, a WiFi IR Blaster are at the Edge level. However, due
to requirement of high end computational power the AI/ML operations are planned to be executed
on AWS cloud platform. Below is the birds eye view of the system’s hardware architecture.

59
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.28: System Hardware (IoT) Architecture

3.6 Circuit Diagram


Our system includes three variants of development boards thus have a complex circuit diagram and
communication profile. It become essential to understand the schematics of individual boards
before getting into the interconnections of the boards.

Specifications of the boards are also mention earlier. Schematics of each board are as below

1. UNO R3 WIFI ESP8266 ATMEGA328 CH340G

60
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.29: RobotDyn UNO R3 Schemetic diagram

Figure 3.30: RobotDyn UNO R3 ESP Pool Pin diagram

2. NodeMCU ESP 8266

61
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.31: Node MCU ESP 8266 Schemetic diagram

3. Raspberry Pi 4 Model B 8GB

Figure 3.32: Raspberry Pi 4 Schemetic Diagram

62
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.33: Raspberry Pi 4 Pin Diagram

4. SparkFun WiFi IR Blaster

Figure 3.34: SparkFun WiFi IR Blaster Pinout

All these individual boards are connected with various sensors, sensor modules and actuators. Thus,
it creates a hefty circuit as shown below:

63
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.35: Circuit Diagram

This circuit includes all the sensors, actuators, Development Boards and power supplies.

3.7 Communication Profile


Communication between different board and single board computer technologies is a daunting task.
Interoperability however has been a classical issue in this industry. Thus, communication becomes
a really challenging task. This project has combination of wired and wireless communication
technologies. As, this provides more flexibility and reliability compared to all wireless
communication. In addition to this it significantly reduces latency and overhead. It is not feasible to
have all wired communication as well due to positioning and geographical issues. Apart from this it
also introduces higher capital cost and maintenance cost of the system.
Data Type of the data across the network: Data majorly consist of Boolean type array being

64
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

serially transmitted and received.


Other mainly used data Type is Float and Integer respectively.
However, transmitting these demanding data types is not plausible solution as the recommended
data type is String. Thus, it add up an overhead to typecast the data before transmitting and after
receiving

3.7.1 Wired Communication

Figure 3.36: Serial VS Parallel Communication

I²C (Inter-Integrated Circuit) Communication

I²C is a synchronous, multi-master, multi-slave, packet-switched, single-ended, serial


communication bus.

• Components:

– Master Device: Initiates and controls data transfer.

– Slave Device: Responds to the master.

• Pins:

– SDA (Serial Data Line): Used for sending and receiving data.

65
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

– SCL (Serial Clock Line): Provides synchronization.

• Characteristics:

– Uses only two wires for communication.

– Devices can be masters or slaves.

– Each slave has a unique address.

– Supports data rates of 100 Kbit/s (Standard mode) and up to 3.4 Mbit/s (High-speed
mode).

• Arduino UNOs and I²C: The Arduino UNO has built-in pull-up resistors for I²C
communication that can be used with its Wire library.

SPI (Serial Peripheral Interface) Communication

This is a synchronous serial communication interface used for short-distance communication,


primarily in embedded systems.

• Components:

– Master Device: Initiates communication.

– Slave Device: Responds to the master.

• Pins:

– MOSI (Master Out Slave In): Sends data from master to slave.

– MISO (Master In Slave Out): Sends data from slave to master.

– SCK (Serial Clock): Clock signal generated by the master to synchronize data transfer.

– SS (Slave Select): Determines which slave device the master is currently communicating
with.

• Characteristics:

– Full duplex communication.

– Separate lines for sending and receiving data.

– Data rates can be faster than I²C.

• Arduino UNOs and SPI: The Arduino UNO supports SPI communication using its built-in
SPI library.

66
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

UART (Universal Asynchronous Receiver-Transmitter) Communication

UART is a hardware device or circuitry that is responsible for the asynchronous serial
communication in computing devices.

• Pins:

– TX (Transmit): For transmitting serial data.

– RX (Receive): For receiving serial data.

• Characteristics:

– It’s asynchronous (no clock signal is required).

– Data is transmitted serially, one bit at a time.

– It uses start and stop bits to determine the beginning and end of a data byte.

• Arduino UNOs and UART: Arduino UNO has a single UART interface, used for serial
communication through its digital pins 0 (RX) and 1 (TX). It’s also used for communication
with the computer during programming and for debugging with the Serial Monitor.

Keeping the below factors in consideration we have decided to use UART as our primary wired
communication protocol

This protocol is used to establish communication between three boards namely two UNO R3
and a NodeMCU ESP 8266.

However, it is also important to note that RobotDyn UNO R3 WiFi boards have ESP module
emnbedded onto it. The internal communication between ATmega and ESP is through UART pins.

Figure 3.37: Protocols available in Serial Communication

67
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Table 3.7: Comparison of UART, I²C, and SPI

Criteria UART I²C SPI

Communication
Asynchronous Synchronous Synchronous
Type
Requires at least 3 Requires at least
Wiring Requires only 2
wires (SDA, SCL, 4 wires (MISO,
Complexity wires (TX, RX)
GND) MOSI, SCK, SS)
Works well over Best suited for short Best suited for short
Flexibility
longer distances distances distances
Clock Signal Not required Required Required
Data collisions
Possible when Not applicable as
Data are less likely due
multiple masters SPI is primarily
Collision to the absence of
are involved single-master
multiple masters
More complex
Easier for simple, More complex due
Ease of due to addressing
point-to-point to separate data
Implementation and multi-master
communication in/out lines
features

Figure 3.38: UART (Tx/Rx) Communication

However, it is also vital to know that majority of sensors and/or sensor modules that we are
using use I2C and UART as thier communication protocols respectively. A lot of times it is
essential to attach more than one sensor on I2C pins. As I2C protocol have only 2 dedicated pins
SCL and SDA. The solution to this problem is connecting in parallel. Parallel connections in these
scenario is connection on the same bus but with different address. In order to change the address of
the peripheral there are 3 open pins on I2C chip namely, A1, A2 and A3 these can be closed tin
different possible combinations to produce a new address while I2C scanning. List of address and
its configuration is given below:

68
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.39: I2C Addressing

In UNO R3 WiFi board that we use two separate chips ATmega and ESP are internally
connected. Thus, it is printed on the PCB and cannot be modified in anyway. One can only switch
the modes using the DIP switch structure which is earlier mentioned.
The internal connections are mode in the following way:

Figure 3.40: ATmega ESP internal UART (Tx/Rx) Communication

3.7.2 Wireless Communication

Wireless communication occurs between Raspberry Pi 4 and ESP modules available on the boards
of respective boards. Once the data is received on the ESP module through guided media utilizing

69
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

UART protocols it is further sent to Raspberry Pi 4 for further processing using MQTT protocols.
Any communication in this wireless zone must be Full Duplex in nature and on the other hand Half
Duplex mode will work for wired communication

Figure 3.41: Modes of communication

MQTT

Basics of MQTT:

MQTT, standing for Message Queuing Telemetry Transport, is a lightweight, publish-subscribe


network protocol primarily used in machine-to-machine or Internet of Things communication
contexts.

• Broker: Centralized communication method where devices ”connect” to send or receive


messages.

• Publish-Subscribe Model: Devices can ”publish” messages to a topic or ”subscribe” to a


topic for message receipt.

70
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.42: MQTT Publish and Subscribe Model

• Topics: Labeling system for data payload. Subscribers receive updates based on their topic
subscriptions.

• QoS (Quality of Service): MQTT offers different levels of QoS, ensuring message delivery
based on message importance.

Figure 3.43: Basic MQTT Communication Protocol working

MQTT Communication between Raspberry Pi and Arduino:

• Role of Raspberry Pi: Being a capable microcomputer with Wi-Fi capabilities and running a
Linux-based OS (like Raspbian), the Raspberry Pi can host an MQTT broker like Mosquitto
and act as an MQTT client.

• Role of Arduino: Arduino, with its resource constraints, mainly functions as an MQTT client.
For communication, components like the ESP8266 Wi-Fi module are typically required.

• Setting up the Broker on Raspberry Pi:

– Install Mosquitto: sudo apt install mosquitto mosquitto-clients

– Start the broker: sudo systemctl start mosquitto

71
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

• Arduino and MQTT:

– Use the Arduino MQTT library (e.g., PubSubClient).

– Network connection via an Ethernet shield or Wi-Fi module.

– Arduino can publish data to the Raspberry Pi’s MQTT broker or subscribe to topics.

• Example Use Case: An Arduino temperature sensor could publish data to a topic like
”home/livingroom/temperature”, which the Raspberry Pi subscribes to for data processing or
display.

Figure 3.44: MQTT Raspberry Pi and Arduino/NodeMCU Example

Benefits of Using MQTT with Raspberry Pi and Arduino:

• Lightweight Protocol: Designed for devices and networks with constraints, ensuring minimal
data overhead.

• Real-time Communication: Suitable for timely data delivery in real-time applications.

• Scalability: The broker and publish-subscribe model facilitate scalability for numerous
devices.

• Security: While basic MQTT lacks built-in security, TLS can secure it.

Limitations:

• Broker Dependence: Broker disruptions impede device communication.

72
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

• Arduino Constraints: Basic Arduino boards require additional components for MQTT
communication.

Figure 3.45: MQTT SN System

3.7.3 Communication Architecture

As mention earlier this system contains mixture of wireless and wired communication resulting into
a relatively complex communication profile. On the top of it the data type needed to be sent across
the network is heavy, thus, adds up to the overhead of typecasting to and from String.
Addressing all these challenges we have designed a novel communication profile of which the
diagrammatic representation is given below:

Table 3.8: Development Boards and Their Communication Protocols

Wireless
Development Wired Communication
Communication
Board Protocols
Protocols

Raspberry Pi Serial UART MQTT


Arduino Uno R3
Serial UART, I2C MQTT
Wifi
NodeMCU
Serial UART, I2C MQTT, HTTP
ESP8266

73
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.46: Communication Architecture

3.8 AWS Pipeline


We have designed an end to end Cloud Pipeline on AWS. This pipeline covers various aspects such
as fetching data from IoT devices then processing it using Lamda function and Kinesis Analytics.
AWS Sagemaker will be hosting the trained Reinforcement Learning model and the database
services are taken cake by DynamoDB and other storage services are looked after by S3 buckets.
Plethora of services are used in this pipeline in odrer to suffice the need of each technology.

For balancing the load Load Balance and Cloud Watch can be used and at the same time EC2
instance must be used to manage this pipeline

74
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Figure 3.47: AWS Pipeline

3.8.1 AWS Data Processing and Integration Pipeline

The presented diagram showcases an intricate AWS data processing and integration pipeline.
The following elucidation provides an understanding of the illustrated AWS services and their
interconnected functionalities:

AWS IoT Core & AWS IoT Greengrass

Acting as entry points for IoT (Internet of Things) devices. The former facilitates device-cloud
connection, while the latter offers localized compute, messaging, data caching, and synchronization.

AWS Lambda

This serverless compute service executes code in response to events, possibly those stemming from
IoT devices.

AWS DataSync

Employs AWS Lambda functions to transport data between on-site locations to Amazon S3 or
Elastic File System (EFS).

Amazon Simple Storage Service (S3)

This scalable, reliable, and efficient storage service likely functions as the primary repository or
staging area for raw data.

75
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Data Analytics and Warehousing

• Amazon Athena: An interactive query service designed for S3 data analysis using SQL.

• Amazon Redshift: AWS’s data warehousing service.

AWS Glue

Operates in data cataloging and ETL (extract, transform, load) processes. It discovers, catalogs, and
readies data for analytics.

Glue Data Catalog

Operates as a unified metadata repository, enhancing ETL job and data analytics transparency.

Amazon Kinesis Data Analytics

Handles real-time data processing and analysis, especially from live streams.

Amazon ElasticCache

Enhances data retrieval speeds via its in-cloud in-memory cache service.

Amazon SNS (Simple Notification Service)

This might be used to notify users or systems based on specific analytical results or processed data.

Amazon SageMaker

Dedicated to building, training, and deploying machine learning models.

AWS Data Pipeline

Orchestrates and automates the flow and transformation of data across various AWS services and
on-premises data sources.

External Devices

The devices symbolized on the diagram’s lower left (labeled as ”ter” and ”k”) are likely
representative of external or on-premises devices or data sources.
Below are more detailed reports for some of the vital AWS Services:

3.8.2 AWS Lambda

AWS Lambda is a serverless compute service provided by Amazon Web Services (AWS) that lets
you run code without provisioning or managing servers. It executes your code only when required
and scales automatically, from a few requests per day to thousands per second.

76
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Core Features

1. Event-Driven: AWS Lambda is designed to use events like changes to data in an Amazon S3
bucket or updates in a DynamoDB table to trigger the execution of code.

2. Scalable: Lambda functions can scale automatically by running code in response to each
trigger.

3. Integrated: Lambda is integrated with a variety of AWS services.

4. Stateless: Every function execution is independent.

Use Cases

1. Web Applications: Deploy serverless web applications and backends.

2. Data Processing: Process data in real-time.

3. Machine Learning: Implement and deploy machine learning models.

4. Backup and Logging: Trigger backup processes or audit trails.

Advantages

• No Server Management.

• Continuous Scaling.

• Built-in Fault Tolerance.

• Flexible Resource Model.

Limitations

• Time Limit.

• Deployment Package Size.

• Resource Limit.

• State Management.

77
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

3.8.3 Amazon S3 (Simple Storage Service)

Amazon Simple Storage Service (Amazon S3) is a scalable object storage service provided by
Amazon Web Services (AWS). It allows users to store and retrieve any amount of data at any time,
from anywhere on the web. Designed for 99.999999999% (11 9’s) of durability, Amazon S3 offers
a highly reliable and available storage infrastructure.

Core Concepts

1. Objects and Buckets: Data in Amazon S3 is organized into objects and buckets. Objects
reside within buckets with a key and metadata.

2. Global Namespace: Buckets are globally unique across all AWS accounts.

3. Data Consistency: Amazon S3 provides strong read-after-write consistency.

4. Scalability: Suitable for various storage needs, from backups to big data analytics.

Features

1. Versioning: Store multiple variants of an object in the same bucket.

2. Life Cycle Policies: Automate object transitions or deletions.

3. Multipart Upload: Enables concurrent uploads of file parts.

4. Transfer Acceleration: Faster uploads using Amazon’s CloudFront.

5. Event Notifications: Notify other AWS services or Lambda functions for object changes.

6. Data Replication: Replicate data with Cross-Region Replication.

Storage Classes

Amazon S3 offers storage classes for different use cases:

• STANDARD

• INTELLIGENT TIERING

• ONEZONE IA

• GLACIER

• DEEP ARCHIVE

78
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Security and Compliance

1. Access Control: Use bucket policies and ACLs for object permissions.

2. Data Encryption: Supports server-side and client-side encryption.

3. Monitoring and Logging: Integration with AWS CloudTrail and S3 Server Access Logging.

4. Compliance: Suitable for regulated industries.

3.8.4 Amazon DynamoDB

Amazon DynamoDB is a fully managed NoSQL database service offered by Amazon Web Services
(AWS). It is designed to provide low-latency and high-throughput performance by automatically
scaling the data across multiple servers. With DynamoDB, users can create database tables that
store and retrieve any amount of data and handle any level of request traffic.

Core Concepts

1. Tables, Items, and Attributes: A table in DynamoDB consists of items, and each item is a
collection of attributes.

2. Primary Key: Every table has a primary key, uniquely identifying each item.

3. Scalability and Performance: DynamoDB uses partitioning for virtually unlimited read and
write workloads.

4. Consistency: Supports both Eventually Consistent Reads and Strongly Consistent Reads.

Features

1. Global Tables: Replicates tables across multiple regions.

2. DynamoDB Streams: Captures item-level modifications.

3. DynamoDB Accelerator (DAX): Provides in-memory cache.

4. Backup and Restore: Offers on-demand and continuous backups.

5. Adaptive Capacity: Maintains peak performance under imbalanced workloads.

Security

1. Fine-Grained Access Control: Controls read or write item requests.

2. Encryption at Rest: Secures data in encrypted tablespaces.

79
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

3. VPC Endpoints: Provides private access within a VPC.

Use Cases

• Web Applications: Manages user data, preferences, game state, etc.

• Mobile Apps: Handles data for mobile applications.

• Gaming: Manages unpredictable workloads.

• Content Management: Stores metadata for digital assets and manages content.

3.8.5 Amazon SageMaker

Amazon SageMaker is a fully managed machine learning (ML) service provided by Amazon Web
Services (AWS). It allows developers and data scientists to efficiently build, train, and deploy
machine learning models. SageMaker takes on various tasks within the machine learning workflow,
spanning from data labeling and preprocessing to model training, optimization, and deployment.

Core Features of Amazon SageMaker

1. Built-in Algorithms: SageMaker offers pre-defined algorithms optimized for vast datasets,
eliminating custom code requirements.

2. Jupyter Notebooks: Integrated Jupyter notebooks facilitate data preprocessing, computational


visualization, and work sharing.

3. Distributed Training: SageMaker supports expansive dataset model training, scaling as


necessary, expediting the training phase.

4. Model Deployment: Post-training, SageMaker streamlines model production deployment,


handling auto-scaling and load balancing.

5. Automated Hyperparameter Tuning: It identifies the optimal model by adjusting various


hyperparameters and parallelly evaluating numerous models.

6. SageMaker Studio: An all-encompassing integrated development environment for machine


learning workflows.

Suitability for Reinforcement Learning (RL)

Reinforcement Learning is a machine learning approach where an agent learns behavior patterns by
taking actions in a specific environment to maximize some notion of cumulative reward.
SageMaker’s functionalities render it apt for Reinforcement Learning tasks:

80
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

1. RL Toolkits: SageMaker integrates with renowned RL libraries like TensorFlow, Intel’s


Coach, and Ray’s Rllib.

2. Simulations: RL-based agent training usually requires multiple simulations. SageMaker can
horizontally scale these, accelerating training.

3. AWS RoboMaker Integration: For robotics applications, SageMaker synchronizes with


AWS RoboMaker, offering a realistic simulation setting.

4. Pre-built RL Notebooks: SageMaker proffers ready-made Jupyter notebook templates for


various RL scenarios.

5. RL Model Deployment: After RL agent training, SageMaker facilitates deployment, allowing


real-world agent testing and utilization.

6. Cost-Effective Training: RL often demands substantial computation. SageMaker’s managed


setup can be more economical than dedicated environments.

3.8.6 AWS IoT Core

AWS IoT Core is a managed cloud service provided by Amazon Web Services (AWS) that facilitates
the connection of Internet of Things (IoT) devices to cloud applications and other devices seamlessly.
AWS IoT Core can manage billions of devices and trillions of messages, securely and reliably
routing those messages to AWS endpoints and other devices.

Key Features

1. Device Connectivity: Supports HTTP, WebSockets, and MQTT, a protocol tailored for
limited-bandwidth devices.

2. Authentication and Authorization: Secures device-to-AWS IoT communication using


recognized security measures.

3. Device Registry: Organizes the resources linked to each device for tracking metadata and
configuration.

4. Device Shadow: Offers a JSON depiction of each device’s current state, enabling applications
or other devices to read and engage with them.

5. Rules Engine: Transforms and relays data from devices, directing them to assorted AWS
services.

81
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

6. AWS Service Integrations: Enables connectivity with various AWS services, amplifying the
range of potential applications and analytics capabilities.

Benefits

1. Scalability: Accommodates billions of devices and trillions of messages.

2. Low Latency: Delivers swift performance, empowering devices to rapidly react to alterations.

3. Rich Analytics: Integrated AWS services allow real-time data stream analysis, storage, and
subsequent processing.

4. Easy Integration: Ensures device data remains synchronized with on-premises or cloud-based
applications.

5. Enhanced Security: Implements multi-layered security to preserve the confidentiality and


security of data shared between devices and AWS IoT Core.

Use Cases

• Home Automation: Manages smart home devices such as lights, security cameras, and
thermostats.

• Wearable Devices: Monitors health through wearable devices.

• Industrial Automation: Real-time machinery monitoring for operations optimization and


predictive maintenance.

• Smart Cities: Administers systems for waste management, traffic, and public utilities.

• Agriculture: Implements precision farming by monitoring soil moisture and tracking


livestock.

3.8.7 AWS IoT Greengrass

AWS IoT Greengrass is a service provided by Amazon Web Services (AWS) designed to allow
secure local compute, messaging, data caching, and sync capabilities for connected devices. With
Greengrass, devices can execute AWS Lambda functions, maintain device data synchronization,
and communicate with other devices securely, even without an active Internet connection.

82
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

Key Features

1. Local Lambda Execution: Enables local execution of AWS Lambda functions, bringing
logic execution closer to data sources.

2. Local Device Shadows: Offers a persistent representation of device state, facilitating offline
device interactions.

3. Secure Device Connections: Uses AWS IoT security and authentication mechanisms to
ensure secure device-gateway and gateway-cloud communication.

4. Local Messaging: Devices can engage in inter-device communication without requiring cloud
connectivity.

5. Data Syncing Across Devices: Automatic device data synchronization with the cloud once
reconnected.

6. Extensions via Connectors: Integration of third-party applications, on-premises software,


and AWS services without code writing.

Benefits

1. Edge Computing: Promotes local data processing for quicker response times compared to
cloud-based processing.

2. Offline Capabilities: Ensures effective device operation even in intermittent or no cloud


connectivity situations.

3. Reduced Costs: Local data processing reduces raw data cloud transfer, minimizing data
transfer expenses.

4. Seamless Deployment: Greengrass’s integration with AWS IoT Core facilitates seamless
compute task deployment across a device fleet.

5. Enhanced Security: Features encryption both at rest and in transit to keep data secure.

Use Cases

• Industrial Automation: Employs local data processing in factories for immediate decision-
making.

83
CHAPTER 3. PROJECT FLOW AND METHODOLOGY

• Smart Agriculture: In expansive farms, real-time data collection and analysis are essential
for immediate action.

• Remote Monitoring: In mines, oil rigs, or other isolated locations, equipment health
monitoring and swift action are critical.

• Smart Cities: Handles utilities, traffic, and infrastructure by making local decisions.

• Home Automation: Ensures smart home devices can decide autonomously without relying
entirely on the cloud.

84
Chapter 4

Results and Analysis

4.1 Tools and Technologies

Table 4.1: Tools and Technologies Used

Categories Tools & Technologies


Hardware 1. Raspberry Pi 4 model B
2. Arduino UNo r3 wifi
3. Nodemcu esp8266
4. Sensors:
- dht22
- paj7620 gesture sensor
- voice recognition module v3
- PIR motion sensor
5. Actuators:
- l298 motor driver
- relay module
- SparkFun wifi ir blaster

85
CHAPTER 4. RESULTS AND ANALYSIS

Software 1. DRL algorithm: Proximal policy optimization


2. Software Tools:
- Arduino ide
- raspbian os
- Jupyter notebook
- python
3. Cloud & API Platforms:
- AWS cloud platform and its services
- API platforms and development tools
Communication
1. Wired:
Protocols
- UART
- I2C
2. Wireless:
- MQTT

4.2 Results
The project’s performance metrics, acquired post-implementation, provide tangible evidence of its
success and efficacy. Below are the summarized results contrasting the traditional home automation
systems with the ”Smart Lifestyle Automation” project:

Table 4.2: Comparative analysis of traditional home automation systems vs. Smart Lifestyle Automation

Criteria Traditional Systems Smart Lifestyle Automation

Personalization Generic Responses Adaptive User-centric Interactions


Interoperability Limited Compatibility Seamless Integration Across Devices
Learning Ability Static Dynamic (via PPO)
Response Time Average Real-time
Energy Efficiency Standard Optimized (via AI)

The table elucidates the marked improvements achieved through the project. Notably, the
adaptive user-centric interactions and seamless device integrations have been pivotal in enhancing
user satisfaction. Furthermore, the dynamic learning capability, endowed by the PPO algorithm, has
manifested in optimized energy consumption, rendering the system both smart and sustainable.

86
CHAPTER 4. RESULTS AND ANALYSIS

4.2.1 Quantitaive Results

The results were decidedly in favour of PPO. In the baseline scenario, sudden shifts in user
preferences often led to large policy updates, which in turn resulted in suboptimal system
behaviours. For instance, during peak hours, the system sometimes made drastic thermostat
adjustments that compromised user comfort. In contrast, under PPO, the system exhibited smoother
transitions, making more gradual and consistent adjustments that better aligned with users’
evolving preferences.

Quantitatively, the PPO-driven system exhibited a 45reduction in undesired policy outcomes


compared to the baseline. User satisfaction scores gathered via simulated feedback mechanisms
were on average 30% higher in the PPO scenario. Furthermore, energy consumption analysis
revealed that the PPO model achieved a 15% improvement in energy efficiency during peak hours,
suggesting a tangible benefit not just in user experience but also in operational cost.

In relatively simple scenario where only ‘ON’ and ‘OFF’ of lights (or fans) was taken into the
consideration results suggest that RNN works better but PPO is not too behind. Graph below shows
that:

87
CHAPTER 4. RESULTS AND ANALYSIS

Figure 4.1: RNN vs PPO in simple case scenario

However, the proposed system is not that simple in nature. The system includes much more
than just ‘ON’ and ‘OFF’. In includes Dimming and Colour of the ambient lighting, Speed of fan,
AC temperature and other HVAC setting, TV Volume and Channel along with Home Entertainment
system setting, Curtain positions and other aspects. These are outputs depending on input like Time,
User, Exterior Temperature and location. When such system is considered, PPO performs
significantly better than RNN. The graph along with the tabular outputs supports this statement

88
CHAPTER 4. RESULTS AND ANALYSIS

Figure 4.2: RNN vs PPO in Complex case scenario

Table 4.3: RNN vs PPO Results Table for Complex Case Scenerio

Epoch RNN Accuracy PPO Average Reward

1 0.5279999997 0.914
2 0.625 0.926
3 0.6629999988 0.94
4 0.6629999988 0.918
5 0.6629999988 0.944
6 0.6629999988 0.956
7 0.6629999988 0.966
8 0.6629999988 0.974
9 0.6629999988 0.964
10 0.6629999988 0.98

a. Evaluation Metrics for RNN is Accuracy


b. Evaluation Metrics for PPO is Average Reward

The average reward provides a sense of how well the PPO-trained agent performs in the
environment. In this case, the agent receives a reward of more than +0.5 for the correct action

89
CHAPTER 4. RESULTS AND ANALYSIS

(based on user feedback) and less than 0.5 for the wrong action. The average reward is then the
mean of all these rewards over the given steps.

(a) Raspberry Pi 4 with screen

(b) Implemented System

Figure 4.3: Original Project Image

For testing and trying out working of the system, visualization of the system was essential so we
made a miniature house model out of MDF and assembled the system. This gave us a better under
standing of the working of the system. Apart from just the visualization this gave us a better way to
train the model by simulating the real-world environment, as deployment of the model in the real
world was not feasible. Black labels represent the placement of the actuators, Red are controller
boards and Yellow are Sensors

90
CHAPTER 4. RESULTS AND ANALYSIS

Figure 4.4: Miniature Environment setting for the system

4.3 List of Research Paper Publication

Table 4.4: List of Research Paper Publications

Research Paper Journal Status


A Novel Reinforcement Learning - Based Smart
IEEE
Lifestyle Automation: A Step Towards Enhanced Submitted
Access
Interoperability and Energy Efficiency

91
Chapter 5

Conclusion and Future Works

5.1 Conclusion
The ”Smart Lifestyle Automation” project sought to address contemporary home automation
challenges, notably interoperability, semi-automation issues, and lack of adaptive personalization,
by merging Artificial Intelligence (AI), the Internet of Things (IoT), and Cloud Computing.
Leveraging technologies like Arduino Uno and Raspberry Pi, alongside Deep Reinforcement
Learning, specifically the Proximal Policy Optimization algorithm, the project created a
personalized home ecosystem. This was further enhanced by integrating AWS cloud infrastructure,
facilitating agile data processing and real-time adaptability. Despite initial communication
challenges between tech components, the project eventually epitomized a new paradigm in home
automation, underscoring the combined potential of AI, IoT, and Cloud technologies, and hinting at
further advancements in the field.
The ”Smart Lifestyle Automation” project integrated AI, IoT, and Cloud Computing to address
home automation gaps. By leveraging advanced platforms and learning algorithms, we overcame
integration challenges, creating a personalized home ecosystem. This experience highlighted the
integration complexities and the transformative potential of combining these technologies.

5.2 Future Prospectus


Home automation, encompassing the control of lighting, heating, appliances, and security, is set for
significant growth due to advancements in AI, machine learning, and increasing consumer interest.
Key future trends include AI-driven anticipatory device responses, seamless interoperability among
devices, enhanced security features, eco-friendly solutions, and health monitoring integrations.
Despite facing challenges like high costs, privacy issues, and system complexity, the potential

92
CHAPTER 5. CONCLUSION AND FUTURE WORKS

benefits of convenience, efficiency, and sustainability position the smart home industry for
widespread adoption, with a focus on innovation, user education, and security being paramount.
In the evolving home automation sector, future plans for our project encompass designing
a custom PCB for enhanced efficiency and cost-effectiveness, fully deploying on the cloud for
scalability, and integrating with voice assistants like Alexa for convenient user control. We aim
to refine our MVP for commercialization, ensuring an intuitive and seamless user experience.
Embracing Controller 4.0 technology is also on the horizon to amplify system capabilities.

93
Parul
University
Student Startup and Innovation Policy 2.0
Education Department, Government of Gujaratt

SSIP Grant Sanction Letter


Date: 07-02-2023
Sanction Letter No: PUSSIP/POC/006

Dear Om Baval

Congratulations!
We are glad to inform you that your
Startup/ ldea Smart Lifestyle Automation have been
selected for the SSIP grant through Parul University, based upon the screening that happened on
07-01-2023.
Grant sanctioned to;

Project ID: PUSSIPPOcO06

Team Leader Name: Om Baval

Team member-Riya Koradia

Team member-Dwijen Mehta

Mentor: [Link] Thacker

Institute Name: Parul Institute of Engineering and Technology

Statistics of the proposed and Approved Funds;


Proposed amount: Rs. 1,04,791/
Sanctioned amount: Rs. 95,000/-
Grant disbursed for the first Milestone: Rs. 60,000/-
for Completing 1st Milestone: 04 Months
Suggested timeline
Once 100% funds are utilized from the 1st milestone along with completion/preparation of the
proposed part of the project, the team could propose for remaining funds in their 2nd Milestone,
which would be given based upon the review done for the 1st Milestone by the Committee. You
are requested Purchases or Expenses should be made after preparing the affidavit and

sharing quotations as per the format, along with the approval for the
s

Post Limda, Waghodia, Gujarat 391760


Parul Innovation and
Entrepreneurship Research Centre
Established & Incorporated Under Gujarat Private Universities
(Second Amendment) Act, 2015 (Guj. Act No. 7 of 2015)

January 25, 2023

Letter oflncubation

Dear Om Baval

Congratulations!!! We are indeed delighted to inform you that the executive committee successfully
confirmed and recommended enrolment of your start-up at Parul Innovation and Entrepreneurship
Research Centre, Parul University, during the general meeting held on January 07, 2023.

It's especially thrilling to be a part of this Center at Parul University right now. You will have
unmatched opportunity to collaborate with the team thoughtfully to advance your entrepreneurial
career methodically. There will be numerous opportunities for you to take your startup to the next level.
At the Parul Innovation and Entrepreneurship Research Centre of Parul University, the learning cycle
) of discovery, dissemination, and implementation takes place. PIERC provides its aspiring
entrepreneurs with a canvas of learning and equips them for a career of leadership through one-on-one
mentorship and chances to build and apply the knowledge across the world. The startup's incubation
time will last 1.5 years be starting from the date of this announcement; but, if necessary, the Executive
Committee may decide to prolong the incubation period following the successful conclusion of your
incubation phase.

Following are the details of your enrollment:

Startupld: 2023008
Startup Name: Smart Lifestyle Automation
Startup Sector: Home Automation

Best wishes,

Jay Sudani
Chief Executive Officer (CEO)
Parul Innovation and Entrepreneurship Research Centre
Parul University, Vadodara, Gujarat-IN

Copy to:
Office of Chief Executive Officer
Office of Chief Operating Officer
All Incubation Mangers
Startup Founders

[Link], Tai. waghodia, Dist. Vadodara - 391760, Gujarat State, India.


CIN: U93030GJ2015NPL083040 I Email : edc@[Link] I Web : [Link]
Bibliography

[1] K. Agarwal, A. Agarwal, and G. Misra. Review and performance analysis on wireless smart
home and home automation using iot. In 2019 Third International conference on I-SMAC (IoT
in Social, Mobile, Analytics and Cloud) (I-SMAC), pages 629–633, 2019.

[2] A. A. Arefin, A. S. Nazmul Huda, Z. Syed, A. Kalam, and H. Terasaki. Acs712 based
intelligent solid-state relay for overcurrent protection of pv- diesel hybrid mini grid. In 2020
IEEE Student Conference on Research and Development (SCOReD), pages 59–62, 2020.

[3] Y. Arora and H. Pant. Home automation system with the use of internet of things and artificial
intelligence. In 2019 International Conference on Innovative Sustainable Computational
Technologies (CISCT), pages 1–4. IEEE, 2019.

[4] Belkacem Benadda and Adil Benabdellah. Hardware design and integration of low-cost edge
ai smart power management and home automation. In 2022 International Conference on
Artificial Intelligence of Things (ICAIoT). IEEE, 2022.

[5] H. Chandak, A. Jaiswal, H. Dhoke, P.K. Juwar, and C. Singh. Smart energy efficient security
and intelligent home automation using iot with cloud organizing. Global Journal of Computer
Science and Technology.

[6] S. Das, T.K. Choudhury, and S.K. Mohapatra. Data analytics to increase efficiency of the ai
based energy consumption predictor. In 2020 International Conference on Computational
Intelligence for Smart Power System and Sustainable Energy (CISPSSE), pages 1–4, 2020.

[7] G. P. Dave and N. Jaisankar. Analysis and design of energy efficient protocols for wireless
sensor networks. In 2017 Innovations in Power and Advanced Computing Technologies
(i-PACT), pages 1–7. IEEE, 2017.

96
BIBLIOGRAPHY

[8] W. M. El-Medany. Fpga implementation for humidity and temperature remote sensing system.
In 2008 IEEE 14th International Mixed-Signals, Sensors, and Systems Test Workshop, pages
1–4, 2008.

[9] Shruti S. Gulkari. A review on advanced home automation system using gsm and ai.
International Journal for Research in Applied Science and Engineering Technology, 9:459–
461, 2021.

[10] V.S. Gunge and P.S. Yalagi. Smart home automation: a literature review. International Journal
of Computer Applications, 975:8887–8891, 2016.

[11] N. Hossain, M.A. Hossain, R. Sultana, and F.A. Lima. A security framework for iot based
smart home automation system. Global Journal of Computer Science and Technology, 18:9–13,
2018.

[12] I.B.C. Irugalbandara, A.S.M. Naseem, M.S.H. Perera, and V. Logeeshan. Homeio: Offline
smart home automation system with automatic speech recognition and household power usage
tracking. In 2022 IEEE World AI IoT Congress (AIIoT), pages 571–577. IEEE, June 2022.

[13] S Kala and S Nalesh. Efficient cnn accelerator on fpga. IETE Journal of Research, 66(6):733–
740, 2020.

[14] P. Khairnar, S. Bansode, B. Sahota, and P. Chourasia. Automation of home (iot) using raspberry
pi. Global Journal of Computer Science and Technology, 18(E3):9–13, 2021.

[15] I. Krishna and K. Lavanya. Intelligent home automation system using bitvoicer. In 2017
11th International Conference on Intelligent Systems and Control (ISCO), pages 14–20. IEEE,
2017.

[16] T. N. Kumar, H. A. F. Mohamed, B. A. C. M. Naleem, and V. Ganeish. An fpga based real-time


remote temperature measurement system. In 2010 International Conference on Electronic
Devices, Systems and Applications, pages 218–221, 2010.

[17] M. Manhas, D. Sanduja, N. Aggarwal, and R. Vashisth. Design and implementation of artificial
intelligence (ai) based home automation. In 2021 6th International Conference on Signal
Processing, Computing and Control (ISPCC), pages 122–126. IEEE, 2021.

97
BIBLIOGRAPHY

[18] R. F. Molanes, J. J. Rodrı́guez-Andina, and J. Fariña. Performance characterization and design


guidelines for efficient processor–fpga communication in cyclone v fpsocs. IEEE Transactions
on Industrial Electronics, 65(5):4368–4377, 2018.

[19] K.A Rahman, A.M Leman, M. Faris Mubin, M.Z.M Yusof, Azian Hariri, and M.N.M Salleh.
Energy consumption analysis based on energy efficiency approach: A case of suburban area.
In MATEC Web Conf., volume 87, page 02003, 2017.

[20] Jean Rossario Raj, S.M.K. Rahman, and Sneh Anand. Fpga design for multiline acquisition
and ethernet interface in high frame-rate ultrasound machines. IETE Journal of Research,
62(6):804–811, 2016.

[21] Swanand Raje et al. Speech recognition using ai. International Journal for Research in
Applied Science and Engineering Technology, 9:459–461, 2021.

[22] P. Ramachandran, S. Ranganath, M. Bhandaru, and S. Tibrewala. A survey of ai enabled edge


computing for future networks. In 2021 IEEE 4th 5G World Forum (5GWF), pages 459–463,
2021.

[23] P.J. Rani, J. Bakthakumar, B.P. Kumaar, U.P. Kumaar, and S. Kumar. Voice controlled
home automation system using natural language processing (nlp) and internet of things (iot).
In 2017 Third International Conference on Science Technology Engineering Management
(ICONSTEM), pages 368–373. IEEE, 2017.

[24] S.M. Shabber, M. Bansal, P.M. Devi, and P. Jain. ihas: An intelligent home automation based
system for smart city. In 2021 IEEE International Symposium on Smart Electronic Systems
(iSES)(Formerly iNiS), pages 48–52. IEEE, 2021.

[25] N. Sudha, C. H. Siva Sai Prasanna, and V. Kamakoti. An efficient digital architecture for
principal component neural network and its fpga implementation. IETE Journal of Research,
53(5):425–431, 2007.

[26] R.B.A. Tonoy, H.M. Zilany, and R.M. Rahman. A smart and intelligent home automation
system. In 2021 IEEE 12th Annual Ubiquitous Computing, Electronics Mobile Communication
Conference (UEMCON), pages 0446–0452. IEEE, 2021.

[27] J.S. Wu and M.S. Jian. Smart home personalizing services based on adaptive cloud iot
devices with bigdata and deep learning technique. In 2019 IEEE International Conference on
Consumer Electronics-Taiwan (ICCE-TW), pages 1–2. IEEE, 2019.

98
BIBLIOGRAPHY

[28] T.-Y. Yang, C.-S. Yang, and T.-W. Sung. A dynamic distributed energy management algorithm
of home sensor network for home automation system. In 2016 Third International Conference
on Computing Measurement Control and Sensor Network (CMCSN), pages 174–177, 2016.

99

You might also like