[NO LONGER SUPPORTED] Ask Alexa

I think this is the fundamental disconnect and misunderstanding (not from you, but in general) when Alexa says they released a new capability…All they are doing is adding new commands into the native controls that Alexa can do without an innocation name. As you already pointed out, you were already able to control your stuff with Ask Alexa before you discovered the new features from Amazon. And by virtue that this is ‘another’ skill it precludes Ask Alexa from using it as Ask Alexa is already a skill…Not sure a catch 22 is the right term here, but to use this without an invocation name means a new skill needs to be written. Google Home is going through a similar identity crisis in that you also need to ‘open’ a skill to talk to it, and then it can have a different voice than the overall Google Home experience.

I have looked at writing a skill using the native commands, but unfortunately they are limited in what they can do and with creative naming, you don’t even feel you like you are opening a skill (i.e. Alexa, turn on the TV in the Media Room…where media room is actually the skill name).

Let me know if that helps at all or if I am just confusing the matter.

Ah right. I wasn’t aware that a skill with an invocation name couldn’t also tap in to the native controls. Didn’t realise it was one or the other. Makes sense now.

Getting creative with the naming etc…only goes so far unfortunately, and requires you and others in the house to remember certain ways of saying things, which negates the natural interaction.

Thanks for the explanation, appreciate it.

1 Like

Updated to 2.3.0:

I installed Ask Alexa today and while it interacts well with some devices, it won’t work properly with many of my devices.

If I ask Alexa to ask SmartThings to turn on or off a light (any light), Alexa just returns the status of the device (on/off, set to…, power being used, etc). If I ask Alexa to set one of those lights to 40%, it works. If I ask Alexa to set the same light to 0% it works and a status request returns a response that the light is off. If I then ask Alexa to ask ST to turn the light on, I again just get the status. If I use the Service Simulator on the AWS Dev Console to issue a “turn the kitchen light on,” it also returns the status of the light in the response column.

Here’s the log generated in response to the command, “Alexa, ask smartthings to turn the patio lights on”:

7:57:41 PM: debug The patio lights is off.
7:57:41 PM: debug Param: undefined
7:57:41 PM: debug Num: undefined
7:57:41 PM: debug Op: status
7:57:41 PM: debug Dev: patio lights
7:57:41 PM: debug -Device command received-
7:57:41 PM: debug --Begin commands received-

You can see the ‘Op: status’ operation in the fourth line. Weird.

I’m really excited about Ask Alexa and would love to get the “turn on/turn off” thing working properly. Any suggestions are appreciated.

And again, huge props to MichaelS. Everything about the Ask Alex is top notch.

This isn’t related to my problem but it was interesting to see that when I ask the status of my water main, Alexa hears this: “Dev: water maine.” Not sure why she thinks I said Maine, not main. Not a big deal as I can rename my sensors to something unambiguous, but Amazon may want to work on their algorithm.

Thanks for the comments…I have seen this before. First you must make sure you have the latest version and that all of your developer slots are populated with the proper names. However, part of the problem is probably the name of the devices. Amazon recommends three syllables, and ‘Patio Lights’ really is at the max.

I renamed one of my lights to patio lights, however, and it worked just fine with voice and with the simulator, so I go back to having the app at the latest version and ensure you have all of the slots populated with the proper devices, commands, etc.

8:32:27 PM: debug I am turning the patio lights on.
8:32:27 PM: debug Param: undefined
8:32:27 PM: debug Num: undefined
8:32:27 PM: debug Op: on
8:32:27 PM: debug Dev: patio lights

Send me a PM if you start sending screenshots, but it sounds like you are almost there…

Also, you water main (maine) could also be a symptom of the proper names not being in the slot However, if it is hearing MAINE, there is not much I can do about that. That is between you and Amazon :slight_smile: Simply rename it (and put the new name in the device slots) and you should be fine.

1 Like

Thanks, Michael. You were right; I had missed a bunch of commands in the LIST_OF_OPERATORS slot type. I updated the list and all is well.

