Echo Devices (Alexa) as Media Player - Testers Needed

alexa
Tags: #<Tag:0x00007f47fe21e588>

#1367

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


#1368

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

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


#1369

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'

#1370

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.


#1371

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?


#1372

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


#1373

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?


#1374

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


#1375

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?


#1376

wrong user in your config


#1377

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


#1378

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.


#1379

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…


#1380

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”}


#1381

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


#1382

Thank you! Very clear now.


#1383

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.)


#1384

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.


#1385

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


#1386

But you need to be a premium user?