Echo Devices (Alexa) as Media Player - Testers Needed

@alandtse & @Didgeridrew

Honestly, I may have been one of the people that missed the notation in the release notes. I went searching and could not find the notation either. can you assist? For the record and comment(s) here is my configuration yaml chunk:

default_config:
#Alexa Media Player
alexa_media:
  accounts:
  - email: !secret amazon_user
    password: !secret amazon_password
    url: amazon.com
alexa:
  smart_home:
    locale: en-US
    endpoint: https://api.amazonalexa.com/v3/events
    client_id: https://pitangui.amazon.com/
    client_secret: xxxxxxxx

Any guidance is greatly appreciated.

You can completely remove the alexa_media: portion. Leave the alexa: heading alone… that’s for your Nabu Casa or Alexa custom skill connection.

default_config:

alexa:
  smart_home:
    locale: en-US
    endpoint: https://api.amazonalexa.com/v3/events
    client_id: https://pitangui.amazon.com/
    client_secret: xxxxxxxx

@Didgeridrew thanks for the response. I have taken your advice and removed the entry(s) from my configuration.yaml Again spending another day and multiple attempts have provided pretty much the same result.
Removing the integration, followed by removing it from HACS. Then Reloading it in HACS, it did not appear available in the search of integrations until I re-added the chunk into configuration.yaml and restarted HA. At that point it appeared in the search. Again, removed the chunk, and restarted HA. It was still avaiable when I searched. Thing being different was that the fields in the form were no longer prefilled. So, at that point, I went in to Amazons Login & Security and removed the 2 Step and started over new. This time creating only the one for HA. Form the log, I was able to see the generated code, and completed the process by butting the 6digit code in the Amazon verification field. Watching the log, I could see that a login was created. However, the same error is repeated that I have been getting for the past three days… Unable to connect to provided Home Assistant url: https://xxxxxx.duckdns.org What I find interesting is thatI can double click the address right from the log and it opens and new login for HA

.
The only other think I fine notable is that beyond the Username and Password, I also have to enter the F2A for HA from my authy app. I wonder if that is what is hosing my Authorization. I have not heard anything from @alandtse in community or from my I am unable to re-authenticate alexa_media_player api · Issue #1648 · custom-components/alexa_media_player · GitHub request for help. Although, I can easily say he is most likely swamped with tickets as 5 more people have added me-too to my request.
Everything else is pretty much the same except the logs…

2022-06-22 11:15:18 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Creating new login
2022-06-22 11:15:18 DEBUG (MainThread) [custom_components.alexa_media.helpers] R****e@M*************t: Returning uuid {'uuid': '3ec5fddfbe094aaa7dd3f696f79ae14c', 'index': 0}
2022-06-22 11:15:18 DEBUG (MainThread) [alexapy.alexalogin] Creating TOTP for 4************************************************G6A
2022-06-22 11:15:18 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 339205
2022-06-22 11:15:18 DEBUG (MainThread) [alexapy.alexalogin] Login created for R____e@M_________t.net - amazon.com
2022-06-22 11:17:30 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Unable to connect to provided Home Assistant url: https://_____.duckdns.org
2022-06-22 11:27:59 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Using existing login
2022-06-22 11:27:59 DEBUG (MainThread) [alexapy.alexalogin] Creating TOTP for 4************************************************G6A
2022-06-22 11:27:59 DEBUG (MainThread) [alexapy.alexalogin] Generating OTP 645357
2022-06-22 11:30:08 DEBUG (MainThread) [custom_components.alexa_media.config_flow] Unable to connect to provided Home Assistant url: https://_____.duckdns.org

Here is the GUI response


Any ideas?

2 Likes

Does this fix means we can leave it in the config file??

2022-06-27_5-02-24

Yes it does.

1 Like

@alandtse @Didgeridrew
Fortunately, thanks to @alandtse (GitHub)I have my issue resolved.
I have one more very minor issue/question. Following various leads to get where i am now, I enabled DEBUG via the configuration.yaml In the guidance, I removed those lines. Everything is working now, however, The DEBUG is still enabled but no longer necessary.

Des anyone know how to turn Alexa Media DEBUG off via Settings/Devices&Services?
Thanks in advance!

You can do that in the developers view under services. Logger.set_level and under data the the Alexa component you would like to turn off. But in order to do that permanently, you have to set the log level in the configuration yaml as well

If it’s the option at the config screen, you need to remove and readd to access that. It won’t require a relogin if your data is still valid.

Hey guys,

I’ve removed a Echo Dot and am trying to change the name of another, but its not updating in HA. I cant seem to find any doco on updating the entity ID esc. Does that exist? Have I just missed it?

Thanks

Did you klick “reload” at the integration?

I did, I’m not sure if it was time, or restarting 3 times lol. But it seems good now, thanks :slight_smile:

I am wondering if there is a way to view what Alexa responds back from a command in text?

Right now I can see what I said to Alexa in the attribute of the media_player, but there isn’t an attribute for what Alexa responded back.

AFAIK, there isn’t a way to pull that information if the response is generated by Alexa. If the response is something that you are generating in HA then pushing out to Alexa it is possible to also store and recall that using an mqtt sensor. Jeff Stone @netizen24601 shows this method on his SlackerLabs channel Build a Notification Recall system in Home Assistant - YouTube

1 Like

Integration cannot connect to my HA external URL… But external URL works, just tested with my Smartphone from mobile network… Or does this only work with HA Cloud?

1 Like

Hi all,

I want my Samsung TV that has a Fire Stick to broadcast to more than two Echo Dots. I’ve previously set up the theatre setup in Alexa, but I have four Echo dots and I want to have the Samsung, whether using the Fire Stick or not actually, to broadcast to all four. I set up a Speaker Group with all four speakers in Alexa, and HA sees the group using the Alexa media integration, but how do I tell the TV and/or Fire Stick too use the Speaker Group as the media player since Alexa will only let you broadcast to two speakers max from a TV/Fire Stick.

Any thoughts?

This past week I’ve been unable to:

  1. Use the previously working echo group “last_alexa” room aware scripts
  2. See currently playing songs (the echos now always say “Standby” or “Idle” even if playing
  3. Some of my echo devices appear unavailable.

I’ve made no changes to this stuff.
I have no alexa_media in the configuration.yml - purely UI configured.
I can reload the integration with no trouble.
Many features still work (timers, etc) but others do not.

Is there a way to force a fresh re-auth? Anyone else noticing issues?

service: alexa_media.force_logout
data: {}

Or remove and readd the integration.

@alandtse - Not sure if you have already seen but Marcel from the Music Assistant component project has just added support for a stream URL to allow playback on Alexa devices; Support for Alexa Media Player · Discussion #431 · music-assistant/hass-music-assistant · GitHub

I’ve tested this out using a basic audio player skill (the one linked in the discussion by dabblelabs) and it works perfectly, it even plays the streams directly within the local network.
The tricky part is that the skill looks to a static URL hosting the M3U file (which is slightly different depending on the playback target device).
Is there any magic that could be done on the Alexa Media Player side of things to add support for calling playback of a specific URL without having to rely on a skill?

1 Like

This is fantastic - thanks so much. Just adapted your code to handle my XM/tunein needs. Fantastic!

Were you able to resolve this? I’m seeing the same problem. I know my external url works as I use it all the time.