Jack Richer
Published © GPL3+

On_Off_Lights_By_Google

You can switch on or off the light in your home by Google Assistant. To do so follow the flowing steps.

AdvancedFull instructions provided15 minutes473
On_Off_Lights_By_Google

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
USB-A to Mini-USB Cable
USB-A to Mini-USB Cable
×1
LED (generic)
LED (generic)
×1
Resistor 10k ohm
Resistor 10k ohm
Just to keep safe the bolt WiFi module.
×1
Android device
Android device
Any device you have.
×1
iPhone
Apple iPhone
Any device you have.
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
IFTTT - WebHooks
IFTTT -GoogleAssistant

Story

Read more

Custom parts and enclosures

STEP 1: Get the api_key and BOotI_id

Login to cloud.boltiot.com and note the ID of your Bolt WiFi Module.

STEP 2:Set up your hardware

Warp one end off the resistor to longer end of the LED. Plug other end of the resistor to the Pin 0 of Bolt WiFi module shorter end to the ground pin (GND). Make sure that while doing the hardware connection your bolt device is not connected to any power supply source . Then power on the Bolt WiFi module by giving power supply to it.

STEP 3: GPIO Control Command

Since LED is a digital output device, 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 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/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. To switch on the light : https://cloud.boltiot.com/remote/f1f918e9-d9c2-ndaoiA-fjjohf74cf/digitalWrite?pin=0&state=HIGH&deviceName=BOLT1273747 To Switch off the light just change the state = LOW : https://cloud.boltiot.com/remote/f1f918e9-d9c2-ndaoiA-fjjohf74cf/digitalWrite?pin=0&state=LOW&deviceName=BOLT1273747

Step 4: IFTTT integration via Google Assistant and Webhooks

Go to IFTTT to create a new applet by clicking 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.

Step 5:

Click on '+This' to create the trigger.

Step 6:

Choose Google Assistant -> Say Specific Phrase

Step 7:

Type the phrase you want to trigger the action. Make sure to specify the trigger command in different ways for example I used
for on select on for off the light select off

a) Turn the lights on /off

b) Turn on/off the lights

c) Lights on/off

d) Switching lights on/off


click on create trigger

Step 8:

Click on '+That'

Step 9:

Select Webhooks and then Make a web request.

Step 10 :

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

Schematics

Circuit Diagram

This pic shows how to interface the led with the Bolt WiFi Module
make sure that there is no short circuit between two leg of LED.

How it works

Say OK Google to your device and say the command that you wrote while setting the Google Assistant .

Credits

Jack Richer
2 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.