[RELEASE] Ask Alexa

Without a Sonos you would have to use some other speaker technology else that integrates with SmartThings. There are a few out there, you should look above to this posting ([RELEASE] Ask Alexa) where a user (Brad @bwyble) that did this with some rather inexpensive speakers that do Alexa AND TTS…so you can have one unit that does ALL of the talking.

Merry Christmas!

2 Likes

have I said already that Ask Alexa rocks?

Trying to tell my AV receiver to set the volume to a number.
So Ask Alexa -> run Marco with parameter -> webCore -> HTTP call to Onkyo.
The last part works.
However, whenever I try to say anything like:
“Alexa, tell smartthings to Set Level to 40”
everything is recognized well except that the parameter is exported into MNum and not into xParam as Ask Alexa prefers.

So Ask Alexa doesn’t get the parameter to pass to WebCore.
I saw the example of sending an item out of a list (BBC channel) but this is a number.
I noticed there are Utterances which might fit such as:
MacroOperation to run {Macro} in {MNum}
and they are kicking in, which is good. but Ask Alexa doesn’t like it (i think).

How can I resolve this?

thanks you !!!

The first thing I see is that it THINKs your macro is called “SetVolume”…So this doesn’t make a lot of sense if you actually said “Alexa, tell smartthings to Set Level to 40”. I have to assume you said “set volume”. That being the case, what is your macro name. This does seem to be behaving as I would expect.

If I read your post correctly you are simply trying to adjust the volume on your Onkyo? And it is NOT integrated in with SmartThings? In that case you will probably need to do a little tweaking, specifically in the xParams.

First, let me know your macro name and exactly what you are attempting and I can help you walk through the minor modifications you need to do to get this to work.

MichaelS!

thanks a bunch for helping. You are right. I am saying ‘Alexa tell smartthings to set the volume to 40’ . The Macro named is well recognized as can be seen in the log capture.

The method I found to integrate Onkyo with Smartthing is with an HTTP bridge which sends commands to the Onkyo. If there is other ways I which I am not aware of would be more than happy to learn. It works tho for simple On, Off Mute etc. command.

The issue I am having is with passing a number, rather than a value our of a list (like in the xParam / BBC example).

thank you!

Avner,

Thanks…that explains what is seen in the logs. What did you add to the xParams in the Developers slots? Did you actually add the volume names? Something has to be in there for this to work…I recommend putting the spelling of the numeric levels you want (fifty, sixty, etc). If that doesn’t work we will need to change the utterance but I can assist with that via PM. Let me know if simply adding the numeric list works (I would try just a couple before committing to 0 to 99).

This is what I did:
I added numeric values to LIST_OF_WCP as can be seen here:

the result is that when I say a number (forty) it is well mapped BUT to MNum (as can be seen in the picture).
When I say ‘potato’ (just for debugging) it is not mapped anywhere.

What am I missing ?

Still, value is mapped to MNum instead of to xParam:

Did you click the slider in the ‘setvolume’ macro to require additional parameters?

Also, I assume you read through this: http://thingsthataresmart.wiki/index.php?title=Using_Parameters_with_Ask_Alexa_and_webCoRE

Thank you Michael for helping.

Of course I have required additional parameters. I believe that otherwise no parameter would be collected into MNum.
I also read every letter on the great explanation, otherwise I would never know how to write the webCore macro.

I also tried to add this line to be first in the
MacroOperation to {Macro} to {xParam}
in the Utterances, as I thought that I am experiencing a “race” between assigning “forty” as a number (and send it to MNum) or a variable (and then look it up in LIST_OF_WCP).

So if you simply say “Alexa tell SmartThings setvolume potato” it doesn’t send the parameter over? Let’s take this to PM as this does work for others. I will test it myself but nothing has changed in the code to prevent it from working. Also, please revert your utterances back to standard as that is probably not the issue and will mess up other things if you go too far off from standard.

Welcome to the last Friday of 2017! It has been a fantastic year for me personally and for Ask Alexa in general. I have honored by the number of people that have found my program useful in their everyday lives. Until now I really didn’t know HOW useful. While I have gotten statistics from SmartThings on the installation and usage numbers, with my new website update I am actually able to gauge how many people are actively installing Ask Alexa on a daily basis. On average, it is about 5-10 per day, with many people apparently getting an Alexa for Christmas as the numbers REALLY ballooned that day! And the ironic part….not a single installation question over the holiday! This tells me that just the simple change in 2.3.5a made a huge difference in the installation. While I am sure this is a holiday ‘bump’ in installations, I am still humbled that an application that is almost 2 years old is still being actively installed and used by the SmartThings community. Thank you!

As for what 2018 holds, who knows…I DO know that next week I will probably be releasing my ‘stage 2’ installation improvements. Currently, when setting up the Amazon developer site for Ask Alexa, you have to copy and paste information from either GitHub or the Setup Variables page over 10 times. While this has never been a problem for folks (with the setup web page clearly defining what goes where), it is tedious to say the least. Now, with a single click you will be given a JSON string that you simply load into the developer site. One copy/one paste….Starting from scratch I can now install Ask Alexa (with both the Lambda and Developer sites) in less than 10 minutes. Updating the code will be easier in the future as well…add or remove devices or extensions? Simply output the code again, update the developer area, and you are off and running. Even with these revisions, you do not have to abandon the hard work you have done in the past. You will simply upgrade your IDE code and all of your macros, extensions and configurations remain! Advanced users and those that are concerned about sending their SmartThings information over the internet can STILL use the manual method to update their developer area or Lambda. Finally, all of this automation will allow you one day to simply click a link and everything will self-install. I have this working for myself but am still not happy with the process Amazon lays out. I will only release code that makes this process easier…not more cumbersome!

Happy New Year to everyone!

8 Likes

Thank you for all your hard work. May you and yours have a very Happy and healthy New Year.

1 Like

Hey Man,

I have been lurking on here for over a year and finally got a forum account after I set up my Alexas and SmartThings to work together. I am a IT security engineer in Silicon Valley and I have to say that your standards of documentation, communication and community engagement are better than some of the folks I work with in ‘the industry’. Keep up the good work and Happy New Year to you as well!

Franklin

1 Like

Micheal thanks for all the hard work that you have put into this project. I am new to the project and so far so good.

Is it a fact that the only parm that can be passed from Alexa to a Piston is xParam? I am controlling my Tivo using the setup described here: http://thingsthataresmart.wiki/index.php?title=How_to_Control_your_TV_through_Alexa_and_Smartthings.

Is there a way for me to get any number passed to the Piston without having to specify every number in the LIST_OF_WCP Customer Slot Type? If MNum were passed this wouldn’t be an issue but I’m guessing it is not passed so I am trying to find a way to make xParam work without having to fully populate LIST_OF_WCP with numbers up to nine hundred ninty nine. :slight_smile:

Thanks,
Tom

Funny you should ask. @avnergid had the same question and I found that you could not send numbers via the xParam…so I fixed that and it will be in the next release (next Friday). If you need it now I can get it to you to test…

Thanks. If you sent the update my way I would be happy to give it a test.

Thanks,
Tom

Would this smartapp be able to pass numerical values via Alexa to Serb webCoRE variables?

Ran into a problem, don’t know what to make of this. Installed two Xioami devices.

Yes…Seems to be a very popular request and it will be released on Friday.

Check your IDE and the specific devices…while you will find a name in there, the label (a different field) may be blank. I recommend simply setting the label the same as the name.

Let me know if that works.

Seriously?