Smartthing and sonos


(John O) #1

Can anyone explain to me how Smartthing and Sonos talk to each other? I’m looking to have Sonos announce certain events like “good morning” or “motion detected” does smartthing have TTS but in?
Thanks in advance
John


(Impliciter) #2

Request access to Smartthings Labs:
http://blog.smartthings.com/introducing-smartthings-labs/introducing-smartthings-labs/

Then open the SmartApp Sonos (Control) and you can see how it’s done. There is no TTS it just plays a hosted *.mp3 on the Sonos player.

Here is the command:
sonos.playURI("http://s3.amazonaws.com/smartapp-media/sonos/a%20door%20opened.mp3")


(Chuckles) #3

Ahhh…but it does take a URL, presumably passed to the Sonos device.

I have my Sonos kit, but I don’t yet have my SmartThings to try this with:

sonos.playURI("http://translate.google.com/translate_tts?tl=en&q=I'm%20sorry%20Dave,%20I%20can't%20do%20that")

I’ve also started coding up a local ASP.NET based text-to-speech server which should give me more flexibility on voice, rate, text length, etc., but Google Translate may be enough for now (though I believe its limited to 100 chars for the message).

Can anybody report back on how well (or if at all) the above works with SmartThings and Sonos?


(Chuckles) #4

…anybody???


(Wheeler) #5

9:41:44 PM MST: error Command ‘playURI’ is not supported. Supported commands: [play, pause, stop, nextTrack, playTrack, setLevel, playText, mute, previousTrack, unmute, on, off, refresh, getVolume, subscribe, getCurrentMedia, getCurrentStatus]