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

I have a spare Vera Edge I could try it on.

My Vera Plus is my main unit.

When you say “dev repo” how would I go about doing this ?

Are you referring to beta firmware for Vera or something else?

Thanks

i use node-red with alexaremote2 and ewelink nodes to control wifi devices from vera, i can also trigger routines. I use therealdb’s http switch to trigger from vera. I also have the http switch update from node-red if it is turn on/off via other sources

1 Like

There’s a dev repo with packages not available in the current repo. In theory this will not harm your device, but it depends. I still need to update the code, since it’s using the full code only on openluup now.

I have been asking Sorin about the ability for Vera devices that are exposed to Alexa to be able to be used to trigger Alexa routines and he informed me that the Alexa security registration and upgrade should be ready Q1 this year. This will bring along many addition options also.

2 Likes

Oh, great news. Right now, official skill is missing a lot of things and I truly hope the support for what’s missing will eventually make this plug-in less useful.

ive been looking for the .Alexa.devicelist.json file and can’t find it. Ive checked both tmp folders and Alexa folders

If you use winscp, be sure to show hidden files.

using rbrowser on Mac… hidden files is greyed out. Will try figuring out why

If you’re on a mac, just use ssh from a terminal

ls -a

C

What are you guys doing it you only want to hear the TTS announcements if Vera is in House Mode - Home ?

I have a scene that turns off my garden festoon lights off every night at midnight. It also sends a TTS announcement to Alexa saying “Schedule turning off Festoon lights”

If I am still awake at midnight and Vera is still in “Home” mode, then its OK for it to send the TTS announcement to Alexa.

However if I have already gone to bed and Vera is now in Night mode, then I don’t want it to send the TTS announcement and disturb me.

I’ve just tried this code I put together and it seems to work and will only send the TTS announcement to Alexa when the Vera House Mode = 1 aka its in “Home” mode

local mode = luup.attr_get "Mode" 
if (mode == "1") then
luup.call_action("urn:dlna-org:serviceId:DLNAMediaController1", "Say", {Text="Schedule Turning off the Festoon Lights", Volume=50, GroupZones="ALL", Repeat = 1}, 396)
else end

The numbers for the house modes are as follows:

1=Home
2=Away
3=Night
4=Vacation

So if Vera is in Away, Night or Vacation modes then the TTS announcement would not be sent out to Alexa etc.

Well if I’m not home I won’t hear it :wink:

Reactor can let you specify mode in your conditions but I guess you’re doing it manually?

C

Yes indeed haha.

However if I am in bed and Vera is in NIGHT mode, then I would still hear the TTS announcement.

I’m using a mixture of PLEG and Vera’s native scenes.

I’ve not looked at using Reactor yet, as it took me a long time to learn PLEG and I have some quite complex logic setup using it. I manage to bumble through things using PLEG.

For this example of these garden lights turning off, I have a schedule setup in PLEG to run every night at midnight.

The condition that has to be met is:

sFestoonLightsOff and FestoonLights_Status==1

Meaning my schedule has run and the lights are turned on already.

My action in PLEG then turns off the lights and I have this new LUA code also in the PLEG action, to only send out the TTS to Alexa if Vera is still in HOME mode.

1 Like

Fair call on Night mode. I, personally only use Home and Away.

C

I have a function I call from every scene and it’s not sending the tts command while house mode is away or night. Plus, I change volume based on time of day/day of week. While 50 is perfectly fine during the day, it will scare wife and kids while I’m up at 8 am and they’re still in bed - even if the house is big and they’re really away from the echo in the living room, you can easily hear it in the silence of an early morning.

Thanks Mate, yours are the first instructions I found that worked for me, much appreciated.

PS, as an Aussie im using:

AlexaHost: alexa.amazon.com.au
AmazonHost: amazon.com.au

1 Like

That’ll come in useful for someone. Glad it’s working!

C

1 Like

Btw, I assume speaker groups arent currently supported? I tried targeting one with no success.

Don’t think so, but what does your .alexa.devicelist.all contain?

C

So stupid question, where do I find that? :man_facepalming:

No, groups are not working. I found someone using the scripts to get all the devices in a group and cycle them. But you can easily do it yourself. I can code something special for groups, so you can have the announcement on different devices and repeat them in interval, but you will still not get them synced. It’s simply not supported at the moment.

Cookie should be auto-renewed when you got it this way, but as always with hacks, YMMV.