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

Can anyone think of a way to send a notification when the log in expires?

local res = luup.call_action("urn:dlna-org:serviceId:DLNAMediaController1", "Say", {Text = "message", Volume = 50, GroupZones="Lounge", Repeat = 1}, 1333)

will return
0 if good
or
401 if bad

not sure what is returned if login fails, as i am logged in.

2 Likes

This, and look at LastResponse variable.

1 Like

How would you guys recommend setting this up? I was thinking of having daily a empty TTS command sent to check login status, then if the ‘LastResponse’ or ‘Local_Res’ was bad, id trigger a push notifications to re-login.

I would go with @therealdb idea.

Set up a reactor to monitor the last response
a good response is

urn:bochicchio-com:serviceId:VeraAlexa1 / LatestResponse = sending cmd:speak:there-is-somebody-at-the-door to dev:Lounge type:A5S6BH2HU8VAYF serial:G090LF37759830C6D customerid:ABY6GLLXT9UMQ

if you use reactor devise spy you could see the changes . I’m sure the fail login messge appears there to

I’ll add a special variable just to get login status. I’m done with my special blinds projects, so I should have more time to add new features.

I just pushed a new version to GitHub - soon to the marketplace.
Here’s what’s new:

  • Sonos and DLNA services are now removed (you can remote the S_VeraAlexaSay1.xml and S_VeraAlexaVolume1.xml, because they will cause conflicts with other plug-ins - thanks to @rigpapa for pointing it to me). The service will be OK if you have the plug-ins installed, or you could switch to the proprietary one. I will update the doc soon.
  • New feature to populate CommFailure variable for status. It should be 0 when everything is OK. It’s a brand-new feature, so YMMV.

I will soon add Last Alexa and prepare for a future, I don’t know when, 7.32 fw version that will finally add support for jq. If support will not come soon, I’ll probably embed the lib and give instruction on how to manually install it for anyone who wants to experiment and don’t want to wait for the new firmware.

4 Likes

Hopefully we get 7.32 soon, been waiting for LastAlexa for so long

My TTS stopped working a while ago, only just looking at it now. I have updated to the latest version from Github on my Vera Plus.

After updating the cookie I was able to get TTS working again using a http command sent to Vera via the web browser.

However none of my Vera scenes were speaking their TTS announcements.

Looks like I will have to reconfigure all the Vera scenes and also PLEG logic actions that send TTS announcements.


Just a heads up to others wondering what’s going on.

Note: The Configured variable on my Alexa TTS device is set currently as 1 however the TTS still works. Not sure why lt’s not 0 though.

I also appear to have two variables with the same name “AnnouncementVolume”

@therealdb has removed the sonos and DLNA serviceID
the serviceID will be “urn:bochicchio-com:serviceId:VeraAlexa1”, if i am correct.
you will need to update your luup actions etc.

edit
didn’t see that you had that in the image, any way its above for anyone who wants to copy and paste.

the anouncement variables will have different serviceId’s

1 Like

Note: This still works in the browser though.

With serviceId:DLNAMediaController1

http://192.168.1.100:3480/data_request?id=action&DeviceNum=396&serviceId=urn:dlna-org:serviceId:DLNAMediaController1&action=Say&Text=say-this-line

Oddly enough the Sonos1 service ID still works for me after the update and deletion of the files. Maybe because I have the Sonos plugin installed.

Isn’t the new variable to check for login CommFailure not Configured?

My bad I read it wrong, yes you are right.

image

Probably, I don’t have the Sonos plugin installed.

I do have the DLNA plugin installed however.

This worked for me after updating, cheers.

Yep. This will only work if you have the corresponding plug-in installed. I encourage to move to the native endpoints. I’m sorry for this breaking change, but my knowledge about Vera’s features is still not complete and I don’t want to break anyone’s plugin.
That’s why it’s a beta, after all.

1 Like

Yep, calling in code and via http should still work. Reactor, pleg and advanced scene editor should break.

I just pushed a new version, with small fixes and updated docs.

2 Likes

Hello
Sorry to bring up an old topic but I have your problem too.
How did you solve it?
I can see that the order is being sent to Alexa I can’t hear anything.
what can be done?
I also did not see the alexa.login file.
I made an update in the SH file for the user agent but I can’t hear a voice from Alexa.
Attaches some files here for reference.


Thanks for the helpers. ‏‏3