ESP8266 & Amazon Alexa for home automation

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ธ.ค. 2017
  • Get professional PCBs for low prices from www.pcbway.com -~-
    In this video we show how you can control anything from lights to heaters to whatever plugs into a wall socket using your voice, an Amazon Echo, a Wemos D1 mini, and a relay. Super simple setup, takes aout 10 minutes to go from old-school to ultra modern tech!
    Async TCP Library: github.com/me-no-dev/ESPAsyncTCP
    FauxMoESP Library : bitbucket.org/xoseperez/fauxm...
    Wemos D1 Mini : amzn.to/2DmfMgW
    Relay: amzn.to/2DknnMI
    Echo Dot: amzn.to/2BYHqnO
    The code: pastebin.com/A95HzH7n
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 100

  • @michaelpadovani9566
    @michaelpadovani9566 6 ปีที่แล้ว +1

    Really cool i just bought some d1 minis as well as 3v and 5v relays!

  • @SSIBENAC
    @SSIBENAC 6 ปีที่แล้ว

    Very Nice - thanks for taking the time to make this video!I got the libs. and your code - seems like I had to add the digitalwrite commands, pinmode and define D2 = some value (1)had to add the esp8266 board to preferences - htpp.....and so on.it all compiled... now I have to get the hardware so I can try it out.will keep you posted!

  • @Solja4Christ
    @Solja4Christ 5 ปีที่แล้ว

    I use that board and a two channel relay to turn my fireplace on and off. My wife didn't understand when I was doing all the coding and testing but now she loves it!

  • @raym9691
    @raym9691 6 ปีที่แล้ว

    Great video ! You make it look so easy

  • @area46241
    @area46241 6 ปีที่แล้ว +1

    All new to me and I love it! Bought my first arduino uno a month ago and wow so many cool things you can do with them. The esp drooling... Great channel

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว +1

      +area46241 Thanks. esp3w is such incredible technology for cheap. I love them too.

  • @danksmokaz
    @danksmokaz 6 ปีที่แล้ว +1

    Sick cutout and lighting. Far cry from the X11 automation style

  • @funnyduddy15
    @funnyduddy15 6 ปีที่แล้ว +3

    holy shit.. I had the volume up on this video and when you said "Alexa what time is it? " my Alexa said the time and it was the same exact time as yours.. Mind blown

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Andrew Douglas ok, that's too wierd lol

  • @joshj343
    @joshj343 6 ปีที่แล้ว

    What would be a more elegant way to power the D1 mini? Is there a commonly used shield for the D1 that can utilize the DC power that's already present at the relay?

  • @robcairns186
    @robcairns186 4 ปีที่แล้ว

    One of my favourite sites, please keep it up, and hi from the other Toronto.

  • @codingspace1143
    @codingspace1143 4 ปีที่แล้ว

    Really Nice video many thanks .. you are great man!

  • @georgechambers3197
    @georgechambers3197 6 ปีที่แล้ว +1

    I don't have a Darth Vader to light up, but I do have an Elvira maybe that would work. I built a 50W per channel Bluetooth receiver and used a Sonoff to power it up. I can start the player with my phone then send music to it from the phone. Makes a great shop tool. Your new microphone is a little hard to listen to it seems especially when there is some interference from something close. Elexa is a cool device. Now I guess I need one of those to replace my X10 stuff. Gotta figure out how to connect the cameras though. Most of these new devices and gadgets I have been working on and with are because of the wealth of knowledge you brought to me and the rest of us over the last year. Thank you for all the work you've done for us this year. I hope you have a happy healthy and prosperous new year!

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว +1

      +George Chambers Thank you George. Happy New year to you and your family too.

    • @andreamitchell4758
      @andreamitchell4758 5 ปีที่แล้ว

      i still do not understand a single line of code, can you please tell us how many pins can be used with one D1 mini? and please show some examples of code that uses 1 pin to control one relay next to code that controls 2 pins/relays?
      also how to code a dealy , like for example close one relay for for so many miliseconds then open it again
      like momentary more with a timer for how long the relay is closed for / how long to bring the GPIO pin hight or low depending on how the realys works

  • @zenzen9131
    @zenzen9131 6 ปีที่แล้ว +1

    Amazing video :) You made it really clear :)

  • @leglessinoz
    @leglessinoz 5 ปีที่แล้ว

    People who are having trouble getting Alexa to find a new device, check what revision your Echo Dot is. If it's a v2 you will need to modify the code. It's a simple change. There are several discussions around. The original code seems to work if there is an older Dot on the network as well.

  • @andreamitchell4758
    @andreamitchell4758 5 ปีที่แล้ว +1

    stil not understanding a single line of code, can you tell us how many pins can be usd with one D1 mini?
    and pleas shoe somexamples of code that usese 1 pin to control one relay next to code that controls 2 pins/relays?

  • @ulhasrane3656
    @ulhasrane3656 5 ปีที่แล้ว

    In alexa app i can't see smart home tab.
    You may add that part how to make smart home tab visible in app

  • @MrLimitless95
    @MrLimitless95 6 ปีที่แล้ว

    How are you powering the wemos d1 mini?

  • @mrosenberg8231
    @mrosenberg8231 6 ปีที่แล้ว

    ok, some headway. I changed to d4 and when it loads up, the relay clicks and the light on the relay comes on. After it finishes loading, the relay clicks off, the relay light goes off, and the wemos d1 mini light comes on. After that when instructed by Alexa or the alexa app on the phone, there is no response from the wemos or the relay. is it in the code or the app?

  • @MightyTechGuy
    @MightyTechGuy 5 ปีที่แล้ว

    You are the man...you made my day :))

  • @cubangooddoctor9939
    @cubangooddoctor9939 4 ปีที่แล้ว +2

    I get an error saying class fauxmoESP has no member named onMessage. Any idea whats going on here? Thanks in advance.

  • @luis55g
    @luis55g 6 ปีที่แล้ว

    Great video very well explained. just have a question on how to add more relays to this code??
    I have a four relay board and I want to add the other three relays, to be able to do different things with each relay.
    Hope you can help thanks!

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      Alexa only addresses the Esp8266 as a whole. You would need 4 different IP addresses

    • @luis55g
      @luis55g 6 ปีที่แล้ว

      learnelectronics.
      that sounds incorrect I know there is a way to do it

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +gary b ok, hope you find it

    • @luis55g
      @luis55g 6 ปีที่แล้ว

      I figure it out thanks

  • @shanerigsby9030
    @shanerigsby9030 6 ปีที่แล้ว

    I enjoyed the video. So, let's say had a temperature probe in the fish tank connected to your ESP8266. What would it take to ask Alexa the fish tank temperature and have her call it out to you? Seems possible, but I don't know how integration with Alexa works.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Shane Rigsby I'm a hardware guy, so I don't really have an answer for you. Right now all I can get it to do it turn things on and off.

  • @Moonbrony
    @Moonbrony 6 ปีที่แล้ว +1

    Is that red alert and self destruct built into the dot? If so that's awesome!

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว +1

      +Moonbrony They are "skills" you just turn them on.

  • @ethanping1010
    @ethanping1010 6 ปีที่แล้ว

    @learnelectronics Hello, I am having a problem when I verify your sketch word for word. It says WIFI was not declared In this scope as well as other problems. Please reach out to me if you can help me!

  • @thunderbolt8582
    @thunderbolt8582 5 ปีที่แล้ว

    Your links do not have the esp8266wifi.h file, where do I get this?

  • @robo909
    @robo909 5 ปีที่แล้ว

    There is something missing in your code. I saw video and code. In code you are missing print and call back entries. Can you please upload the complete code

  • @mrosenberg8231
    @mrosenberg8231 6 ปีที่แล้ว

    your code doesn't seem to work. Alexa sees the fish tank device. When I tell alexa to turn on/off the device it shows up on my Android phone alexa App as on or off...so there is a connection between the echo dot and the phone app. Yet, the relay doesn't work and the voltage doesn't change on the pins from the Wemos d1 mini. What am I missing?

  • @gibo588
    @gibo588 6 ปีที่แล้ว

    Can Alexa do dimming of light via ESP8266? I can dim one with it, but I do not know how to with Alexa?

  • @MrBobWareham
    @MrBobWareham 3 ปีที่แล้ว +1

    Have you cut your microphone cable????????????

  • @davewarrant8673
    @davewarrant8673 ปีที่แล้ว

    Does this still work? A lot has changed.

  • @eddielarivey8115
    @eddielarivey8115 6 ปีที่แล้ว

    Thanks for the video! Is there a certain Alexa "skill" that needs to be added for this to work? I have it connected to my wifi network, but Alexa is not discovering the wemos.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว +1

      +Eddie Larivey No, just go to smart home and click discover

    • @eddielarivey8115
      @eddielarivey8115 6 ปีที่แล้ว

      Yes, that is what I did. I've tried many things but no signs of life from Alexa. Maybe it has something to do with my board being the older style D1? I'll try more tomorrow and update if I can get it working.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว +1

      +Eddie Larivey No, I'm using a older D1 on my fish tank. What does the serial monitor show?

    • @eddielarivey8115
      @eddielarivey8115 6 ปีที่แล้ว

      learnelectronics It shows the connection to the wifi network, and the ip address of the D1. That is all it shows, there is no activity on it after the initial connection to the wifi network. I read about some people having these issues with newer versions of Alexa/Amazon products, yet working fine with the older versions. I'm just using the alexa app currently, I don't have an echo yet.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว +1

      +Eddie Larivey oh ok. I have not tried it with just the app. That could be an issue, but I just don't know, sorry. If I can help with anything else let me know.

  • @MrLimitless95
    @MrLimitless95 6 ปีที่แล้ว

    I kept getting this error whenever i am trying to upload the code to the board.
    readlink C:\Users\phyos\OneDrive\Documents\ArduinoData\packages: The system cannot find the file specified.
    Please Help

  • @gartmorn
    @gartmorn 6 ปีที่แล้ว

    Got a dot last year Paul but to be honest I mostly use it to play music and listen to radio! I use blynk to switch on and off my Xmas lights and that's about it for home automation. I bought a couple of sonoffs but haven't found a use for them yet! Question, do you get Doctor Who in the US?

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +gartmorn yes we do

    • @gartmorn
      @gartmorn 6 ปีที่แล้ว +1

      learnelectronics My eldest son is a big fan and I was going to get a dalek and try to work out a way to programme it with speech synthesis to do some personalised phrases! Probably use a BBC micro:bit as I think I can get the effect using micro python! I'll let you know if I succeed! May be after holidays though./

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +gartmorn awesome, definitely keep me in the loop. I love hearing about projects from you guys.

  • @juanportillo7702
    @juanportillo7702 ปีที่แล้ว

    Does this still work?

  • @silikoncomputers3922
    @silikoncomputers3922 6 ปีที่แล้ว

    Link to the code is not working. Please correct. Thanks

  • @codingspace1143
    @codingspace1143 4 ปีที่แล้ว

    Do you have any Idea if I want to let alexa control AC with temperature changes ?

    • @codingspace1143
      @codingspace1143 4 ปีที่แล้ว

      for example I already have the code with LED IR sensor to change the temperature instead of original remote control of AC but I am thinking to let Alexa change it with her sexy voice =D

  • @WILDMACK
    @WILDMACK 6 ปีที่แล้ว

    I'm having the same problem as others are. Alexa doesn't see the ESP8266 when I tell it to discover devices. Any ideas??

  • @danielmoraes9637
    @danielmoraes9637 6 ปีที่แล้ว +1

    good job

  • @doughy67
    @doughy67 6 ปีที่แล้ว +2

    Nice but the sound was rough but got better. Am thinking of getting a echo

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Gary Rivett sorry about the sound, working on a new microphone. The echo is a steal at $30 bucks

    • @JonathanWellskcender
      @JonathanWellskcender 6 ปีที่แล้ว

      I got an Echo and a Google Home Mini for Christmas. They're both really cool, but I think the Google has an easier API if you're wanting to connect it to a Home Assistant server. It also has the broadcast function, which is fun to play with.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Jonathan Wells broadcast? That like Chromecast?

    • @JonathanWellskcender
      @JonathanWellskcender 6 ปีที่แล้ว

      Kind of, but just for short messages/announcements between Google Home devices. For example, I can broadcast a message (a voice recording or typed message) from my phone while at work and it will play on all of my Google Home devices at my house. If it's a voice broadcast, it plays in my voice. If I type the broadcast, Google uses a text-to-speach engine and plays it in the Google voice. My daughter loves it when Google talks to her.
      If you haven't tried it yet, tell you echo "red alert". My Mom got a kick of telling my Echo "Computer, Red Alert!" over Christmas.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Jonathan Wells Oh yes, red alert and also code zero zero zero destruct zero lol.

  • @mrosenberg8231
    @mrosenberg8231 6 ปีที่แล้ว

    I used the sketch above. I loaded the sinric.com skill and loaded the smart device into alexa. The sketch uploaded, and I can see the wemos d1 mini when doing a scan of my network. Still, when I say Alexa, turn on or turn off, nothing happens. What's going on?

    • @leglessinoz
      @leglessinoz 5 ปีที่แล้ว

      What revision is your Echo Dot? If it's a v2 then a problem in the firmware that stops it finding this device. You need to modify the code then reupload to the ESP8266. There are a several discussions about it.

  • @dwyt
    @dwyt 6 ปีที่แล้ว

    Darth Vader done like rogue one was great touch. Does anyone know how you could power the WiFi directly of the power for the light?

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Dean Welch there is only one set of power leads there in the Sonoff, so lamp and wifi are powered together.

    • @jaypee9937
      @jaypee9937 3 ปีที่แล้ว

      Buck converter

  • @grimster76
    @grimster76 4 ปีที่แล้ว +1

    just wondering why am I getting this error message that says Call fauxmos ESP has no member named 'On Message' can someone help please

  • @TooMuckinFuch17
    @TooMuckinFuch17 6 ปีที่แล้ว

    Hey, I've gotten my wemos mini to connect to the same wifi network my echos are on, but when I discover devices, it can never find them. I've tried several variations of the fauxmo code and two different wemos boards. Not sure what's wrong. =(

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +TooMuckinFuch17 Do you have smart home enabled?

    • @TooMuckinFuch17
      @TooMuckinFuch17 6 ปีที่แล้ว

      learnelectronics On the Alexa app? Yeah, I have more than twenty devices connected through Hue and SmartThings as well. I've managed to find my raspberry pi fauxmo devices before, just can't get the wemos discovered.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +TooMuckinFuch17 I'm sorry my friend, that was really the only advice I had.

    • @directhacker7776
      @directhacker7776 6 ปีที่แล้ว

      I have the same problem

    • @stewartrv
      @stewartrv 6 ปีที่แล้ว

      Seems same for me too, just can't find new devices...

  • @jimb032
    @jimb032 6 ปีที่แล้ว +2

    You can also say "Alexa discover devices" and not even have to fool with the app. Interesting hubless design that is. You should look into node red or Openhab to help the devices work together. P.s. ask Alexa to fart.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว +2

      +James Kerns Jr. Thanks for the info... And the gifts

    • @jimb032
      @jimb032 6 ปีที่แล้ว +1

      learnelectronics You are welcome! Happy new year.

  • @JasonCarlson
    @JasonCarlson 6 ปีที่แล้ว

    Hey.. pinMode is missing in your code that you uploaded..

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Jason Carlson ok...

    • @JasonCarlson
      @JasonCarlson 6 ปีที่แล้ว

      I also noted that the digitalWrite options were not there. Sorry for the critical analysis..

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Jason Carlson it's all good

  • @BruceAWilliamson
    @BruceAWilliamson 3 ปีที่แล้ว

    The code in pastebin does not match the code in the video!

  • @pragnesharjunbhaipatel1670
    @pragnesharjunbhaipatel1670 4 ปีที่แล้ว

    I am getting error "ESP8266Wifi.h: No such file or directory" can you help?

  • @jesusrdeleon
    @jesusrdeleon 3 ปีที่แล้ว

    On the noise

  • @borisband1134
    @borisband1134 4 ปีที่แล้ว +2

    Why my ALEXA can't detect the ESP8266??

  • @Saahib_K
    @Saahib_K 3 ปีที่แล้ว +1

    Whats up with such bad quality sound on this video, somethings wrong with the microphone. Hard to believe from such cool tech video...lol

  • @m.s.idrischannel5655
    @m.s.idrischannel5655 6 ปีที่แล้ว

    Cool!!!!!

  • @vidhatrisamadhiya4599
    @vidhatrisamadhiya4599 6 ปีที่แล้ว

    Error is comming

  • @TrentSterling
    @TrentSterling 6 ปีที่แล้ว

    Maybe alexa can learn some colors? Alexa, "set fish tank green", or something.

    • @learnelectronics
      @learnelectronics  6 ปีที่แล้ว

      +Trent Sterling Not with the setups I have. She is just actuating a relay.