Created
March 1, 2016 13:33
-
-
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
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 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