Support for Alexa Media Player #431
Replies: 27 comments 105 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 |
Beta Was this translation helpful? Give feedback.
-
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) |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
@mabrochu-helpox how do you bring the Alexa's into HA as media players though? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 ? |
Beta Was this translation helpful? Give feedback.
-
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/
|
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
Moved to discussions, raise your votes! |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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: |
Beta Was this translation helpful? Give feedback.
-
Any more progress on using the Alexa Media Player integration in conjunction with this? |
Beta Was this translation helpful? Give feedback.
-
is there any progress with alexa media player |
Beta Was this translation helpful? Give feedback.
-
I wonder why it doesn't work. Anyway, my plan is to get rid of all Alexa speakers :) |
Beta Was this translation helpful? Give feedback.
-
2 years later this still hasn't been able to be fixed? I downloaded Music Assitant because I have a house full of Alexa and even Alexa Amplifiers so I can have whole house audio. It's very disappointing that my Alexa devices can't be used as players. |
Beta Was this translation helpful? Give feedback.
-
Looking for any success stories with Alexa and either a Bluetooth connection or via the HA plugin exposing HA media players. Interested to understand if we have a workable solution already to support these devices. |
Beta Was this translation helpful? Give feedback.
-
I think the solution is relatively simple (at least that's what my Alexa said). So a normal service call to play music from Alexa is the following:
But since Alexa says
This service call option is also documented on the official Home Assistant Docs https://www.home-assistant.io/integrations/media_player/ |
Beta Was this translation helpful? Give feedback.
-
I tried the changes suggested and only ended up with error
I guess the only problem now is to figure out how to get rid of the |
Beta Was this translation helpful? Give feedback.
-
I have used this to stream from my local shoutcast Server to play on Alexa |
Beta Was this translation helpful? Give feedback.
-
I just used this for my local Snapcast from Music Assistant and I can get all my Alexas to play the same stream and they are in sync pretty well https://github.com/alexa-samples/skill-sample-nodejs-audio-player in Lambda index.js just change this line to your local pserver const podcastUrl = 'https://audio1.maxi80.com'; |
Beta Was this translation helpful? Give feedback.
-
good tutorial for this: https://giuliomagnifico.medium.com/build-a-custom-audio-stream-from-a-video-url-for-echo-devices-1ba8a7cd34bb |
Beta Was this translation helpful? Give feedback.
-
I have a solution that works using snapcast. |
Beta Was this translation helpful? Give feedback.
-
I worked around this problem by using the alexa media player integration and using an automation to send a command to alexa. Note that media_player.entry is the alexa where I send all my commands to just in case she ever decides to respond but the media_content_id I am specifying everything I want to do. If I can code this so that the media content id is dynamic then I can create a dashboard with station buttons just using the voice commands. I've used this method quite a few times particulary when I can't get devices working with home assistant but they work fine with alexa voice commands. You just have to remember to write "how it sounds" |
Beta Was this translation helpful? Give feedback.
-
So they're definitely seems to be a way for this to work because there's a third party program called MyMedia Alexa (mymediaalexa.com) that allows you to play any mp3 that you may have locally stored on your computer and there is no 4 minute limit (I've played a 3hr DJ set on my Echos). Then consider the fact that I can play Sirius XM on my speakers, so it must play URLs. It's just a matter of figuring out how Sirius XM is able to work and combine that with MyMedia and how it's able to play audio that doesn't confirm to the 4 min limit and bitrate requirements. That is of course, if it converts everything on the fly. |
Beta Was this translation helpful? Give feedback.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions