Imagining being sleepy and lights of your room troubling you and you feel lazy to go to switch board to turn off the lights. Ever wished someone would come and offed the lights for you? Being a lazy person I always wished that someone could do that for me. And now with my phone I can do that. Want to know how check this project.
This project titled "Home Automation using Bolt IoT and Google Assistant" enables the user to control lights by receiving specific commands via Google Assistant which can be further extended to other appliances as well. Interesting right??
INTRODUCTION :This is a project on Home Automation where we can control home appliances by making use of IoT. As the demand for automation is rising, we use Bolt IoT to make switching of appliances easy. In this project, we control a Led lights and decorative light bulbs(light balls) by voice commands using google assistant. We give commands of our choice by IFTTT to control the appliances and also specify the reply we get by giving those commands. By this, we turn the appliances On and Off by just sitting at a place comfortably.
Step 1 : Gathering and Understanding the components required- Bolt Wi-fi Module
The Internet of Things (IoT) is nothing new, it has been with us for over a decade. The ESP8266 (and the newer ESP32) have really shaken the world of IoT. Bolt is an IoT Platform for the most rapid development of IoT products and services.
- 2 Channel Relay Module
Relay basically serves as a switch. The type of relay depends on the number of devices we want to connect. If we want to connect a single appliance, we use a single channel relay. In this project we are going to connect two devices hence we are using a 2 channel relay. The image below gives the description of pins.
- Lights / any other appliance which you want to operate using the Google Assistant.
1. Connect 5V from our Bolt Wi-Fi module to the VCC of relay. Connect the ground of Wi-Fi module to the ground of relay and connect the digital pin from the Wi-Fi module to ground of the relay.
2. Connect Pin 1 of Bolt to IN1 of relay, Pin2 of Bolt to IN2 of Relay.
3. Connect one wire of 2 pin socket to COM of both relay.
4. Now connect other wire of 2 pin socket to one terminal of both the appliance(light in my project).
5. Connect the second terminal of the appliance to each NO of the Relay.
6. Use Schematic diagram for reference.
7. Recheck the connections.
That's it. Let us move to next step.
Step 4: Creating new Product on Bolt Cloud1. Login to your bolt cloud.(If you are not registered on Bolt Sign Up)
2. Create a new product. Select pins as output and select GPIO. Give a suitable product name.
3. Select configure this product.
4. Select the pins and name them.
5. In code section, give a suitable name, language used, and write the code.
6. Link the product to bolt device.
7. Note down the Device ID and API key.
Step 5: IFTTT setup1. Download the IFTTT app.( Or open https://ifttt.com/)
2. Sign in with your Google account.
3. Create Applets.
4. Select If This.
5. Select trigger as Google Assistant.
6. Select say a simple phrase.
7. Add the phrase upon your choice and suitable reply for it, and then select 'Continue'.
8. Select 'Then that'.
9. Search and select 'Webhooks'.
10. Paste the URL given below and change the API key, Device id by our API key and device id.
Select method as 'GET'.
Select content type as application/json
URL: https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID
NOTE: To turn the led ON, we use the LOW state and we use the HIGH state to turn it OFF as we operate it by a relay.
Change the PIN_NUMBER as well.
For turning the appliance ON :
URL: https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=LOW&deviceName=DEVICE_ID
Forturning the appliance OFF:
URL: https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=LOW&deviceName=DEVICE_ID
12. Select 'Continue'.
13. Review and Finish.
Here's how the final outcome looks like
Comments
Please log in or sign up to comment.