Alexa & Home Assistant: Sprachsteuerung Deluxe! (2024)

Tauche ein in die Welt der Spitzen-Sprachsteuerung mit Alexa und Home Assistant! Dieses Video zeigt dir, wie du beide Systeme nahtlos integrierst, um dein Smarthome mit einfachen Sprachbefehlen zu steuern.

Von Lichtern über Thermostate bis zu Sicherheitssystemen – erfahre, wie du dein Zuhause smarter machst, als je zuvor 🙌

Inhaltsverzeichnis

  • Fehler im Video
    • Rechenfehler Netto-Kosten
  • Voraussetzungen
    • Alexa Geräte
  • Sprachsteuerung von Home Assistant Entitäten
    • Möglichkeit 1: Nabu Casa
    • Möglichkeit 2: Emulated Hue
      • Konfigurationsmöglichkeit 1 (nicht empfohlen)
      • Konfigurationsmöglichkeit 2 (empfohlen)
    • Möglichkeit 3: Alexa DIY-Skill über AWS
      • Code für Lambda
      • Umgebungsvariablen
      • Initial-Code für deine configuration.yaml
      • Testen der Lambda-Funktion
      • Finales Code-Beispiel für deine configuration.yaml
      • URLs für Account linking
      • Vollständige Übersicht der Konfigurationsmöglichkeiten
    • Fehlerbehebung
      • Fehlermeldung beim Verknüpfen in der Alexa App
      • Tippfehler im AWS-Portal
      • Port 8123
      • DuckDNS Alexa Anmeldeseite
  • Integration von Alexa als Entität in Home Assistant (Media Player)
    • 0. Voraussetzung: Amazon 2FA-Authentifizierung aktivieren
    • 1. Integration einrichten
    • 2. Spaß haben!
      • Musik abspielen
      • TTS (Normal)
      • #TTS (Ankündigung)
      • Mobile Push und Drop In
      • Sounds abspielen
      • Routinen Triggern
      • Custom Commands (Für alles!)
  • Geräte für HA
  • Hardware für Home Assistant
  • Fazit

Fehler im Video

Rechenfehler Netto-Kosten

Beim Ausrechnen der Netto-Kosten von Nabu Casa ist mir leider ein kleiner Fehler unterlaufen. Die Nettokosten belaufen sich auf 75€:119x100=63,03€ (11,97 Euro Mehrwertsteuer sind im Preis enthalten).

Die Kernaussage des Videos bleibt aber trotzdem wahr. Es ging mir ja nur darum zu zeigen, dass Nabu Casa nicht den EU-Kunden “das Geld aus der Tasche ziehen” will 😊

Voraussetzungen

  1. Home Assistant Grundlagen für Anfänger – From Zero to Hero

Alexa Geräte

Mindestens ein Alexa-Fähiges Gerät. Bei Bedarf findest du hier unten einige Möglichkeiten.

Zuletzt aktualisiert am 22.07.2024 um 19:10 . Wir weisen darauf hin, dass sich hier angezeigte Preise inzwischen geändert haben können. Alle Angaben ohne Gewähr.

Zuletzt aktualisiert am 20.07.2024 um 23:03 . Wir weisen darauf hin, dass sich hier angezeigte Preise inzwischen geändert haben können. Alle Angaben ohne Gewähr.

Zuletzt aktualisiert am 22.07.2024 um 18:41 . Wir weisen darauf hin, dass sich hier angezeigte Preise inzwischen geändert haben können. Alle Angaben ohne Gewähr.

Zuletzt aktualisiert am 22.07.2024 um 18:41 . Wir weisen darauf hin, dass sich hier angezeigte Preise inzwischen geändert haben können. Alle Angaben ohne Gewähr.

Sprachsteuerung von Home Assistant Entitäten

Möglichkeit 1: Nabu Casa

https://www.nabucasa.com/

Möglichkeit 2: Emulated Hue

https://www.home-assistant.io/integrations/emulated_hue/

Konfigurationsmöglichkeit 1 (nicht empfohlen)

emulated_hue: host_ip: IP.Deines.Home.Assistant listen_port: 80 expose_by_default: true exposed_domains: - light off_maps_to_on_domains: - script - scene entities: light.smart_garage_door_2008205833383036100448e1e92ce256_dndmode: hidden: true light.smart_plug_2208025276132451080248e1e99d35de_dndmode: hidden: true

