Jump to content

How To Guide: Getting Alexa to provide verbal responses


blueman2

Recommended Posts

Posted

This is something I'd really like to have. I can follow instructions and cut / paste code but I don't know much about programming. Is this something I should even try? I guess I have nothing to lose, the instructions in post #1 appear very detailed. Does anyone have an opinion as to whether or not someone with virtually no programming background should give this a try? 

Posted

Read through this thread and I'm confused how to get a variable converted to a word and then spoken.

 

I have the zwave lock status stored as a variable 1 or 0.

 

so I ask...  "Tell me front door status", and the reply is currently "The front door is 0".  The issue is getting the ISY variable of 0 (Unlocked) or 1(Locked) and translating it locked  or unlocked as a spoken word by Alexa.

 

I'm brand new at this.  Got my 994 up and running today.

 

Any suggestions on this would be greatly appreciated!

Posted

Read through this thread and I'm confused how to get a variable converted to a word and then spoken.

 

I have the zwave lock status stored as a variable 1 or 0.

 

so I ask...  "Tell me front door status", and the reply is currently "The front door is 0".  The issue is getting the ISY variable of 0 (Unlocked) or 1(Locked) and translating it locked  or unlocked as a spoken word by Alexa.

 

I'm brand new at this.  Got my 994 up and running today.

 

Any suggestions on this would be greatly appreciated!

 

In this case, do not put the variable in the network resource. Instead, create 2 network resources.  One for unlocked and one for locked.  Then run a program that triggers locked sentence network resource when variable is 1, and unlocked sentence network resource when variable is 0.  I only use variables in the resource itself when the values make sense, such as temperatures.   

Posted

I decided to change my intent from "Tell Me" to "Give Me" because I can no longer use the intent Tell Me for normal Amazon Alexa interfacing. Such as, Tell me a joke or more importantly from things like Wikipedia answers, Alexa will give a short answer and then suggests if I want to hear more details say "Tell Me more".  Of course I can not because if I say Tell Me more, it no longer works (development skill has priority).

 

Changing the intent did not work so well. My Amazon developer account shows the change and now calls the skill Give Me but it still responded to Tell Me. I wrote a program and in the Then section said to execute the network resources but nothing changed.

 

A few days later while trying to figure it out I noticed my skill ID was different then the original. Not sure why, I never deleted the Tell Me skill, I only changed the intent Tell Me to Give Me.

So anyway,  I changed the ID in my network resources saved and tested the resources with no faults. It still responded to Tell Me and not Give Me. I executed the network resources from a program and tried again. No luck.

 

Deleted the Skill from my Amazon developer account completely and now everything is back to normal. I figured I'd just get myself into trouble (Post 1). :)

  • Like 1
  • 5 weeks later...
Posted (edited)

Great thread. I am new to ISY and added Alexa, and finding s steep learning curve, but worth it, this is icing on the cake. I too am getting the dreaded TCP client request failed. [Net module Rule 1:400] I have checked and rechecked and done manual data entry to be sure, everything is ok... any ideas where the root problem likely lies when you get that error message? Thanks !

Edited by glacier991
Posted

Great thread. I am new to ISY and added Alexa, and finding s steep learning curve, but worth it, this is icing on the cake. I too am getting the dreaded TCP client request failed. [Net module Rule 1:400] I have checked and rechecked and done manual data entry to be sure, everything is ok... any ideas where the root problem likely lies when you get that error message? Thanks !

 

If you will post screen captures of the network resource setup, I can look over them.  Many people have run into this and every time there is a small error in something they had in their network resource config.  

Posted

Thanks Michel/Blueman... I will post a screen shot tonight.

 

I had read in the thread of others problems, issues with copying etc, and so carefully (I thought) typed it in, and carefully (so I thought) compared it... but as I grew tired I thought maybe I was chasing the wrong thing, wondering if maybe my portal (in which I had never used the networking portion before) might the issue, hence my prior Q, But now assured the problem is likely me, I will do as you suggest. Kind of you to offer your time to assist in this fashion.

Posted (edited)

btw update just posted on the 3PO-labs website about new stuff for developers to explore from Amazon in the Developers site. Along the lines of voacbulary extensions.

Edited by glacier991
  • 2 months later...
Posted (edited)

My spa status variable is 0 when off, 1 when on, and 2 when in cool down mode.  After it's been running, and I turn it off the variable changes to 2 but never goes back to 0 because the program says

Spa Heat Status - [ID 0037][Parent 0033]
If
        $SpaHeat > 0
Then
        Resource 'Spa Heat Status'
Else
   - No Actions - (To add one, press 'Action')

Because I don't fully understand "If $SpaHeat > 0" I have to ask, is there any harm in changing it to If $SpaHeat >= 0?  If it's doing what I think, I don't see why this wouldnt work.

Maybe eventually I'll get creative and figure out how to get alexa to say on, off, and cooldown based on the variable status.  Im thinking I could have three different network resources.  The program would run the appropriate one based on the variable.  The network resource would be hard coded with the proper text, and no variable.  Think that would work?

 

Thanks

Edited by n8huntsman
Posted (edited)

blueman2... great write-up. Thanks for doing this.

 

I am looking for some help with getting my setup working.

 

I'm on v5.0.9 and following your instructions a "test" of the network resource yields:

 

HTTP/1.1 200 OK
Date: Sat, 15 Apr 2017 17:02:09 GMT
Content-Type: application/json

Content-Leng

 

However, when I say "Alexa tell me inside temperature" she responds with "There is no response for this input".

 

I have attached a screenshot of my network resource if this helps... 

 

Any thoughts on what I am doing wrong?

 

