[Deprecated] Amazon Alexa Text to Speech (TTS) v0.6.2 - Direct Integration (USA, Canada, UK, Italy, Australia, & Brazil)

Is there a doc on this some where?

This one looks to be the best solution for me but in order that Alexa app enables the contact sensor as a trigger in the routine it should be set in that way as virtual contact sensor (would a different virtual device work as well??), so when this virtual device "opens" then the routine will trigger but then how to automatically "close" it so it is ready to "open" again to trigger the routine again?? (with a virtual switch it is as simple as just enabling the auto turn off function but looks like Alexa app would not enable those types of virtual devices to trigger routines) I am thinking to create a dedicated rule to "close" all my Alexa virtual contact sensors whenever the get "open" but is that the best way?

The simplest way is to use a custom device driver that implements both the switch and contact sensor capabilities, along with auto-off functionality.

https://raw.githubusercontent.com/ogiewon/Hubitat/master/Drivers/virtual-contact-switch.src/virtual-contact-switch.groovy

4 Likes

awesome as always, thanks !!

1 Like

@tonesto7 do you have documentation you could share on how to use your echo speaks integration with Hubitat? I was using the simple contact sensor triggers but as it only offers to speak a static phrase is not good enough for me, looking for your integration then

@Aldo

Follow the thread linked below for Echo Speaks:

4 Likes

Need help. I can't get a valid cookie. All my hardware is registered to uk. Does that mean I get a cookie from Alexa.Amazon.co.uk? I managed to get a list of my devices but everytime I get the same message

ending Message: Alexa TTS: Please check your cookie! Priority: 0 to Device: oneplusnord

app:64152022-11-08 18:46:33.763error'speakMessage()': Error making Call (getMessage): status code: 500, reason phrase: Internal Server Error

app:64152022-11-08 18:46:33.758error'speakMessage()': Error making Call (Status): 500

app:64152022-11-08 18:46:33.716error'speakMessage()': Error making Call (Data):

I'm almost certain to be doing something stupid!

If you were able to see the list of your devices, then I believe that means that your cookie was successfully obtained. It has been a very long time since I wrote this, and I personally no longer use it. Thus, I am not sure I can be much help troubleshooting this further. Are you using an individual Echo? Or are you trying to send to ALL Echos at once? Try just a single Echo device and see if that works.

I personally simply bought an IKEA Symfonisk speaker, which are made by Sonos, and that is much simpler to set up and maintain. Hubitat has built-in support for Sonos speakers for TTS. Works great!

500 usually means it canot reach some page.. looks like you are trying to a phone which may have extra steps.. like mentioned can you get it to work with a single echo.

also not sure what you are doing as your log messages don't look normal.. here are mine.. have your tried just the speak option from the device panel for the echo device?



looks like your using echo speaks not "Alexa tts"?

I use alexa tts sorry if i misled you ,,, i use this as it is initially easier to setup and you can copy the cookie from the web for your alexa account to get started.. i do have a nodejs job on my qnap server to automatically refresh the cookie.

once you get it set up you dont need any special switches both the built in notification app and rule machine motifications or any system notifications has a speech option so send any messages you want.. however, there are issues trying to send to multiple alexas at once.. amazon limits it.. if you need that use the "all alexa" device which gets around it.

here are what logs look like using the notifications

1 Like

Thanks guys.. I know when I am beaten. Just ordered a cheap Sonos one speaker.

1 Like

I've been trying to get this to work for a couple evenings now with no luck. It's non-functioning. Oh well. Hopefully tonesto comes up with something soon

1 Like

Do you need internet for the TTS to work with the Symfonisk speaker? I assume they are wi-fi right?

Thanks

The first time a TTS phrase is used, the hub fetches it from the cloud. But then it remains on the hub and subsequent uses of the phrase can be all local.

2 Likes

thanks for that details!!
I'm trying to setup a system for my sister and she is concerned that the internet may be down- causing echo dots to be useless. These speakers are 4x the cost of an echo dot so I'm thinking you have 1 of these centrally located and then dots everywhere else...
The question is whether anyone has come up with a solution to ensure they are all local...for example on bootup run a webcore or something and speak all the possible sayings? ...could it be that simple ?

Yes.

No.

Here's the only fully local TTS solution that currently integrates with Hubitat.

Thanks for that quick answer...I had been studying that ...and that seems probably do-able....

but being an engineer ....... why wouldn't forcing each phrase to be spoken on the IKEA after boot up (of course assuming internet active at that point) not work? Does it only cache the LAST spoken phrase?

Thx...do really appreciate the help : )

No need to re-run all of your TTS commands during a reboot of the Hub. The hub caches the audio files locally on its internal eMMC storage. So, as long as your TTS text is static for each announcement (i.e. do not embed a timestamp, date, or a value like temperature), the audio clips will all get cached locally.

Again, this only works using the Hub's built-in TTS engine with Sonos speakers.

This thread's solution, just like Echo Speaks, relies on the Amazon Cloud for all TTS announcements.

2 Likes

i have had echo's in 3 different locations for years and really never had an issue with missing notifications due to internet being down.. if it is down there are a lot more pressing issues.. you area eally looking for a problem waiting to happen.

Is Alexa TTS working? My Alexa stopped working since last two weeks. I getting refresh cookies notifications . Refreshed manually but after few hours, stopped working again.