Page 1 of 2
Alexa retrieves variable value but fails - SOLVED
Posted:
Thu Sep 30, 2021 6:12 pm
by ryanbuckner
Every few time I try to ask Alexa for the value of a variable , I get "I'm having trouble accessing your Indigo Server Skill Skill right now" . But it appears to retrieve the value. Here's. what's in the debug:
Sep 30, 2021 at 8:05:45 PM
Alexa Debug variable_actions API call received
Alexa request the value of variable 'forestville_lunch_tomorrow'
Alexa Debug reply:
{"speak_string": "Cheese Pizza or Pepperoni Pizza or PB&J Biteable or Yogurt Biteable", "status": "success", "variable_name": "forestville lunch tomorrow", "variable_name_mangled": "forestville_lunch_tomorrow"}
Rather than speaking the value, it said "I'm having trouble accessing your Indigo Server Skill Skill right now"
Re: Alexa retrieves variable value but fails
Posted:
Fri Oct 01, 2021 8:52 am
by jay (support)
Unfortunately, that error is generated by Alexa. Since we're returning the appropriate response (as per the debug reply above) I have no insight into why Alexa is returning an error. If you immediately say exactly the same thing again, does it work? If so, and you get two identical debug replies like above, then there really isn't anything we can do about it since it's totally on the Alexa side.
Re: Alexa retrieves variable value but fails
Posted:
Fri Oct 01, 2021 9:06 am
by jay (support)
I was able to find the Amazon logs for processing the event specified above. It shows that everything went correctly from our skill's side:
- Code: Select all
[DEBUG] 2021-10-01T00:05:45.145Z XXXXXXXXXXXXXXXX GetVariableValueIntent.handle() called...
[DEBUG] 2021-10-01T00:05:45.145Z XXXXXXXXXXXXXXXX locale: en-US
[DEBUG] 2021-10-01T00:05:45.145Z XXXXXXXXXXXXXXXX variable name: forestville lunch tomorrow
[DEBUG] 2021-10-01T00:05:45.145Z XXXXXXXXXXXXXXXX payload:
[DEBUG] 2021-10-01T00:05:45.145Z XXXXXXXXXXXXXXXX {
"variable_name": "forestville lunch tomorrow",
"locale": "en-US",
"action": "get_variable_value"
}
[DEBUG] 2021-10-01T00:05:45.864Z XXXXXXXXXXXXXXXX reply:
[DEBUG] 2021-10-01T00:05:45.864Z XXXXXXXXXXXXXXXX {
"status": "success",
"variable_name_mangled": "forestville_lunch_tomorrow",
"speak_string": "Cheese Pizza or Pepperoni Pizza or PB&J Biteable or Yogurt Biteable",
"variable_name": "forestville lunch tomorrow"
}
END RequestId: XXXXXXXXXXXXXXXX
This shows the entire event flow from our skill's perspective: we get the request for a variable value with the given name, we format that into the request that gets passed to the Alexa plugin, the plugin replies (as seen in your debug log), our skill (hosted on Amazon's servers) receives the reply and returns the value of "speak_string" to Amazon. Nowhere do we show any errors, so I don't know why you wouldn't have gotten the appropriate response. I wish I had found some errors that we could address...
Re: Alexa retrieves variable value but fails
Posted:
Fri Oct 01, 2021 10:44 am
by ryanbuckner
I'd say it works 75% of the time when trying the same thing right away
Re: Alexa retrieves variable value but fails
Posted:
Fri Oct 01, 2021 2:04 pm
by jay (support)
And you always see the reply debug in the log? If you do, then the problem will almost certainly be on Amazon's side. If, however, you say something and you get an error but no debug logging, then the problem could be that your reflector connection is having an issue. I would expect there to be errors in the Event Log however that would indicate that there were some kind of issue with the reflector or any part of the flow on the Indigo side.
Re: Alexa retrieves variable value but fails
Posted:
Mon Oct 04, 2021 7:10 am
by ryanbuckner
I've tried renaming variables and action groups. I think I'm giving up on the Alexa feature for a while.
Re: Alexa retrieves variable value but fails
Posted:
Wed Oct 13, 2021 6:30 am
by ryanbuckner
Tried again today ... same result: "Having trouble accessing your Indigo skill skill"
- Code: Select all
Oct 13, 2021 at 8:27:54 AM
Alexa Turning on debug logging
Alexa Debug variable_actions API call received
Alexa request the value of variable 'lunch_today'
Alexa Debug reply:
{"speak_string": "Baked Chicken on Bun or PB&J Biteable or Yogurt Biteable", "status": "success", "variable_name": "lunch today", "variable_name_mangled": "lunch_today"}
Re: Alexa retrieves variable value but fails
Posted:
Wed Oct 13, 2021 1:14 pm
by jay (support)
It doesn't like the & in the string value. Change it to "and" and it will work.
Re: Alexa retrieves variable value but fails
Posted:
Thu Oct 14, 2021 6:36 am
by ryanbuckner
The '&' is pulled from the API for Nutrislice. I can try to change it in the script.
That night be why Alexa has no problem pulling the breakfast_today variable but fails on the lunch_today variable. Damn PB&J Bites.
- Code: Select all
Oct 14, 2021 at 8:32:26 AM
Alexa Debug variable_actions API call received
Alexa request the value of variable 'breakfast_today'
Alexa Debug reply:
{"speak_string": "Apple Cinnamon Muffin Top or Cheerios", "status": "success", "variable_name": "breakfast today", "variable_name_mangled": "breakfast_today"}
Oct 14, 2021 at 8:32:58 AM
Schedule 1st Floor Bathroom on Motion - OFF (delayed action)
Sent INSTEON "1st Floor Bathroom Light" off
Alexa Debug deviceUpdated: 1st Floor Bathroom Light
Alexa Debug original device type: RelayDevice, updated device type: RelayDevice
Alexa Debug IndigoDeviceEndpoint.__init__ called with device: 1507246897 (1st Floor Bathroom Light)
Alexa Debug IndigoDeviceEndpoint.__init__ called with device: 1507246897 (1st Floor Bathroom Light)
Alexa Debug variable_actions API call received
Alexa request the value of variable 'lunch_today'
Alexa Debug reply:
{"speak_string": "Macaroni & Cheese or PB&J Biteable or Yogurt Biteable", "status": "success", "variable_name": "lunch today", "variable_name_mangled": "lunch_today"}
Re: Alexa retrieves variable value but fails
Posted:
Thu Oct 14, 2021 6:42 am
by ryanbuckner
It worked!!
- Code: Select all
foodlist.append(item['food']['name'].replace("&", " and "))
returned:
- Code: Select all
Oct 14, 2021 at 8:41:25 AM
Alexa Debug variable_actions API call received
Alexa request the value of variable 'lunch_today'
Alexa Debug reply:
{"speak_string": "Macaroni and Cheese or PB and J Biteable or Yogurt Biteable", "status": "success", "variable_name": "lunch today", "variable_name_mangled": "lunch_today"}
Re: Alexa retrieves variable value but fails - SOLVED
Posted:
Thu Oct 14, 2021 11:12 am
by jay (support)
I think you could also use the
html module:
- Code: Select all
import html
foodlist.append(html.escape(item['food']['name']))
That would generate "
Macaroni and Cheese or PB&J Biteable or Yogurt Biteable" which appears to work as well. It might also catch other things that might cause hiccups.
Re: Alexa retrieves variable value but fails - SOLVED
Posted:
Thu Oct 14, 2021 3:36 pm
by ryanbuckner
It generated Macaroni & Cheese or PB&J Biteable or Yogurt Biteable
Appears to work well. I'll go with this.
Re: Alexa retrieves variable value but fails - SOLVED
Posted:
Sat Feb 10, 2024 2:09 pm
by mgolden50
I'm having similar problems getting the Alexa plugin getting Alexa to speak,
The variable name is Announcement. The variable content is <The patio door, is not locked.
Alexa is linked to Indigo. But her response is "Sorry. Im having trouble accessing the Indigo Skill. skill right now. Try again later.
This has been happening for two days worth of attempts
Here's the debut output
Alexa Debug variable_actions API call received
Alexa request the value of variable 'announcement'
Alexa Debug reply:
{"speak_string": "<The patio door is not locked.", "status": "success", "variable_name": "announcement", "variable_name_mangled": "announcement"}
Re: Alexa retrieves variable value but fails - SOLVED
Posted:
Sat Feb 10, 2024 2:16 pm
by mgolden50
Also tried a different variable name.
Got this
Alexa Debug variable_actions API call received
Alexa request the value of variable 'speak_this'
Alexa Debug reply:
{"speak_string": "<The patio door is not locked.", "status": "success", "variable_name": "speak this", "variable_name_mangled": "speak_this"}
Re: Alexa retrieves variable value but fails - SOLVED
Posted:
Sat Feb 10, 2024 3:00 pm
by jay (support)
Have you tried it without the < sign at the beginning of the string? I suspect that might be the problem.