Konfigurationsmöglichkeit 2 (empfohlen)

emulated_hue: host_ip: IP.Deines.Home.Assistant listen_port: 80 expose_by_default: false off_maps_to_on_domains: - script - scene entities: switch.aktor_neben_wendeltreppe_untere_dose_licht_galerie_state: name: “Licht Galerie“ hidden: false switch.aktor_kuche_neben_rundbogen_licht_kuche_state: name: “Licht Küche“ hidden: false switch.aktor_sicherungskasten_licht_flur_state: name: “Licht Flur“ hidden: false switch.aktor_unterputz_schalfzimmer_licht_schlafzimmer_state: name: “Licht Schlafzimmer“ hidden: false switch.aktor_neben_wendeltreppe_untere_dose_licht_wohnzimmer_state: name: “Licht Wohnzimmer“ hidden: false switch.aktor_bad_decke_deckenlampen_bad_state: name: “Licht Bad“ hidden: false switch.aktor_uber_spiegel_bad_spiegel_bad_state: name: “Licht Spiegel“ hidden: false switch.aktor_untere_dose_kachelofen_kronleuchter_esszimmertisch_state: name: “Kronleuchter“ hidden: false switch.aktor_untere_dose_kachelofen_esszimmer_decke_state: name: “Deckenlampe Esszimmer“ hidden: false

Möglichkeit 3: Alexa DIY-Skill über AWS

https://www.home-assistant.io/integrations/alexa/

Code für Lambda

Umgebungsvariablen

https://www.home-assistant.io/integrations/alexa.smart_home/#:~:text=(required)%20Key%20%3D-,BASE_URL,-%2C%20Value%20%3D%20your%20Home

BASE_URLhttps://DeineHomeAssistantAddresse.de

Initial-Code für deine configuration.yaml

alexa: smart_home: locale: de-DE endpoint: https://api.eu.amazonalexa.com/v3/events filter: include_entities: - light.irgendeinelampe - light.nocheinelampe

Testen der Lambda-Funktion

https://www.home-assistant.io/integrations/alexa.smart_home/#test-the-lambda-function

Eventname: Discovery

Code 👇

{ "directive": { "header": { "namespace": "Alexa.Discovery", "name": "Discover", "payloadVersion": "3", "messageId": "1bd5d003-31b9-476f-ad03-71d471922820" }, "payload": { "scope": { "type": "BearerToken" } } }}

Finales Code-Beispiel für deine configuration.yaml

alexa: smart_home: locale: de-DE endpoint: https://api.eu.amazonalexa.com/v3/events filter: include_domains: - light include_entities: - climate.heizung_wohnbereich_int0000001 - climate.heizung_bad_int0000002 - climate.heizung_schlafzimmer_int0000003 - cover.rollo_badezimmer - cover.rollo_kuche - cover.rollo_schlafzimmer - cover.rollo_wohnzimmer - camera.reolinke1zoom_sub - lock.summer_haustur - cover.garage_door - cover.garage_door_2 - vacuum.roborock_s7 - sensor.aqara_tvoc_air_quality_monitor_temperature exclude_entities: - light.a60_smart_bulb_rgbw_2 - light.bambulab_x1c_chamber_light - light.levoit_core300s_night_light - light.licht_kellergang - light.wakeup_lichter_schlafzimmer - light.reolinke1zoom_status_led

URLs für Account linking

https://www.home-assistant.io/integrations/alexa.smart_home/#account-linking

Authorization URIhttps://[AddresseDeinesHomeAssistant]/auth/authorize
Access Token URIhttps://[AddresseDeinesHomeAssistant]/auth/token
Client IDhttps://layla.amazon.com/
Client SecretEgal was, wird nicht benutzt
Your Authentication SchemeCredentials in request body
ScopeAuf + klicken & smart_home eingeben

Domain List und Default Access Token Expiration Time können leer bleiben.

Vollständige Übersicht der Konfigurationsmöglichkeiten

Alle Entitäts-Konfigurationen, unterstützte Typen und Parameter findet ihr hier:

https://www.home-assistant.io/integrations/alexa.smart_home/#configuration-variables

