Initial contribution of the Sonos 2.0 binding

Signed-off-by: Karel Goderis <karel.goderis@me.com> (github: kgoderis)
[slap on the forehead] ofcourse, silly me [/slap on the forehead]



> On 24 Oct 2014, at 23:40, Kai Kreuzer <notifications@github.com> wrote:
> 
> In addons/binding/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/handler/ZonePlayerHandler.java:
> 
> > +			String resultString = null;
> > +			String artist = null;
> > +			String album = null;
> > +			String title = null;
> > +
> > +			if(currentURI.contains("x-sonosapi-stream")) {
> > +				//TODO: Get partner ID for openhab.org
> > +
> > +				String stationID = StringUtils.substringBetween(currentURI, ":s", "?sid");
> > +				String previousStationID = stateMap.get("StationID");
> > +
> > +				if(previousStationID == null || !previousStationID.equals(stationID) || lastOPMLQuery ==null || lastOPMLQuery.plusMinutes(1).isBeforeNow()) {
> > +
> > +					this.onValueReceived("StationID", stationID,"AVTransport");
> > +
> > +					String url = "http://opml.radiotime.com/Describe.ashx?c=nowplaying&id=" + stationID + "&partnerId=IAeIhU42&serial=" + getMACAddress();
> It could be a (optional) configuration for the SonosHandlerFactory through the ConfigurationAdmin service. It could be described within the binding.xml file. I can help you on doing so after merging the PR, this might make things easier.
> 
> —
> Reply to this email directly or view it on GitHub <https://github.com/openhab/openhab2/pull/20/files#r19366318>.
>