Page 1 of 1

Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 12:15 pm
by ryanbuckner
I asked "Alexa, ask Indigo to read isBMWHome" and she replied -- "A variable Named isBMWHome does not exist in your Indigo server"

Here's my variable name:
Code: Select all
isBMWHome


Is there a preferred naming convention for Alexa to be able to recognize device and variable names in Indigo?

Update: Same response for variable "isDaylight"

Re: Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 1:08 pm
by jay (support)
https://wiki.indigodomo.com/doku.php?id ... a_variable

Her actual reply was: "A variable named is BMW home does not exist in your Indigo server" :wink:

Re: Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 2:25 pm
by ryanbuckner
jay (support) wrote:
https://wiki.indigodomo.com/doku.php?id=indigo_2021.1_documentation:plugins:alexa&#speaking_the_value_of_a_variable

Her actual reply was: "A variable named is BMW home does not exist in your Indigo server" :wink:


Right. So the solution is to rename the variables and use underscores?

I just renamed the variable "is_BMW_in_Garage" and got the response "I'm sorry, a variable named is BMW in garage does not exist in your Indigo server"

Re: Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 2:51 pm
by jay (support)
Are there any errors in the event log? Hopefully that will show what alexa is interpreting when you say that phrase.

Re: Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 2:58 pm
by jay (support)
I just tried it and it works:

Code: Select all
   Alexa                           request the value of variable 'is_BMW_in_garage'


But Alexa has a very hard time getting "BMW" right. Sometimes it thinks I say "is the mwn garage":

Code: Select all
   Alexa                           request the value of variable 'is_the_mwn_garage'
   Alexa Error                     I'm sorry, a variable named is the mwn garage does not exist in your indigo server. Please make sure you are using the exact name for the variable; spaces should be represented in your variable name with underscores.


I'd recommend using variable names that don't have abbreviations - maybe "is_car_in_garage" for instance. I've also noticed that slightly shorter names have less of a chance of being misheard by Alexa, though lots of factors determine what it hears.

Re: Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 3:36 pm
by FlyingDiver
Case sensitivity issue? Use is_BMW_in_garage not is_BMW_in_Garage.

Re: Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 4:36 pm
by jay (support)
FlyingDiver wrote:
Case sensitivity issue? Use is_BMW_in_garage not is_BMW_in_Garage.


No, we updated the API to do non case sensitive checks specifically for this reason.

Re: Alexa Reading Variables

PostPosted: Fri Jun 18, 2021 8:14 pm
by ryanbuckner
Alexa was able to give me the results of the request for [renamed] variable is_BMW_in_garage

but was unable to answer request for variable value of isBMWHome

Code: Select all
Jun 18, 2021 at 10:11:28 PM
   Alexa                           request the value of variable 'is_BMW_home'
   Alexa Error                     I'm sorry, a variable named is BMW home does not exist in your indigo server. Please make sure you are using the exact name for the variable; spaces should be represented in your variable name with underscores.
   Received INSTEON                "Kitchen Motion Sensor" on (button 1)

Re: Alexa Reading Variables

PostPosted: Sat Jun 19, 2021 2:23 pm
by jay (support)
I just tried is_BMW_home and it worked, so I'm not sure why it didn't work for you.

Re: Alexa Reading Variables

PostPosted: Sat Jun 19, 2021 4:42 pm
by matt (support)
ryanbuckner wrote:
Alexa was able to give me the results of the request for [renamed] variable is_BMW_in_garage

but was unable to answer request for variable value of isBMWHome

You must use underscores between the words.