-
Notifications
You must be signed in to change notification settings - Fork 255
adding support for manual setup of Sonos devices #88
base: master
Are you sure you want to change the base?
Conversation
// are entered. | ||
var setupDomain = require('domain').create(); | ||
setupDomain.on('error', function(err) { | ||
console.error('error on setting up device "'+deviceArg+'": '+err); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iona5 - mind using spaces between concat'd things here for consistency's sake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also - capital "Error" here? Keeps it stylistically same as above messages.
@iona5 - thanks for putting this together! looks mostly good to me, with minor comments above. Last nitpick - can you reformat using 2 spaces per indent? Keeps it inline stylistically with what it used to look like. |
} else if (flags.get('devices').length > 0) { | ||
|
||
var deviceArguments = flags.get('devices'); | ||
for(var i = 0; i < deviceArguments.length ; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also spacing, here:
for (var i = 0; i < deviceArguments.length; i++)
(perhaps I should add a travis-ci linter..)
hi stephen, thank you. i will update my changes accordingly. regarding the error handling: i know what you mean, but i guess i will keep that in a separate commit: i am fairly new to node.js and i am not really sure how errors should be handled in your package. i will make a proposal and you say if you like it or not. ;) cheers |
(Feel free to also add yourself as a contributor in package.json 😄) |
* fixed indents to two spaces * changed formatting of string concatination * slight change of error messages
i tried to address all the issues. regarding the error handling i created pull request #91 which includes this pull request. |
fbf36d7
to
b08132c
Compare
* added argument "--devices" - takes comma-separated list of IP[:Port] * changed version to "0.1.1-jona5' and added <me> as a contributer * added documentation to README.md
…e throws error * individual setups should run in a domain, so we can catch errors individually * add feature to README.md
+1 - would like to see this fixed. |
at the very least a rebase seems to be required |
This adds the argument '--devices' to airsonos. The argument takes a comma separated list of IP addresses. airsonos tries to setup these without doing a discovery via M-SEARCH.
Usage:
Example:
tries to setup airsonos with Sonos devices at IPs 192.168.0.100 and 192.168.0.101. While it connects to .100 over the standard port (1400), it connects to .101 over port 1401.
if a timeout occurs to one or more devices, airsonos prints an error message, but maintains connection to other devices.