Echo Devices (Alexa) as Media Player - Testers Needed

Thanks for the new event! I implemented an automation on my end. Just waiting for it to fire for the first time when the login will be required in order to test it out.

I guess I could speed up this process by deleting the pickle, right? Will share my code afterwards.

I’ve had to re-enter Captcha text 4-5 times in the last hour. Anyone else having this issue?

i was… i ended up logging into HA through telnet and rebooting that way and it fixed it

Thanks @Vetsus! Restarting my HA docker container did the trick for me.

Actually no. That would only impact startup and we don’t throw the event during startup. It’s only when Amazon starts rejecting connections for some reason after startup.

Long time user here, and I cannot get past the capcha. I’ve restarted using ssh, etc… There’s no pickle file to delete. I am approving the phone alert each time it asks me to. I’m running out of ideas to try. Can someone suggest something?

Enable 2FA is the workaround. Or if you want to help debug it you can review this thread where we were in the middle of trying to figure out how to get past it but it went away for that particular user. The downside to debugging is you may be down for a few days while we figure it out.

1 Like

Is it possible to use media_player.play_media with a group of echo devices at the same time please?

I basically wish to do the following which works with one device, but for multiple devices instead:

    - service: media_player.play_media
      data:
        entity_id: media_player.study
        media_content_type: sound
        media_content_id: amzn_sfx_doorbell_chime_01

The trouble is, it seems I can only use entities that start with media_player when testing this within Developer Tools -> Services, so the group entity isn’t available.

If there is a way, can all the devices sync what they play back?

I see in the Wiki there’s a section titled “Play in Alexa groups”, but I don’t understand what it’s trying to say or how playing to any entity on the account then plays in a group.

I’ve created a group called group.alexa_media_players with seven media_player entities, and I can successfully send a TTS notification to this group using the following, it’s just a shame I can’t see how to use it with media_player:

service: notify.alexa_media
data:
  target:
    - group.alexa_media_players
  data:
    type: announce
    method: speak
  message: 'test'

Thanks.

2fa got it me going. Thanks for this (and everything else you do). Once I get back in town next week, I’ll turn off 2fa and participate in the debugging thread.

Yes you can. The way I do this is by having a group of Alexa devices and then the automations are notifying the group.

groups.yaml

alexas:
  name: Alexa devices
  entities:
    - media_player.echo_dot_home
    - media_player.echo_dot_basement
    - media_player.echo_show_bedroom
    - media_player.echo_show_workshop
  icon: mdi:amazon-alexa

automations.yaml

- service: notify.alexa_media
  data_template:
    data:
      type: tts
    target:
    - group.alexas
    message: Hello World!

Hi Jee,

I really appreciate your help, however I mentioned in my post that I am able to send text to a group in the same way you describe, but my issue is that I’d like to use the media_player service instead.

EDIT. So, I never actually tried using a group because when in Developer Tools -> Services, if you choose “media_player.play_media” it only lists “media_player” entities in the drop down menu, so I assumed groups wouldn’t work. However, just putting in the group entity actually works!

Sorry all, I should have at least tried it. :roll_eyes: (it doesn’t sync audio, but that’s ok for now)

image

you cant sync notifications

so what you want to do is likely not possible either.

Thanks for the time spent in creating this component; it looks to be absolutely awesome. How “safe” is it to give my credentials to it? I can see that it seems to use the unofficial API to pretend to be the alexa web UI. If there are any malicious updates in future; what’s the risk for my amazon account etc?

Thanks!

So yesterday, like @_Mike and others, I had multiples Captcha failing on me. It ended up working after more than 12 times. Can’t say why.

Which brings me to the automation that was previously setup. This was the way I though I could get an alert when authenticattion was required by Amazon.

automation.yaml

  trigger:
    platform: event
    event_type: alexa_media_player/relogin_required

But unfortunately, the automation was never fired. I’m using v2.9.2 of the integration.

It seems to be the way to do it when looking upon the documentation but hey, it’s my first try with the “event” platform and I could be wrong.

Any ideas? Like is it possible to test the event with the Developer Tools > Events ?

I am experiencing problems again with the Alexa Media Player integration. It starts prompting for logging in again in the notification area. And then you do that. It asks for Capcha. It looks like it accepts it but it fails. And you can continue like this many time. The integration does not work at all in this mode.
Only way out is to remove the integration and install it again and then it works for a week or so. It is a bit annoying.

As safe as giving your Amazon credentials to any code you find on the internet. If it’s not clear, the risk is whoever has your username and password can log in as you (of course Amazon provides 2FA and other mechanisms to try to help you).

If you’re concerned, you can read the component code or the underlying API code. Otherwise, I’m not sure there’s much value in asking “is it safe?” because if it was intended to be malicious, why would you trust any random internet stranger’s word on it? A malicious author could just say, “yes it’s very safe, but please make sure you have your highest limit credit card in your Amazon account before using it.” :money_mouth_face:. As with all open source, it’s provided as-is so please review it including updates before you use it.

That said the component will save your username and password in the HA storage folder and the component will also create a .pickle file with the necessary cookies to login as you. So the question is do you trust HA or any of the other components you use not to grab that information and send it somewhere else?

I’m being blunt but that’s the reality of the situation. If you have any doubts, please don’t use it. That’s the only way to be safe.

That’s the purpose of dev tools. It lets you fire events so in theory you could test your automations. I haven’t tested your specific use case though.

I can’t fix what isn’t reported (including details). For example, an issue for what you described was fixed in 2.8.7, but again I’m guessing what you’re seeing since there’s not enough information in your post. Assuming you’ve updated and it’s not the existing “authentication required” issue (which has been discussed recently) or some other already reported bug, please submit a new bug report with the requested information.

2 Likes

Yeah I’m aware but it seems that you can’t fire an event with the dev tools that contains “/” like alexa_media_player/relogin_required. Can you confirm?

Ok, here’s post #4040, can I play an MP3 file via Alexa?

@alandtse I see in the v2.10 release notes:

  • Add dropin notification support

I’ve used this before to have one Alexa in one room “dropin” on another Alexa in another room.

What would be an example use case for this feature using the Alexa Media Player?

BTW, Thanks for all your work on this component :slight_smile:

I just expose features when they appear in the Alexa app. If you figure out how to use it, please update the Wiki.