In the present scenario, people are working to make lives easier and better by connecting everything with internet. IoT is playing a major role in fulfilling these needs.
Bolt is one such platform in which I learned the ABC of IoT. So, when it came to making a project, I thought why not make the one which is the hot topic these days i.e. controlling our lights with Google Assistant. So, I applied what I learned and here is my project. Using this project I can control my devices from any corner of the world just by using my phone with internet facility and Google Assistant.
Follow these simple steps to make one for you:
Step 1: Fetching your Bolt APIkey and device id
Log in to your bolt cloud and click on devices to get the device id and then click on API to get your unique api key.
Step 2: Establishing the GPIO commands
On clicking API button on your bolt cloud, there is an option API documentation. Click on it. After that a page opens with a list of documentation.
On the top left there is an option GPIO commands-> write digital output. You will see the example links such as->
In place of 'YOUR_API_PIN', write your api pin which you will find on the bolt cloud. Also change 'YOUR_BOLT_DEVICE _ID' with your bolt device id which is also available on https://cloud.boltiot.com. The above mentioned link is for turning on the lights. To create a link for turning the lights off, generate the same link and replace the state with LOW in place of high. The link for the same will be as shown below
Step 3:Installing and setting up the IFTTT mobile app
- Go to playstore and search for IFTTT app or click here to download and install the app. Login with the same email id you use for your Google Assistant and then click on create to create a new applet.
- After this a screen will come up as shown below
Click on "+This". A window will appear which will ask you for selecting a trigger. In the search box, search for Google Assistant.
Select Google Assistant. A new window will come up which will ask you for selecting an option to trigger your operation. Select the option say a phrase and then fill up the phrases you want to say. A sample screen is shown below
After completing the form click continue and a new window will appear. Click on "+That" to select the operation to be performed by Google Assistant
On the next window, search for webhooks and in results, select webhooks as shown above. On selecting webhooks, a new window will appear as shown below
Click on make a web request and fill the required credentials as shown in the image below
The url will be your GPIO command to turn on the lights.
Method will be GET.
Content type will be application /json.
Click on Continue and then Finish. Your applet to turn on the lights is ready. Follow the same steps to turn off the lights. Remember, in the url, replace the state with LOW instead of HIGH. Sample screen for the same is shown below
On completing all the steps, your IFTTT home screen will be as shown below
Put the longer(positive) leg of your led in the pin0 of your bolt wifi module and the shorter (negative) leg in the ground pin. Power up your module and connect it with internet. You are ready.
Overall it is a really cool project and one should try it to enhance their understanding of the cloud connection with IoT. This project is also simple and easy to make and also requires no code.
Comments