Zum Hauptinhalt springen

Echo Media Player Smart-Home-Integration, kostenlos und Open Source

Echo Media Player-Integration für Gladys Assistant

Gladys spricht über deine Echos: Durchsagen, Alexa-Routinen, Musik und Lautstärke aus Szenen.

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

Gladys → Echo: Gladys makes your Echo speak. Not to be confused with Gladys' Amazon Alexa integration (with Gladys Plus), which lets you control Gladys by voice from Alexa; both can run side by side.

Make your Echos speak in your scenes, run your Alexa routines, and control music, volume and Do Not Disturb from Gladys.

Unofficial and not affiliated with Amazon. This integration uses the web API of the Alexa app, which Amazon does not document: it may stop working when Amazon changes it.

Developed without the hardware: feedback welcome. Tell us on the Gladys forum what works with your Echos and what does not.

Before you start​

  • Gladys 5.1.0 or later.
  • Your Amazon account, with your Echos set up in the Alexa app.
  • A computer for the sign-in: on a phone with the Alexa app installed, Amazon may open the app instead of the sign-in page.

Sign in to Amazon​

You do this once. Gladys never sees your password: you sign in on Amazon's own page.

  1. Open Integrations → Echo Media Player → Configuration.
  2. Choose your Amazon marketplace (the site of your account: amazon.fr, amazon.de…) and click Save.
  3. Click Connect. Amazon's sign-in page opens in a new tab. It is the Amazon Alexa page on amazon.com, even for an amazon.fr or amazon.de account, and that is expected: the Alexa app always signs in there, then Gladys uses your marketplace. The page speaks the language of your marketplace. (For Japan, it is amazon.co.jp.)
  4. Sign in: email, password, and the verification code if two-step verification is on.
  5. Amazon then shows a page that looks empty, broken or "page not found". That is expected: the address of this page carries the authorization.
  6. Click the address bar and copy the whole address. It starts with https://www.amazon.com/ap/maplanding? (even for an amazon.fr account) and is long.
  7. Back in Gladys, at the bottom of the Configuration tab, paste it in Finish the sign-in and run the action, within a few minutes (the code expires quickly and works once).
  8. The answer says how many Echos were found. The status at the top turns to connected.
  9. Open the Discover tab and add your Echos.

Gladys now appears as an "Amazon Alexa" device in your Amazon account. To undo everything, run Sign out of Amazon: the credentials are deleted from Gladys and that device is removed from your account.

If it fails​

  • "This is not the return address": you copied the address too early (or the sign-in page itself). Finish signing in, then copy the address of the page that follows.
  • "This address does not come from the sign-in page Gladys opened": the pasted address does not start with https://www.amazon.com/ap/maplanding? (an amazon.fr page opened by hand, for instance). Click Connect again and copy the address of the page that follows the sign-in.
  • "Amazon refused the sign-in": the code was already used or too old. Click Connect and start again, a bit faster.
  • "Amazon refused the stored sign-in" (later on): the registration was removed from your account, or your password changed. Sign in again.

Your Echos in Gladys​

Each Echo is a device. Each multi-room group too.

FeatureEchoGroupNotes
Volumeyesno0 to 100
Do not disturbyesnoon / off
Play, pause, prev/nextyes¹yes
Playback stateyes¹yes1 while playing
Now playingyes¹yes"Title — Artist"
Notificationyesyesfor the core's "Play a notification"

¹ Echos with a music player (not the Echo Spot without music, for instance).

The states are read every 2 minutes by default (Refresh interval in the configuration), only for the Echos you added. Amazon blocks accounts that call it too often: do not go below the default without a reason.

The Language of names and messages setting gives the names of the features of the Echos you add afterwards (Gladys keeps them once a device is added) and the language of the error messages.

In scenes​

Make an Echo speak (Echo Media Player actions):

  • Echos: one or several; a group speaks through its speakers.
  • Text to say: scene variables are allowed. Up to 1,000 characters; Alexa says long texts in pieces of 250 characters.
  • How: Speak (the Echo just talks) or Announcement (a chime first, on every chosen Echo at once).
  • Volume (optional): set before speaking, then the previous volume comes back.

Run an Alexa routine: type the name of the routine as in the Alexa app, or the phrase that triggers it. The List my Alexa routines button of the configuration shows the names. Choose an Echo if the routine has steps acting on "the device you speak to".

Echo: Do Not Disturb: on or off, on one or several Echos.

Play a notification (the core's action, in the Music category) also works with an Echo, but needs Gladys Plus: the core turns your text into an audio file there and sends only its address (and not the volume). Alexa plays an audio file only in some formats; if your Echo stays silent, use Make an Echo speak, which sends the text itself.

Dashboard widget​

Add the Echo player widget and choose an Echo: title, artist, state, Do Not Disturb, the live volume and previous / play-pause / next buttons.

Limitations​

  • Unofficial API: it can break when Amazon changes it.
  • No mute (the web API offers none) and no scene trigger (nothing reliable to start a scene on).
  • Two speeches sent at the same moment may interrupt each other.
  • Tested only against reconstructed answers, never on a real account yet.

Privacy​

The integration stores, in its own folder of Gladys (/data, readable by the integration only): the refresh token of the "Amazon Alexa" registration, the marketplace and your Amazon customer id. Nothing else, and never in the logs. It talks only to Amazon.

Konfigurationseinstellungen​

Diese Einstellungen fragt Echo Media Player in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Bevor du anfängstsectionNeinDiese Integration nutzt die Web-API der Alexa-App, die Amazon nicht dokumentiert: Ändert Amazon sie, kann die Integration ausfallen. Nicht mit Amazon verbunden. Ohne die Hardware entwickelt: Rückmeldungen willkommen.
Amazon-MarktplatzselectJaDie Seite, auf der dein Amazon-Konto liegt (die der Alexa-App). Speichere, bevor du auf Verbinden klickst.
Bei Amazon anmeldensectionNein1. Klicke auf Verbinden: Die Anmeldeseite von Amazon öffnet sich in einem neuen Tab. Es ist die Seite von Amazon Alexa auf amazon.com, auch für ein Konto bei amazon.de: Das ist normal. Melde dich dort an (Passwort, Bestätigungscode). Gladys sieht dein Passwort nie. 2. Amazon zeigt danach eine Seite, die leer oder kaputt aussieht: Das ist normal. Kopiere ihre vollständige Adresse aus der Adressleiste (sie beginnt mit https://www.amazon.com/ap/maplanding). 3. Füge sie innerhalb von fünf Minuten in die Aktion „Anmeldung abschließen“ unten auf dieser Seite ein. Nimm einen Computer: Auf einem Handy mit der Alexa-App öffnet Amazon eventuell die App.
Amazon-Kontoaccount_linkNein
Sprache der Namen und MeldungenselectNeinNamen der Funktionen der ab jetzt hinzugefügten Echos (Gladys behält sie, sobald ein Gerät hinzugefügt ist) und Fehlermeldungen von Befehlen und Szenen.
AktualisierungsintervallselectNeinWie oft Lautstärke, Musik und „Nicht stören“ gelesen werden. Amazon sperrt Konten, die zu oft anfragen: Bleib gemächlich.

So installierst du Echo Media Player in Gladys​

  1. Öffne in Gladys Integrationen: Echo Media Player erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/guim31/gladys-amazon-echo:1.0.3) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/guim31/gladys-amazon-echo.

Echo Media Player benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

Echo Media Player ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von guim31 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