Introduction: Find Items by Ringing Them Using Google Assistant

Things used in this project

Hardware components NodeMCU ESP8266 Breakout Board×1 Buzzer×1 Battery, 3.7 V×1 Software apps and online services IFTTT Maker serviceBlynk Google Assistant SDKArduino IDE

Step 1: How My Project Look

Story

find KEYs, WALLET, BAGs by ringing them they work on IOT connected to wifi *

EXAMPLE- hey google find my wallet.

*than wallet tag start ringing.

*Range is more than 20 meter Instead of controlling manually we can use voice commands to operate devices.For this we use the GOOGLE ASSISTANT on mobile phone. Google assistant cannot directly communicate with BLYNK. For making a chain link between Google assistant and Blynk we use IFTTT. If This Then That, also known as IFTTT, is a free web-based service to create chains of simple conditional statements, called applets. An applet is triggered by changes that occur within other web services such as Gmail, Facebook, Telegram, Instagram, etc. In this project we make use of WEBHOOKS on IFTTT to handle a web service, which is BLYNK.

Step 2: Schematics

schematics shown

Step 3: Steps to Build

Step 1: Blynk Download the Blynk app from google play storeSign in using a valid E-mail addressCreate a new projectGive a project name and choose NodeMCU from choose devicedropdown list.Then choose Wi-Fi from connection type dropdown list and press Create.An Auth Token will be generated and send to the E-mail address which you signed in.Copy and save the Auth Token somewhere safe, We will use it in the next step DO NOT share it, anyone who is having it can control your device.Now click on the "+" symbol to add widgets, then add a Button. Now you can see a button will be added to the dashboard.Click on the Button widget from the dashboard to edit the button settings.Now from the settings choose the pin which you want to control, I'm choosing digital pin D5Change the ON state to 0 and OFF state to 1, by default ON will be 1 ie HIGH and OFF will be 0 ie LOW. We are doing this because Our relay will turn ON on LOW and turn OFF on HIGH.Change the mode to switch instead of push.

Step 2: NodeMCU We are going to program NodeMCU with Arduino IDE. open node mcu blynk code File In Arduino IDE. Then paste the AuthToken generated from Blynk app to the Blynk Arduino sketch.Type your WiFi SSID and Password also to the Blynk Arduino sketch, where it is mentioned. tep 3: Relay Connection Same Power Supply for NodeMCURelay and buzzer is given 1 / 2 Step 4: IFTTT Either you can use IFTTT website to IFTTT mobile app to create Applets. Here I'm using IFTTT website Before start create IFTTT applet we need to create two HTTP request links, one for turning ON the relay and one for turning OFF the relay. http://188.166.206.43/blynkAuthToken/update/D14?v... The 188.166.206.43 is the IP address of blynk server.You need to replace your blynk Auth Token, where it is mentioned in the request link.D14 is the pin which we have connected our relay, actually, we have connected relay to the D5 pin of NodeMCU but here in the HTTP request link we need to address the GPIO pin number, so the GPIO pin number for physical pin D5 is D14.When we call value=0 it will make the pin D5 LOW, the relay is ON.When we call value=1 it will make the pin D5 HIGH, the relay is OFF Creating Applet For Relay ON Go to www.ifttt.com then login using your account or signup if you don't have an account.Then under applets tab click on new applets button. Now, click on the +this button.Then choose a service page will open. From "choose a service" page, search for Google Assistant and click on it.Then "choose trigger" page will open. From "choose trigger" page click on Say Simple phrase. Now Write A sentence you want to say to google assistant for light onand also add response sentenseand click create trigger button. Now, choose +that button. Then like before, search for webhooks and click on it. Now from "choose action" click on Make a web request.and fill the details as shown below. URL: In this filed paste the HTTP request link which is created before, don't forget to edit the URL with your blynk Auth Token.Method: From the drop-down list choose GET.Content/Type: Choose text/plain from the dropdown list.Body: Leave it blank.Now, Click Create action Button. Now we have successfully created an applet for turning the ON.like the same way, we need to create another applet for turning OFF.Paste the HTTP request URL for turning OFF the relay, that is the value=1.and click on create action button. Now we have Successfully created Applets for ON and OFF the buzzer sorry for copying others screen shot. after that you login in google assistant using same gmail account and simply say"Ok google, Turn on light". NOW USING google assistant you can find your things in this project I connect buzzer to it You can also connect More Devices based on your requirement so u create more applets.

Step 4: Code - Upload Code on Nodemcu Using Arduino Ide

#include

#include

// You should get Auth Token in the Blynk App. // Go to the Project Settings (nut icon). char auth[] = "YourAuthToken";

// Your WiFi credentials. // Set password to "" for open networks. char ssid[] = "YourNetworkName"; char pass[] = "YourPassword";

void setup() { // Debug console Serial.begin(9600);

Blynk.begin(auth, ssid, pass); // You can also specify server: //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 80); //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8080); }

void loop() { Blynk.run(); // You can inject your own code or combine it with other sketches. // Check other examples on how to communicate with Blynk. Remember // to avoid delay() function! }