Home Automation Using Smart AI Assistant

Artificial intelligence is taking over all the platforms and applications and making them more and more user friendly and intelligent and gives the application a human like behaviour and thinking. AI is being used everywhere now-a-days because applications that use AI are able to learn and improve and require less maintenance. This paper “Home automation using smart AI assistant” is a voice command-based AI assistant coded using python and Natural Language Processing NLP that can respond to user queries and responds to voice-based commands of the user. Using this AI Assistant users can send emails to anyone just by speaking the receiver’s name, subject of email and the email body. The users can send WhatsApp messages to any of their contacts just speak the message and to whom you want to send it, users can do google searches and open google tabs by voice search, users can do Wikipedia searches and can also open any YouTube video they want to watch. With this AI Assistant we can also get weather updates and news updates, just speak what news updates you want and the Assistant will read it for you. We can also check the computer performance, add remainders and to-dos. We can open our documents, play our favourite music or watch our favourite movie and do many more thigs just by a simple voice command. This assistant is also used for voice-controlled home automation. Using this Assistant, we can control our home electrical appliances with simple voice commands like turn on the room lights, fans, AC etc.


Introduction
Artificial intelligence and machine learning based smart assistants are now used by almost everyone.Different platforms have their own assistants like Google, Apple, Windows etc.Many developers are working on applications that can interact with the users like an artificial human, hence looking at the popularity of smart assistants across all the platforms we decided to make such a smart assistant for our computers/laptops.This assistant will hear whatever the user says or asks to do and using its database and intelligence will give the user the best possible result of his/her query.It can be used for searching anything on the internet.It can be used for asking questions, it can be used to open any application in your computer using voice commands, you can use it to play your favorite music from your library just name the song and enjoy.As AI is used in almost everything now-a-days, today we have smart watches, smart cars and bikes, smart phones, even smart shoes.The scope is very large and this technology is developing and learning every day.Hence, we are using our assistant as a home automation tool as well.Ease of living projects are the need of the future and can help many people to do their tasks quickly and can also be very useful for our elders, people who are disabled and many others and hence we decided to make this project [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15].

Problem Definition
For making this AI assistant there are three main stages.Firstly, finding and implementing all the features we want in our AI Assistant like sending mails, messages, getting news updates, google searches etc.All the different packages and libraries for these features were implemented in our project.nline at: le o b ila Ava -1057 -Secondly, we need proper testing of all the features of our AI Assistant, whether it responds properly for all the voice commands the user gives and Lastly implementing the Home automation feature in our AI assistant and testing the inputs of the Arduino UNO board for our voice commands.

Materials And Methods
The process of the Home Automation and designing the AI Assistant consists of four main stages that are: -1.Adding the different functions for different voice commands.
The AI Assistant has different functions like sending mail function, getting news updates function etc.The first stage was to add all these functions to our Assistant using different Python libraries, packages and APIs like text to speech conversion, Wikipedia library, News and Weather API and many more such functions.

Testing the AI features with different user inputs and voice commands.
The second stage was to test all our functions for different user voice inputs that we did using Natural Language Processing library for python call NLTK.We divided the voice input of the user into different sub strings and matched the main keyword to the function like if the user says "Play Shar Tank on YouTube", using NLP we extract the two keywords that are "YouTube" and "Shark Tank" and then we pass the keyword of what video we want to watch to our YouTube function.

Coding the Arduino UNO board for home automation features.
For this stage use connected different home electrical appliances to the different ports of the Arduino board and tested manually if they work or not.
4. Connecting the Arduino Uno board with our AI Assistant.
Finally, we connected the Arduino Uno Board to our AI Assistant and tested the working of the electrical appliances with voice commands.

Proposed System
This project "Home automation using AI assistant" is coded using python language and runs on any python IDE.The project has many different python functions that together make up the AI assistant.The main function is the python speech to text convertor that takes the user voice commands and coverts it into a String using NLP and then the string contents are matched with the different assistant functions and if the string matches the program runs that function and the task that the user wants is completed like sending a mail, doing a Google search etc.The home automation is done using an Arduino Uno board and the serial inputs of the board are controlled using the python.So, when the user wants to turn on of off any home electrical appliance the serial input of "on" or "off" is sent to the Arduino board and the request is completed   Sustainable Smart Home and Home Automation-Big Data Analytics Approach published by Man Li, Cho Mak, Tony Tang, Herru Li in 2016.This paper talks about technologies that can be used in home automation and can help in sustainable development and saving energy.They used Bluetooth technology and AI for smart home and focused it to save energy and water.Their analysis also shows that people from Bangalore and Chennai have searched the keyword "smart home" the most in South Asia and the demand is increasing.The main focus is to save energy, like using natural light more and dim the electrical lights in presence of natural lights saving electricity and also can detect room temperature and surrounding temperature and control the AC accordingly, main focus is to not use any electrical appliance when it is not required.
2. IoT Based Home Automation and Analysis Using Machine Learning.Published by Sakshi P, Shanu Jaiswal, Nitin Yadav and Jayashree S in 2019.This is a research paper that talks about the use of machine learning and data analysis in smart home automation.This paper survey shows home automation is mostly used for helping old age and handicapped people.Machine learning helps in understanding how the user uses the different home appliances and over time learn their behaviour and predict what the user wants for example if the user works in a office on weekdays and comes home by 6 P.M the smart assistant can learn the users behaviour and accordingly can pre cool the room 15 minutes before he reaches and if the user watches news every day at 8 P.M the smart home can turn on the T.V at that time automatically and give the user a notification.The scope of machine learning with home automation is very large.

Acknowledgment
Eventually we are grateful to God Almighty and a number of individuals whose professional guidance, assistance and encouragement have made it a pleasure endeavour to undertake this Course.I would like to express my sincere gratitude to the esteemed REVA University, Bangalore for the wonderful opportunity given to me in carrying out this Course.I express my deepest gratitude to Dr. P. Shyama Raju, Chancellor, REVA University, Bangalore, for the environment and infrastructure provided to carry out and complete my course under one roof in REVA University campus, Bangalore.I owe my deepest gratitude to Dr. Mallikarjun Babu, Vice-Chancellor, REVA University, Bangalore, for his continues support, encouragement.It is pleasure to express my gratitude whole heartily thanks to Dr. Sunil Kumar S Manvi, Director and Dr. Ashwin Kumar U M, Assistant Director, School of Computer Science and Engineering and our Guide Prof. Bindushree DC REVA University, Bangalore, to timely process the research related tasks. References:

Fig. 1 •
Fig. 1 Flow chart of the proposed system

Fig
Fig. 2. How to send emails