Support for Alexa Media Player #431
Replies: 120 comments 417 replies
|
I've inspected this today and so far I see no easy way to make that work. The Alexa Media Player does not allow to just send a stream URL to play which is what this integration needs. The only way to make this work properly is if somebody creates a custom Alexa skill that communicates with this integration. I do not own a Alexa device so I can't do that. A little googleing I just did quickly led me to several 3rd party solutions you could use to turn the Echo device into a unpnp receiver or squeezebox player. For example: https://www.amazon.com/ComputeQ-UG-Haftungsbeschr-Roomskills-Squeezebox/dp/B0983C2377 I'm happy to work with somebody to make this work but without an actual Alexa/Echo device to test with, this is not something I can start with alone |
|
I would gladly help, I'm not a developer, but I would help by testing it on my echos, unfortunately I'm located in Spain and the skill you pointed can be only installable on US echos (perhaps on DE as well, as per language selection) |
|
I don't know how the SpotCast integration works but I'm able to play music from spotify on my alexa devices from Home Assistant, I don't believe a skill is needed. |
|
@mabrochu-helpox how do you bring the Alexa's into HA as media players though? |
|
To be clear, this is not the official Alexa integration built into HA. This is a custom integration known as Alexa Media Player. It is found here: https://github.com/custom-components/alexa_media_player |
For Music Assistant to work it is required that the enddevice (the speaker) supports "play from url". Music Assistant is not about playing Spotify on a speaker. Music Assistant is about playing all your online en offline media to a collection of speakers. The Spotcast implementation (and others like the alexa custom integration) send Spotify commands to the Echo speaker, not plain urls |
|
Its hacky but you can send urls like this: Probably not the intended use but im curious if there is another api we that could be leveraged ? |
|
Enjoyed the Open Home Audio stream with you all! Very impressive stuff all around! @marcelveldt Music Assistant seems great, and opens a world of possibilities! I just wanted to offer up a potential path forward for supporting Echo devices, and that would be using them as a bluetooth audio target. I regularly pair my Echo with my Macbook via bluetooth, and set it as my output device. No special hardware of configuration needed, just the Amazon Alexa app: The simplest solution is to pair your Echo(s) with the host OS, and use them as system output device(s) - of course, that may incur limitations regarding targeting specific connected devices/groups Traditionally, Bluetooth radios have supported a single audio streaming device per chip (except for a few specialist radios) - so 1 dongle = 1 speaker, 2 dongles = 2 speakers, etc.... However, the recent Bluetooth LE specification also adds "multi device audio streaming" from a single radio, I believe using the LC3 codec. Here's some reference links: https://www.bluetooth.com/learn-about-bluetooth/recent-enhancements/le-audio/
|
|
Additional: I came across an article from last year on Mark Lewis's Blog, in which he configures audio with a bluetooth dongle on Home Assistant OS, seemed fairly simple: https://marklewis.blog/2021/02/25/home-assistant-bluetooth-speaker/ Mark was using a "Local VLC" community addon as a player, but I'm sure there's other things that can be done |
|
would we possibly be able to use something like this: https://www.youtube.com/watch?v=NoCPUypkimc&ab_channel=DabbleLab as a base for a custom skill to be able to play media from a url on amazon devices? |
|
Moved to discussions, raise your votes! |
|
I think we would need to create a music provider following https://developer.amazon.com/en-US/docs/alexa/music-skills/understand-the-music-skill-api.html and then hook into that via alexa_media_player through alexapys |
|
Not a coder, just a dabler. From what I understand. Activating this skill will have the backend load up an audio stream. The URL in this stream could be changed to point to your home assistant instance (or I believe nabu casa URL) for the .m3u file. If it's possible to code an audio stream, then we could use this skill. The scenario would be to have the audio stream process start when opening the media player If this is achievable, then we could adapt the stream URL to other players. Using a m3u app on your phone to stream is one example that comes to mind. Edit: |
|
Any more progress on using the Alexa Media Player integration in conjunction with this? |
|
Hello, |
|
For those experiencing random songs, the issue may be related to Alexa+ if it is supported in your region and enabled on your account. Some update to Alexa seems to have broken skill usage with Alexa+. The testing page has no input or output when launching the skill with Alexa+ but works fine if you opt out of early access. There is now an Alexa+ store for "skills" in the Alexa app which may be related to the update that broke the skill compatibility. The API for the new "skill" framework is currently confidential and may never be open to individual/open source devs. I will update the docs on the prototype skill eventually to notify users that Alexa+ is currently incompatible with the skill. |
|
Failed to authenticate with Amazon 'Cannot connect to host alexa.https:443 ssl:default [Domain name not found]'. Hi, I've tried setting this up multiple times, the docker part and the skill part work fine, but once i try to sign in in the Alexa provider menu the amazon sign in works correctly but once i get back to the Music Assistant tab its shows a pop up with: Failed to authenticate with Amazon 'Cannot connect to host alexa.https:443 ssl:default [Domain name not found]'. the only thing the logs output is: |
Might be something I hard coded. If you can find the issue, I can make the change or you can open a PR. I hard coded en-US at one point in the provider code. |
Can you please provide your setup details (region, device, using skill prototype, Alexa+ if in supported region)? |
|
after i enter all my credintals i get Non-base32 digit found. i have followed the guid on github? |
|
I have everything set up and all appears to go well except the status page shows 404 errors: Service Status Skill running Music Assistant Skill interaction model found; endpoint matches (alexa.******.com); testing enabled Music Assistant API responded 404 for /ma/latest-url { Alexa API responded 404 for /alexa/latest-url { |
|
Is there any Chance that the delay to Pause will be fixed anytime? |
|
I'm having issue configuring the Alexa Player Provider in MA. Specifically, I cannot authenticate with Amazon. When I enter the OTP Secret in the Generic settings and click save, the page navigates back to the top-level Providers page. I then go back into the Alexa provider configuration and the OTP Secret field is filled with the expected dots, however there are less than when I entered the code. If I click AUTHENTICATE WITH AMAZON, I get the error regarding non-base32 digits in the secret. If I re-enter the code and click the auth button before saving, the auth flow happens, however auth fails. I close the tab after the failed redirect and click the CLICK HERE IF THE POPUP DID NOT OPEN link and enter my credentials again, yet it redirects to the same page with the same error, and eventually auth times out completely with "Failed to authenticate with Amazon "Timeout while waiting for authentication callback"." I am confident the OTP Secret is correct... I'm not sure why it's not loading correctly after saving the form. Am I missing something blatantly obvious in the docs? Thanks for any advice! |
|
Could I ask for some advice please:- I think(?) I'm so close but can't quite resolve. But I'm not getting the music out of Alexa when I try to play it through the device. My thinking is that I've got an error in how I've set things up in Cloudflare plus I'm getting an error in the Cloudflared logs within Home Assistant (ERR Request failed error="stream 2317 canceled by remote with error code 0"..... For setting up Cloudflared I've already got a tunnel setup for my domain name (which I access home assistant through). So I added additional routes to this one rather than setup 2 separate tunnels (one for alexa.mydomain and one for music.mydomain) and then amended the Cloudflared YAML as follows: external_hostname: mydomain.com
Is that right? Thanks! I'm sure I'll get there :) |
|
Hi, next issue for me :D tried a full new and clean setup of Music-Assistand and Skill: when i hit play my echo is saying "Playback using Music Assistant is not supportet"... Status page: Skill running skillhost mapped to mydomain.de:5000 |
|
For reference, @jamesonuk and @chemelli74 are now also working on a an Alexa media player for Home Assistant as a new media_player platform to the Alexa Devices integration, adding Home Assistant media player controls to Alexa device playback/volume via aioamazondevices and coordinator-provided media state. See here: |
|
Hi! I was able to set it up (man, what a journey :D) and it works on one of my speakers (one without a screen) which is great! I do have, however, another speaker (a Show), and that one seems to be unable to stream anything. It shows the album art then gets stuck, while MA UI thinks it's streaming. This is the error I'm seeing within Music Assistant logs: Has anyone encountered anything like this? Potentially an old OS on that device making calls with un-escaped blank characters? Thanks :) EDIT: I was able to make it work by changing the device name in the Alexa app to |
Found and fixed: MA Alexa proxy returns 404 on CVF / register / forgotpassword sub-flowsHi @alams154 and everyone in this thread — while debugging the broken Alexa The problemIn proxy_path = "/alexa/auth/proxy/" # GET
post_path = "/alexa/auth/proxy/ap/signin/*" # POSTBut Amazon's login pages issue requests to a lot of additional paths during How to reproduce
Routes Amazon actually hits (collected from
|
|
The feature request has been implemented successfully. As such this feature request will be closed and locked. If there are enhancements desired then open a new feature request. If there is a question about how this works then check the documentation, or ask a question in the Q&A area or on Discord. If there are problems then ask a question in the Q&A area or on Discord or open an issue. Thanks for your interest in seeing this idea being brought to life. |



Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Current Status
As at August 2025 experimental support is available in the beta channel
Original Post
Trying to play music from Spotify to my Alexa devices, which are set as media devices using Alexa Media Player. Alexa gives an error stating that the proper service calls must be made.
If this could be integrated in some way, it would be a game changer for playing music via HA. Happy to test anything as needed.
All reactions