Apple music integration

Have you looked at Dashboard: Sonos card - #446 by PunxsutawneyPhil ?

Wonā€™t help anything until Home Assistant supports Apple Music.

1 Like

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!

1 Like

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.

1 Like

This :point_up_2:t2::point_up_2:t2::point_up_2:t2:

1 Like

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.

1 Like

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.

1 Like

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.

1 Like

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.

1 Like

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?

1 Like

Maybe thereā€™s also something goinā€™ on @MusicAisstant ā†’ Add Apple Music Support Ā· music-assistant Ā· Discussion #389 Ā· GitHub

1 Like

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

3 Likes