Alexa and Node-Red - control your smart devices

Sdílet
Vložit
  • čas přidán 3. 10. 2019
  • * We are going to link #Alexa with Node-Red by installing the right skill into the Alexa App and the right nodes into the #Node-RED.
    * We will install Node-Red using Docker ( you have to have Docker client installed).
    * Then we will create a Node-Red flow that will have a device with the unique name in our case Kitchen Lights.
    * And finally we will politely ask Alexa to turn the newly created device on and off
    * Prerequisites:
    * You will need a working Node-Red installation - For the purpose of this demo I will show you how you can easily install Node-Red from a docker image
    * Obviously you will need an Alexa device. You can get one from my Affiliate link: amzn.to/31MrNZj
    * You will also need A smart relay that can turn on and off something. I’m using Sonoff basic flashed with Tasmota firmware connected to my local MQTT server, but you can use anything you have and want instead. If you don’t have anything to control yet you can still complete the whole tutorial and use debug nodes to see that your voice commands are reaching the right place.
    * How-To
    * Create Account in Node-Red bridge - First you have to create account in the Node-Red bridge from this URL - red.cb-net.co.uk/newuser
    * Alexa Skill - Search for Amazon Alexa in your iOS or Android store and install it. Open the app and click on the menu, then on 'Skill and Games' and search for "node-red" then tap on the result named Node-RED Smart Home Control and click the “enable to use" button. Enter your credentials from the step above.
    * Define new device into the Node-RED bridge from this URL - red.cb-net.co.uk/devices - Don’t forget to type a unique name for your device. And choose a device type, that suits your needs I will chose smart Plug, because what I want is to simply turn on and off the device using my voice and Alexa. Also Leave “Power Interface” and “Report State” enabled
    * Discover devices - What we want to do next is to discover devices using the "Alexa, discover devices" or we can use the Alexa App.
    * Node-Red installation - if you already have Node-Red up and running you can skip to the part. First you need to install the docker client from www.docker.com. After that go to hub.docker.com and search for “node-red”, click on the first result, open command prompt or terminal and then copy and paste the following command:docker run -it -p 1880:1880 --name mynodered nodered/node-red-dockerThis command means run a docker container, attach terminal session to it so we can see the output, expose the internal container port to your local computer port, a name that could be anything you want and the exact path to the node-red image. Now you can see that node-red server is running at 127.0.0.1:1880
    * Install Alexa nodes - Go to manage palette from the Node-Red menu and search for “alexa-smart-“ and install them.
    * Configure the FLOW - You can import this flow in your Node-Redgithub.com/peyanski/Node-Red/...
    * (Optional) if you want to change the device type from plug to light in Alexa app follow the instructions in the vide
    Question of the day - what is your favourite software for managing your smart devices? Node-Red, Home-assistant or maybe something else? Let me know in the comments below.
    Subscribe to my newsletter - peyanski.com/newsletter/
    Stay safe. See you next time.
  • Jak na to + styl

