.playText() with ObyThing


(Supercody) #1

I’m having some issues with .playText() and an ObyThing airplay speaker. It seems that while every other smart app is able to utilize the airplay feature and play it through a pair of airplay speakers, when I try to use .playText() in one of my own apps, it will only play through the computer speakers. Is there something I should know specifically about this method or the ObyThing device type?


(Tim Slagle) #2

@obycode, is this a known issue


(Brice; SmartRulesApp.com) #3

Yes, this is a known issue. When you use “playText()” it is actually just using the “say” command on your Mac, which is not going through iTunes and therefore not using the AirPlay speakers. If you instead use the speak method, ex. speak("hello world"), then it will generate the mp3 in the cloud using SmartThings API and send the url to iTunes to play over your selected AirPlay speakers.


(Supercody) #4

@obycode When I try that though, I get:

Command 'speak' is not supported by device 73d808c8-5f06-491a-ad35-8d100b6330bc of type 'ObyThing Music'. Supported commands: [on, off, refresh, play, pause, stop, nextTrack, playTrack, setLevel, playText, mute, previousTrack, unmute, setTrack, resumeTrack, restoreTrack, playTrackAtVolume, playTrackAndResume, playTextAndResume, playTrackAndRestore, playTextAndRestore, playSoundAndTrack]

(Brice; SmartRulesApp.com) #5

Hmmm… are you using the default SmartApp and Device Type, or the one from GitHub? It should get speak from the Speech Synthesis capability, but I don’t remember if the one that is published by ST has that or not.


(Supercody) #6

Ahh that seemed to fix the error. Thanks for the quick reply!