SmartThings Community

[RELEASE] Ask Alexa

(James) #3942

Thanks! That worked.

2 Likes
(Paul) #3943

I tried to pm back but Smartthings Community said I pm up to my limit as a new user? Odd. Newbies like me need all the help we can get. It is working. I need to clean up some names for better device recognition. I do see that it is creating a lot of logs. I’m not sure how to stop it. I’m thinking it could be from Stringify checking in on motion sensors?

I dunno. But, yes, askalexa is running now.

1 Like
(ilker Aktuna) #3944

I changed my device language to “English (UK)” from “English US” and now “alexa ask smartthings” command response is "sorry something went wrong"
when I choose US English the problem is gone.
What may be the problem ?
is there a solution ?

(Micheal ) #3945

It is a long shot but maybe change the invocation name to Smart Things (no space). There are others from the UK that are running this…maybe they can chime in.

(ilker Aktuna) #3946

actually I am not fond of UK english. I just noticed this and wanted to understand what differs.
I am now using US English

1 Like
(Micheal ) #3947

Happy Friday. Let’s see what this week brought us…well, ironically, neither SmartThings or Google really brought us anything fun. Amazon finally fulfilled a request I put in when I first got the Echo…the ability to wake up to music (https://techcrunch.com/2017/12/11/amazon-alexa-can-now-wake-you-up-to-music/). This is just on Alarms for now, but I would guess routines will have this in the future.

I still am setting up routines in the native Alexa app and connecting them Ask Alexa. THIS is almost the way I originally envisioned how a smart home should be; easy and do exactly what I want it to do. While there are still functions that I need to ‘ask Smart Things’, but now the majority of the items still use the power of SmartThings without having to say an invocation word. Very nice!

Once again, I have small Christmas present for everyone…a very small update to 2.3.5 of the main code and 1.0.6 of the Weather Extension code. This is general cleanup of the code, and adding the switch restrictions to the weather extension. This does not improve the install process I mentioned in an earlier post, but that is still a work in progress. On the good side, many of you reached out with brand new installs this week, so I am glad the tried and true process of the documentation still works.

This brings up a question many of you have asked me: how I keep track of the revisions. So I will focus this week’s essay on that.

Many of you know this already, but I work in the high tech industry. I am a manager of technology folks, which includes engineers, analysts, and programmers. As such, I have learned that version control (along with documentation) is one of the first things people skip, but is one of the most essential things in high tech. Internally, I keep track of daily revisions to the code use some sort of identifier…usually a data (2017123.1 for example…looks like a stardate from Star Trek!). MOST revisions don’t get released…they are for my own sanity…if I make a mistake in code and can’t remember what I did, I can always revert back.

When I am ready to release the code, I remove all remarked statements (to cut down on size) and give it a RELEASE increment number. For example, the MAJOR release is 2.3.5 of the main code. When I have a small revision that most people won’t see (a misspelling, or removing a remark or even a small obscure bug), I don’t change the date but add a small letter (a, b, c, etc) after the version number. Many areas of the code and extensions look at the major revision number to alert you if there is an upgrade needed. By keeping the Major revision the same, everything doesn’t need to get upgraded.

For major releases, I simply increment the number. The next revision of Ask Alexa, for example, will probably be 2.3.6. And if I make a MAJOR change to the code and functionality, I may go simple 3.0.0. While there are standards and best practices for revision, the most important part is not HOW you do it, but to do it at all. It allows you (the users) to know when you have the latest version, and it keeps me sane by allowing me to roll back a version if I run into issues.

Happy Holidays!

1 Like
(jay yankacy) #3948

I apologize if this is covered somewhere, but I can’t seem to find the answer. I think I have everything setup correctly, but I’m not seeing the skill in the Alexa App. The Service Simulator seem to work and returns a correct response from Smartthings. As far as I know, my developer account is the same as my Alexa account (same email and password). Just not sure what to do at this point.

(Micheal ) #3949

Did you search the skills in your Amazon app…you need to add it to your account…there is a filter for ‘My skills’ that may help you find it.

If it is working in the simulator it should already be set up. If you say “Alexa, open Smart Things” what happens?

(jay yankacy) #3950

It didn’t come up in the list, but I found it when I did a search for Ask Alexa. Thanks for all your hard work!

1 Like
(Micheal ) #3951

Welcome to the Friday before Christmas……I hope everyone makes it to their destinations okay this weekend and has a great holiday. If you happen to get an Alexa (I got my Spots this week and they are great!) for Christmas, or you are finally going to make the plunge into Ask Alexa, I have a little holiday cheer…I have updated Ask Alexa with a small update (2.3.5a) that has BIG improvements in the installation process.

As mentioned previously, I acquired the Ask-Alexa.com domain earlier this year and have linked that site to the ThingsThatAreSmart Wiki page for my app (Give it a try….http://ask-alexa.com) . In addition, I am using the backend web hosting space to write a few scripts that improve Ask Alexa. The first addition is for a small part of the installation process.

For whatever reason, 90% of the issues I receive have to do with copying the Lambda code, pasting it into the AWS site, and then copying/pasting the code from the setup page to the code again. Well, now a user simply clicks “Setup Variables” in the app, then click the link in the output (preferably from a desktop browser), and the Lambda code will be generated on the fly with all of the necessary variables already embedded in the code. You simply copy this entire page of code, paste it to the Lambda section, and you are set. This sets the stage for later improvement where the code will auto-deploy to Lambda.

If you already have Ask Alexa installed and working, there is no reason to upgrade; the Lambda code is EXACTLY the same. This update will allow NEW users to cut down on the copying/pasting, and if I ever upgrade the Lambda code, this will allow for easy upgrading without have to go back and forth, copying and pasting from one screen to another multiple times. I have updated the documentation to reflect this one-step method: http://thingsthataresmart.wiki/index.php?title=Ask_Alexa#One-Step_Method

Now, as with any site that is NOT maintained by SmartThings, developers need to be 100% transparent with what is happening with the users’ data. In that spirit, here is what is happening when you click the link within the Setup Variables page:

  • Your SmartThings AppID and Token are sent via plain text (via the URL) to my script on Ask-Alexa.com. I do not yet have a SSL certificate on my site, but will be adding one should I see the usage on this site increase. I also can encrypt the data within the URL if it becomes an issue for anyone.
  • My script does NOT store your authentication information and simply relays back (again, in plain text) to you the code from my Github with your information already inserted in the proper areas.
  • My hosting service DOES keep metrics on unique visitors to this site and link usage, and may record your IP address. This is for tracking purposes only and MOST sites do this without your knowledge.

The more “official” privacy policy can be viewed here: http://ask-alexa.com/privacy.html

I have been developing for SmartThings for over 3 years now and have NEVER misplaced anyone’s trust with the information given to me. Some of you have actually given me your Amazon logins to do the setup/configuration for you. While this SHOULD be an indication that it is safe to obtain your Lambda code using Ask-Alexa.com, you are NOT required to use it to set up the SmartApp/Skill. The wiki instructions still indicate how to set up the Lambda code manually using the tried-and-true copy/paste method.

While this update may seem ‘meh’ for most of you, it is going to be a part of a larger set of improvements that I can do with an external web site and compute power. I am already testing some of these features and will incrementally release them when I feel they are ready. My ultimate goal is to make it EASIER for the end-user to install, maintain and use Ask Alexa. Step 1 completed!

Enjoy the holidays!

4 Likes
[DEPRECATED] Ask Alexa 2.3.5
#3952

Is there a way to use Alexa (and the group of alexas) to do this with webCore? [DEPRECATED THREAD: visit community.webcore.co for assistance] WebCoRE - Example Pistons

(Nathan Curtis) #3953

Not yet, as Alexa can’t (yet) be used to trigger an audio response without it first being initiated from the Echo device itself… I think I saw in an earlier post where @MichaelS says this (the notification featureset) basically what is being used for calling and messaging is on the Alexa roadmap to be made available to external developers, and therefore on his feature list but for now it’s not in everyone’s developer accounts so (technical technical technical) we all have to wait. …for now.

(Micheal ) #3954

Technically you CAN do this, but not with just the Alexa. You would still need an external speaker (like a Sonos) to do this. However, when Amazon turns on the direct voice notification, we are going to see some fun stuff happen.

3 Likes
#3955

Ok… Go tthat but if i dont have a sonos, what else can i use? Chromecastaudio+ speaker/ BT speaker?

(Micheal ) #3956

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
(Avner) #3957

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 !!!

(Micheal ) #3958

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.

(Avner) #3959

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!

(Micheal ) #3960

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).

(Avner) #3961

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: