As the Technologies are growing faster we wish things to be simpler around us.And we do not have enough time to concentrate on our household works. Assume that your are away from your house and you have forgot to switch off your living room lights.Else imagine that your watching an interesting movie you want to turn off the lights.What if I tell it is all possible by telling one word to google assistant in your android phone instead of writing long and monotonous code. Is'nt it interesting..? All you need is an android phone with good internet connection and Bolt wifi module.
Image of the working model
Take the LED and the Bolt Wifi module.The LED has two legs one is short which is -ve and the long one is +ve.Connect the long leg of the LED to any one of the GPIO pins from 0 to 4.And connect the short leg of the led to GND.Connect the Bolt Wifi module using a USB to your laptop or switch board.
STEP 2:GET API KEY AND DEVISE IDLogin to your Bolt Cloud account copy your device id and on the left side you will find a API tab Click on the tab and copy the API key And save it for further use.
To control your device with your voice you need to set up a command which is given below
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID
In the above command replace the API_KEY, PIN_NUMBER, DEVICE_ID and the state of the device with your values.
API_KEY: Replace it with the API_KEY which you copied from the cloud API tab.
PIN_NUMBER:The GPIO pin to which your LED is connected ( 0 to 4).
HIGH/LOW:High will turn ON the lights and low will turn OFF the lights.
DEVICE_ID:Substitute with the device id you copied from the dash board.
STEP 4: IFTTT-WEBHOOKS-GOOGLE ASSISTANTGo to the IFTT web page. Create a new Account. Click on new Applet
Click on the + to create a trigger. Search for Google Assistant and click on 'Say simple phrase'
Fill the details as given above and click the trigger button. Click on +that button and search for webhooks.
After selecting the webhooks select 'Make the web request'.
Fill in the URL with the URL which was done in step3.And fill in the method tab with GET.
Select the content type as Application/JASON.
Click on create and finish button.
Create a similar one for switching of the lights.
the final step looks like this
Say"ok google" on your android phone to issue the command.And your project is ready.Try saying "lights on" and you will see the led glows.
Comments
Please log in or sign up to comment.