[Fix] Sonos Weather Forecast External TTS

Hi, This is a Fix for the Sonos Weather Forecast smartapp, In this release I have added a Fix for Text To Speech function.

It use 3 TTS services,

Service 1 ) Smarthings TTS : This is a great TTS , high voice quality but crash frequently.

Service 2 ) Google TTS, Its a great TTS but can be blocked if you request frequently and is limited to 100 chars

Service 3) VoiceRSS, Great API service, it allows 350 free request by day with high quality audio (needs to register free to obtain an api key) http://www.voicerss.org/registration.aspx

Then If Smarthings crash, verify the api key, if exists use VoiceRss if not use Google

I have change some short words for full words

API Key

You must to enter yor free API key, you going to find the setting under more options

It will open the field to input the data and the link to register,

You must register free in VoiceRss, the link going to open the page in your browser, no email confirmation required

Once you register you going to see your api key

I hope you enjoy these release

Create the smart app with the code

3 Likes

Hi,

After the last software update of ST hub I noticed that the timed events from “Sonos Weather Forecast external TTS” is not starting.
To debug, I added a “log.debug” statement in evtHandler and saw that it never goes into that.
I checked the code to see if something is weird about TimeOfDay settings, but couldn’t find anything abnormal.

	if (timeOfDay) {
	schedule(timeOfDay, scheduledTimeHandler)
}

def scheduledTimeHandler() {
eventHandler(null)
}

what might have they changed and now it’s not working ?
I checked with a timed event on CoRe and they seem to work fine. At correct time…

Hi , I think you are wrong, The app send the audio when a event trigger the action. not by timer, you can config in the app certain time the app works, but not the trigger by time.

I have verify the app and its working fine.

Hi,

There is a time based trigger here:

ifSet "timeOfDay", "time", title: "At a Scheduled Time", required: false

and it worked for me until yesterday. How do you say that there is no time trigger ?

Sorry I have missed that trigger, but I’ts working fine, I think you must to check your time settings , for me it’s 1:30 AM , and several test are working fine

whatever I set there, it does not trigger.
as I wrote in initial question, I have added a line to debug just in the first line of evtHandler and this debug is never fired.

what can I do about this ?
is there a way to see subscribed times on my IDE ?

any ideas ?
how can I check for what time my smartapp has registered an event ?

I’ve realized something today.
when I set the time to trigger +1:00 ahead of the real time it works.
for example if I want the announce at 22:30 , I have to set it for 23:30

this does not happen on CoRe for example.
what is the difference between this app’s time trigger and CoRe’s time trigger behaviour ?

how should I change it so it works correct ?

thx

hi,

am I the only one who has this issue ?