Want your favorite playlist to play when you get home from work? Use Text-to-Speech Markup Language (SSML) so thatAlexa inform you of a leak under your dishwasher? You are on the right page ! Today, we are going to see together how to integrate very easily and in less than 5 minutes your Echo devices fromAmazon on your Home Assistant server.
Integration Alexa Media Player in Home Assistant
Go to the page HACS, then in the tab integrations are looking « Alexa« .
Click on Alexa media Player. This component created by keatontaylor et alandtse allows us to control devices Amazon Alexa from Home Assistant
Once on the integration page (component, whatever the name), all you have to do is click on install to install it. 🙂
The integration is now installed, Home Assistant will offer to restart your server. Just click on Restart Home Wizard in order to finalize the installation ofAlexa media Player
Your server is restarted, perfect! Always on the page HACS but this time in the tab Installed you will find the component Alexa media Player, it is therefore well installed.
Echo devices: configuration Alexa media Player
We are now going to configure this component in Home Assistant, nothing could be simpler, just go to the page Configuration then click integrations
A list of brands and / or devices that can be integrated into Home Assistant appears. As before, with the tutorial of xiaomi gateways we will search for the component that interests us.
Search Alexa, our component will appear as below:
Click on it, then enter your identifiers Amazon
You can validate by clicking on Submit
Echo devices: adding maps to Home Assistant
Your devices do not appear on your Home Assistant dashboard? You just have to click on the 3 dots at the top right then on Configure user interface
A small + on an orange background appears at the bottom right of your page, click on it to display the different types of cards available
Here, for example, we searched for the map Media control which will allow us to control the music of the selected entity
Select the entity (device) you want to control with this map, for example, my Echo Show 8.
Validate by clicking on record, your Echo device has now appeared on your dashboards Home Assistant.
Here is an example showing two devices of the range Amazon Echo (here, Echo Show 8 and Echo Dot 3) as well as the different services they offer:
Make your Amazon Echo
We will see together how to make our Echo speakers or Echo Show devices talk so that they alert us whena water leak for example !
For that, nothing very complicated, go to the page Configuration then click Automations.
Click on the small + on an orange background at the bottom right of the page to create a new automation. Ignore the first pop-up by clicking on Skip (This first pop-up allows you to create automations by writing a sentence, thank you Almond for this solution, unfortunately only in English for the moment)
This page appears, perfect, let's go to automation creation. As above, give a name and a description (optional) to recognize it among all your automations.
In the section Actions select the type of action Call a service then select the service notify.your_echo_device (for example, notify.alexa_media_aurelien_echo_show)
So we call the service notify on an Echo device of our choice, we must now provide it with the data. To do this, copy the following three lines:
data: type: tts message: lesalexiens.fr first French-speaking news site devoted to Alexa and devices Amazon Echo
our data contains two pieces of information:
- le type : TTS(text-to-speech)
- le message : Very simple, the message you want (example: The sensor under the dishwasher indicates a water leak)
Save your automation by clicking the small diskette on an orange background at the bottom right of the page
Run our Home Assistant automation
As I told you a little earlier, we have created a very simple automation that only contains one action (the call to our notify service). To test this automation, simply click on Execute next to the name of our automation:
Is your Echo device reading your message? Perfect, automation is working 🙂
Important information about the format of TTS messages
Some information should be known in order not to make a mistake when designing a TTS message
- Do not put quotes whether double or single quotes. These could conflict with the system code. (See example above, "topicality" replaces "topicality")
- As for all lines in YAML the indentation must be respected, for example in our example above, type: tts is shifted by a tab relative to the data and message lines, this is quite normal 🙂
Do not hesitate to share your dashboard or automations in comments or on the facebook group : )
I have the impression that it works more like that now ???
Hello,
In fact, just like Jerome, it doesn't work for me. I did install the plugin via HACS, but then nothing in the integrations in HA. It does not find any integration named " Alexa Media Player ”.
Do you have a lead?
Guillaume
Hello,
I also had a problem integrating alexa media player. all you have to do is enter the following elements in the configuration.yaml file:
alexa_media:
accounts:
- email: your email amazon
password: password amazon
url: amazon. Fr
We restart and normally you have a new integration to configure.
You can repeat the tutorial above at the point: "Echo devices: configuration Alexa Media Player ”.
here it is 😉
Hello,
I wanted to integrate my echo show into my home assistant, I succeeded in configuringAlexa Media Player, but when taking the test to "talk alexa ", it does not work. I have no errors, the script seems to be running fine, but alexa remain silent. Any ideas?
thin I have this message when I try to record automation "Message malformed: Integration" not found "
do you know why?
merci!
Bonsoir
Great tutorial, well detailed
I have a problem, I am blocked at "To do this, copy the following three lines:"
I have no fields where to put it, where should we write these lines? in the configuration.yaml file?
please
Hello,
It's in Action> Add a service> Service data. 🙂
Hi,
Frequently, home assistant asks me to reconfigure the integration Alexa by giving the password again. And this automatically generates a response fromamazon change my account password Amazon.
Do you have a solution to this problem?
cordially
Hello,
No, unfortunately we have not been faced with this problem. Try to configure two-factor authentication (OTP) at Amazon, this will probably prevent you from going through this security system. 🙂
no longer works arrives on a high authentication page amazone who does not find in homeassistant
It was working this weekend, I doubt it is no longer ... Look at the known issues and their resolution here: https://github.com/custom-components/alexa_media_player/issues