Alexa Media Player

Also promising/getting my hopes up!

3 Likes

rolling out now in US and Canada only :frowning_face: Bit of a frustrating wait for Europeans.

as always. we have to be patient :wink:
it can always be worse. think of all the countries that are not supported at all at the moment :wink:

I would love it when i finally can speak dutch to her.

Goedemiddag! Hoe gaat het met je?

very good, thanks. :wink:
can you please take the place from alexa? :stuck_out_tongue:

FYI with the latest release of the shell command, TTS is now possible :slight_smile:
And if your interested in volume control of the Alexas (specifically multiroom) i implemented this in the meantime:
Better Alexa Multiroom Volume Control & Alarm Scraping

Since my original post I’ve been working on getting this up and running. Mostly dissecting the bash script posted by @AlmostSerious.

I know that many have had issues getting the bash/shell script to work (myself included) so I went with the route of creating a node.js application using nightmare to ensure that logging in is seamless and doesn’t get you stuck against endless captchas.

I plan to make a dedicated post showing what I have, how to set it up (as an hassio plugin with auto discovery :slight_smile:) so keep on the lookout.

Essentially my component code creates a media player device in HA for each device associated with your Alexa account (including whole home audio). Play/Pause/Next/Previous/Volume all work

Obligatory Screenshot:

5 Likes

Awesome can’t wait to try this out, great work on what you have so far.

You gotta give us some code that we can test as a custom componet … this is too cool Great Work :+1:

@Vasiley and @jimpower going to upload the code tonight. If anyone would like to help with development I’d be happy to start a shared git repo.

1 Like

yeah boiiii.

:slight_smile:

2 Likes

Great job!!!. I’ve been waiting for something like this forever. I installed it last night and it’s working great!

I’ll be happy to keep testing. Much appreciated.

Hi Keaton. For some reason I cannot get the Alexa_media to show up in services
I have all the media_player.play.shuffle.volume.turn etc all showing unde Services. However I cannot see the Alexa_media in services. I want to be able to TTS to my Echo and Echo Dot
Have the following files in custom_components/alexa
init.py
pycache (Folder)
const.py
manifest.json
media_player.py
notify.py
services.yaml

  • platform: alexa
    email: “email address”
    password: “password”
    url: “https://alexa.amazon.com”

Please help mate as keen to send TTS to Alexa echo from notifications
cheers heaps
Bruce

Also see the following in the log

  1. Unable to set up dependencies of alexa.media_player. Setup failed for dependencies: alexa_media
  2. Unable to set up dependencies of alexa.media_player. Setup failed for dependencies: alexa_media
  3. Setup failed for alexa_media: Component not found.
  4. Unable to find component alexa_media

From what I can tell it’s not currently possible, but wanted to ask anyway in case there’s a chance someone’s found a workaround :slight_smile:

Is there a way to get an Alexa speaker group to play a custom alert sound, read an announce message, and then go back to whatever it was doing previously (like streaming music from Amazon or Spotify)

Use case: I have a script that polls for severe weather alerts, and if specific alerts are active it will fire an announce TTS to my “Everywhere” speaker group. But the beep before the announcement isn’t very loud/noticeable, so for an alert like that I’d like to play a different tone first.

find a tone/mediaplayer file that you like on amazon music (there are sounds available)
then create a routine that first plays the sound and then says the text, or
make an automation that plays the amazon sound and then speaks the TTS.

That wouldn’t be able to resume other music if it were already playing, would it? We often have a station streaming from Amazon music, or music playing from Spotify

tts doesnt stop the music, but a tone/music file does.

the only way to restart the music that was playing, is by gettin the info what is playing before you send the tone (i think thats possible with the alexa mediaplayer component) and start it again afterwards.
but if you have a playlist playing, that will restart if you do that.

the automation would be like

  • retrieve what is playing with mediaplayer component and store that info somewhere
  • start the tone that you want
  • pause for as long is needed
  • send the TTS
  • pause for as long as needed
  • get the retrieved value and start the music again.

but i personally find it easier to set volume to max short before the TTS and then start the alert text with something like “Alert, alert, alert, please pay attention …”
the music wont be stopped that way and will just play on.
dont forget to set the volume back afterwards :wink:

is there any way to make alexa open a skill? I have an surveillance camera that can be viewed by Alexa using a skill so I’d like to make Alexa Media Player open a skill when there is a motion triggered.

@keatontaylor btw thanks for this great skill and the work you put in!