Google Home Lighting
Junior Year 2018
Junior Year 2018
Project:
Create hands free lighting under the counter using Google Home and an ESP8266.
Skills learned in this project:
In this project I learned about MQTT, a protocol used for many IOT projects. This project taught me how easy it is to connect my favorite IOT devices using MQTT and IFTTT.
Parts:
5 meters of WS2812B leds: $12
ESP8266: $1.72 or Adafruit's Huzzah (easier to flash): $10
5 volt wall wart: $8 (you can find cheaper ones from china)
Wire (price not included)
Solder (price not included)
Google Home (price not included)
Total cost: $25 - $35
Skills Required:
Soldering
Fishing wire
Code:
GitHub link: https://github.com/igneousstar/googleLights
Adafruit.io Setup:
You are going to have to go to have to set up an adafruit.io account. Then create a feed and call it onoff.
To set up adafruit.io and learn more about mqtt go to Adafuit's website: https://learn.adafruit.com/mqtt-adafruit-io-and-you/getting-started-on-adafruit-io
Set up IFTTT:
Go to www.ifttt.com and set up an account.
Click on my applets.
Click new applet to start
Click if "this"
Search for Google Assistant and then click on it. You may have to set
it up with your google account. It will walk you through step by step and
ask for an email confirmation.
We can just use the simple phrase when we create the trigger.
Choose the phrases to switch between modes. I used
turn lights off, purple power and Christmas time
After it is triggered, we tell it what it needs to do. Click the "that"
Search for Adafruit. You will need to connect your adafruit.io to IFTTT.
It will walk you through step by step and ask for an email confirmation.
Select the feed and then the data you want to receive.
You will need to create one to send a 0, another to send 1,
2, 3 and 4. You can send custom data for more modes if
you edit the code.
Hardware Setup:
I stuck the LEDs to the bottom of the counter using double sided
tape. I had to run a 5 volt power wire, a ground wire and a
data wire. You can stuff the wires in the hole and cover
it with putty.
I had a large gap between the wall and my cabinets, so running the wire was easy. But, you may have to fish the wire through the wall.
Adafruit has a good tutorial for powering LED strips:
https://learn.adafruit.com/adafruit-neopixel-uberguide/basic-connections
I used the wall wart to power both the LEDs and the ESP8266. Just MAKE SURE the microcontroller and the LED's both share a common ground. If they don't, then then the data won't send to the LED strip very well.