Generally for the IoT project we requires something like Aurdino or some other components but here in this smart project, I just used a Bolt wifi Module and done a smart communication with the electronic devices, but in this project you will look at working of street lights and other lights by the commands of the user by using the Google assistant from your smart mobile with the help of πππππ.
YOU CAN WATCH THE WORKING OF THE PROJECT IN THE YOUTUBE
ππΌππΏππΌππ πΎπππππΎππππ
- we requires a bolt wifi module and a connecting wires.
- From the wifi module we needed to plug the one end of the led with the help of the wire to the pin 0 and other to the ground.
- And do the same following by connecting another leds to the remaining pins one end to pin 1, and other led to the pin 2................and pin 4, make sure that every led leg of the other one must be grounded. and aslo note that for connections we use the breadboard as shown in the below diagram.
- Plug the longer end of the LED in the Pin 0 of Bolt WiFi module shorter end to the ground pin (GND), and power on the Bolt WiFi module Getting the Bolt API Key and Device ID
- Login to cloud.boltiot.com and note the ID of your Bolt WiFi Module.
- Now click on the API Tab and under the section for Generate Key, click on Enable.
- Next click on the copy button to copy your API key. Your API key will may look something like this: f1f918e9-d9c2-4e5b-aed0-b7cb743f74cf
- Creating the GPIO Control Command
- Click here Bolt Cloud go to Docs Tab -> API Documentation -> GPIO Commands API -> Write Digital Output, to understand how to create a API command link to turn on or turn off a pin of the Bolt.
The structure of the command is:
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID
The parameters that you need to replace are:API KEY : You can get it from API tab on cloud dashboard
PIN NUMBER : Pin to which you have connected the LED. Values can be either 0, 1, 2, 3 or 4
HIGH AND LOW : This value indicates if you want to turn on/off the LED. HIGH will turn it on, LOW will turn it off.
DEVICE ID : The id of your device. You can get it from cloud dashboard.
- The sample command to turn the led ON connected to device having ID BOLT13819450 to PIN 0 is:
- The sample command to turn the led ON connected to device having ID BOLT13819450 to PIN 1 is:
- The sample command to turn the led ON connected to device having ID BOLT13819450 to PIN 2 is:
- The sample command to turn the led ON connected to device having ID BOLT13819450 to PIN 3 is:
- The sample command to turn the led ON connected to device having ID BOLT13819450 to PIN 4 is:
NOW YOU HAVE SUCCESSFULLY DONE WITH URL
With the help of the pins we needed to connect with different electronic devices but in this case we used leds for easy understanding.
Next is to play wait software by using IFTTTAfter the process we need to implement the IFTTT- For this we needed to install the IFTTT app from playstore.
- After installing the IFTTT, you can login by using the google account.
- It will be appear as below.
- (ππ)
- πππ πππ ππππ ππππππ ππ π ππππππ ππππππππππ πππ πππ, ππ’ πππππ πππ πππwsπππ.
- Go to IFTTT to create a new applet by clicking here
- here
- Login using your Gmail account. Make sure you use same account which you'll be using on your mobile to interact with Google Assistant.
- Click on '+This' to create the trigger.
Choose Google Assistant -> Say Specific Phrase
Type the phrase you want to trigger the action. Make sure to specify the trigger command in different ways for example I used
- Turn the street lights
- Turn on the lights
- street lights on
you can also add by what reply google want to answer you. Here I mentioned as
- Ok Harish street lights are getting turn on.
Click on 'Create Trigger'
Click on '+That'
Select Webhooks and then Make a web request.
1 / 2
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'
Remember in this project we need to repeat ther same process for all the five pins to get connected with different devices at the same time.
To turnoff the leds- To turn off the leds we need to do the same steps but we need to replace the state by HIGH to πππ in the link.
Comments