Skip to content

Instantly share code, notes, and snippets.

@wurmr
Created June 4, 2015 04:18
Show Gist options
  • Save wurmr/e2f110a94adb32c55996 to your computer and use it in GitHub Desktop.
Save wurmr/e2f110a94adb32c55996 to your computer and use it in GitHub Desktop.
Sonos Subscribe Example client
var Discovery = require('sonos-discovery');
process.env.DISCOVERY_LOG_LEVEL = 'error';
var discovery = new Discovery();
setTimeout(function() {
discovery.getPlayer('office').on('transport-state', function (data) {
console.log('transport-state', data.roomName, data.state.playerState);
});
}, 500);
{
"name": "sonos-subscribe-client",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "wurmr",
"license": "ISC",
"dependencies": {
"sonos-discovery": "https://github.com/jishi/node-sonos-discovery/archive/0.15.3.tar.gz"
}
}
@wurmr
Copy link
Author

wurmr commented Jun 4, 2015

Doesn't quite work right with zone groups, needs a little work there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment