Echo Devices (Alexa) as Media Player - Testers Needed

not quite sure but you may uncheck “Use Login Proxy method (2FA not required)” or enter your external Url in “Url to access Home Assistant” Field.

Chrome is forcing it to https. Add http:// to the front of the url.

Edit: Your internal url for HA is likely wrong. It’s set up as https which won’t work because your certificate is probably not for your internal ip. You can change it manually here but you should fix it in HA.

I’m finding it impossible to link my amazon account now, been using this for months and it was great only used it for a notification when someone was at the door, but today it asked me to re-authorise, as it does on an weekly basis, I went through my usual battle with the captchas not matching (even though they do) and manged to lock myself out of amazon. A password reset later and I still cannot get it to link.

I’ve removed it, re-installed it 3 or 4 times. Done the cookies text into the configuration window, added the cookie.txt to my /config/.storage/ folder manuallt and I stil cant get it to link.

I’m now being directed to another webpage where I login to amazon, it then redirects me to https://192.168.0.37:35727/ap/signin/xxx-xxxxxx-xxxxxxx but this page never responds.

Any ideas before I go and buy a real doorbell?

did you activate 2FA?
because in that case you shouldnt get captchas anymore.
and this component only works with 2FA activated.

You can disable the proxy login to get the old login or you can make sure your HA is accessible at the url HA reports (e.g., https://192.168.0.37:8132). If you can’t connect to the URL in the URL to access Home Assistant field, then then you won’t be able to connect to the proxy. If it shows https, it’s likely your internal url is misconfigured in HA and needs to be changed to http instead. You can change it manually on the form but you probably should fix it in Configuration -> General to prevent issues with any components that use the HA internal url.

I’m on the latest version, have activated 2FA (not the built-in one - I use a third party 2FA app) and I still get the captcha every time.

Strangely tho, I got an re-auth notification today and when I opened the re-auth form it was way different than it has been before. There were all kinds of different options (but no HA URL field and no captcha?).

So I tried a few different settings and kept getting kicked right back to the same form.

So then I noticed there was an update available in HACS so I did the update (and restarted HA) and after that it went back to the same auth form that I’m used to without all of the extra settings/fields (and it had the captcha and 2FA fields) and I could auth again.

So everything is working now but I don’t understand why all of that happened.

The reauth form should be the same. If you’re getting anything different, that may be a bug. It’s only the initial login that will take you to the new proxy method (unless you deselect it).

It only happened one time (yesterday).

I did an update a couple of days ago (I think…) and it worked fine until I got that re-auth notice yesterday. Then it went to the much longer form.

Then I updated again and restarted and then it went back to the old form again and has been fine.

I’ll definitely let you know if it happens again on the next re-auth request.

thats very strange.
amazon should normally only use the 2FA when it is activated.
i had problems with capcha on my wifes account, and even when she tried to login to the website she got captchas. and after a few attempts to get that logged in, she gave up.
i activated 2FA, and from that moment on, no more captchas (after i had cleared cache.)

which is only logical, because when 2FA is activated on amazon, they shouldnt use a less save way to login. so i suspected that was general.

maybe it was the cookies that made amazon ask for the old way.

but like you sometimes i cant understand what goes on on amazon :wink:

1 Like

Thanks, configuration, general looked OK. Instead I re-entered the external_url: internal_url: lines in config.yaml with the same data I had in configuration, general and it now works. Odd as it should be the same. But I’m in.
Thanks again

Does anyone have a recent example of notify.alexa_media in appdaemon?

It used to work great, it broke late last year, but unfortunately it was about the time that I was having issues due to needing to modernize the 2FA login. I didn’t realize I had two issues, not one. I checked the docs, I guess Node Red is winning? That has examples.

I can use notify.media in Home Assistant, Developer Tools, Services and it works perfectly, 100%. My code in appdaemon errors out with the exact same alexa.

        self.call_service("notify/alexa_media", target="media_player.my_alexa",
        message="testing text to speech",
        data={ "type": "tts" })

2021-01-27 19:44:02.200539 WARNING AppDaemon: Unknown service (default/notify/alexa_media) in call_service from …

edit: other than appdaemon, the latest github custom component works. Alexa_Media 3.6.1, HA 2021.1.4, not sure how to tell Appdaemon, but I’m pulling the latest.

Gah! This is getting ridiculous!
Today Alexa routines don’t work again (happens regularly every 2 weeks or so).
Usual error: “Error while executing automation automation.(name of routine). Unknown error for call_service at pos 1:”
This normally kicks off about a 1 hour recovery process, so it takes a lot of patience. Last time it didn’t work until I left it and tried again the next day.
Restarting HA doesn’t help, so on to the usual next step: delete pickle file, restart, get prompt to configure Alexa.
Prompt to enter Captcha. A couple of characters are indecipherable, as usual, Enter best guess. No good, back to prompt to configure Alexa.
Repeat 3 more times…
Wait! Crap! The prompt under the Captcha on that last one was “Enter email address” instead of Enter characters. Never seen that one, but too late now, it’s back to the prompt to configure Alexa.
But now I get a prompt that says Click to begin login instead of a Captcha. I click. Nothing. Wait… nothing. Close the prompt and try again. Same thing. Wait… nothing.
Kill HA again.
Login to Amazon in browser to make sure I can connect. Get a prompt that I must change my Amazon password. Go through the process of changing my Amazon password, including 2FA message to my email with OTP code.
Change my Amazon pwd in HA, restart, get configure Alexa prompt. This time clicking it immediately produces the “Enter OTP code” message instead of a Captcha. Not sure if it means the OTP code I got a few minutes earlier when changing password or a new one. Wait… no email. Wait some more. Occurs to me to check cell phone - and there’s a new OTP send to my cell phone this time at random. Enter that one, accepted, Alexa appears to be configured.
Try my Alexa routine again. No good.
Restart HA, try again. No good.
One more cycle of delete pickle and try configuring Alexa again. This time I get only an OTP prompt, which appears to accept the prompt sent to my cell phone.
But routine still doesn’t work, same error as originally.
So close to 90 minutes wasted this time, and it’s still borked.

1 Like

Amazon removed the url we were using to access routines. Fix is 3.6.3. No idea about your other issues though. Please consider looking at the GitHub to see if it’s a reported problem.

1 Like

I just tried out notify.alexa_media_last_called.
Thanks @alandtse!

Last called device

(versions >= 0.10.0)

As of >= 3.6.0, a notify target will be created automatically notify.alexa_media_last_called

Thanks for the update @alandtse, I should have checked the Github issues thread, but too exasperated with it after the long process of trying the usual measures unsuccessfully to continue last night. Not sure if it will help me since my HA installation can’t be updated to the latest version, and I don’t think the current Alexa component is compatible when plugged into my old version, but I’ll try it. In any case, the work to keep this updated and respond to issues is always appreciated.

The interaction with Amazon that makes re-configuration of the Alexa component such a lengthy and problematic process is all Amazon’s fault I think. It begins with poorly-chosen Captchas that are indecipherable in many cases, continues through a quirky and buggy 2FA process that’s partly hidden from the HA UI so it’s hard to tell what’s going on. Interspersed with lengthy HA restarts and waiting for OTP codes from Amazon makes it a long process at best, and that’s without forced password resets.

I can confirm. The issue I have with doing it this way is there is a delay between each. Having “Everywhere” work would solve the problem

The latest version of the component uses a proxy login method which lets you see login directly through your browser. We’re also using the mobile app login now which tends to have easier captchas. Also for 2FA, we recommend using an application so you don’t need Amazon to send anything to you. It also avoids the situation where Amazon hits it SMS sending limit.

Is the sms sending limit really relevant for a login every several weeks or even twice a day?

Given the issues people complain about that I don’t run into, I’m not sure why I’d suggest otherwise given I have run into this issue testing the login process.

Hi,

i am trying to create a script to play a Spotify playlist and shuffle it at start.
This is my code currently:

  run_playlist:
    alias: 'run playlist'
    sequence:
      - service: media_player.volume_set
        data_template:
          entity_id: media_player.echo_salotto
          volume_level: 0.3
      - service: media_player.play_media
        data:
          entity_id: media_player.echo_salotto
          media_content_id: "Playlist My playlist"
          media_content_type: "SPOTIFY"

and this works fine but doesn’t shuffle obviously.

I tried

media_content_id:  shuffle "Playlist My playlist"
media_content_id:  "shuffle Playlist My playlist"
media_content_id:  "Playlist My playlist" in shuffle mode
media_content_id:  "Playlist My playlist in shuffle mode"

with no luck at all.
According to this the following should work (if supported)

media_content_id:  shuffle "Playlist My playlist"

but again no luck.

Can anyone help?