Already have your Home Automation Solution running, and need it to “speak” through your Sonos speakers?
Well this job is easily achieved, with the “SONOS HTTP API” from “Jishi” on GitHub (https://github.com/jishi/node-sonos-http-api)
First you need to install NODE 4.0 and above on your Home Automation server, NAS, RPi or what ever you have laying around, for Windows, Mac and Linux you can download it here: https://nodejs.org/en/download/
After you have installed it (In this example Windows), get the Sonos API build from GitHub, and extract it to a folder.
Go to the API folder and run:
npm install –production
To install all dependencies.
And the API is running
Google is the default Text To Speech Engine, but several others are supported, Amazon, Microsoft, VoiceRSS, feel free to test them out, it’s all in the API front page, how to configure.
Now open a browser on your client and type (In this example I use my Batchroom speaker – To find your zone names use http://localhost:5005/zones from the computer you installed NODE 4 on):
http://localhost:5005/Bathroom/say/Hej, kan du have en god dag/da
The above line makes my Bathroom speaker say “Hello have a nice day” (In danish) /da equals danish language for speaking (See api-doc).
Now in HomeSeer or Athom Homey, you can make HTTP GET commands, you can just copy-paste the above in that action/flow you create, just remember to change “localhost” to the IP of your new Sonos proxy 😉