Komentáře • 44

  • @thamieedgar1366
    @thamieedgar1366 Před 2 lety +1

    Keep up with the great work Man, so much highly appreciated more especially in Docker & HA Addons integrations. Very good Man, Thank you.

    • @KPeyanski
      @KPeyanski  Před 2 lety

      Thanks, will do! That is my first smart home video BTW. Check my other videos as well!

  • @gregwarner4441
    @gregwarner4441 Před 4 lety +3

    Really thorough video great!!

    • @KPeyanski
      @KPeyanski  Před 4 lety

      Thanks Greg. Check my other videos as well.

  • @VWTesla
    @VWTesla Před 3 lety +1

    Thanks a lot for this. Spaciba!

  • @soovui
    @soovui Před 4 lety +1

    I like it so much... Great work bro... Make more on nodered, I like nodered and blynk. They both are great.

    • @KPeyanski
      @KPeyanski  Před 4 lety

      I'm glad you like it. BTW this is my second video overall and my first Smart Home related that I ever created.

  • @blastinc
    @blastinc Před 4 lety +1

    Браво супер интересно видео. Мерси за информацията и отделеното време. Може би ще пробвам и аз NODE-Red с Алекса.

    • @KPeyanski
      @KPeyanski  Před 3 lety

      Здравей, съжалявам за късния отговор, но някак си съм пропуснал твоя коментар. Надявам се да не се сърдиш и благодаря за хубавите думи. Задължително го прбвай ;)

    • @blastinc
      @blastinc Před 3 lety +1

      @@KPeyanski няма проблеми. Случва се. Не съм единственият, който поставя коментари. В момента се занимавам повече с Raspberry и Tasmota и Python, но като остане време ще се опитам да надградя с Node-Red.

    • @KPeyanski
      @KPeyanski  Před 3 lety

      Чудесно. Успех!

  • @ighost_1337
    @ighost_1337 Před 4 lety +1

    Nicely explained !
    If possible can you make video for ESPhome api based instread of mqtt ? to integrate this node

    • @KPeyanski
      @KPeyanski  Před 4 lety +1

      Thanks. ESPhome based tutorials are in my todo list. I will think about it.

    • @ighost_1337
      @ighost_1337 Před 4 lety

      @@KPeyanski ah great
      I'll wait :)

  • @lluisazorin3883
    @lluisazorin3883 Před 8 měsíci

    Hi! Thanks for your video! But I have two devices with the same name, and the orders only arrive to the virtual new device, not the real one. Both with the same name.... could can I do?? thanks!

  • @blopak2
    @blopak2 Před 3 lety +1

    Hi again Kiril. I have another question. This solution is only for MQTT communication? I have some Xiaomi temp sensor in my home assistant, and I have Node Red on my home assistant installation. I have the doubt how interact those sensor with Alexa, and I think this tutorial is very close to what I'm looking for, but the MQTT communication is that I don’t know is a request or mandatory way. Thanks a lot man. Regards from Chile.

    • @KPeyanski
      @KPeyanski  Před 3 lety

      Check my other two videos for Alexa integration they are not requiring MQTT. czcams.com/video/FRC7yR67xA8/video.html & czcams.com/video/vj9K0O_3zxI/video.html

  • @paulmiller9430
    @paulmiller9430 Před 2 lety

    I think the contrib addon has changed significantly since you made this. There is no place to add the sensors under the gateway anymore, instead they are searate nodes. The temperture node requests the SID and the 'devide ID/Name. I have tried aso many variations to get the values parsed correctly by the node and although I can get the debig output to discplay the correct details I cannot get the node to parse it. Any chance of an update to this?

  • @hadizababatunde7833
    @hadizababatunde7833 Před rokem

    Hi! Thank you for this video… I’m using Alexa, Arduino and Node to turn on three bulbs. I have been able to connect node red to Arduino… now I’m currently working on connecting Node-red to Alexa and I came across your video… should these same steps work for my own project and would I need to open a different tab for each connection
    Thank you

  • @lookboy478
    @lookboy478 Před 4 lety +2

    I have a question: I need an MQTT server to run this node?

    • @KPeyanski
      @KPeyanski  Před 4 lety

      Yes, it is easier that way. Check this video how you can install Mosquitto MQTT server - czcams.com/video/5JMNHuHv134/video.html

  • @roystervi
    @roystervi Před 11 měsíci

    Hi, can you ask alexa to dim the light. example: "alexa dim light 50%"
    or which ever the wake word is? TIA.

  • @rhyshughes1317
    @rhyshughes1317 Před 4 lety +1

    I use node red. I don’t use it very well as it’s still kinda new 😀

    • @KPeyanski
      @KPeyanski  Před 4 lety +1

      You are absolutely right - it looks a little strange at first glance, but don't stop using it you will see that is worth it. It is very powerful tool and you can do basically everything with it. They recently released their 1.x version which is a big milestone and I really love it.

  • @nicolarigoni1062
    @nicolarigoni1062 Před 3 lety +1

    Hello, I'm implementing the library but I communicate with a Siemens PLC all works but I don't find the document from where you copy the code at minute 13:00 can you help me to find it? thanks a lot

    • @KPeyanski
      @KPeyanski  Před 3 lety

      Hi Nicola, that is my first Smart Home/Home Automation video :) I guess that the document from the video is replaced/updated by these: flows.nodered.org/node/node-red-contrib-alexa-smart-home & docs.cb-net.co.uk/en/development/index.html

  • @lookboy478
    @lookboy478 Před 4 lety

    Hi, I have another question: while I'm attempting to turn on the device, the alexa app say that the device is not responding...
    Could you help me?

    • @KPeyanski
      @KPeyanski  Před 3 lety

      Did you manage to make it work?

  • @shaunwhiteley3544
    @shaunwhiteley3544 Před 4 lety

    Hi, new subscriber 😀. I have a Reolink camera set up with Zoneminder, the state of the camera, either recording or idle turns on via node-red some outside lights. These just turn on for 5 minutes. Sometimes the motion is not picked up so I can be outside and all the lights go off and I have to keep waving at a camera to activate motion to trigger the lights. Any idea of a quick way I can turn off the lights off automation in a flow but for the flow to work normally later when I don’t need the light?
    I was thinking having a second flow that would keep the light on, that Would use Alexa voice command to disable the auto off flow (first flow) but I don’t know how to do that ☹️
    Any suggestions greatly appreciated! Thanks

    • @KPeyanski
      @KPeyanski  Před 4 lety +1

      Sorry, but I have no experience with that camera and Zoneminder so it's better not to give you any wrong advice that will mess/brake something more. Maybe someone will read that and help you out

    • @shaunwhiteley3544
      @shaunwhiteley3544 Před 4 lety +1

      KPeyanski Thanks anyway mate

    • @weatherchaser1166
      @weatherchaser1166 Před 4 lety +1

      I'm headed your way on my next project. Hoping it goes well

    • @KPeyanski
      @KPeyanski  Před 4 lety

      @@weatherchaser1166Let us know what happened. Good luck.

  • @robertovergotti1035
    @robertovergotti1035 Před 11 měsíci

    Ciao ti seguo da tanto tempo ed ho imparato tantissime cose . Vorrei chiederti se utilizzando NODERED con la paletta APPLESTRUDEL posso in qualche modo attivare l ascolto di Alexa.
    Per esempio, dire: IO - Alexa - attiva cancello Alexa - Certo ma dimmi il codice di sicurezza a questo punto attivo l ascolto e IO - codice RED 1234 e lei attiva se il codice è corretto.
    Si può fare in qualche modo ??
    Grazie Mille

  • @nidalidais9999
    @nidalidais9999 Před 3 lety

    good work man, what about google home , and what code to write to esp8266, thanks

    • @KPeyanski
      @KPeyanski  Před 3 lety

      I can recommend Tasmota! This is my tutorial about it czcams.com/video/_UnI6cnzF3k/video.html

  • @3ATIVE
    @3ATIVE Před 4 lety +1

    Here's something may find useful...
    Home Assistant: Controlling Devices with Alexa: czcams.com/video/l1as3tYVy64/video.html

    • @KPeyanski
      @KPeyanski  Před 4 lety +1

      Good Job with the video. Keep them rolling.

    • @3ATIVE
      @3ATIVE Před 4 lety +1

      Wow - thank you for the support, I got a few more coming soon.

    • @KPeyanski
      @KPeyanski  Před 4 lety +1

      Very good