Fehlerbehebung

Falls mal etwas nicht klappen sollte, hier eine kleine Sammlung an bisher aufgetretenen Problemen und deren Lösung

Fehlermeldung beim Verknüpfen in der Alexa App

“Konten konnten nicht verknüpft werden Deine Alex-App benötigt ein Update”

Lösung: Update installieren (ja, ist nicht immer der Grund). Workaround: Smartphone des Partners benutzen 😅

Tippfehler im AWS-Portal

Wenn du beispielsweise das Scope falsch geschrieben hast, also smatr_home anstatt smart_home, musst du nach der Korrektur die Funktion in Lambda neu “deployen”!

https://community.simon42.com/t/alexa-home-assistant-sprachsteuerung-deluxe/22249/6?u=simon42

Port 8123

Laut der Doku von Home Assistant ist ein eigener Port (also ein anderer Port als der Standard-HTTPS Port 443 wie 8123) kein Problem für den eigenen Alexa-Skill! Vorausgesetzt natürlich, dieser wird auch bei den entsprechenden URLs wie der Authorization URI oder der Umgebungsvariable mit angegeben.

Nichtsdestotrotz gab es vereinzelte Rückmeldungen in den Kommentaren, dass es bei einigen nur funktioniert, wenn der Port 8123 auf den Port 443 geändert wird, Home Assistant also von Extern direkt über https://meineDomain.Duckdns.org zu erreichen ist. Im Zweifelsfall kannst du das also ggf. mal testen. Die Lambda-Funktion muss auch hier nach dem anpassen der Parameter neu deployt werden.

https://www.youtube.com/watch?v=SJPu8QhbbWw&lc=Ugx7McqUUybwqwPfT2F4AaABAg.A1gEpJekBqIA1hMFT795Ux

Aber noch ein Hinweis an dieser Stelle: Jeder offene Port am Router stellt ein potenzielles Sicherheitsrisiko da. Das verwenden eines Standard-Ports wie 443 für https erhöht die Gefahr noch ein stück mehr…

Falls es bei dir mit dem Custom-Port 8123 geklappt hat, lass gerne mal Feedback da 🙏

DuckDNS Alexa Anmeldeseite

Falls du DuckDNS nutzt und die Anmeldeseite für die Alexa-Authentifizierung nicht angezeigt wird, versuche mal die Verbindung über 5G, also nicht aus dem Heimnetz, abzuschließen. Bei Cloudflared gibt es dieses Problem nicht.

In diesem Video zeige ich dir den umgekehrten Weg, nämlich wie du Amazon Alexa Geräte oder Echo Lautsprecher, mittels Alexa_Mediaplayer Integration in Home Assistant einbindest. Du lernst, wie du sie für Automatisierungen, Sprachansagen (TTS) und benutzerdefinierte Befehle nutzt, um eine nahtlose Kontrolle und Integration in dein Smart Home zu erreichen.

0. Voraussetzung: Amazon 2FA-Authentifizierung aktivieren

Zuerst musst du in deinem Amazon-Konto die 2-Faktor Anmeldung aktivieren. Ich empfehle dir wie gesagt dringend mindestens 2 dieser Faktoren zu konfigurieren (Beispielsweise die Google Authenticator App & deine Telefonnummer), falls du den Zugriff auf eines davon verlieren solltest!

Außerdem musst du dich anschließend ggf. auf deinen Amazon-Geräten neu anmelden & dann natürlich auch den OTP-Code eingeben.

1. Integration einrichten

Kann einfach über HACS installiert werden: https://github.com/alandtse/alexa_media_player

2. Spaß haben!

Hier noch einige Code-Snippets aus dem Video oder die Links zu den entsprechenden Doku-Seiten.

Alle Dienstaufrufe können entweder in den Entwicklerwerkzeugen ausprobiert werden (YAML-Modus nutzen, um Code-Snippets einzufügen und nicht vergessen, die Entität gegen deine eigenen auszutauschen) oder als Aktion in Automationen genutzt werden!

Musik abspielen

https://github.com/alandtse/alexa_media_player/wiki#play-music

TTS (Normal)

#TTS (Normal)service: notify.alexa_mediadata: message: "simon42, schon abboniert?" target: media_player.DEINE_ALEXA_HIER data: type: tts

