Echo Devices (Alexa) as Media Player - Testers Needed

I checked and it seems the voice command is not recognized…
Do i need only the “stop” command or must i put “alexa, stop” as command?

only stop, because else it wouldnt show up in history at all :wink:
try saying it a few times to alexa, then see in the history if she writes it differently, then you do in your automation. (i suspect you dont use english)
also look for capitals, etc.

Newbie here, and maybe this is answered somewhere but I can’t find it. I’m trying to setup the Alexa media player for 2FA. My system is up to date as of 2/6/2021 (Pi-4).
Following the Wiki at: https://github.com/custom-components/alexa_media_player/wiki/Configuration
I obtain the 2FA App Key from amazon, then in step 4
“Enter the value from 3 under the Built-in 2FA App Key when adding the integration. 2FA should be automatically generated from now on and can be left blank.”
what does ‘3’ mean in this instruction it make no sense to me. maybe it’s a type O or something. The Amazon page seems to expect you enter a generated key from the ‘APP’ to confirm proper setup of the 2FA App Key. How do I get the Alexa media player to display a generated key? Also there are various optional check boxes that may or may not be needed to be checked but there is no guidance on how to set these. What would be really help is an example of the setup page with the entries and items checked that are needed for proper 2FA setup. (with bogus App Key of course). Needless to say it never logs in to the account, and give me notification or failed logins. I still have entries in configuration.yaml for ‘alexa_media’ should I remove these? Thanks for any help.

It means step 3.

Yes.

Hello everyone,

It’s been a long time since I installed the integration, I have all my devices, but the echo studio loudspeaker never returns its status, it always remains on a previous status, while my other devices work perfectly.
would you have a solution please, because I would like to use it to make automations according to its status but it does not go back up.

Hi,

I will share my experience with this custom component and the mini-media-player, in lovelace :slight_smile: To use the button in mini-media-player associated with the media player of alexa, i use this

- type: custom:mini-media-player
  entity: media_player.echo_cuisine
  icon: 'mdi:amazon-alexa'
  hide:
    source: true
    power_state: false
    controls: true
  source: icon
  tts:
    platform: alexa
  shortcuts:
    columns: 3 # Max buttons per row
    buttons:
    - type: custom
      name: Virgin Radio
      id: "play virginradio on tunein"
      icon: mdi:radio
    - type: custom
      name: Fun Radio
      id: "play fun radio on tunein"
      icon: mdi:radio  
    - type: custom
      name: Skyrock
      id: "play skyrock on tunein"
      icon: mdi:radio
    - type: custom
      name: Mouv'
      id: "play mouv on tunein"
      icon: mdi:radio 

The button type property and the the button id property corresponding to the property of the service in the custom component alexa media_content_id and media_content_type . It’s really simple to use like that :slight_smile:

Best regards,
Anthony

I’m having trouble logging into Amazon today.

Some notes: I successfully logged in a few days ago with 2FA enabled and this is the method I’m trying to use now. I had to start from scratch and create a new Amazon account and relink everything because when I transitioned my Alexa integration from the Philips Hue emulator to the self-hosted AWS solution, Alexa continued to recognize two phantom Philips devices no matter what I tried to purge them.

Using my new account, I’m now presented with additional challenges through the login proxy that I don’t remember the first time around. Specifically, a CAPTCHA challenge and then a request to enter a OTP (there is no field to enter it) is preventing me from authenticating. Is anyone else seeing this? Did Amazon change something to break the proxy, or is it just me?

Please open an issue and provide the domain you’re trying. I just tested it for .com and .co.uk and I’m getting the right fields to fill in.

Please note the message you’re getting is strange in that it’s the screen for selecting where to generate an OTP and is typically filled with a email or SMS option. If you hit send OTP does it take you to the input screen for the OTP?

No–it takes me to the error screen in the second screenshot. This sequence works fine when this happens on the amazon.com site.

Again, please open an issue so I can help you there. Please fill out the template and also let me know what domain you’re using.

For comparison, this is what the OTP screen should look like so you’re in a weird state where I’ll need to get some logs probably. If you don’t want to debug and just want to log in, you can disable the proxy. However, I’ll probably discontinue the legacy login methods at some point in the future.

Regarding the state of success since 3.4.8 and the last login request
Since 28 Days no new relog request appeared. Before it was around every 10 days.
Seems that the new oauth procedure works.
Thanks @alantse

Updated to V3.8.1
On the first restart it’s asking me to re-authenticate
“Relogin required after 3:03:20.301703 and 201 api calls.”

When I click on reconfigure, it won’t let me move past the first page. The submit button just reloads the same window over and over again.

After removing the integration and re-installing, I still cannot get past the first page.
Now I get a message “Email for Alexa URL already registered” when I click submit

Do you have it in your configuration.yaml? It will auto load from that. Delete that.

Hey all,

Alexa media centre automation, play flash briefing, then play music.

Here is my automation (scripts work) but flash briefing does not change the entity state and music never starts after the flash briefing, it just remains “standby” But! If I take out the “wait for trigger” the music will just roll over the flash briefing after a second.

Any ideas what the proper trigger should be? Should flash briefings have a state other then standby?

Thanks

alias: 'Motion: Morning'
description: ''
trigger:
  - type: motion
    platform: device
    device_id: id
    entity_id: binary_sensor.bathroom_motion_sensor_motion
    domain: binary_sensor
condition:
  - condition: template
    value_template: >-
      {{ ((as_timestamp(now()) | float) -
      (as_timestamp(state_attr('automation.go_to_sleep','last_triggered')) |
      default(0) | float)) > 36000.0 }}
  - condition: time
    after: '07:00'
    before: '11:00'
action:
  - service: script.alexa_flash_briefing_volume
    data: {}
  - service: script.play_flash_briefing
    data: {}
  - wait_for_trigger:
      - platform: state
        entity_id: media_player.bathroom
        to: standby
  - service: script.play_music_bathroom
    data: {}
mode: single

I just tried to configure this but I can’t get past the logon screen - when submitting the credentials I get the error message: “Unable to connect to Home Assistant url. Please check the Internal Url under Configuration -> General”.

The URL i am using is https://smart.home.mydomain which is reachable from inside my network and outside (split dns setup) and the certificates are valid as well (wouldn’t be able to access HA otherwise since I’ve configured my domain to use HSTS).

I don’t have the Internal URL configured under Configuration -> General, and this component works for me.

For some reason I have to re-auth often, every couple of weeks. I noticed that in my logs, I have this:

Logger: alexapy.alexalogin
Source: /usr/local/lib/python3.8/site-packages/alexapy/alexalogin.py:696
First occurred: February 17, 2021, 7:05:32 AM (2 occurrences)
Last logged: February 17, 2021, 7:10:17 AM

No access token found; falling back to credential login instead of oauth.

What do I have to do to fix this so it just stays connected better? I’m always having to mess with it and I’m not sure what I’m doing wrong. Thank you - love this app when it stays connected! :slight_smile:

1 Like

I’ll add to liminal above…
What I find, is when an alexa device is in the standby state, if I use the media_player.play_media for media_type: custom (which I understand is emulating a voice command), the media player stays in the standby state even though media is playing on the device. If I were to do similar but instead of using custom, use TUNEIN then the alexa device’s state will change to Playing. I’m not sure why, just my observation.

The HA server will attempt to connect to the url you have provided. if it can’t, it will get the message you mentioned. Please verify it can. If you’ve verified, you can open up a new issue and we can try to see why it’s failing. The other alternative is to disable the login proxy.

Remove and readd and make sure the oauth token option is checked. It’s the new default but we’ve left the old option in place in case you can’t log in using the new method.