paint-brush
Building Cool IoT Lamp That Can Be Controlled via Google Assistantby@TheHardwaron
391 reads
391 reads

Building Cool IoT Lamp That Can Be Controlled via Google Assistant

by The_HardwaronJuly 6th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Building Cool IoT Lamp That Can Be Controlled via Google Assistant. There are many IoT projects available on Youtube and on the internet. Here is a very cool project based on IoT. It is actually a lamp which can be controlled through Google Assistant. So,lets get started. Here is how to build the project: Building cool IoT Lamp that Can Be controlled by Google Assistant with the help of the IFTTT app from play store. Here are the instructions for the project and how to do it.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Building Cool IoT Lamp That Can Be Controlled via Google Assistant
The_Hardwaron HackerNoon profile picture

You can also refer to my video tutorial:

There are many IoT projects available on Youtube and on the internet.Here is a very cool project based on IoT.It is actually a lamp which can be controlled through Google Assistant.So,lets get started…..

Hardware:

  • Wemos(or any board like Node MCU)
  • Plug
  • Wires
  • Relay(10 amps or higher)
  • jumper wires
  • Bulb
  • Bulb holder
  • Lamp(optional)

Software:

  • Google Assistant
  • IFTTT
  • Adafruit io

Circuit:

Instead of the power plug(near the bottom left)we can use the plugs like the ones of our mobile chargers.

Schematics:

Do the connections as shown above.

Now,go to adafruit.io website and create an account.

after that go to the feeds section>>Actions>>Create a new feed.

Then in the name section type any name of your choice for eg:light,bulb,etc…. and then click on create.

After that go to the dashboards section>>Actions>>Create a new dashboard.

Then in the name section type any name of your choice.

After that click on the name of the created dashboard>>click on the plus sign>>click on the toggle option(first option).

Select the feed that you had created earlier>>next step>>Create block(do not modify anything).

This part might look a little complicated just follow the instruction 👇👇

Install the IFTTT app from play store >>open the IFTTT app>>make an account>>go to my applets section>>click on the plus sign(on the top right)>>tap on ‘this’>>select google assistant >>say a simple phrase.

Under the “What do you want to say?” section, write the phrase that you want to say to Google Assistant like turn on the light.And under the ‘What do you want Assistant to say’ section type the thing that you want the Assistant to say to you in response like ‘ok’ and then tap create trigger.

Now go to that section and select Adafruit>>Send data to Adafruit IO>>Select the correct feed and under the data to save section type ‘ON’>>Create Action>>Finish.

Now our first action is completed now we can turn on the bulb,but now we have to set another action to turn off the bulb.

Repeat the same procedure as above only replace the text under “what do you want to say” with turn off the light and under the data to save section in Adafruit to ‘OFF’.

Open the Arduino IDE>>File >>Preferences>>under the additional boards manager type: http://arduino.esp8266.com//versions//2.4.2//package_esp8266com_index.json

then go to sketch>>include library>>manage libraries>>in the search box type Adafruit MQTT and install that library.

Finally go to tools>>board>>boards manager>>in the search box type esp8266 and install that library.

Note:

If you are using Wemos then you have to install this driver 👇 👇

https://wiki.wemos.cc/downloads

Code:

https://drive.google.com/file/d/1_P0QcBW4iYrZRLJnvB6M5bDyMd8tpBse/view

In the above code replace your wlan ssid ,your wlan password ,your adafruit username ,your adafruit AIO key with your wlan ssid,password,adafruit username,and AIO key(You will find your AIO key and username in the ‘view AIO key’ section on adafruit.io website)

Select the correct board and port ,in my case it was Wemos D1. Set the upload speed and baud rate of your serial monitor to 115200.Insert the plug into the socket

AND THEN UPLOAD THE CODE!!!!!!!!

Previously published at https://medium.com/@shridharkamat10/how-to-make-an-cool-iot-lamp-that-can-be-controlled-through-google-assistant-37ba61b6fdb2