Alexa TTS (Text-To-Speech) [and more] plug-in for Vera

Two stage verification is now included.

I will be back to add other features in the coming weeks. I’ll probably try to first implement a cookie backup strategy, then add the ability to execute any command. If anyone wants to beta-test this on openluup, just let me know.

3 Likes

that’s great. I have writtten an automate flow that will automatically forward the one time pass code to vera. The flow is not fully tested yet, as i am waiting for my cookie to expire. Once fully tested i will upload a copy to the automate community, and link to it here.

@therealdb, I have just installed open luup on my android box and would love to test alexatts. what files do i need to install.

Install jq package and the plugin and you’re good to go.
It will adapt and use the advanced version of the script. Easy Pease :blush:

ok i have
installed jq
uploaded files to /etc/cmh-ludl/
created device
folder create by plugin called VeraAlexa
in that folder is the remote.sh script and i coppied the cookie file to that location.

when i test i get nothing.

On openluup the path is different. Take a look at the script, I’m now out and can’t be more precise.

The bash script gained some new features lately :tada::rocket:

  • sync’ed announcements for groups: tested on my 6 devices, it’s impressive :scream:
  • rich voice options, with the ability to pause, change emotions, etc
  • sounds (chimes, cars, dogs and much more)

I will incorporate these soon, as I’ll get a real benefit from them (ie: repeat announcements with one commands, instead of a queue). Unfortunately, this needs Jq, and it’s not offered in the plain text version.

3 Likes

Does this work for ALL? Should be easy to hear :smiley:
C

You’d use everywhere, since all is cycling all the devices, but yes, it works!

2 Likes

Ok i am still not getting this to work on openluup.
It downloads the remot.sh script and .alexa.login.
but if i upload the cookie it deletes it.

where is log in the altui?

I got excited then but I have a Vera Plus not OpenLuup :roll_eyes:

Jq needs to be added by the Vera people?

Damn, just saw this. Another reason to move to OpenLuup perhaps. Another Raspberry Pi in the house! :smiley:
C

Anyone running into this issue, every time I upload the new updated files from GitHub I lose TTS. Ive tried updating the cookie file, inputting a new OTP code and still can’t get TTS to work. Last time I uploaded the new files I had to create a new device to get Alexa to work, anyone recommend anything else?

50 02/22/20 10:14:27.532 luup_log:632: VeraAlexa(executeCommand@235): Response from Alexa.sh: “cookie does not exist. logging in … ERROR: Amazon Login was unsuccessful. Possibly you get a captcha login screen. Try logging in to https://alexa.amazon.ca with your browser. In your browser make sure to have all Amazon related cookies deleted and Javascript disabled! (For more information have a look at /storage/alexa/.alexa.login) To avoid issues with captcha, try using Multi-Factor Authentication. To do so, first set up Two-Step Verification on your Amazon account, then configure this script (or the environment) with your MFA secret. Support for Multi-Factor Authentication requires ‘oathtool’ to be installed.” <0x70837520>
50 02/22/20 10:14:27.533 luup_log:632: VeraAlexa(sayTTS@275): Executing command [TTS]: “export EMAIL="" && export PASSWORD="***" && export SPEAKVOL=50 && export TTS_LOCALE=en-CA && export LANGUAGE=en-CA && export AMAZON=amazon.ca && export ALEXA=alexa.amazon.ca && export TMP="/storage/alexa" && /storage/alexa/alexa_remote_control_plain.sh -e speak:Hello_from_Vera_Alexa -d "Arman’s Sonos One"” <0x70837520>
50 02/22/20 10:14:27.533 luup_log:632: VeraAlexa(sayTTS@280): Queue will be checked again in 2.302 secs <0x70837520>
50 02/22/20 10:14:27.534 luup_log:0: ALTUI: Evaluation of lua code returned: nil <0x70837520>
50 02/22/20 10:14:29.102 luup_log:632: VeraAlexa(checkQueue@192): checkQueue: 632 - 0 in queue <0x72734520>
50 02/22/20 10:14:29.102 luup_log:632: VeraAlexa(checkQueue@196): checkQueue: 632 - queue is empty <0x72734520>

Yep. I have under a private repo for devs, and it’s working on Vera too. It will be published on 7.32, so it should be soon, maybe weeks.

Things I tried:

  • Male voice mixed with female one
  • TTS in different (or mixed) languages (hooray for my 2nd echoes not supporting Italian)
  • whispered mode, to scare the wife :slight_smile:
  • breaks
  • say-as (for units, numbers, etc)
  • everything else supported by SSML
  • sounds
2 Likes

@therealdb
The otp works fine in vera
but

In openluup it appends the device id and not the otp

Ouch. Let me test it again tomorrow. I should have time to release the new version with sync’ed announcements. If you can, please send some logs via PM.

local password = getVar(MYSID, "Password", "", masterID) .. getVar("OneTimePassCode", "", masterID)

should be.

local password = getVar(MYSID, "Password", "", masterID) .. getVar(MYSID, "OneTimePassCode", "", masterID)

and i believe this should be devNum

initVar(MYSID, "AlexaHost", "pitangui.amazon.com", devNum)
	initVar(MYSID, "AmazonHost", "amazon.com", devNum)

	-- OTP
	initVar(MYSID, "OneTimePassCode", "", masterID)
1 Like

ok i am up and running with VeraAlexa running on debian(android) OpenLuup.

Just let me know what you would like me to test.

edit/
may be add a defaultRepeat value to.

There is an error in latest version should be fixed shortly.

ah, was wondering why there was a 632 (device ID) at the end of my password. Thanks for the heads up.