This project is about controlling the outdoor light with its intensity be it in the balcony, courtyard or the entrance door light of our house just to mention a few together with controlling the brightness of the light accordingly. The reason I decided to go with this project was my curiosity and interest to control things with their brightness level over voice commands in addition to the ideal way of controlling them sitting at one place with just a single click by writing a code for it but sometimes you need more than just "on" and "off" control over the device which the digital(on/off) signals simply can't do it instead you can also control via speech along with controlling its brightness and with no coding using Google Assistant and IFTTT which sounded quite interesting to me. So I came across a wonderful project article on hackster.io made by Pranav Pai Vernekar sir which inspired me to make this simple yet useful project with an additional creativity!!
Step1 : Hardware Setup
Wrap one leg of the resistor around the longer(+ve) leg of LED, insert the shorter(-ve) leg of the LED to GND and the other leg of resistor to PIN0.
Login to cloud.boltiot.com and under Devices note down the Device ID of Bolt WIFI module. Next under API Tab note down the API key by enabling it.
We use a analogWrite command since LED is an output device which is sent to the Bolt Cloud over internet to switch on the LED.
The command to write analog output is :
Remember value should be ranging between 0 to 255 for controlling the Brightness of LED.
For api_key and deviceName you need to add your respective API key and Device ID.
Step 4 : IFTTT integration via Google Assistant and WebhooksGo to ifttt.com/create and login using your gmail account which should be the same even for Google Assistant.
Click on +This
Choose Google Assistant -> Say a Specific Phrase.
Type the phrase on by which you want to trigger the action and click on 'Create Trigger'.
Click on +That, select Webhooks and make a web request
Enter the API URL
Method will be GET
Content type will be Application/json
Click on 'Create Action' and then Click on 'Finish'.
Repeat the same process for command to turn on the light with more brightness or to turn off the light.
Comments
Please log in or sign up to comment.