To integrate Amazon Echo (Alexa) with Home Assistant (via cloud for a fee)

5 minutes of reading
Guide purposes:
Concepts dealt with:
  • Software configuration
Software components used:
Physical devices used:
  • The device on which it resides Home Assistant
  • Smartphone on which to run Amazon Alexa (Android and / or iOS)
  • Amazon Echo (any model or any model of smart speaker you mount Amazon Alexa as integrated software)
GUIDE more indicated for:

All environments

Notes and disclaimer
  • qualsiasi modifica all'impianto elettrico dev'essere progettata ed effettuata da personale qualificato;
  • any changes implemented in probefore is a propersonal responsibility as well as a profirst risk and danger (the contents of the present page are purely educational);
  • any changes implemented in proprior to a device it voids the guarantee, quality approvals and certifications.

Amazon Echo Plus - Technical details


The advent on the market of smart speaker is slowly changing the habits of many who, everydaynamente, they become familiar and familiar with the possibility of interacting with a real e profirst personal assistant simply using voice and natural language.

Amazon Echo It is one of device of wider and more recognized success. As we explained, this smart speaker uses the software to work Alexa, which is available, even for smart speakers proproduced by third parties, as well as how appstand-alone communication for Android and iOS smartphones / tablets.

Any smart speaker you use Amazon Alexa can be easily integrated with Home Assistant.
But why, since many domotic components declare compatibility with Amazon Echo - and therefore can be controlled "by factory" - it is useful to integrate them with this latter Home Assistant? [Before answering the question, who reads have clear the concept of integration in home automation.]

Simple: why through a personale HUB like Home Assistant we are able to define scenarios, virtual accessories, automations otherwise not definable with the separate use of the single components. As explained also in a episode of our podcast, scenarios like "good night"(Which perhaps when evoked turn off all the lights, the TV, and activate the perimeter alarm) simply they cannot be realized without the aid of a common platform, or a personale HUB.

The moment it integrates itself like this personal HUB(therefore Home Assistant in the specific case of this guide) with Amazon Echo, you can check all the components and the entity - which scenarios (and others) - defined in it through my personal assistant. One of the many reasons to adopt a personale HUB for the profirst home automation. A focus on this important topic is available here.

The elements (defined of) defined in the configuration Home Assistant and controllable through integration with Amazon Alexa (Amazon Echo and compatible speakers) are:

  • alert (alarm alerts)
  • automation (automation) - on / off
  • climate (air conditioners and thermostats) - target temperature setting.
  • cover (dark)
  • fan (fans) - on / off
  • group (Groups)
  • boolean input (boolean input)
  • and "light", too (Lights)
  • lock (locks) - opening and closing
  • media_player (repromultimedia players) - riproduction, pause, stop, set volume, adjust volume, track forward / backward
  • scenes
  • script - activation / activation only
  • sensor (Sensors)
  • Switch (switches)
N.b. To integrate Amazon Alexa with Home Assistant exist two roads:

This guide explains how to make the first possibility, that to simpler but to payment.

Finally, it is good to know that Alexa can be integrated to Home Assistant also how to repromultimedia producer and how voice notification system, or "making it talk" automatically when certain conditions arise in home automation.

It starts

Cloud activation Home Assistant

The cloud service by Home Assistant is active by default. If it was not (therefore not apparisse the voice "Home Assistant Cloud "under" Settings ") you need to activate it by adding to the configuration file configuration.yaml the following lines:

# Example configuration.yaml entry

Then restart Home Assistant.

Creating an account in the cloud

It is now necessary - unless you already have one - create an ad hoc account on the client of Home Assistant. To do this, go to "Settings" in Home Assistant (web interface) and click on "Create Account":

Home Assistant Cloud - Create Account

You will then have access to a mask in which enter the desired credentials:

Home Assistant Cloud - Register

At the end of the procedura (which provides a confirmation by e-mail), progive in to entering credentials, on the first screen, under the heading "Sign In".

Nb Starting from December 2018 the cloud service Home Assistant became a fee, 5 $ a month. The first month is free.

Definition of domains

After configuring the cloud, you must specify in configuration Home Assistant what are the domains to be made available to Amazon Echo / Alexa, so what accessories, scenes, entity etc.

The list of exportable domains is as follows:

  • alert (alarm alerts)
  • automation (automation) - on / off
  • climate (air conditioners and thermostats) - target temperature setting.
  • cover (dark)
  • fan (fans) - on / off
  • group (Groups)
  • boolean input (boolean input)
  • and "light", too (Lights)
  • lock (locks) - opening and closing
  • media_player (repromultimedia players) - riproduction, pause, stop, set volume, adjust volume, track forward / backward
  • scenes
  • script - activation / activation only
  • sensor (Sensors)
  • Switch (switches)

Then add a block similar to the following (customizing it) to the configuration Home Assistant:

# Cloud
        - light.cucina
        - switch
        - switch.terrazzo
        name: Nome personalizzato per Alexa
        description: La luce della cucina
        display_categories: LIGHT

In this example block they are included in the domain Amazon Alexa the features of switching on kitchen and bedroom lights, they are included all switches, except that of the terrace.
Furthermore, the behavior / name was customized of kitchen light and the switch of the stairs.

Field display_categories can be customized based on the categories available within Alexa.

Activation of Alexa integration

First di prosee integration with Amazon Echo it is necessary to activate, simply, integration with Alexa side Home Assistant.

Always on the voice Home Assistant Cloud, activate "Alexa"

Home Assistant - Integration Amazon Echo Alexa with Nabu Casa

Installation of Amazon Alexa

To complete the integration di Amazon Echo / Alexa with Home Assistant it is necessary to have installed on the prosmartphone and / or tabletapplished here Amazon Alexa (For Android and / or iOS).

After proseen through that applished here to the first configuration of Amazon Echo - refer, for this, to to the support provided by Amazon - integration will be possible.

After that, execute theapp and authenticate with the same account Amazon already used con theapp Amazon Alexa to configure initially the device Amazon Echo.

Configuration of Amazon Alexa

It is the moment to implement integration. To do this, select in the menu of theapp the voice "cv"

Home Assistant - Integration Amazon Alexa

Then select "Your Skills" and then the magnifying glass icon:

Home Assistant - Integration Amazon Alexa - 1

then, enter as search key "Home Assistant"And select theapp which will be found as follows:

At this point select "Enable use"

Home Assistant - Integration Amazon Alexa - 4

At this point the Skill will request authentication at the Nabu Casa cloud: clearly, the user created must be used in the previous step:

Home Assistant - Integration Amazon Alexa - 5

Once authentication is complete, Alexa will confirm the successful connection of the Skill with the cloud of Home Assistant:

Home Assistant - Integration Amazon Alexa - 6

At this point it will be necessary to instruct Amazon Alexa on entity present on Home Assistant, or our home automation components.
To do this, click on the next screen, on “Detect devices"

Home Assistant - Integration Amazon Alexa - 7

Subsequently, Amazon Alexa provvederà upon detection of the components:

Home Assistant - Integration Amazon Alexa - 8

At the end, it will be offered a summary screen regarding all detected components:

Home Assistant - Integration Amazon Alexa - 9

Yours Amazon Echo is now proto control your home automation Home Assistant.

Example of use

Home Assistant Official LogoATTENZIONE: remember that there is on our FORUM community an ad hoc section dedicated to Home Assistant, for any doubt, question, information on the specific merit of these components.