- The simple defination of iternet of things is as follows The Internet of Things (IoT) is a system of interrelated computing devices, mechanical and digital machines, objects, people that are provided with unique identifiers and the ability to transfer data over a network without requiring human-to-human or human-to-computer interaction.”
- in our project we are using Google Assistant and to link up the device we are using WEEBHOOK
- the total out put
There are few steps to complete our project the steps are as follows
step 1 (hardware setup or connections ) :The connections of the circuit is as follows
- take the led bulb and connect long pin( positive pin) with resistor of " 330 ohm" to "Gpio 0 pin" you can also connect it 1, 2, 3, 4 pins. we can also see this in the below images
- connect short pin ( negative pin) to " Ground terminal"
- the connection is as follows
Login to cloud.boltiot.com And note the id of your bolt hardware iot module
Now click on the API Tab and under the section for Generate Key, click on Enable.
NOTE : Your API key is 14 letter code and the bolt id is look like "BOLT4567891"
Step 3 (creating a GPIO control command) :- To enable GPIO PIN "0" IS AS FOLLOWS
- name the variable name and then after we have to write a code or command
- since led is output device( as it is showing light ) we will need to get a Digital Write command that can be sent to Bolt over the Internet to switch on the LED.
- The structure of the digital write command is"https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID"
- In the API_KEY we have to write our 14 digit key& in device id we have to write device id
- As in the code as we mention"HIGH" means the bulb will glowes & if we mention "LOW" means the bub will OFF
- PIN_NUMBER indicates which GPIO pin we have connected the terminal
The sample command to turn the led ON connected to device having ID BOLT456789121 to PIN 0 is:
- To led to turn on the code is as follows https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH&deviceName=DEVICE_ID
- To led to turn off the code is as follows https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=LOW&deviceName=DEVICE_ID
Go to IFTTT to create a new applet by clicking here
Before we move forward we have to log in usin "GOOGLE or APPLE account"
click on the creare button After we will get like this
AFter click on the create button we can get below image or below one
THen after click on the "+ button(plus button)" ->search for google assistant ->click on the google assistant->select on say simple trigger
- select on say a simple phrase -> List a phrase to which triggering action is performed.Make sure the all phrases must no be same.Example phrases are
- 1) ok google "Turn the lights on"
- 2) light on
- 3) on the light etc...
after enter detais create a trigger
NOTE :Foroff also we have to follow same process
Then again click on "THAT" -> by clicking on it search for webhook and click on it
that is used to goin the both the things
after clicking on it click for make web request-> Enter the API URL you got in the previous Step. Make sure that you change the API Key and device name.
Method will be GET
Content type will be Application/json
Here is how your screen will look like
Click on 'Create Action' and then Click on 'Finish'
Stepsto turn OFF the LED
Now do the same process for a command to switch of the LED. Here you will change the state to LOW i.e. state=LOW in your code. Here is a sample of the code. Also, add a suitable phrase to switch off the LED.
Note :Nowwe have to check it is working or not by saying the above return phase
Comments
Please log in or sign up to comment.