post-2761-0-55771100-1492277223_thumb.jpg

Edited by GMD99
Posted (edited)

Try either running the network resource or the programs then statement manually then retest. Also check the Alexa app to see what she heard. Make sure it matches your utterance.

Edited by n8huntsman
  • Like 1
Posted

The first thing that jumps out at me is that *Mode* needs to be set to C-Escaped give that a try.

 

No... in the thread, blueman2 acknowledges that Raw Text works and keeps the body in a readable format. As an aside, I did try it anyway and I got the same result!

Posted

No... in the thread, blueman2 acknowledges that Raw Text works and keeps the body in a readable format. As an aside, I did try it anyway and I got the same result!

 

I am going to assume your program uses a *State Variable* if so the next step is to use a (IF) conditions that uses >=. Give that a try and report back success / failure.

Posted

Try either running the network resource or the programs then statement manually then retest. Also check the Alexa app to see what she heard. Make sure it matches your utterance.

 

Hmmm... I'm not sure what you are suggesting! I haven't created the programs yet. I manually populated the variable. I understand the "test" function to be running the network resource the same way it would run if called from a program.

 

The second part of your comment is interesting... Alexa stumbles on the "Tell me" part... here is what she shows me:

 

There is no response for this input Tell Me

There is no response for this input

{"intentName":"GETRESPONSE","variables":null,"state":null}

Posted

 

Hmmm... I'm not sure what you are suggesting! I haven't created the programs yet. I manually populated the variable. I understand the "test" function to be running the network resource the same way it would run if called from a program.

 

The second part of your comment is interesting... Alexa stumbles on the "Tell me" part... here is what she shows me:

 

There is no response for this input Tell Me

There is no response for this input

{"intentName":"GETRESPONSE","variables":null,"state":null}

 

 

Running the network resource will not send the current value to the cloud hosted service. Only a program will do so and hence why I suggested you create a program and confirm it uses the >= to ensure it fires off the *State Variable*.

 

Of course you need a State Variable to obtain and track what ever value you wish it to know.

Posted

 

 

I am going to assume your program uses a *State Variable* if so the next step is to use a (IF) conditions that uses >=. Give that a try and report back success / failure.

 

 

 

Right, if the variable is zero the program never runs. Running the then statement manually solves that. So does changing to >= 

 

I am using a state variable and I gave the variable a value of 74.5 manually, so this should avoid the zero value issue.

 

However, as my last post seems to point to, Alexa doesn't seem to understand the "Tell me" command!

Posted

I am using a state variable and I gave the variable a value of 74.5 manually, so this should avoid the zero value issue.

 

However, as my last post seems to point to, Alexa doesn't seem to understand the "Tell me" command!

 

Hello GMD99,

 

For the benefit of others and brevity I am going to quickly call out the basics that need to be in place.

 

- State Variable

- Network Resource

- Program that is called by a State Variable and initiates a network resource update to the cloud service.

 

Having said this has the *Tell Me* phrase been accurately employed in the AWS Service? 

Posted

Running the network resource will not send the current value to the cloud hosted service. Only a program will do so and hence why I suggested you create a program and confirm it uses the >= to ensure it fires off the *State Variable*.

 

Of course you need a State Variable to obtain and track what ever value you wish it to know.

 

Ok I will try doing this... but am I wrong in my understanding that the "test" function doesn't send the current value to the cloud hosted service? In any other use of the network resources I have always used the "test" to see if the resource actually works! Isn't "test" the same as actually running the resource?

Posted

Ok I will try doing this... but am I wrong in my understanding that the "test" function doesn't send the current value to the cloud hosted service? In any other use of the network resources I have always used the "test" to see if the resource actually works! Isn't "test" the same as actually running the resource?

 

Technically, you're correct in so far as the Network Resource is supposed to do X vs Y. The problem I am trying to address and let you know is currently the AWS (Amazon Echo) portal service has no value to reference. So because of this you need to initiate either manually the IF / Then section of the program so that value is then sent up to the AWS Cloud Hosted service to *Know* the value.

 

The AWS is very much a dumb computer simply waiting for X value to arrive so it can invoke Alexa to speak Y value(s).

 

Also, as as an aside if you so choose to use a *Integer* variable for what ever reason you need to have something in the (IF) statement that will cause that Integer to be updated consistently.

 

Don't need to ask how I know this besides the plain obvious reason I was scratching my head for hours waiting for X to happen and it never did!

 

Doh . . .

Posted

Technically, you're correct in so far as the Network Resource is supposed to do X vs Y. The problem I am trying to address and let you know is currently the AWS (Amazon Echo) portal service has no value to reference. So because of this you need to initiate either manually the IF / Then section of the program so that value is then sent up to the AWS Cloud Hosted service to *Know* the value.

 

The AWS is very much a dumb computer simply waiting for X value to arrive so it can invoke Alexa to speak Y value(s).

 

Also, as as an aside if you so choose to use a *Integer* variable for what ever reason you need to have something in the (IF) statement that will cause that Integer to be updated consistently.

 

Don't need to ask how I know this besides the plain obvious reason I was scratching my head for hours waiting for X to happen and it never did!

 

Doh . . .

 

I'm still confused on this... if my THEN statement is simply calling the same network resource that I tried "test" on then why do I need a program at this stage? I fully understand the need to use a program, going forward, to make sure that Alexa is aware of temperature changes but I cannot see a need for it now... unless running it from a program does something different than the "test" function!

 

As an aside, I ran it from a program and I still have the same result. I think that somehow Alexa hasn't picked up the "tell me" skill!

 

I am using a "state" variable. You can see that in my network resource ${var.2.20}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...