Echo Devices (Alexa) as Media Player - Testers Needed

in the .sh script how you put italian language (LANGUAGE=“IT”)? And in place of ALEXA=‘layla.amazon.de’?

Alexa italian server:
ALEXA='alexa.amazon.it'

Anyway github and author’s blog are full of documentation and samples. It’s easy to configure

Thanks… i sent this command but received this error:

sudo ./alexa_remote_control_plain.sh -d media_player.echo_spot_di_maurizio -r "KCMQ-967-s32094"

playing stationID:KCMQ-967-s32094 on dev:media_player.echo_spot_di_maurizio type:A2825NDLA7WDZV serial:F41BA1A10C99 mediaownerid:

{"__type":"HouseholdNotAuthorizedException:http://internal.amazon.com/coral/com.amazon.dee.web.coral.model/","message":"Customer does not belong to the same household"}

I configured the script in this way:

EMAIL='secret email'
PASSWORD='secret password'

LANGUAGE="it-IT"
#LANGUAGE="en-US"

AMAZON='amazon.it'
#AMAZON='amazon.com'

ALEXA='alexa.amazon.it'

the script has nothing to do with HA, so it doesnt know things like “media_player.echo_spot_di_maurizio”
you need to use the names you get back from the script.

I don’t get any name from the script… what you mean? the -d option of the script ask for the device name and i have that name for that device. Or i am wrong in something else?

Did you read the blog post?
use this command to get the names:
alexa_remote_control.sh -a

Yes, and i got the following names:

the following devices exist in your account:

Echo_Spot_di_Maurizio

Echo_Plus__di_Maurizio

Maurizio’s_echosim_BETA

This_Device

Maurizio’s_Alexa_Apps

So why that error?

Then don’t use the “media_player.” in the name

Ok i did it but i get the same error

{"__type":"HouseholdNotAuthorizedException:http://internal.amazon.com/coral/com.amazon.dee.web.coral.model/","message":"Customer does not belong to the same household"}

… maybe something wrong in configuring the script?

wrong user in your config

Is user the email i use to go into amazon.it ?

yup and i guess you have more then 1 user?
you need the email and password that you use for login into the alexa app when you want to change the echo settings.

but i think you need to take this conversation to another topic. (the alexa_remote topic or a new one) because this has nothing to do with the mediaplayer.
and the topic long enough as it is.

1 Like

Ok, but i have only one user and that’s what i put in the script.
I noticed (and i close this thread here) that if i put amazon.com instead amazon.it i get no error, but the script does nothing…

One question: what’s the benefit using alexa_remote_control.sh, when alexa.py expose already services for tts integrated in HA? Like media_player.alexa_tts {“entity_id”: “media_player.echo_plus_giuseppe”, “message”: “Test message”}

with the script you

  • can find out which alexa was used last
  • give a command to start the weather reading
  • start traffic report
  • start routines
  • actually do everything you also can do from inside the alexa app

with the mediaplayer you can control only music and tts

2 Likes

Thank you! Very clear now.

1 Like

Does control music also entail selecting, say, media from Spotify and start playing it? Or is it only play / pause that works?

If one can specify a Spotify playlist or some such to play, how is it done?

(I’ve tried searching this monster of a thread, but so far haven’t been able to find how to do it. I get that I probably could do it through the aforementioned alexa-remote-script, but without a desktop browser it seems like quite the chore to create the necessary login cookies etcetera.)

you can use services to start music.
selecting music would be impossible without you creating a selection (for example with an input_select).
because of the enourmous amount of possible options.

creating the cookies for the script can be done on another PC, if you would prefer that, but it wouldnt make playing easier.

Might’ve gotten lost in the long thread but starting a playlist on Spotify should be as easy as calling the play_media service with the following attributes.

{
"entity_id": "media_player.living_room_echo_dot",
"media_content_id": "Discover Weekly",
"media_content_type": "SPOTIFY"
}

media_content_id will be set to whatever you want to “search” on Spotify, such as playlists, etc.

Currently known media content types:

AMAZON_MUSIC, SPOTIFY, PANDORA, TUNEIN, I_HEART_RADIO

7 Likes

But you need to be a premium user?