I have recently create Python bindings for AllJoyn to control my Allplay speakers (https://github.com/glennpierce/alljoyn_python). This speakers are like Sonos speakers.
I would like to hack in support for this to Mopidy but need some advice to where to start.
I first though I could create a Gstreamer sink but not sure that is possible as the sink is dealing with only audio data and the Allplay api essentially wants to be passed a url to a music file.
Does anyone have an Idea where this can be hacked in.
What would your pyhton binding allow you to do with the system?
And what do you want to hack into it?
One very low-tech choice would of course be using the aux-in on the AllPlay speakers, but I assume that this is not what you had in mind.
You also could stream the output of Mopidy via Icecast (see here in Mopidy docs). Have not tried it myself, but based on the docs it looks like it is still work in progress. You “only” would have to get the speakers to play this stream.
I also looked at the Allplay system recently to find out whether the feature set was good enough to replace the raspberry music server and wired 5.1 system. However, IMO the system lacked a good way of controlling it. I mean it has two (!) apps - one for music and one for internet radio… and no physical way of interacting with the system.
The last point was somethat improved by the SC-ALL2, which has some “favorite” buttons but the other speakers don’t have anything like this.
And also there was no auto-play, so there was no easy way of “just turn it on” and it play something. You always had to fiddle with these stupid apps.
I think that if there was a easy way to control these speakers and give them some more freedom (e.g. by automatically streaming the output of mopidy to it) then it could be a very cool system… and at a fraction of the price of Sonos
My bindings will allow me to send a url for a web accessible song to play to one on my speakers.
I should be able to use the bindings to create a zone which is one or more speakers that will play in sync on my wireless network.
I mainly want multi room audio.
The call for that is CreateZone. Unfortunately at the moment I don’t know the parameters it expects. I just know it is an array of strings. I’m sure I will work that out soon.
I wonder with the icecast method Mopidy passes the uri to icecast as I could write something similar.
Yes the two app Allplay thing has been a major pain. I am not sure what they were thinking. I originally created an Android app called AllPlayRelay that is a Dnla renderer that sits on your tablet of phone. You can get a music app with Dnla support to send audio to it and it translates it in the AllPlay system. It works but is clunky. Like you I hate fiddling when wanting just to play music.
That’s when I found out their libraries were built on AllJoyn so I am trying that approach now.
I feel it should be possible to send the output of Mopidy to it. The problem is simply getting the url of a track to send to my speakers. I don’t think I can get that info from within a sink but I may be wrong.
The icecast stream is afaik the whole output of Mopidy, not just for single tracks.
Couldn’t you just hand this icecast stream URL to Allplay like a normal web radio station URI?
Yeah this seems to work.
Its a little buggy when stopping a restarting etc. At the moment I have a angular webpage to control speakers but I think
I will fork modped web interface to add my control there. I can then hook into signals from Mopidy to start / pause etc.