Alexa - -Unsolicited TTS

My development hub has slowed to a crawl... trying to restart it now...

I was not clear, sorry.. isn't this shell script just a tutorial on what to send to alexa.google? Cant just the text to speech be trimmed down and put into an App like you did for pushover and entirely eliminate the Pi ?

Exactly like what was happening to me lol.. At least it wasn't just me.

13 10 are the default term chars, they shouldn't be required within the term char option.

Possibly, but that is beyond my skill level. This technique to get Alexa to perform TTS is not using a published API from Amazon. So, you need to emulate an interactive browser session, I believe. Not sure if this is possible directly from the HE hub.

Pushover was using a very nice published Web-API, so it was much simpler.

strange because i ended up having to manually append cr and lf at the end of my string before sending it otherwise the envisalink wouldn't respond.

How did you append CRLF to the ends of your strings? Did you simply add a "\r\n" to end of each line?

cmdToSend = cmdToSend + "\r\n"

1 Like

It seems to be getting hung up on opening the telnet session. Need to get some sleep. Hopefully someone can figure this out. I have updated my code in the earlier post with my latest version.

@bravenel, @mike.maxwell, @patrick, @chuck.schwer

I am hoping someone more familiar with the Hubitat Telnet Driver Capability will please chime in to help troubleshoot why connecting to a Raspberry Pi (Raspian Stretch, using telnetd) is not working? And, it seems like the continuous attempt to connect to the RPi eventually causes the Hubitat Hub to slow down to a crawl, requiring a reboot. Fortunately, I am using my development hub which prevents the family from being impacted.

This post from above has my current test driver code. I am hoping I am just missing something obvious.

I will continue to debug this driver after I get home tonight.

Thanks,
Dan

I just wanted to chime in that my experience was very similar to @ogiewon. I eventually gave up in frustration convinced I was completely messing something causing my hub to lock up over and over.

add this, and see if it sheds any light...

def telnetStatus(String status){
    log.debug "telnetStatus- error:${status}"
}
3 Likes

Thanks Mike - I'll give it a try later tonight and will let you know what I find.

2 Likes

Pretty sure we found the issue, we're not dealing with the unix telnet login prompts correctly, @chuck.schwer is working on a fix...

5 Likes

Thanks Mike. I was wondering if the username and password prompts were not consistent on all platforms and if that could cause the issue. Sounds like it. I'll wait for the fix from Chuck.

Once again, great support from the Hubitat Team! :+1:

3 Likes

@chuck.schwer
Has a solution been found this?

Just been trying to get this up and running...

I've followed the instructions about extracting the cookie data, but get a "cookie expired" message every time I run the script.

Any ideas?

Cheers!

[20:18:59] pi@raspberrypi:~/home-automation/alexatts/ha-alexa-tts$ ./alexa_remote_control.sh
cookie expired, logging in again ...

Use firefox

Figured it out, I needed to change the script to point at amazon.co.uk (rather than .com)

1 Like

I'm seeing about a 10-12 second delay from the command being executed to the sound being played. Is that "normal"?