Alexa Enabled Light Switch (DIY Home Automation, NodeMCU, ESP8266, IoT, Arduino, 3D Printing)
HTML-код
- Опубликовано: 3 июл 2024
- Amazon's Alexa voice assistant is found in many consumer electronic devices, and is a great way to get started with home automation. I recently purchased several Echo Dots, and while some of the came bundled with smart plugs that can turn my floor lamps into IoT devices, Alexa cannot be used for my home's overhead lights unless I purchase a new set of lightbulbs or rewire my light switches and install internet enabled relays. To solve this problem, I decided to use 3D printing and a NodeMCU microcontroller equipped with an ESP8266 chip to create a battery powered, internet enabled smart switch that can be easily mounted over the existing light switches in my home!
Interested in building a switch for yourself? Check out the following links:
- STL Files for 3D Printing: www.thingiverse.com/thing:343...
- NodeMCU Arduino Code: github.com/SuperMakeSomething...
- FauxmoESP Software Library: bitbucket.org/xoseperez/fauxm...
- More Information on NodeMCU "Light Sleep" Mode: community.blynk.cc/t/esp8266-...
- Bill of Materials (All links are Amazon affiliate links):
-- 1x NodeMCU: amzn.to/2X7ziIC
-- Breakaway PCB Header Set: amzn.to/2EeU95o
-- PCB Prototyping Board: amzn.to/2TWr3gs
-- MG90S Micro Servo: amzn.to/2DRmSff
-- Transistor Set: amzn.to/2DPXjed
-- Resistor Set: amzn.to/2EgAUIM
-- AA Battery Pack Holder: amzn.to/2IlJvO8
-- AA Rechargeable Batteries with Charger: amzn.to/2X79agO
-- AA Rechargeable Batteries: amzn.to/2EeaK9e
-- Metric Screw Set (Also Includes Nuts and Washers): amzn.to/2IjPvHo
-- 3M Command Strips: amzn.to/2X9fd4t
-- Yellow PLA: amzn.to/2DMbGQR
-- Red PLA: amzn.to/2EfH0sw
-- Blue PLA: amzn.to/2DIQpaA
-- PCB Jumper Wire: amzn.to/2IlJQQU
- Tools I Used During the Build:
-- Monoprice Maker Select 3D Printer: amzn.to/2GSwMjT
-- Adjustable PCB Holder: amzn.to/2GOsQjO
-- Hakko FX-901/P Cordless Soldering Iron: amzn.to/2TUE2z6
-- Hakko Micro Flush Cutter: amzn.to/2SW2CCI
-- Wire Stripper: amzn.to/2IjQ8ke
-- Jackly 45 In 1 Screwdriver Set: amzn.to/2DRiNYn
-- Hakko Wire Type Soldering Iron Tip Cleaner: amzn.to/2EgQLqK
-- Solder: 60-40 Tin-Lead Solder: amzn.to/2GtinuZ
- Other Amazon Echo Enabled and Compatible Devices:
-- Amazon Echo Plus: amzn.to/2DQrbqO
-- Amazon Echo: amzn.to/2Ef7qdY
-- Amazon Echo Dot: amzn.to/2Egy7z9
-- Alexa Compatible Lightbulbs: amzn.to/2Gy3GXm
-- Alexa Compatible Smart Plug: amzn.to/2EgKnj6
(Note: All Amazon links are affiliate links. As an Amazon Associate I earn from qualifying purchases.)
Check out the DIY Arc Reactor build here: • DIY 3D Printed Arc Rea...
Comments or questions? Connect with me on Twitter @SuperMakeSmthng
You can also follow me on Instagram for updates on my latest projects: @SuperMakeSomething
Want to support Super Make Something?
You can buy me a coffee here: www.buymeacoffee.com/supermak...
Or use the link below to buy a shirt and show your Super Make Something pride!
Finally, be sure to check out the newly-launched home of Super Make Something on the web! www.SuperMakeSomething.com
--
Music credits:
Outro: "Clear Mind" - Play on Loop (www.playonloop.com)
#NodeMCU #HomeAutomation #3DPrinting Наука
I always come back to this idea every once in awhile then get reminded of weekly battery swaps...
Been a while since I've seen a hunter2 joke. Nice one.
Haha thank you.
Great project!
Thanks!
awesome man.
saman mohamadi Thanks!
My Mrs is going to love that shit on the wall of every room.
Good day sir. Very nice tutorial awesome video... more power
marlon glodo Thank you!
Thank you , l learn from you a lot , go ahead
Thanks for watching! Happy that these videos are helping people learn!
Is it possible to make the same thing but with a push button added so that you can turn it on and off without the need of Alexa? So that you are able to have the choice of turning the lights either by pressing a button or using Alexa.
Good video. Nice ideas , i like your videos
KARTHIK KP Thank you!
I have a problem, my Alexa can't find the ESP8266 when I ask it to search for devices
I would double check that you are connecting to the internet correctly by plugging in the USB cable to power the unit from your PC and opening up a terminal. You should get a "connection successful" message printed out to let you know that you are online. After that, your Echo device should be able to find the ESP8266.
Very nice complete instructions! TY! One question, since the entire module is tapped onto the wall. How easy is it to remove it to replace the batteries (every 5 days as you encountered)?
Thanks! The module is actually attached to the wall using a two piece Velcro strip, so it comes off very easily. I specifically use “3M Command Strips” in this build. There is a link in the video description if you are interested.
Amazing tutorial! I have to give props to the guy behind the edit. I'd really like to add similar graphics overlays in an upcoming tutorial I'm making for an automated chemistry reaction vessel. If it's not too much, could you point me in the direction of how to do that. IE what do I need to Google to figure it out?
PrettyChill Chemistry Thank you so much! I also do all of the editing. I edit my videos in Sony Vegas and use a combination of Inkscape and Photoshop to create the graphics overlays. Transitions between images are simple fade transitions. Hope this helps and I’m glad you enjoyed the video!
hi, thank you for the video. what Alexa skills to be enabled for detecting the device
hope you reply me soon and thanks in advance..
The code on the NodeMCU should make the device appear as a "Royal Philips Electronics Smart Device" that is connected to a "Hue Hub." Hope this helps!
You love yellow match match 😂😂
Hi Alex. I hope you're doing well, and I hope that a new video is coming soon ;)
Hey Man, i have ESP32 Node MCU, How can I Make it work with it? Any suggestions?
Btw thanks to this to the point tutorial
NIHAR J PATEL Sorry I am not familiar with that microcontroller. However if you get it to work, please share a Github link to the code!
Hi Alex, I just followed your steps, but cannot get the Echo Dot to recognize the ESP. The "Discover Devices" step times out.
Also, could you please go over how to get Google Home to recognize this ESP device?
Hi Walter -- make sure that the correct smart skills app is enabled on your Alexa device. Please see the link to the blog post in the video description for further instructions. I unfortunately do not have access to a Google Home, so I cannot comment on specific steps, but the blog post should again provide some additional information.
@@SuperMakeSomething Can you give us the link here directly please. I dont know exactly where you were referring to in the video.
@@SuperMakeSomething Hi Walter, fantastic project and video! Just came across your channel recently and am really impressed.
I'm trying to get this working so I can connect it up to my garage door but I also can't get Alexa to recognize the ESP - looking around online this seems to be an issue with Gen3 Alexa devices. Would you know of a fix? Apologies I can't seem to find the blog post you refer to above.
Hey, great stuff. I can't seem to find the arduino code? all that's linked in github is the readme text. Thank you!
Andrew Taylor Thanks! Just cleaning up the code - should be up first thing tomorrow!
The code is now up! You can find it here: github.com/SuperMakeSomething/alexa-light-switch
How long does the circuit last before the battery fully drains?
The batteries last about a week, but further code optimization could extend this significantly.
Damn, I got all excited but for the UK it's a totally different rocker switch. :( lol
i recomend you to have the nodemcu conected direct to the exit of the lights and just use a relevator to on and off the ligts and now you never need bateries or rewire your electriciti of your house if you want help send me mesage ive done before but whit out alexa just whit a web page
Wow What a nice video, can you the same code without Transistor and resistor if you yes what I need to modify in my code. I am supplying power direct in ESP8266 from my laptop
Vinod Tiwari You can use similar code, but would need to modify the wiring for the servo to receive 5V directly from the USB cable, because the ESP8266 likely will not be able to supply enough current.
Thanks for your quick reply. however, my mother is not stopping it keep running the same direction. where I can define to stop the motor.
Very cool project. Instead of batteries why not build a small power pack you can tie into the light switch power? Either way it's a cool project. Happy Trails!!!
smwizzz Thanks! That’s definitely an option. For this project, I was looking for a device where I didn’t have to mod the wiring of my house, but adding a transformer to drop the mains down the 5V DC for the NodeMCU input is another way to go - that way you will never have to switch out any batteries!
setupWif(); // Set up wifi
Quality commenting there.
nic like+sub from me
Thanks!