DAAP (iTunes) Binding?

I’m using forked-daapd as a music server to stream audio to various airplay speakers in my house. Forked-daapd has some rudimentary mpd support so the mpd binding works to start and stop playback but it would be much nicer to have a proper daapd binding.

Anybody working on this? Would there be a general interest in this?

github link: https://github.com/ejurgensen/forked-daapd

1 Like

+1 for interest. I’m beginning to gather Airplay speakers in more and more rooms so a binding to read status (device connected/disconnected) and manage volume would be great.

I’d love to see this but noticed this on wikipedia:

As of January 20, 2016, the iTunes 7.0+ DAAP authentication still hasn’t been reverse engineered, so no third-party application can stream from servers running iTunes software (from 7.x, all the way up to and including version 11.x).[5]

Maybe it’s time to look at chromecast audio…

why would you need to stream from iTunes? The idea is here to control iTunes. (or forked-daapd for that matter). There is no need to stream from iTunes - especially not for openhab

That’s a great point. If you just want to control iTunes, there are a number of simple ssh/applescript patterns that I’ve played with in the past.

yeah applescript doesn’t work for me since forked-daapd server (which I use instead of iTunes) runs on a linux PC.

I can even rudimentary control it through the mpd protocol however what is not really working is updating the state of the system. I would like openhab to know whether something is actually playing. That does not work (no idea why) through the mpd binding.

So a real binding would be great and I thought I will not be the only one wanting that but apparently not many people use multi room audio systems other than sonos.

I actually find airplay really great for multi room audio…

1 Like

Another +1

Similar to mscottco I would like to get speaker status, (un-)set it as output and adjust its volume.

A good point for someone to start with can be https://github.com/jkiddo/jolivia, where Java Sources for DACP and other protocols can be found.

On the other hand MPD Binding is already given and can be extended with missing functions probably.
At YMPD.org there is a MPD web client written in C, I can control speakers at forked-daapd with.

EDIT:
I used samples provided at Wiki of MPD Binding to receive player status (current track info), which works just fine.
I am also able to switch speakers at forked-daapd on/off by using following binding:
Switch MPD_Speaker1 “Speaker 1” (SpeakerSwitch) { mpd=“OFF:player-id:disable=speaker-id, ON:player-id:enable=speaker-id”}
At my system 1 has to be set as speaker-id for local output, while Airplay Speaker is at 40000 range. Speaker status hasn’t been implemented at MPD Binding as far as I could see at its sources. I used ympd to lookup speaker-ids (you’ll need to add 1 for the speaker-id at openHAB Binding).

1 Like

There is an ITunes rest api on github - check it out, I have it working with Dashing.io and openhab - also added airfoil support so I can stream from my iPhone to multiple speakers.

@micro7 for me the retrieval of the tracking play status is mostly not working. It does work if I start openhab after forked-daapd but if forked-daapd disappears (shuts down) and then returns it no longer works. So itS not really reliable.

There is another thread, which is about mpd binding no longer receiving info.