[Deprecated] Ask Alexa 2.0.7

Thanks for the additional effort in finding the line number. I would restore everything back to 2.0.7a and first verify the switch issue is gone.

Next, check your main settings see if you have one of the global variables set up (specifically %temp%). This is almost identical to another issue that came up last week and we found out that a custom device handler was outputting the wrong output, causing an issue with the app…

Let me know if that solves it, and if so, what device you have in that position (or multiple devices).

Thanks for your patience while we troubleshoot this…we are getting closer!

Very strange…I have found that since I changed everything to strings I am going to need to do a bit different error trapping…

Not sure if the new update caused my Macro to give me the reply “there was an error with the requested skill response”

The Macro works and the routine runs. But I get that response from echo!

I increased the time out to 10 ? Ideas?

Other wise everything is working. And it’s a great app Michael !

Is there a way to allow “play” or “play the” command to “turn on” a switch in Ask Alexa skill? I was messing around with the old SONOS station switches I still had configured from the Alexa Helper app to allow Echo to accept commands both ways (Ask Alexa and Alexa Helper). Using the term “turn on” when the SONOS is already playing is a little weird.

As for playlists, I used this methos as I have only a couple pre-configured playlist that I associated to a switch for the Alexa Helper app.

Of course, if you do get to adding the “clunky” method you describe, then the above is not probably not required.

Thanks. This integration is great!

Actually, this is a pretty easy one to do… I just set this up to test it using a hue bulb as my switch.

  • create a new voice macro
  • macro type is “control (run/execute)”
  • configure settings / control these smartthings devices / switches (choose your device and the command to give to it, probably turn on).
  • save your macro and name it “Play {whatever your switch name is goes here}”
  • update your “list of macros” slot in the developer website
  • add this to the sample utterances file “DeviceOperation play {Device}”
  • click on save

Now do this…

  • Alexa, ask SmartThings to play the {device name}.
1 Like

Are you sure all items are firing within your macro? I would change the timeout to 60 and then see if you get the response. I would also look in the live logging. If it shows that Ask Alexa is giving a response to Lambda that means the app is ok.

I guess I am not understanding what you are attempting to accomplish…Why not just issue a play command from Ask Alexa to a connected speaker. That would work if I understand your goal…

Let me know if I am missing something.

This was a proposed temporary solution to playing specific playlists or stations on a SONOS. Changing the station after it is on is one example. Right now, unless I am missing something, I can only turn on/off, volume, next/previous track my SONOS speaker using Ask Alexa. I cannot change the stations once it is on or tell it to turn on to a specific station or playlist like I do/did with Alexa Helper.

Let me try Jason’s idea but I think I tried and Ask Alexa did not like it for some reason. I think it still recognized it as a switch even though I have a macro. Might be syntax.

For the most part you are correct…the latest version of Ask Alexa only allows for basic control over speakers (basically, all speakers, not just specifically Sonos). My concern was adding specific Sonos commands…which I can do in a future version if people really feel it is worth it. I have always found the SmartThings API clunky with Sonos…

You have ensure you update the utterance file to include the line I posted above, written just like it is above. If you don’t it will not work.

For those that are having issues with the newest version, be sure to update to 2.0.7b (just published). There was an error in the code. This is the one @jpark40 and I were tracking down above…Thanks to him for his patience…it was not his account but one of the optimizations I did in the latest version.

Enjoy!

2 Likes

I blew away the Lambra code and reloaded it and then I removed the Macro and rebuilt it. I get these results on the new Lambra code error message as I run the test.

{
“errorMessage”: “Process exited before completing request”
}

After rebuilding the Macro I was able to get it to work with the error response. I really don’t know why though.

Keep up the good work it really is getting to be a great addition to Alexa Thanks.

1 Like

Do you mean WITHOUT an error response? I assume it is working now?

I’ve gotten that error code in the lambda since day one… Still have it right now… It’s never caused me a problem.

It shows up when I click “save and test”

Which “error code” are you referring to? Where are you seeing it?

Edit: When you press the “Save and Test button” you are testing the functions within the Lambda environment. Doing this you should not get any errors as everything is trapped with the Alexa functions.

These are NOT good tests to run if you are having integration issues as it will only confuse the matter. The output is using staged data, and depending on the test, may have nothing to do with the Ask Alexa integration. Lambda code can be used for a variety of functions outside of the Alexa apps…Remember, Amazon sells this computing power to everyone for whatever they want to use it for…Alexa is just a small function in the grand scheme of things.

I would still be interested in what error you are seeing as the Alexa functions you should be testing against don’t produce errors on my side.

I believe they are referring to the Lambda console.

If you click “save and test” without properly setting test code within Lambda console itself then you will always get errors since the default test code I believe is just a simple Hello World type code which won’t work with Ask Alexa Lambda code. Simply clicking “save” is enough.

“save and test” only tests the Lambda code against a set of test codes inside Lambda console and not with the Ask Alexa Skill setup.

1 Like

Correct!!!

1 Like

Joe,

Outside of cleaning up any errors that come up in the current version, I am open to adding additional functionality for the app in the next version. Are you looking for the same functionality as was in Alexa Helper in that you could set up memory slots with pre-designated songs? That would have to be a specific function of the Sonos, but can manage the options around that specific device type.

Just let me know what functionality you want (via PM) and I can let you know what is possible.

Yep it’s working without error response thank you!