Integración domótica Echo Media Player, gratuita y de código abierto

Gladys habla a través de sus Echo: anuncios, rutinas de Alexa, música y volumen desde escenas.
La documentación de esta integración la escribe su autor y, por ahora, solo está disponible en inglés.
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.
- Open Integrations → Echo Media Player → Configuration.
- Choose your Amazon marketplace (the site of your account: amazon.fr, amazon.de…) and click Save.
- 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.)
- Sign in: email, password, and the verification code if two-step verification is on.
- Amazon then shows a page that looks empty, broken or "page not found". That is expected: the address of this page carries the authorization.
- 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. - 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).
- The answer says how many Echos were found. The status at the top turns to connected.
- 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.
| Feature | Echo | Group | Notes |
|---|---|---|---|
| Volume | yes | no | 0 to 100 |
| Do not disturb | yes | no | on / off |
| Play, pause, prev/next | yes¹ | yes | |
| Playback state | yes¹ | yes | 1 while playing |
| Now playing | yes¹ | yes | "Title — Artist" |
| Notification | yes | yes | for 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.
Parámetros de configuración
Estos son los parámetros que Echo Media Player te pide en su pantalla de configuración en Gladys.
| Parámetro | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| Antes de empezar | section | No | Esta integración usa la API web de la aplicación Alexa, que Amazon no documenta: puede dejar de funcionar cuando Amazon la cambie. No está afiliada a Amazon. Desarrollada sin el hardware: se agradecen sus comentarios. |
| Sitio de Amazon | select | Sí | El sitio donde está su cuenta de Amazon (el de la aplicación Alexa). Guarde antes de hacer clic en Conectar. |
| Inicio de sesión en Amazon | section | No | 1. Haga clic en Conectar: la página de inicio de sesión de Amazon se abre en una pestaña nueva. Es la de Amazon Alexa en amazon.com, incluso para una cuenta de amazon.es: es normal. Inicie sesión (contraseña, código de verificación). Gladys nunca ve su contraseña. 2. Amazon muestra luego una página que parece vacía o rota: es normal. Copie su dirección completa de la barra de direcciones (empieza por https://www.amazon.com/ap/maplanding). 3. En los cinco minutos siguientes, péguela en la acción «Terminar el inicio de sesión» al final de esta página. Use un ordenador: en un teléfono con la aplicación Alexa, Amazon puede abrir la aplicación. |
| Cuenta de Amazon | account_link | No | |
| Idioma de los nombres y mensajes | select | No | Nombres de las funciones de los Echo añadidos a partir de ahora (Gladys los conserva una vez añadido el dispositivo) y mensajes de error de comandos y escenas. |
| Intervalo de actualización | select | No | Frecuencia de lectura del volumen, la música y el modo No molestar. Amazon bloquea las cuentas que llaman demasiado: manténgalo lento. |
Cómo instalar Echo Media Player en Gladys
- En Gladys, abre Integraciones: Echo Media Player aparece en el catálogo junto a las integraciones nativas, con una insignia de comunidad.
- Haz clic en Instalar. Gladys descarga la imagen Docker (
ghcr.io/guim31/gladys-amazon-echo:1.0.3), la ejecuta en un entorno aislado del núcleo y genera la interfaz de la integración (dispositivos, descubrimiento y configuración). - Abre la pantalla de Configuración de la integración, rellena los parámetros y guarda.
- También puedes instalarla directamente desde la URL de su repositorio: https://github.com/guim31/gladys-amazon-echo.
Echo Media Player requiere Gladys >=5.1.0. El catálogo de Gladys se actualiza cada hora, así que una nueva versión está disponible como máximo una hora después de publicarse.
¿Todavía no usas Gladys? Es gratuito y de código abierto: sigue la guía de instalación para empezar.
Sobre las integraciones externas
Echo Media Player es una integración externa: una integración comunitaria empaquetada como contenedor Docker y publicada en GitHub. Gladys la instala con un clic y la ejecuta en un entorno aislado del núcleo. La publica y mantiene guim31, no el equipo principal de Gladys.
- Explorar todas las integraciones externas
- Descubrir las integraciones nativas incluidas en Gladys
- Crear y publicar tu propia integración externa
- Código fuente en GitHub — fuente de esta documentación