I did notice that my smoke alarm isn’t included when I output a list of devices using the IDE. And if I add it to the LIST_OF_DEVICES card manually, it still isn’t recognized. I’m assuming that type of device isn’t supported at this time?

1 Like

Good to hear that helped…What brand is you smoke detector? I am curious why you would want to integrate it with Ask Alexa…I would assume if it was going off you would know it, and if it wasn’t you would know that as well and wouldn’t need Alexa to tell you about it. :slight_smile: Seriously, if this device does more than just detect it might be good to add it to the sensors section…I just need to know what brand it is and its capabilities (We would need to work together to get some screenshots of certain pages as I don’t have any of these devices in my SmartThings setup).

Let me know!

Did you get my response? I am still curious about the Smoke Detector use case. Let me know.

Welcome to another Friday update. I hope everyone’s hub update went well…I noticed everything go down yesterday, but after the reboot everything seems to be working fine. Can’t really tell a difference in performance, but that is the ‘long game’ so we will see.

In the world of Ask Alexa, we still wait for notifications. I use this function with Amazon deliveries, so I know HOW it works…I just wish I could enable it in my app. The good news is that from a structural standpoint the code doesn’t really need to change much to implement this. Just need Amazon to give us the ability.

While I wait for push, I have continued to look at my code and have found a way to ‘flip the script’ (as the kids say) on how my app processes input. For those who are slightly into code and logic programming, Ask Alexa categorizes items by type…Switches, Locks, etc. I am building an extension that takes the input and instead checking at the type first it looks at the function (on, off, lock, open, etc). Without getting into specifics of what the extension will do (it is pretty cool), this change in logic will allow me to do some interesting things. For example, instead of me having you choose switches, dimmers, colored lights, etc, you simply have one input called “switches” and the app will determine what it can do and allow.

I am being purposefully vague but have been told this will radically change how people interact with Ask Alexa. I may retrofit some of what I learn back into the main app, but for now this will be limited to the new extension. I estimate another month of development. Of course if Amazon releases push between now and then I will send an update out and then supplement that with the new extension. After that, I am at the end of my roadmap for extensions. If anyone has any ideas for further functionality let me know and we can work together to bring that to reality if it appears to be a mass used function.

Until then, enjoy the weekend.

3 Likes

It’s a First Alert 2-in-1 Z-Wave Smoke Detector & Carbon Monoxide Alarm. What I’ve found is that while I cannot use Ask Alexa to “Ask SmartThings about the Smoke Alarm,” I can include the device in a battery health report. And battery status is all I need so the report gives me the info I was looking for.

In case you’re curious, I get a “I had some problems finding the device you specified” response when I ask Alexa to “ask ST about the smoke alarm” even though I added it to the LIST_OF_DEVICES. Also, if I use Live Logging to output a LIST_OF_DEVICES, the smoke alarm isn’t included in the list that’s output.

Here’s a link to the smoke alarm I’m using: https://www.amazon.com/gp/product/B00KMHXFAI/ref=oh_aui_detailpage_o06_s01?ie=UTF8&psc=1

Btw, Ask Alexa is amazing and I’m having a blast using it.

Glad you are enjoying the app! I will constantly improve, so keep watching this area for updates.

Regarding the smoke detector, if I am reading your post correctly, you DO have them in SmartThings and you ARE monitoring the batteries? If they are in a voice report, then you don’t actually have to have them in your List of devices as the voice report name is what Ask Alexa is keying off of. However, I see your point…since the device doesn’t probably show up in any of the main menu items, you really can’t query it directly. That, quite honestly, is an easy fix…but before I put that in is the Voice report giving you exactly what you need or do you need to query it directly? I am thinking of putting in another selection into senors menu item and that would allow you to put in the Smoke detectors. I would need to work with you on the device type handler you are working with to get it into SmartThings.

PM me if you would like to do this or just let me know if the voice report is enough to get the information you want.

Yup, I’m able to get the battery level from a voice report so that’s all I need.

1 Like

You make a good point, however about devices that still have batteries but are not really controllable…May add that later. Thanks for the suggestion.

Michael, first of all thanks for the work on this, it’s an incredible piece of software. However I am having some issues making it work.

