Home Assistant Community

Echo Devices (Alexa) as Media Player - Testers Needed

alexa
Tags: #<Tag:0x00007fcf4db41378>
#2050

it wont allow be because of the error

#2051

Oh I didn’t realize you couldn’t validate your config. You’re on .88 or higher?

#2052

88.1 and yes if i comment out the alexa_media: below then its error free. does it not allow !secrets maybe?

#2053

It allows it. Here is my config:

alexa_media:
  accounts:
    - email: !secret amazon_username
      password: !secret amazon_password
      url: amazon.com
1 Like
#2054

https://hastebin.com/ducacikusi.makefile

#2055

No, you can’t send actual files. See below regarding using Alexa routines to discover other options we can try to expose.

You don’t use routines to play music. routine is for playing routines that are defined in the Alexa App. Routines can be used to discover how the Alexa App is playing music or doing something.

EDIT: Wiki updated.
To play music, you have to define the media_content_type appropriately. Search the forum for other examples and hopefully someone updates the wiki with working examples.

{
  "entity_id": "media_player.guest_room",
  "media_content_id": "cats the musical",
  "media_content_type": "AMAZON_MUSIC"
}
{
  "entity_id": "media_player.guest_room",
  "media_content_id": "7 rings",
  "media_content_type": "APPLE_MUSIC"
}
{
  "entity_id": "media_player.guest_room",
  "media_content_id": "BBC one",
  "media_content_type": "TUNEIN"
}

Did that exact statement work before? If it changes, it may be an Amazon issue. You can try the Routines method to discover how Alexa does it using the Alexa App in my response above.
EDIT: This may actually be a bug we can look into.

In Development and it also says for versions 1.1.0. That’s in the queue and hasn’t been released. I’m currently splitting my time answering forum posts and actually coding, so there’s only so much time for stuff.

Follow the format exactly. Yes, secrets will work. If you’re using optional values, try removing them.

1 Like
#2056

I think u have to relogin again,
Since the pickle file also gets change.

1 Like
#2057

You’ve gotten an unbelievable amount of work done. Custom updater is low priority for everyone I’m sure. Thanks!

#2058

Are your file sizes, similar?

image

#2059

yes the sizes are similar and i see the pycache file now that i went the physical location. i was using IDE on iframe.

#2060

Comment out the component, reboot and try again?

#2061

tried :frowning: should i try deleting the pycache? i see i has some files still related to alexa and media_player

#2062

It won’t hurt anything. If it was me, I’d delete the whole alexa_media folder. Remove the configuration entries. Upgrade to 88.2. I’d then use configurator addon to create three new files and then copy and paste the contents from the RAW page for each of three files. Then add the config entries back and see if config will validate. I’ve seen several people who could only c&p to get their install working. Desperate times call for desperate measures.

#2063

unfortunately i think your right

edit: This worked

#2064

There are two alexa pickle files in my config folder? One with my email adress in it. Are they both for the new version of this component or is one from the old version?

Can I sally remove the one without the email adress in it?

#2065

1.0.0 added the email address since we enabled multiple accounts. You can delete the one without the email address as that was for older versions.

1 Like
#2066

Can you show an example of calling a routine?
Does it work only with routine that involve music or does it work with any routine?

I just tried this and it work, yesterday was not working, so maybe something from Amazon side.

{
  "entity_id": "media_player.guest_room",
  "media_content_id": "Rai Radio 2",
  "media_content_type": "TUNEIN"
}
#2067

Routine example.
Whatever Alexa’s app let’s you control with a routine.

#2068

1.1.0 is out.
New Features:

Fixes:

  • Entry too long database errors (resolve #88)
  • Display of media position while playing (resolve #91)
  • Routines failing if only one step or presence of non_utterance routines (resolve #90)
  • Configurator failure if no verification options available (resolve #101)
  • TTS failure with multiple accounts (resolve #86)
  • Configurator only able to configure one account per restart (resolve #98)
  • Multiple last_called devices for same account (resolve #97)

Full changelog.

As always, please use the the Wiki and FAQ if you need instructions or have questions. Also, please help in documenting features in the wiki since this thread is basically unsearchable now. We also use GitHub for bug reports/feature requests .

#2069

Thanks! Great work. Last_called updates instantly now.

Now that this works, I like to know if it’S necessary to use delays to give it time to update.

- alias: Alexa Routine washing machine
  initial_state: 'on'
  trigger:
    platform: state
    entity_id: input_boolean.alexa_routine_wash
    to: 'on'
  action:
    - service: homeassistant.turn_off
      entity_id: input_boolean.alexa_routine_wash
    - delay: "00:00:02"
    - service: alexa_media.update_last_called 
    - delay: "00:00:01" #not sure about the delays?
- service: homeassistant.turn_on
  data_template: 
    entity_id: >
      {% if is_state("binary_sensor.wash_state", "on") %}
        script.alexa_routine_wash_on
      {% else %}
        script.alexa_routine_wash_off
      {% endif %} 

So what do you think, would it be fast enough to use this without delays?

EDIT: I cant’t finde it know, but there was a thread where two people wanted to use the voiceprofil in alexa and it wasn’t available for german users than. I think it was @ReneTode @lonebaggie and/or @PlayedIn. Am I right?
Voice profiles are now available in german too. (EDIT 2: I probably confuse it with this topic Alexa Announce Feature - Text to Speach via Alexa now a possability?)

Would be interested in what you want or can do with it (together with ha)