#TTS (Ankündigung)

service: notify.alexa_mediatitle: "Titel für z.B. Echo Show Geräte"data: message: "Lust auf mehr Home Assistant? Dann Abonniere meinen Kanal!" target: media_player.DEINE_ALEXA_HIER data: type: announce method: all

Mobile Push und Drop In

https://github.com/alandtse/alexa_media_player/wiki/Configuration%3A-Notification-Component

Sounds abspielen

#SoundEffectservice: media_player.play_mediatarget: entity_id: media_player.DEINE_ALEXA_HIERdata: media_content_type: sound media_content_id: amzn_sfx_doorbell_chime_01# Mehr Sounds: https://github.com/alandtse/alexa_media_player/wiki#known-available-sounds

Mehr Sounds: https://github.com/alandtse/alexa_media_player/wiki#known-available-sounds

Routinen Triggern

service: media_player.play_mediatarget: entity_id: - media_player.DEINE_ALEXA_HIERdata: media_content_type: routine media_content_id: gutenmorgen

Doku zu Routinen: https://github.com/alandtse/alexa_media_player/wiki#alexa-routines

Sequence Commands: https://github.com/alandtse/alexa_media_player/wiki#sequence-commands

Custom Commands (Für alles!)

service: media_player.play_mediatarget: entity_id: - media_player.DEINE_ALEXA_HIERdata: media_content_id: Wie spät ist es? media_content_type: custom

Doku: https://github.com/alandtse/alexa_media_player/wiki#run-custom-command

Weitere Beiträge + Videos zu Smart Speakern & Sprachassistenten

Wenn du nicht genug bekommst, schau mal hier für noch mehr Beiträge zum Thema!

Home Assistant Benachrichtigungen, wenn du heimkommst!

Home Assistant Google Home Sprachsteuerung 🗣️

Home Assistant HomeKit Integration (richtig) einrichten

Smart Home Sprachassistenten im Vergleich (2022)

Geräte für HA

Mehr Geräte für Home Assistant, HACS oder auch Alexa, Google Home, HomeKit sowie Homebridge findest du in unserem Smart Home Gerätefinder!

Entdecke mehr Geräte für Home Assistant

Hardware für Home Assistant

Dein Home Assistant ist langsam, reagiert unzuverlässig oder stürzt ab? Du hast noch gar keinen am Laufen?

Im Beitrag unten findest du empfehlenswerten Hardware & Tipps, damit dein Home Assistant so richtig gut läuft und dein Smarthome schnell wie der Blitz wird 🚀

Hardware Empfehlungen für deine Home Assistant OS Installation

Fazit

Abschließend lässt sich sagen, dass die Kombination aus Alexa und Home Assistant eine mächtige Lösung für jeden darstellt, der sein Smart Home auf das nächste Level heben möchte. Durch die nahtlose Integration beider Systeme wird nicht nur der Komfort in deinem Zuhause erhöht, sondern du erhältst auch eine beeindruckende Kontrolle über eine Vielzahl von Geräten und Funktionen – und das alles per Sprachbefehl.

Egal, ob du neu in der Welt des Smart Homes bist oder bereits ein erfahrener Nutzer, die Möglichkeiten, die sich durch die Verbindung von Alexa mit Home Assistant eröffnen, sind praktisch grenzenlos. Von der einfachen Lichtsteuerung bis hin zur komplexen Automatisierung von Routinen bietet diese Kombination eine flexible und zugleich leistungsstarke Plattform, um dein Zuhause intelligenter und dein Leben einfacher zu gestalten.

Alexa & Home Assistant: Sprachsteuerung Deluxe! (2024)

FAQs

Where does Alexa get her answers? ›

Answer: Crowdsourcing!

Once those chosen receive the notifying email, they can go to a website and enter answers of up to 300 characters for questions that Alexa received and couldn't answer.

How can I get Alexa to answer me? ›

Make sure the Echo's microphone is turned on. The microphone is turned off if you have a solid red light ring or bar instead of a solid blue one. Press the microphone button on top of the device to turn it on again. See if Alexa can respond to your commands.

How do I get Alexa to give short answers? ›

How to have Alexa give shorter responses
  1. Open the Alexa app.
  2. Go to the Settings menu.
  3. Under Alexa Preferences, select Voice Responses.
  4. Select Brief Mode to toggle on or off.

