HOME AUTOMATION USING IoT

— With the recent advancements in automation across the globe, it becomes essential to have products that are readily available for every citizen of the country so that they can keep up with their fast-paced environment. In aid of these products, we proudly present our research over an IOT-based home-automation device that has been ideated, executed, and will be manufactured in India. It is aimed to take away pain of worrying about being in the house to control in-house appliances. All it requires is to have an all-user friendly application in smartphone, an upgrade in switch board and you’re good to go! That makes distant access an important feature of the product. A major selling point is the market price and ideation of the product. Manufacturing in India allows us to reduce the involvement of any 3rd party significantly and hence allows additional cost-cutting. If we compare this product’s market price with any of the devices’ that are available in the current market, we see a minimum difference of 60%. What


INTRODUCTION
Home Automation system via the technologies of IoT, application development, machine learning, etc. is a system design and approach that uses mobile phones and other controlling systems to control basic functions of electrical home appliances and features automatically through internet giving worldwide access of the appliances.The very basic idea through which Home Automation emerged was to save the electric power and human energy.The home automation systems are used for performing various tasks that also includes control of the appliances which are placed inside of the room/house & outside of the house, for achieving control over electrical & electronic appliances and other applications, can perform locking and opening of the doors or gates of the rooms or houses by the help of control systems by the virtue of proper applicable sensors.Home automation also termed as "domotics" is building control for a home which in short, connection of devices over which control has to be achieved is performed to a central structure also known as "gateway".According to an experimental task performed in the United States, approximately 1.5 million home automation devices/systems were installed.

II. PROPOSED ALGORITHM
A. Proposed System -Fig. 1. shows the basic working of the proposed system.When compared with the existing system, this system eliminates the bridge stage from the existing system due to which a hardware set is minimized.In order to tap the appliance the tapping at second stage is performed which is the division at the switch board.The device will be installed with the switch board to perform the destined task.

B. System Functionality -
To describe about the functioning of the system designed and developed, Fig. 2. shows the flowchart of the same.Fig. 2. Flowchart of the entire system Developed device will be directly connected to the electronic devices.The device is connected to a platform for enabling the security to the IOT Core.When the rule and regulations are satisfied only then the CRUDE operation will be performed.
Error Handling-When the rules are not satisfied by the data, the data will be handled and the operation will be re triggered by the user's next input.
Authentication-The authentication providers are the special key that gets paired before data updation and writing.This is performed on mobile application and similar platforms.
Realtime Sync-Synchronizes the data in all the devices which are logged in.
Voice Control-Webhook is created which is secured.Its security layer is passed and https is triggered.And then the similar operation is performed.
Parameter Control-Physical data is sensed and generated and the http is triggered.After which the Security layer is passed.
The flowchart in Fig. 3. deals with the APIs functionality and shows the path of data and explains the advantages of App Engine.
It decides when the database should be scaled up or down based on number of users using the database at that time.Moreover, it also provides additional security to the application.

C. System Hardware -
This project has used various electronic components, modules, hardware etc., initially attempts were made to achieve an automated house model with the device installed along with all the deliverables such as mobile application, sensor modules, etc.This section will present the details of the hardware setup used, followed by the hardware used for the demonstration purpose.

1-HUMIDITY AND TEMPERATIRE SENSING MODULE
Shown in Fig. 4 is the humidity and temperature sensing module which would monitor humidity of the room by automatically regulating the fan's speed and would also perform opening and closing of the window based on the sensor's reading by performing hygrothermal phenomenon.The humidity and temperature monitoring module, consists of DHT-11 humidity and temperature sensor which has a frequency of 1reading/sec, ESP-01 module which is responsible to connect the sensor to the wifi and send the monitored readings.

3-DEVICE
As mentioned in the above section, the solution provided by us for the problems stated, includes a PCB board.The Fig. 6 deals with the PCB Board with all the components soldered over.The PCB would be fitted/attached with the switch board of the room and would be connected with the wifi to perform its desired functioning of the electrical appliances connected with that switch board.

4-CIRCUIT BUILDING
For the desired functioning of appliances, it is important to connect them to the components, resistances, capacitances, etc. in proper manner and the exact value of each.For the same purpose there are various calculations performed by us to get the proper outcome from the designed circuit.For which some data has been taken from the datasheet of the corresponding components.The working and calculation for each circuit is given as follows: Circuit for light control: Fig. 7. shows the circuit for operation of lights.The fan control circuit consists of two major circuits ZC Control and Fan Control.ZC Control: It is used to detect the time at which AC signal changes its polarity i.e. goes from +ve quadrant to -ve quadrant.This is achieved by resistance and bridges rectifier circuit along with a optocoupler.Fan Control: The control on the speed of the fan is achieved by triggering and re-triggering the pulse on triac and hence controlling the amount of power reaches the fan.

