Echo Devices (Alexa) as Media Player - Testers Needed

Hi,
my alarm sensors are generated automatically. Did you have a look if they show up within entities?

Sensors are either defined in configuration.yaml like

sensor:
  - platform: 

or in a separate file like e.g. sensors.yaml, but I don’t think you can (or should) define it manually for echo devices.

Hello,
Today I decided to start using Nabu Casa, I had my (Alexa) media Players working fine, but now none of my scripts or automations (for Alexa media player) are working. Is there a setting I was suppose to do or does it just not work with Nabu Casa?

I’m stuck in a re-authentication loop.

I set it up to use the built-in 2FA.

I click on “reconfigure” and this pops up.

Since I already set up the built-in 2FA I click submit.

it asks for the 2FA code that I get from Amazon:

amp_auth_2

Why? I thought that was what the built-in 2FA was supposed to do.

OK, anyway, I enter the code and I get this:

ex1

It says it successfully authenticated but it also says aborted and my AMP stays un-authenticated.

What the heck am I doing wrong?

It seems this is an ongoing problem with authentication.

Is there any way to have a step-by-step walkthru of the steps required to re-authenticate when using the multitude of various authentication methods put into the wiki?

this happens only occasionally and trying to remember all of the “magical” steps required to successfully re-authenticate is a bit frustrating.

I don’t mind helping to write something up for the method I use once I can repeatably re-authenticate.

1 Like

Can’t reauthorize either, and seems others are stuck too.

Thinking this is an issue with Alexa. Hopefully they’ll fix it soon.

Update- can’t control guard mode in my mobile app either so that would imply an outage/issue on the Alexa side.

1 Like

You’re doing nothing wrong, it just doesn’t work at the moment. This and Tuya :sob::rage:

1 Like

Thanks to both of you.

Thought I was losing my mind.

However the comment about the re-authentication procedure being confusing still stands along with the offer to help improve the docs if I get the procedure confidently worked out.

2 Likes

I just restarted Home Assistant and the integration is now working without asking for reauthentication…

Did you fill in the Built in 2FA App Key? If you just clicked submit as shown in your screen, it would’ve blanked out the Key which matches the next message.

This is an HA issue raised a long time ago. Search the thread if you want to see it. They don’t have a good UI for reauth success. The Config flow can be “aborted” and that’s about it.

This would be much appreciated. Obviously there’s a lot of legacy settings I should remove that would streamline everything but I haven’t been updating this recently since it has been humming along.

Do I have to fill in the built-in 2FA key every time I re-autenticate? My impression was it was only required once when first setting it up?

And I actually tried it both ways (entering the key and not) with different interim, but ultimately the same, results. It said successful but it instantly popped back up as needing re-auth again.

It sounds like it might be two different issues - one of my misunderstanding the process and one with Amazon?

OK, so just to clarify (once Amazon gets their end fixed)…

in the first pop-up I still need to enter the built-in 2FA key every time I need to re-auth?

then it should open a new webpage and send me a 2FA code to enter in there?

Once I do that then it should re-auth successfully?

That would probably help immensely.

There are so many options to check/uncheck and entries to make based on those selections that it’s hard to remember which ones are needed and when. :crazy_face:

Especially if you only re-auth every month or two. :slightly_smiling_face:

Thanks for the help with this.

You should only have to fill it in the first time. It should repopulate that during reauth and is a bug if it doesn’t. If it turns up blank, then failure to fill it will treat it as you don’t have the authenticator setup. It should not request a 2FA code again if the authenticator is working. It only requests the 2FA code if it can’t generate one.

definitely a bug then.

I tried again and entered the built-in key and then it said that my pre-populated password was incorrect.

I verified it was correct tho so I’m not sure what is up with that.

At that point I decided to just delete the integration and start over to see how that went.

I added everything in the first pop-up then hit submit:

then I got this:

amp_auth_3

but nothing else happens. Had no idea how to verify the code so I just created another authenticator 2FA key with Amazon and now everything works again.

Any idea how I can remove the old (and now unused) 2FA authenticator? I didn’t see anything on the Amazon site that allows that to be done.

Now, what should I expect to happen and, more importantly, do when I need to re-auth the app?

From the above it seems that the 2FA key and 2FA code should be auto populated and I should just need to hit the submit and everything should work. Is that about right?

The 2FA key should be getting stored in your /config/.storage/core.config_entries under the data/otp_secret key after logging in once with it. If after successfully logging in with that it’s missing, please open up an issue.

Amazon doesn’t let you. You’ll just have to create a new one.

I’ve just noticed that ALL of my Alexa devices are now showing the switch.devicename_do_not_disturb_switch as unavailable.

Everything else is working fine, except DND.

Has something changed/broken? I’m running v3.10.8 of the integration.

I am seeing the same issue. Do Not Disturb switches are intermittently toggling between unavailable and available. Also running version 3.10.8, which appears to be the latest. It’s only started happening in the last week or two (not sure exactly when, as I have been away from home for a couple of weeks). Nothing significant has changed in my setup.

I just checked and it’s there now.

We’ll see how the next re-auth goes. Hopefully smooth sailing. :slightly_smiling_face:

Getting this warning with the latest version of HASS, which is related to the Alexa do-not-disturb switch entities:

2021-10-08 09:31:05 WARNING (MainThread) [frontend.js.latest.202110070] Icon mdi:do-not-disturb-off was renamed to mdi:minus-circle-off, please change your config, it will be removed in version 2021.12.

I am too - I’m sure its due to this breaking change 2021.10.0: Z-Wave S2 support, Tuya, secure ESPHome and 400 new icons - Home Assistant where the MDI database was updated to v6. It appears the mdi:do-not-disturb-off is no longer in the newer database, and this integration uses that.

Developers are aware - Update icon do-not-disturb-off to new minus-circle-off · Issue #1376 · alandtse/alexa_media_player · GitHub

I also submitted a pull request to hopefully fix it - Update switch.py by mwav3 · Pull Request #1377 · alandtse/alexa_media_player · GitHub

Even if not fixed before December, I think all that would happen is you wouldn’t have an icon for the do not disturb switch and also the error in the log, but it should still work to be able to control it.

Can someone please help me? I have installed the component using HACS and everything is working for me. However when I try to use tts and read some sensor from my HA on my echo dots only one echo dot plays the TTS.

Can I use two or more echo dots to play or send the same message I.e. TTS?

This works here - add more echos if you like:

alias: 1_Notification Test Weekly TTS
description: ''
trigger: []
condition: []
action:
  - data:
      volume_level: 0.28
    service: media_player.volume_set
    target:
      entity_id:
        - media_player.echo_office
        - media_player.echo_bath
  - service: notify.alexa_media
    data:
      message: This is a daily announcement
      data:
        type: tts
      target: media_player.echo_office,media_player.echo_bath
mode: single
1 Like

Thank you @Joerg