Ah actually I didn’t add a password, I commented out the password line in the config file. It should look like this:
# Password for the library. Optional.
# password = ""
But it seems that you got it figured out anyway.
Ah actually I didn’t add a password, I commented out the password line in the config file. It should look like this:
# Password for the library. Optional.
# password = ""
But it seems that you got it figured out anyway.
well, as mentioned, the library is not used by HASS, it seems to be using the admin API / admin password to operate.
I have researched how I could create a multi room sound system from available smart speakers, I do not want to build something on my own based on RPi+Hifiberry+Speakers. So snapcast is out of the picture and forked-daapd seems to be the best solution so far, as it supports Airplay and Chromecast.
One feature is important to me for a multi room sound system: the speakers should be able to
(a) simultaneously play different play lists in each room, and
(b) simulateneously play the same stream synchronously in all rooms
Does that work with forked-daapd combined, lets say with Apple/Ikea Simfonisk smart speakers or Apple HomePod speakers?
For this forked-daapd would nee to be able to stream AirPlay2 (not only AirPlay1), right? Is it able to do that?
Does the synchronized multiroom streaming work well in practice?
How would one model this in HASS/lovelace to place the same stream synchronized on all speakers?
In pretty new to this whole audio thing, so take this with a grain of salt. I have recently got forked-daapd and shairport-sync setup and I am happy with the results.
Not unsure about ‘simultaneously play different play lists in each room’, but it does ‘simulateneously play the same stream synchronously in all rooms’. For me, I am using a combination of homepod, speakers attached to an airport express and an audiocast device. All seems in sync as far as I can tell.
I think you will find that forked-daapd uses the original airplay standard (not airplay 2). I don’t think there are any open source airplay 2 systems out there as airplay 2 is a closed protocol that hasn’t been ‘reverse engineered’ yet. Still, the program manages to sync the end devices quite will as far as I can see.
In terms of integration, there is an forked-daapd integration that will pull into hacs all the media players associated with the installation for forked-daapd. From there, they can be automated / displayed in lovelace.
I find it works very well.
Hope that’s useful.
@currest2620 thank you for your feedback, that helps. I also found some bits and pieces and I have questions for you. Lets start:
As the receivers you are using are all glued-up customer devices I assume that you are using shairport-sync not as a stream receiver for a speaker, but rather as a stream receiver for forked-daapd to be able to use an AirPlay capable source such as an iPhone as input for forked-daapd to be able to stream from an iPhone via forked-daapd to the AirPlay receiver speakers (instead of streaming directly from the iPhone to the Airplay receiver speakers). Is that correct? Then what is the advantage of going via forked-daapd? In any case, could you go deeper into that setup, what is talking to what and could you link a how-to where you found how to set shairport-sync up together with forked-daapd?
The forked-daapd author says that playing different streams does not work simultaneously.
The forked-daapd author says that forked-daapd recently supports AirPlay2.
I found the builtin forked-daapd that comes with HA Core, and the mini-media-player in HACS, I don’t know mean by “all the media players” from HACS, could you please elaborate?
I can confirm this. To play multiple streams simultaneously, you’d need multiple instances of Forked-DAAPd, and you could use one for each stream. I’ve never tried this though.
I can confirm that I use both airplay 1 and airplay 2 devices and can sync the audio perfectly between them. I just tested adding a chromecast to the mix, and can confirm that it will not sync with the airplay devices, at least when run through an HDMI switch to a TV. Maybe it has to do with latency in my setup… I never really tried to make this work properly… I don’t have 2 chromecasts to try if they will sync with each other. But you can at least send audio to them if you need to.
As for how it would be done in lovelace, you just need a media player for the forked-daapd and others for each of the speakers you want to play to. You can see my config here. Here’s a link to the latest config for my music with forked daapd in lovelace, it’s a bit more recent than what’s screenshotted there which was based on the iTunes integration, but same general concept.
Yes, but as I understand it forked-daapd actually uses airplay 1, but syncs them as thought they are airplay2 (that is my understanding about supporting airplay2 instead of actually streaming it). In my case, I have devices with both airplay 2 (the HomePod & airport express) and those without (audiocast uses airplay 1). I can also output audio to the Cromecast speaker, though I don’t.
I use the shairport-sync as a way to inject audio into the forked-daapd server. In my case, it’s the only way I can play Soundcloud audio into that system.
As per installation, I used the guide here.
When the forked-daapd integration (as distinct from its server or add-on) is added it will detect the airplay devices forked-daapd knows about and bring time in as media players to homeassistant. Be they Airplay2, Airplay1 or Chromecast devices.
I don’t know what’s happening internally. But at least for my use case it doesn’t appear to matter. It recognized all my airplay 1 and airplay 2 devices and I can play audio to a mix of AirPlay 1 and airplay 2 devices and the audio will come out perfectly in sync across all devices. I really don’t care if it uses airplay 1 or 2 as I’ve never seen any useful difference between the protocols for playing music.
Yeah it works very well. I thought airplay2 bought multi room sync to apple devices which forked-daapd does pretty well.
Airplay 1 had perfectly working multiroom sync already.
Can’t say it worked for me on iOS. I had to update the firmware on my airport express so it could be used by iOS as a multi-room sync using airplay2. That’s how I remember it at least.
That’s weird. I’ve had 10+ airplay 1 devices in my house and could play all of them in perfect sync on every version of iOS and MacOS since Airplay has been introduced. Now I have about 40% Airplay 2 devices and sync is still perfect across all devices.
I have literally never experienced a single sync issue in 10+ years, and have used many devices to stream to them including unofficial ones like airfoil, forked daapd, etc. Sync was always flawless.
Maybe you had some bad 3rd party implementation? All mine are Apple devices.
Was just unable to select it as one of multiple outputs on iOS.
Hmm, I mean I’ve had intermittent problems with airplay devices, but to be honest it was mostly with airplay 2 devices rather than airplay 1 ones. Airplay 1 have been super solid. But I believe you are referring to accessing airplay 1 from HomePod or HomeKit which is not possible. I solve this problem by not using HomePod and HomeKit ;-).
Not sure we’re talking about the same thing.
Here is a screen shot with 3 airplay2 devices that allow for mult-output (Nanoleaf is an airport express). They allow for multi-selection.
Bedroom is an audiocast, that’s running airplay1. I cannot select this source in addition to others.
Have some issues with the audocast though. Seems to drop in and out of forked-daapd.
How did you get to that screen? Even if I open a video on YouTube and go to cast it, I still get all my outputs (which are audio only), for example living room is a very old apple airport with airplay 1 and Sebastian’s room is the newest one with airplay 2.
I also have all of them from the remote app:
are you on a different subnet or something? I’m guessing it’s just an issue with the AudioCast device.
But if you mean multiselecting directly from iOS apps like YouTube, I cannot do that. Even with my airplay 2 devices. But I can multi select all of them using the remote app and forked daapd or iTunes as the music source, or with homeassistant controlling the same.
But yes I forgot this was even possible directly from iOS in some cases because it works so badly that I never bothered using it.
Fortunately the only time I need multiroom is when I’m playing something from forked daapd or iTunes anyway. I don’t cast internert videos to multiple rooms in the house.
Nah, it’s just the standard iOS audio widget as its always been. But yeah, forked-daapd is great for me as well. I have audio coming through a radio station and it syncs with all my airplay speakers.
What I liked most is that it can be automated. Have the output plugged into the nano-leaf, so when that speaker is turned on, it will select rhythm mode and switch back to colour mode when its switched off. Also have the audio going from there to a pi running LedFx with drives my led strips.
Yeah, its pretty cool.
Hi @scstraus !
Just want to say thank you for your very usefull post. I’am installing the docker variant which seams also to be very smooth.
At the moment i’am tail’ing the logfile and i can see that daapd scans all the music files. Is that correct? I thought i understood, that it makes just use of the iTunes Lib incl. the playlists.
Well, it takes the metadata from the iTunes library .xml file and then on startup goes and checks to make sure all the files are available in the right place… This process takes a while but only happens at startup. But when forked-daapd is running, you will have all the same playlists, ratings, smart playlists, and (most of) your album art (for some reason all of mine didn’t show up, but it has a good feature to auto download it which works well anyway). So at the end of the day, I can’t tell any difference between my forked-daapd instance and my iTunes instance. Everything came right up (after it scanned the library ;-)).