Initial contribution of the Sonos 2.0 binding

Signed-off-by: Karel Goderis <karel.goderis@me.com> (github: kgoderis)
yes, if the player is not part of the group then the coordinator is equal to its own ID, e.g it is as a group of “one” player


> On 24 Oct 2014, at 18:29, Kai Kreuzer <notifications@github.com> wrote:
> 
> In addons/binding/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/handler/ZonePlayerHandler.java:
> 
> > +	 * 
> > +	 * 	@param udn
> > +	 */
> > +	public void playLineIn(Command command) {
> > +
> > +		if(command !=null && command instanceof StringType) {
> > +
> > +			String remotePlayerName = command.toString();
> > +
> > +
> > +			Thing coordinatorThing = thingRegistry.getByUID(new ThingUID(ZONEPLAYER_THING_TYPE_UID,getCoordinator()));
> > +			ZonePlayerHandler coordinatorHandler = (ZonePlayerHandler) coordinatorThing.getHandler();
> > +			ZonePlayerHandler remoteHandler = getHandlerByName(remotePlayerName);
> > +
> > +			// stop whatever is currently playing
> > +			coordinatorHandler.stop();
> can you always be sure that this is not null?
> 
> —
> Reply to this email directly or view it on GitHub <https://github.com/openhab/openhab2/pull/20/files#r19348893>.
>