iTunes Integration: unable to control airplay endpoints

Edit: solution below using GitHub - chasut/itunes-api: 🎵 A simple server providing a RESTful service for controlling iTunes

I am running Apple Music app on a mac mini on macOS Ventura 13.3.1.
I have setup the modified iTunes api from GitHub - DrMachin/itunes-api: 🎵 A simple server providing a RESTful service for controlling iTunes on this mac, since the original Itunes api has not been updated to work with the Music app that replaced iTunes.

The homeassistant itunes integration creates a functional media player, so this part is working.
I can control the play/pause/forward/reverse/volume of the primary mediaplayer.

The integration also creates mediaplayers for each of the airplay endpoints on my network, and updates their status correctly (ie, on / off /volume). However, these airplay endpoints cannot be controlled in homeassistant. For example, on/off/volume of each airplay endpoint can only be controlled from the music app, not from homeassistant.

Is anyone else using this successfully?
It has been several years since the iTunes api has been updated, are any developers interested in taking a look at this?
Thank you! :slight_smile:

Thinking more about this, is the Apple TV integration able to interface with the Music app on a mac?
It seems that an integration that emulates apple’s itunes remote app would fit this purpose.

It is alive and kicking for me. I did make a couple of additional tweaks to the DrMachin version, but honestly don’t remember exactly what, but I don’t think it would impact the airplay endpoints.

I did have something strange happen the other day that may be related. I have been monkeying around with the ATV integration to do some TTS to some HomePods. Shortly after I added those, the connection to the airplay receivers from the iTunes integration did exactly what you described. I uninstalled/re-installed the iTunes api and apple music on my server and everything is back to normal. Even with my super geeky TTS notifications working. So perhaps there is some hope.

I too am hoping for a better solution to integrate Apple Music. I have anxiety attacks every time I update the macOS praying that it doesn’t break the iTunes api. I don’t have the skills to take over maintenance of the integration or the api. I am far too invested in the apple ecosystem to even contemplate a change.

1 Like

Just went back and checked and I did make a change to airplay.js that may have an impact. You can see the changes on my branch https://github.com/chasut/itunes-api

UnfortunateIy my branch may not work as is. I also made some changes to the home-brew path and restart so that it forever works properly. But I think that is because I screwed up my home-brew install :crazy_face:

1 Like

Thanks for sharing that the integration is working for you, including the airplay endpoints.
I’ll try to see what’s up with my installation of iTunes-api.

Will look at your changes!

I just installed your version and it is working great so far!
Thank you again!