Created
June 4, 2015 04:18
-
-
Save wurmr/e2f110a94adb32c55996 to your computer and use it in GitHub Desktop.
Sonos Subscribe Example client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't quite work right with zone groups, needs a little work there.