Help setting up forked-daapd with Home Assistant?

I’d like to setup forked-daapd with home assistant, I’ve got forked-daapd installed on a Pi Zero W and I’ve successfully streamed a test MP3 to my AirPlay speakers, but what I’m struggling with is how I’d use the built-in media extractor to obtain the Radio 4 PM MP3 and then pass that file to forked-daapd for streaming to my AirPlay speakers. A variation on this theme.

Thanks for any help!

I’ve been doing some thinking about this. Am I right that the only way to achieve what I want (streaming of an archived BBC Radio program) is to first download the MP3 with Youtube-DL THEN stream the MP3 with forked-daapd? I was worried that doing a daily download of an 150mb file would bork my SD card…the Pi Zero W won’t allow me to connect a USB thumb drive…but I guess I could try to store the file on a USB drive connected to the Pi hosting HASS…?

I’ve just published a video explaining how I’ve set up forked-daapd on a separate Pi and integrated into Home Assistant. In it, I show how to connect to a network storage (a windows file share) and auto-mount after any reboots. You can watch the video here.

You could, in theory, set up an auto-download to save the mp3 to a network-attached storage device (I’m using a USB thumb drive connected to my router) on a schedule. Set up a playlist to include all files from that directory, and use the instructions to refresh the stored songs to update your media. Then you’d just have to call the service to play that particular playlist.

I played around with using the media extractor component, but couldn’t get any joy from it. If you’ve got cast-enabled devices (i.e. not AirPlay), you could use media extractor to play the audio stream without needing to download and convert. You could use any Google Home speaker, any Chromecast-connected television, or any Chromecast-audio receiver.

Good luck!

Hey- I know it’s been a while, just took a look at this. I haven’t used forked-daapd before, but I think what might get you going here is to use the “named pipe” feature https://github.com/ejurgensen/forked-daapd#pipes-for-eg-multiroom-with-shairport-sync.
This would allow forked-daapd to read this buffer as it’s input instead of an actual file. I’m thinking if you paired that up with another media player (like sox maybe) you might be able to pull this off.

So it’d be radio stream -> sox -> named pipe -> forked-daapd.