5-CIRCUIT INTEGRATION WITH NODE MCU
Node MCU is the microcontroller which we have used to control all the peripherals and parts of the circuit.For this we are using ESP 12F microcontroller which can be termed as the brain of the Node MCU.User interface is designed to maximize usability and the user experience for a particular software, application or any platform.The purpose of a UI is to enable a user to effectively control a computer or machine they are interacting with, and for feedback to be received in order to communicate effective completion of tasks.This gives the virtue to many advantages to the two sides, the users and the developers.Among these the advantages are: -Gives proper to use user interface that lets user to learn and understand the system properly and make the most efficient use of it.-Consistency within the UNIX platforms provides users to make the benefit of moving from one computer to another with minimal or no difficulty.
The UI can be designed as per user's preference so the screen snaps are not attached.
• Backend Integration and Development Backend Integration refers to connecting the device to the cloud platform and handling all the events generated by the application developed along with the sensor triggers and voice interface.To achieve this we had used many of the cloud tools which include Firebase, Google OAuth 2.0, App Engine, geocoding API, OTP handling, etc.We had also used several SDK like Flutter, Firebase Auth, Firebase Database, etc along with that we had applied our knowledge of dart, python, Kotlin, etc languages.We had also used IoT core to provide authentication to our device for security concerned and it provides proper data stream into of device without any error.Offline condition can also be handled.
This also provides proper authentication on the application end to the cloud.It also helps us to scale our app in a very efficient way and manage our billing as per our limits.The Firebase is a set of multiple services such as authentication, database management, user handling, etc with this we are able to access multiple platforms for authentication like google signIn, Facebook authentication, etc.For each of the specific platform, we need to tap there specific authentication and security channel for that we had used OAuth 2.0 and Facebook developer.We had also integrated a weather monitoring system in our application to seamlessly manage our temperature and manage sensor data to manipulate or control the temperature of the room for that we had first used kotlin to access the native platform binaries and get the coordinate as and when required by performing method channel data which then used to get location in coordinates that is changed into address by geo coding API.Then the rest API is called for the temperature of the current temperature of the location.The OTP and email authentication features are also added to our application to provide a high level of security for the safety of our users.We have kept security as our prime focus while developing seamlessly integrating all the parts of this project and provide a proper alternative.Backend Integration refers to connecting the application's backend to the device using cloud platform in which we are using Firestore and Firebase Realtime database.We are also using an IoT node to connect the backend to the IoT core of the cloud platform then that IoT core is connected to the Firebase.The direct connection with firebase can also be established but for the security reasons and authentication, IoT core step is added to the process.The other segment of Backend Development is Backend Function Development which consists of development of the APIs to reach out the customer by sending emails, text messages and at times for data retrieval.

III. EXPERIMENT AND RESULT
The experiment and testing of the above described setup and was performed in a room and was found successful.

IV. CONCLUSION AND ACKNOWLEDGMENT
Major part of this project was dedicated to make the middleclass population experience the budding technology i.e.Home Automation, IoT, cloud computing.In order to achieve this objective the main boundation was to develop the device keeping cost factor minimal and affordable with best experience of technology and most services.The idea was to come up with a device which can control conventional lights and fans remotely from any location with proper Identification security to secure the user's routine, choice and so that no other person can make changes in the appliance current status except for the user.By going through various research papers, we were able to modify our project and take it to another level with Air Conditioner Control, Humidity control using hygrothermal phenomenon, Temperature and Humidity Monitoring and Smoke sensor.The cross platform mobile application was also successfully developed which was able to present and change the appliance's status and regulation in real time.The application was also capable of showing the real-time sensor data.
Future Scope of this project can be considered as presenting this project as a product in the technical market.The other factors also include doing the required modifications with the objective and the same principal can be used to control appliances in offices, schools, etc. which means expanding the areas of the project.With the help of self-communicating network, and other requirements, this project can also be used in methods of agriculture such as irrigation.
V. REFERENCE

Fig. 1 .
Fig. 1.Proposed System The advantages of this system over the existing system may include the following: • Cost effective • Plug and Play • No rewiring required • No appliance upgradation required.

Fig. 7 -
Fig. 7-schematic diagram of circuit of light control The circuit includes optocoupler, resistor, light emitting diode, diode, relay.The function of each is as follows: Optocoupler: The main function of optocoupler is to transfer electrical signal in a circuit in the form of light.It also performs over voltage protection.Resistor: The resistor limits the amount of current to be passed further into the circuit.Relay: Relays at a time can control two electrical circuit by opening one circuit by NO (Normally Open) and closing the other circuit by NC (Normally Closed).

Fig. 9-Node MCU 6 -
Fig. 9-Node MCU 6-MOBILE APPLICATION Cross platform applications are applications which have identical codes base which are capable of operation on distinct platform.The advantages of developing a cross platform application include: time conservation, less development cost, code reusability, efficiency Flutter is a Software Development Kit which enables us to create cross-platform mobile applications.Dart is the language supported by Flutter which was developed by Google.• Frontend Development (User Interface Designing) User interface is designed to maximize usability and the user experience for a particular software, application or any platform.The purpose of a UI is to enable a user to effectively control a computer or machine they are interacting with, and for