ALEXA in HOME ASSISTANT 2022 (Part 1)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in today's video we're going to be  setting up an alexa and home assistant   i'll also be showing you how to integrate your  speakers and we're running through a couple   of features like text-to-speech  and media controls check it out what's going on guys i hope you're all doing  well okay before we get started there's a couple   of things that i'm assuming that you've got or  that you've done in order to actually follow   along with this tutorial so first of all i'm  going to be assuming that you've got an amazon   account with your devices linked to it and that  that account is two-factor authenticated if it's   not it will need to be in order to follow along  and there'll be a link in the description that   you can go and follow in order to set two  factor authentication up for your account   next i'm going to be assuming that you've got  the home assistant community store or hacks   set up and installed now this isn't a  full requirement for this video as you   don't necessarily have to do these things this is  more for the extra parts but i'm not covering the   installation of hacks so if you want to follow  along with those bits then you will need that   and the final one is that you're an abu casa  user making use of the home assistant cloud   now you don't have to be an abu casa user in  order to actually set this all up and you can   do it by making use of free alternatives but using  naboo casa and the home assistant cloud is by far   the easiest way as always this video will be  chaptered so if there's a particular part that you   care about then you'll find the timestamp in the  description below jumping straight in we're here   on our dashboard and the first thing that we're  going to need to do is to just enable the echo   service so let's do that now so from here we're  just going to go ahead and click configuration   then up at the top you should see the home  assistant cloud so go ahead and select that one   that's then going to take us into the home  assistant cloud page and from here you're   going to just need to scroll down until you find  the echo card and in this little card you'll see   a little toggle button and you're just going to  want to toggle that on you'll notice that when   you do that it will tell you that the echo is  not yet activated so what we'll need to do is   just to set up the home assistant skill within  the echo app so let's do that now on our phones   then we're going to open the echo app and in the  bottom right corner we're going to select more we   can then choose the fifth option down which is  skills and games and from here we're going to   do a search for home assistant so just select  the magnifying glass in the top right corner   and then simply type home system home assistant  should then pop up and we can just select it   and then just hit enable to use from here you're  going to need to enter the credentials for your   naboo casa account so go ahead and enter those  and then hit sign in once you've done that you   should hopefully see the message saying your home  assistant account has been successfully linked   and you can just go ahead and click close back  in home assistant if we refresh this page now we   should see that state change and when that changes  you'll see a new toggle for enable state reporting   and i would recommend you keep that toggled on  we can now press this manage entities button and   it's going to show us all the different entities  and devices that we can expose to our amazon echo   by default here i can see that home assistant is  currently exposing 18 different entities to the   amazon echo now it's done this by itself i haven't  told it to do it but i might not necessarily want   all of these to actually be exposed so let's say  for example i didn't want these bed lights to   be exposed to the echo what you could do is just  select this little green icon and just hit don't   expose entity this is then going to remove that  from the amazon echo so it's no longer exposed and   won't be accessible through the echo and the same  applies really if you want to expose an entity   to the echo so if we just scroll down a bit we've  got a list of all the entities that are currently   not being exposed so if i wanted to just expose  one of these i could just select that icon again   but this time just hit expose if you were  wondering how all these different entities   were exposed without me manually doing them  it's to do with the different managed domains   so if we click manage domains in the top right  there that's going to show us a list of all the   different domains that are available within home  assistant and that can be automatically exposed   to the echo so by default you can see that the  fan the light the scene the sensor and switch   are all exposed and what this essentially means is  that any new entity that you add to home assistant   that falls into one of these different domains  will just automatically add and sync to your echo   without you having to manually come and select  it and then just choose expose so for example   if we added a new light to home assistant and  this light domain was turned on that light would   just automatically add to the echo and then i  could control that from my voice then or from   the echo app or without having to do this manual  process and it's entirely up to you which domains   you turn on and off so for the purposes of this  demo i'm just going to toggle all of these off   in the background there behind this  menu i can see that i've still got two   entities exposed and those two are the two that  i manually exposed so i can see that that office   safe is a temperature sensor so if i just hit  reset entities here what this will do is just   reset all the entities in that domain based on  whatever this toggle is so if i hit that there   i can see that that's got rid of the one that i  manually set and if i do the same with the input   button that i set i can now see that i've got zero  exposed so just to recap that this reset entities   can be used as a quick way of toggling on or  toggling off all the entities within a particular   domain so if i was to turn this light on here and  hit reset entities it would expose all the lights   that i have in home assistant to the echo and if  i turned it off and hit reset entities it would   disable all the lights and not expose them so  that we've got some entities to play with let's   go ahead and expose those lights to the echo so  we can just toggle that on and hit reset entities   when we do that we'll see a pop-up on our device  telling us that the echoes found new devices   so in this case i can see that i've got six  new lights found and that's pretty much the   gist of sharing your entities from home  assistant to your echo okay so we can now   control our home assistant entities using our  voice or using echo routines or even the echo   app if that's something that you wanted to do but  what about if we wanted to control the individual   media players so for example if we wanted  to play music or have the echo say something   or even do things such as control the volume to  do all of those cool things we're going to need to   make use of an integration that's only available  in hacks and again assuming that you've got this   all set up and installed we're going to open  up hacks and at the top we're going to choose   integrations in the bottom right there we're going  to press the big blue button that says explore and   download repositories and from here we can just do  a search for our repository so if we start typing   that should then just automatically populate  in the list so we can go ahead and select it   and choose download this repository and then  hit download again if we just dismiss the   new repositories here that will just clear  the list and only show us the repositories   that we currently have installed and i can see  the echo media player here and it's telling us   that it's pending a restart so from here if we  just hit the back button in the top left we'll   see again it's telling us that it's pending that  restart and if we just hit this navigate button   that's going to jump us over to our server control  and from here we can just hit that restart button   once your home assistant comes back to life we're  going to add that new integration that we just   added so let's go ahead and click configuration  and then devices and services we can then hit the   blue add integration button in the bottom right  corner and do a search for the echo media player   and as you start typing that again that should  populate in the list and we can just select it   if when you're searching for it it's not appearing  in the list then more than likely it's a browser   cache issue and all you'll need to do to  get it to appear is just clear your cache   the simplest way of doing this is just by hitting  the control key and hitting f5 that should just   take a minute for it to run through the setup and  once that completes it'll pop up a page asking to   fill in all the configuration information go ahead  and enter your email address and the password   used for your amazon account and then you want to  also make sure that your amazon region is correct   so i'm based in the uk so i just need to  update mine from amazon.com to amazon.co.uk   before we move any further we're now just going  to set up a built-in two-factor authentication   app key for the echo media player and what this  is going to allow us to do is just re-authenticate   this media player with our amazon account without  having to constantly enter a one-time password   to do this we're going to head over to amazon  and we're going to navigate to our account   and from here we're just going  to choose login and security   and from here just next to the two-step  verification we're going to hit this edit button   you'll then see an option here for authenticator  app and we're going to click add new app   we'll then be asked about adding a second  two-step verification authenticator but   rather than scanning the qr code we're going  to select this can't scan the barcode option   that's then going to give us a key based  representation of that so we're just going to   highlight it and copy it to our clipboard we can  then head back into home assistant and in the app   key box we're just going to paste the contents of  our clipboard we can then just scroll down and hit   submit you'll then hopefully get a confirmation  and in that confirmation you'll have a one-time   password code so we just need to copy that to our  clipboard and back on our amazon page we're going   to want to paste that code in and then hit verify  and continue we're now done with the amazon page   and if we come back to home assistant we just  need to select this box for the app key confirm   and then hit submit when you hit that submit as  part of the final confirmation it should just   ping you over to amazon where you'll just need  to sign in again just to confirm your credentials   so go ahead and enter your amazon email address  and password and then hit sign in as you're now   signing into amazon from a different source  and you've got two-step verification enabled   you will need to enter a one-time password using  your authenticator app or whatever you usually use   for your amazon authentication and that will be  the code that we enter here so this code is not   that code that we just had a second ago it's a new  code from your authenticator so get that code and   then go ahead and hit sign in once you hit that  sign in button it should just take a second to   load and once it does you should hopefully see  the success message and from within here you'll   be able to see all of your echo devices that are  connected to your amazon account at this point if   you wanted to you could also assign each device  to a set area by making use of the drop downs   i'm not going to bother with that and i'm just  going to scroll down and hit finish let's start   off by having a look at one of the devices  so i'm just going to select the devices here   and from this list i'm just going to choose one  of my echoes so let's just go for aurora's echo   then in here i can see all the different controls  that i have access to for aurora's echo as well   as the different sensors so here i can see what  the echo is currently doing and it's currently   doing nothing so it's just in standby mode we've  then also got the volume slider and also a do not   disturb switch the volume slider as you guessed  it when you slide this up and down it's going to   toggle the volume of the echo that you target in  and the do not disturb switch when you turn this   on it's going to stop any incoming announcements  or calls and just block them from actually playing   out loud you'll also notice these other controls  and sensors that are currently set as unavailable   or grayed out and that's just because they're not  currently accessible as the echo is not using them   so if i was to set a timer or an alarm they'd  actually appear here here i've swapped over to   my office sonos and you can see that i've got some  of those sensors set so you can see i've got an   alarm i've got a reminder and also a timer just on  the right there you can see when those things are   actually going to kick in so these are the times  for when those events are going to trigger and if   you wanted to you could also write an automation  and a script to actually act when these things do   you can also click on them to find out more  information so for example i could select   the reminder and i could go into the control and  then i could view the attributes of that reminder   so i could actually find out what the actual  reminder was so if i just scroll down there on   the bottom you can see that reminder and the same  goes for the alarm i could select it and go into   the control and then into the attributes then just  scroll down and i can actually find out what the   time is for when that alarm is going to go off so  that particular alarm is going to go off at 4pm   if you happen to be playing any media on your  echo you'll also see it appear in here so you   can see back on aurora's echo we're currently  playing some music and if we select the control   for that we can actually see what media is playing  so i can see here what actual songs play in i can   see when it started playing you also get access  to the album art for that song which is nice   you've then also got the normal controls so you  can pause it you can go back you can go forwards   and again you've got that volume control to  wrap this up we're going to cover one final   feature and it happens to be my favorite feature  of this integration and that's text to speech   so with text to speech you can type some text or  you can have some pre-written text and have home   assistant pass that to the echo and then the echo  will play that and announce it on its speakers   this is a tts notification if you've been  following along you'll see that when we click   the media controls it's got this option here  for text-to-speech and when you type something   in here and click play you'd expect it to  play on the echo speakers but it doesn't   what actually happens is the echo announces that  it's not able to make use of this and you need to   use the notify service so i'm going to show you  now how you go about doing that to show you how   to make use of text-to-speech i'm going to be  making use of the developer tools just to give   you a quick demo so head into developer tools and  then up at the top you're going to click services   then the service that we're going to want to use  is the notify service so under service you're   going to want to start typing notify and as you  start typing that it should start populating with   a list of all the different notified options that  you have so this is a brand new home assistant for   me and i've got lots of different echoes and  you can see them all appearing in this list   here so if i wanted to i could just select one of  these and i'm just going to find my office echo   and i'm going to make use of that so i've got the  office sonos there and i'm just going to choose it   and as you can see here this is going to send a  notification message to the speaker that we chose   to send our notification message we're going to  need to fill in a couple of sections here first   of all we're going to need to fill in the message  so the message is the body of the notification   and essentially what this means is whatever  you type in this box is going to be what's said   so go ahead and write something in there the next  parameter is a title but as this is going to be a   text-to-speech notification there's not really  going to be a need for a title so we can leave   that one following that we've got a target now for  this example we're only targeting the particular   media player that we've chosen the service for so  in my case it's going to be my office sonos so we   can skip target and the final parameter then is  data so with data we need to tell the notification   what type of notification it is so our type of  notification is a text-to-speech notification   and i'm just going to fill that in  here so we need to write type colon   tts and that's pretty much the foundations for  a basic text-to-speech notification so if we go   ahead and click that call service button we should  hear whatever's written in that message body this is a great demo and yes it was a great  demo so that's basically it and if you wanted   to take that and use it in an automation  it would be very easy to do if you wanted   to you could just rewrite what you had there  or if you was to choose the go to yammer mode   that will give you the code representation of  what that is and you could just copy and paste   that then into an automation but as this is such  a simple one you could just easily type that out   again and as you can see from an automation  perspective it looks exactly the same so with   an automation you'd set your trigger and then in  your action you'd use the same thing so you'd set   the notification service and then you'd also set  the data the type and your message and there we   go guys that's been a look at how we set up alexa  home assistant and how we make use of some of the   features like text-to-speech and media controls  this video is the first part of a couple of videos   that i'm going to be doing so this one was mainly  all about the setup and just a couple of little   features but in the next video we'll be looking  at sequences routines and how to do things like   play music sound effects and much much more if  you have enjoyed this video then don't forget to   drop it a like and if you're not already hit that  subscribe button and ding dong the notification   bell you'll then be alerted to any future  videos that i do and as always a massive thank   you to these awesome dudes these awesome dudes my  patreons if you're interested in helping support   my channel which in turn allows me to create  videos like this then you'll find a link to my   patreon in the description below so thank you for  watching and i'll catch you in the next one cheers you
Info
Channel: Mark Watt Tech
Views: 64,685
Rating: undefined out of 5
Keywords: MarkWattTech, HomeAssistant, Hassio, Home Assistant, Smart Tech, Smart Home, Mark Watt, Automations, Home Asistant, alexa guide, voice assistant
Id: UsnhL2z_UUY
Channel Id: undefined
Length: 15min 27sec (927 seconds)
Published: Fri Feb 11 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.