Skip to content

Instantly share code, notes, and snippets.

@jamesabruce
Created March 1, 2016 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesabruce/4af8db24ba3452b94877 to your computer and use it in GitHub Desktop.
Save jamesabruce/4af8db24ba3452b94877 to your computer and use it in GitHub Desktop.
If-This-Then-Node plugin to send voice notifications to Sonos through Sonos-HTTP-API
var request = require('request');
module.exports = {
run: function (params, log, callback) {
request('http://localhost:5005/sayall/'+params.message+'/en-gb', function (error, response, body) {
console.log("Sent message \""+params.message+"\" to device "+params.device);
})
callback({
'success': true,
'output': 'all good!'
});
},
info: function () {
return 'Voice messages to Sonos HTTP API Plugin';
}
};
// This private
var anyHelperFunction = function () {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment