vmichalak/sonos-controller


Java API for controlling SONOS players

Download


Step 1. Add the JitPack repository to your build file

Add it in your root settings.gradle at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url 'https://jitpack.io' }
		}
	}

Add it in your settings.gradle.kts at the end of repositories:

	dependencyResolutionManagement {
		repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
		repositories {
			mavenCentral()
			maven { url = uri("https://jitpack.io") }
		}
	}

Add to pom.xml

	<repositories>
		<repository>
		    <id>jitpack.io</id>
		    <url>https://jitpack.io</url>
		</repository>
	</repositories>

Add it in your build.sbt at the end of resolvers:

 
    resolvers += "jitpack" at "https://jitpack.io"
        
    

Add it in your project.clj at the end of repositories:

 
    :repositories [["jitpack" "https://jitpack.io"]]
        
    

Step 2. Add the dependency

	dependencies {
		implementation 'com.github.vmichalak:sonos-controller:v.0.1'
	}
	dependencies {
		implementation("com.github.vmichalak:sonos-controller:v.0.1")
	}
	<dependency>
	    <groupId>com.github.vmichalak</groupId>
	    <artifactId>sonos-controller</artifactId>
	    <version>v.0.1</version>
	</dependency>

                            
    libraryDependencies += "com.github.vmichalak" % "sonos-controller" % "v.0.1"
        
        

                            
    :dependencies [[com.github.vmichalak/sonos-controller "v.0.1"]]
        
        

Readme


Sonos Controller Header

sonos-controller

Java API for controlling SONOS players.

100% Android and Kotlin compatible.

Travis Status Coverage Status Join us on Slack!

Basic Usage

Discovery all Sonos Devices on your network.

List<SonosDevice> devices = SonosDiscovery.discover();

Connect to a known Sonos and pause currently playing music.

SonosDevice sonos = new SonosDevice("10.0.0.102");
sonos.pause();

How to clone the project

To clone and recover the dependencies do the following commands:

git clone https://github.com/vmichalak/sonos-controller.git
cd sonos-controller
git submodule init
git submodule update

To-Do

Link to the Trello

Contributors

The current lead maintainer is Valentin Michalak (twitter)

Feel free to participate !

Join us on Slack !

There is a Sonos Controller group over at Slack. Feel free to drop by for support, ideas or casual conversation related to Sonos Controller and Sonos in general :wink:.

Sample projects made with this library

Sonos Remote Controller based on Android Things by Michael Guntli

Special Thanks

Special Thanks to rahims for is work on Sonos API !

Licence

Released under the MIT license.