How does Alexa answer questions so quickly? ›

Alexa works by matching audio patterns from your voice with pre-recorded responses and questions. For Alexa to accurately predict what a person will say next, it needs to listen for intonation and inflection cues.

Do you get anything for Alexa Answers? ›

Every time their answer is used, Alexa Answer members gain points. They can also gain points from daily bonus questions. Points can be used to unlock achievements and allow users to compete for top contributor status.

Why won't Alexa answer me? ›

Check that your device isn't muted. The light indicator is red when your device is muted. For devices without a screen: press the Action button to see if your Echo device responds. To make sure that Alexa hears you, move your device away from walls, other speakers, or background noise.

Can Alexa answer questions like Google? ›

To trigger the skill, say, "Alexa, I have a question." You'll hear "what's up?" in response, and you can ask Alexa any number of questions after that. Anything Google can answer, Alexa now can too.

Can I answer my phone through Alexa? ›

Say, “Alexa, answer.” If you have an Echo Show device, you can also tap on the green answer button on your screen. You can also say “Ignore” if you don't want to pick up the call. Alexa will pick up (or ignore) the call. Say “Hang up” to end the call, or tap the End icon if you're using an Echo Show.

How does Alexa know all the answers? ›

All answers go through Alexa's content moderation and quality checks before Alexa selects the most relevant answer to share with customers. Customers ask Alexa responses that are answered by brands are always attributed to the brands that provided them, and are not paid for or sponsored.

Can you turn Alexa's voice off? ›

How to mute Alexa to disable the microphone. Press the microphone button on your device. If the light is red, Alexa is not listening.

Can you get Alexa to not say OK? ›

Open the Alexa app . Open More and select Settings. Select Voice Responses. Turn Brief Mode on or off.

What happens if you yell help to Alexa? ›

If anyone from your household asks Alexa to call for help (including from devices in Amazon Kids mode), Alexa attempts to call and message your emergency contact. If your Echo device isn't connected to Wi-Fi or the phone number is incorrect, Alexa is unable to call or text your emergency contact.

Why won t Alexa answer certain questions? ›

Network errors are often the culprit as Alexa (and most voice assistants) simply can't function without an internet connection. Restarting will often fix this, but, if it doesn't, then you need to reset the Wi-Fi. To do this, open the Alexa app, then go to Devices > Echo & Alexa > [Device that's not working].

What is Alexa cheat mode? ›

It's known as the Konami Code: up, up, down, down, left, right, left, right, B, A, start. The Mirror reports that if you say this sequence to Alexa, you'll illicit a response from the smart speaker. She'll say: "Super Alexa mode, activated.

Where does Alexa get her information from? ›

When you speak to Alexa, a recording of what you asked Alexa is sent to Amazon's cloud, where we process your request and other information to respond to you. For example, when you ask, "Alexa, play top hits on Amazon Music," we use the recording of your request and information from Amazon Music to play top hits.

Where does Alexa get her knowledge? ›

Amazon breaks down your “orders” into individual sounds. It then consults a database containing various words' pronunciations to find which words most closely correspond to the combination of individual sounds. It then identifies important words to make sense of the tasks and carry out corresponding functions.

Where does Alexa get her news? ›

You can also use your voice to ask Alexa to turn on notifications for your preferred news source. (e.g., “Alexa, enable NPR news notifications”, “Alexa, enable Fox news notifications”, or “Alexa, enable CNN news notifications”. Currently Alexa News Notifications are available from NPR, Fox and CNN.

References

Top Articles
Latest Posts
Article information

Author: Mrs. Angelic Larkin

Last Updated:

Views: 6031

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Mrs. Angelic Larkin

Birthday: 1992-06-28

Address: Apt. 413 8275 Mueller Overpass, South Magnolia, IA 99527-6023

Phone: +6824704719725

Job: District Real-Estate Facilitator

Hobby: Letterboxing, Vacation, Poi, Homebrewing, Mountain biking, Slacklining, Cabaret

Introduction: My name is Mrs. Angelic Larkin, I am a cute, charming, funny, determined, inexpensive, joyous, cheerful person who loves writing and wants to share my knowledge and understanding with you.