Closed 1liminal1 closed 7 years ago
I guess what you are looking for is "mpc outputs"?
Hi there,
What I want to do is control connect/ disconnect, plus volume of my Airplay devices though HA-Bridge server.
I can do this pretty easy though Tuneblade, but I want to use a Pi Zero W instead of a power hungry windows PC.
How can I see my visible Airplay devices though HTTP? if the Apple remote can see them and play to them though forked-daapd, then other systems should be able to do the same right?
In the shell , the command mpc outputs|grep enabled|cut -d "(" -f2 | cut -d ")" -f1 gives you a list of enabled outputs; this should help you if you "exec" this in php. The command mpc outputs|cut -d "(" -f2 | cut -d ")" -f1 should analogically give you the list of all outputs. I would go that way...
Havent had a chance to look @ this yet. But I'll be setting up the Pi Zero for Forked-Daapd tonight.
I'll let you know how I get on.
Thanks
Hi there,
Ok this took me a while, but I have got it to output my devices though the shell. mpc outputs, gives me my Airplay devices,
enable 2345673, will enable one
But trying
http://192.168.190.15:6600/commands/?cmd= enable 2345673
Does nothing unfortunately, Im asking around, but not having a lot of luck with this.
I don't know much about HA Bridge, but I understand it will be making http requests? And it cannot execute shell commands?
If that is the case you should be aware of the different protocols in play here: forked-daapd supports the daap and mpd protocols, none of which are directly http*. A normal http get request is something like "GET /this/document?parameter=x", and that is not the same way mpd requests are made.
So you need something that will convert between http<>mpd, and I actually think @LordMyschkin did give you a suggestion on that, namely using php. Maybe you didn't notice that?
An easier option, which doesn't require any programming, is to install something like ympd on your RPi. It is a basic web client for mpd (disclaimer: that I have never tried - there are plenty to choose from, however). You can make http requests to that, and then it will make the required mpd commands.
*though daap is quite close to http
Just to let you know, I have this running on the PI zero with a USB DAC and its working really well. Still having issues with not letting me run the named pipe from the Pi users home directory without running root, which is some annoying Linux thing. But I have Spotify working like a champ though Remote and streaming to multiple Airplay devices. So Sonos but tiny and cheap lol.
Also wanted to say thanks for taking the time to help me with this, I'm a windows sys admin, so while I do have some idea what I'm doing, kettles, fish ect haha
So with the disclaimer out of the way, my comments in bold.
I don't know much about HA Bridge, but I understand it will be making http requests? And it cannot execute shell commands? Yes that's right, not shell commands. So I really just want a simple HTTP command that does it, there is a windows app called TuneBlade that does this so so easily, but I really want the power saving of the Pi Zero.
If that is the case you should be aware of the different protocols in play here: forked-daapd supports the daap and mpd protocols, none of which are directly http*. A normal http get request is something like "GET /this/document?parameter=x", and that is not the same way mpd requests are made. Its interesting you say that because I found some guys talking on the Rune Audio forums and it seems you can send the commands though http. Unless I'm missing something, but I'm asking for clarification http://www.runeaudio.com/forum/http-get-post-commands-for-quick-mpd-play-pause-toggle-t788-10.html#p20670
So you need something that will convert between http<>mpd, and I actually think @LordMyschkin did give you a suggestion on that, namely using php. Maybe you didn't notice that? I did, I just dont know how to do that, but I refer to the above?
An easier option, which doesn't require any programming, is to install something like ympd on your RPi. It is a basic web client for mpd (disclaimer: that I have never tried - there are plenty to choose from, however). You can make http requests to that, and then it will make the required mpd commands. Thats something I'm edging closer to, using a MPD client and then catching the Curl commands in a browser, would that be the way to do it?
*though daap is quite close to http
Glad to hear you got this far.
I don't know anything about Runeaudio, but it sounds like they might have made a http interface which uses the mpd syntax. Forked-daapd doesn't have that. Perhaps something to add later, that would be up to @chme.
However, as mentioned, I think the easier alternative is to install ympd and send http requests to that. Yes, you will need to figure out what requests to make (GET or POST + params). Does HA Bridge ignore the responses of the requests? If yes, then that should work. If HA Bridge needs responses in a specific format (which?), then you might need to go the php way.
I'm not sure why you mention Curl - I don't think there is such a thing as "Curl commands in a browser".
Hi guys,
How can I see what airplay devices are connected, though http?
For example if I go to
http://192.168.190.18:3689/devices/
I get not found
If I try
http://192.168.190.18:6600/devices/
For MPD I get nothing at all