I followed your instructions on http://thingsthataresmart.wiki/index.php?title=Ask_Alexa. When I ask "Alexa, ask smartthings to turn off kitchen"i get the following errors:

  1. Alexa says “there was a problem with the requested skill response”
  2. I know you said the testing function on th Amazon server is not reliable but if it’s useful, Lambda Response is as follows: “Ask Alexa, Lambda Error. There Was an Error with the Alexa SmartApp Execution”. I pasted the Lambda Response below if it’s any useful
  3. If I type “version” in the “Enter Utterance” field I get “The remote endpoint could not be called, or the response it returned was invalid.”

cookierookie44 was having this issue on around 30th June but unlike him I couldn’t find a way to fix it. I made sure the ARN from Lambda is copied in the Amazon Developer Configuration and that the access token and application id from Ask Alexa app are copied in the Lambda function but it is still not working.

Anything else I can try?

Thank you in advance.

Lambda Response
{
“response”: {
“outputSpeech”: {
“ssml”: "There was an error with the Ask Alexa SmartApp execution. If this continues, please contact the author of the SmartApp. ",
“type”: “SSML”
},
“card”: {
“text”: "There was an error with the Ask Alexa SmartApp execution. If this continues, please contact the author of the SmartApp. ",
“title”: “Ask Alexa - Lambda Error”,
“image”: {
“largeImageUrl”: “https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/img/AmazonICO/warning.png
}
},
“speechletResponse”: {
“outputSpeech”: {
“ssml”: "There was an error with the Ask Alexa SmartApp execution. If this continues, please contact the author of the SmartApp. "
},
“card”: {
“text”: "There was an error with the Ask Alexa SmartApp execution. If this continues, please contact the author of the SmartApp. ",
“image”: {
“largeImageUrl”: “https://raw.githubusercontent.com/MichaelStruck/SmartThingsPublic/master/img/AmazonICO/warning.png
},
“title”: “Ask Alexa - Lambda Error”
},
“shouldEndSession”: true
}
},
“sessionAttributes”: {}
}

The most likely cause is your token/app id…this is actually the most common issue but very easy to fix. Let’s do this first…go to Settings and revoke/reset your token. You may have followed the directions properly but I have seen sometimes where the token needs to be reset.

From there, go to About and open the area for the app id and token…make sure something is actually there. Then proceed back to Settings and follow the instructions here to copy and paste the 3 lines necessary to get this operational. http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#Finalizing_The_Function_Code

Let me know if this works for you. I appreciate the kind words about the app!

Michael - I tried and you were right, it works now. I had not updated the third line of the settings with the “var url”, it was not entirely clear to me that needed updating from your instructions in the wiki and I hadn’t paid much attention to your note (!), in hindsight I can see it definitely does need to be updated as I am not based in the US…

Thank you very much for the quick response.

1 Like

No worries and glad you got it working. I actually found a way to auto-populate the Token and appID into the code, just need some time to implement it.

Thanks for the kind words and reaching out!

1 Like

I’ve had the Ask Alexa app running for a long time, I think over a year now, and just recently it has started to have issues with a Macro that i have called bed time it locks a door and then runs an automation for called Good night.

The rest of ask alexa app appears to be running, but this macro just beeps when i ask Alexa about it, or says i don’t have a video provider installed.

Anyone else having this time of issue?

Is this on a Show? The response as you described is coming from Alexa directly, not Ask Alexa. This means she is misunderstanding you. I recommend going to the Amazon app and seeing exactly what she is hearing. It may surprise you…And this happens all of the time as Amazon is always tweaking their voice recognition algorithms. Sometimes for the good, sometimes not so much.

Let me know what you find out…

Hey @MichaelS!

I’ve been successfully running the app for about a year but can’t get the macros to run successfully with added extensions.

At this moment, the app will successfully run modes and routines so everything appears to be configured correctly as I’ve recently updated all elements.

When I attempt to create an extension macro (specifically weather report) - I get the following error in the Amazon Service Simulator:

“The remote endpoint could not be called, or the response it returned was invalid.”

Any ideas??