Alexa Reading Variables

This forum is for discussing the official Alexa plugin which began shipping with Indigo 2021.1 Please do not post any questions about the Alexa-Hue Bridge plugin but rather post on that plugin's forum.
ryanbuckner
Posts: 1108
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

Alexa Reading Variables

Post 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"
User avatar
jay (support)
Site Admin
Posts: 18420
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Alexa Reading Variables

Post 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:
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
ryanbuckner
Posts: 1108
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

Re: Alexa Reading Variables

Post 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"
User avatar
jay (support)
Site Admin
Posts: 18420
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Alexa Reading Variables

Post by jay (support) »

Are there any errors in the event log? Hopefully that will show what alexa is interpreting when you say that phrase.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
jay (support)
Site Admin
Posts: 18420
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Alexa Reading Variables

Post 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.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
FlyingDiver
Posts: 7332
Joined: Sat Jun 07, 2014 10:36 am
Location: Southwest Florida, USA

Re: Alexa Reading Variables

Post by FlyingDiver »

Case sensitivity issue? Use is_BMW_in_garage not is_BMW_in_Garage.
joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177
User avatar
jay (support)
Site Admin
Posts: 18420
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Alexa Reading Variables

Post 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.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
ryanbuckner
Posts: 1108
Joined: Sat Oct 08, 2011 12:33 pm
Location: Northern Virginia
Contact:

Re: Alexa Reading Variables

Post 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)
User avatar
jay (support)
Site Admin
Posts: 18420
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: Alexa Reading Variables

Post by jay (support) »

I just tried is_BMW_home and it worked, so I'm not sure why it didn't work for you.
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
matt (support)
Site Admin
Posts: 21476
Joined: Mon Jan 27, 2003 1:17 pm
Location: Texas
Contact:

Re: Alexa Reading Variables

Post 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.
Image
Post Reply

Return to “Alexa”