Imagine when you are far away from your home and you have forgotten to switch off the lights.Then you can remotely switch off the lights with just a click on your smartphone.... sounds interesting, right? Nowadays the storage capacity of people has become poor due to which power is being wasted a lot. With this project, power can be saved to a greater extent using Google Assistant. Let's get into the project!
And one thing,no coding is required for doing this project:-)
1.HARDWARE CONNECTIONS:
NOTE: Make sure your device is offline.
Step 1: Take the 330 ohm resistor (color code:ORANGE ORANGE BROWN) and wind it up to the positive leg (i.e the longer pin) of the LED.
Step 2: Connect the negative pin of the LED to the ground and another end of the resistor to the pin 0 in the Bolt WiFi module.
NOTE: Make sure your resistor and ground pin are untouched.
Step 3: Now connect the USB to the bolt wifi module and make sure your device is online.
2.GETTING THE CREDENTIALS:
Step 1: Login to your bolt cloud by clicking the link below.
https://cloud.boltiot.com/login?next=%2F
Step 2: After logging your page should look like this and make sure your
device is online.Your device id will be visible in this page.Take a note of
device id.
Step 3: In the dashboard go to the API section.If you have not generated your api
key before select the enable radio button and click on generate new api
key button.
Step 4: Your api key will be generated.Make a note of your api key by clicking the
"show api key" button.
NOTE: Dont share your api key with anyone.
3.IFTTT TO GOOGLE ASSISTANT:
3.1. TURNING ON THE LIGHTS
Step 1: Go to the IFTTT login page by clicking the link below.
Step 2: Create an account in IFTTT by clicking the sign up button on the top right
corner.
Step 3: By clicking on the username on the top right corner a drop down menu
appears.Click on the create new applet option.
Step 4: Click on the +this button.
Step 5: Search for google assistant and select it.
Step 6: Click on "say a simple phrase" option.
Step 6: Enter the details of what you want to say to your google assistant to turn
on the lights.
Step 7: Enter the phrase which you want the google assistant to say in response
to your trigger.
Step 8: Now click on create trigger button.
Step 9: Its time for "that" part to be done.Click on "that" option.
Step 10: Search for webhooks.
Step 10: Click on "make a web request" option.
Step 11: In the URL section enter the below and replace it with your respective
credentials.
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID
CREDENTIALS TO BE REPLACED:
- API KEY - It will be available in the bolt dashboard.
- PIN NUMBER - Enter the pin number in which you have connected your resistor.
- HIGH/LOW - If you want your google assistant to turn on the lights make the state to be high.Similarly,for switching the lights off make the state to be low.
- DEVICE ID - You can get it from your bolt dashboard.
Step 12: Select the "get" method.
Step 13: Select the content type to application/json.The body section is optional.
Finally ,click on the create action option.
Step 14: Make sure your applet is turned on.
Step 15: If you want to edit your applet turn off and turn on your applet once.If you
do so configuring your applet page appears.After configuring dont forget
to click on the save button.
3.2.SWITCHING OFF THE LIGHTS
For turning off the lights follow the steps given for "turning on the lights" .The only thing you have to do is to set the state to LOW in the URL section available in the "make the web request" window.
Hoooooooollaaaa!!!!! you are done creating your project :-)
Now its time to get your hands on to the google assistant .
Now wake your Android phone by saying "OK Google" and say the phrase you had set while creating the trigger.
RESULT:
Now you can control your lights via google assistant from anywhere!!!!!!!
VIDEO FOR HARDWARE CONNECTIONS:
OUTPUT VIDEO:
Comments