Have you looked at Dashboard: Sonos card - #446 by PunxsutawneyPhil ?
Wonāt help anything until Home Assistant supports Apple Music.
It would be great if this can be integrated into HA.
I REALLY hope this feature will be integrated soon.
I ended up getting a Sonos speaker which supports Apple Music, then if you add playlists etc to your favourites in the Sonos app they then become available in HA. Works perfect for me!
If you just want to launch a specific Playlist, you can use the following workaround:
- create a Boolean switch in HA
- make the switch turn auto-off after a few seconds
- expose Boolean switch to HomeKit
- create Automation in HomeKit - if switch is turned on, launch playlist X in Apple Music on Speaker Y
Iāve done this for several radio stations. But there isnāt a solution yet to launch specific songs on a dashboard. Thatās what I want Apple Music for. And I want to keep my HomePods.
This
Even when you use an iPad as a dashboard, thatās not a proper solution, because the iPad should be in Guided Access mode. And then you canāt switch to the Music app (and back) anymore.
Second this. There is literally NOTHING to connect apple music to HA, so an official integration, or any integration really is more then welcome.
Whatās the actual ask here?
Do you want to be able to view your AM library in HA? Play music in HA from AM? Play music from AM to another non-Apple device via HA?
My ask would be to view my AM libary in HA and play it (through Airplay?) to my Sonos speakers, just like I can play Spotify or Sonos playlists through my speakers.
That makes sense to me.
We wonāt be able to stream a M3U8 directly to the Sonos as the media stream data itself is protected by WideVine DRM.
Can you play direct to your Sonos today by calling the service Media player: Play media
and specifying the Content ID (maybe an AM URL)?
This doesnāt work for me with a HomePod and I cannot figure it out. If we can work this out, I think itās feasible.
So I grabbed a URL from AM and used this method to push to a SONOS speaker and it worked. Homepods arenāt exactly open so I appreciate this may not work for those speakers.
Hey, I just tested this and does indeed work. But then I went to Sonos app and removed my Apple Music account from there and tried again calling the service in Home Assistant with the exact same media that worked before, resulting in an 800 error.
Added the Apple Music account back into the Sonos app, pressed the ācall serviceā button again and worked again.
We still need to mess with Sonos app for authentication, but having AM integrated into HA would remove the need from having to do the extra job of adding to Sonos the playlists from AM.
Iām not sure about other plaforms different from Sonos, tho.
Is an interesting project that can access apple music, spotify, plex, youtube and more. Iām not a programmer, but maybe there is a way to incorporate into homeassistant?
Maybe thereās also something goinā on @MusicAisstant ā Add Apple Music Support Ā· music-assistant Ā· Discussion #389 Ā· GitHub
Thanks, Iāll add a note in the MusicAssistant thread you linked.
not quite an integration but Apple Music is available now as a source for music in the Music Assistant Beta 2.1.0b1