A growing portion of IoT devices is created for consumer use, including connected vehicles, Home automation, wearable technology, connected health, and appliances with remote monitoring capabilities.
Google Assistant is an artificial intelligence-powered virtual assistant developed by Google that is primarily available on mobile and smart home devices.
It's very interesting to connect them and control IoT devices using our voice. This interesting project is to activate/deactivate the alerting system. In some places, there may be no phone, maybe no network, no battery or any other problems. At that time alerting system using a buzzer and google assistant (or any other services, in this case, it is google assistant).
STEP 1: HARDWARE SETUP
Insert the Positive end of the Buzzer in the Pin 0 of Bolt WiFi module negative end to the ground pin (GND) using breadboard and power on the Bolt WiFi module.
STEP2: KNOW YOUR 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,click on Enable to see API key and copy it for further use
STEP 3:GPIO COMMANDS
we will need to use Digital Write as the buzzer is a digital output device.
goto https://docs.boltiot.com/docs/write-digital-output-1
Docs Tab -> API Documentation -> GPIO Commands API -> Write Digital Output
copy code to notepad etc and replace API key with your API key and BOLT device
code format:
https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=PIN_NUMBER&state=HIGH/LOW&deviceName=DEVICE_ID
API_KEY: You can get it from the API tab on the cloud dashboard.
PIN_NUMBER: pin number can be 0-4. the number should be 0 according to my schematic if you place it in 1, pin number should be 1.
HIGH/LOW: This value makes buzzer on/off. HIGH will turn it on, LOW will turn it off.
DEVICE_ID: The id of your device. You can get it from the cloud dashboard.
check code by pasting in URL you can check whether the device is active or not.
STEP 4: CREATING IFTTT TRIGGER
Open
Click on This
Choose Google Assistant -> Say Specific Phrase
what do you want to say is for accepting voice command. In this case, if you say Alert/alarm on in google assistant it will reply with ALERTING and trigger the circuit.
Click on create trigger
choose webhooks
now we have to say what should be done when triggered
URL is https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=0&state=HIGH&deviceName=DEVICE_ID
Method: GET
content Type : application/json
click on create action.
Click on the finish.
similarly, repeat steps for turning off
URL is https://cloud.boltiot.com/remote/API_KEY/digitalWrite?pin=0&state=LOW&deviceName=DEVICE_ID
THAT'S IT. It is done, try with your assistant








_ciCuSuR5Cd.png)

Comments