Alexa Skills Kit (ASK)

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit

Interesting… may be ST integration could be simpler.

It’s been while ST has released any new lab apps. What’s going on with ST? Did samsung takeover killed new innovations / integration.

Every big company is trying to build their own echo system and limiting cross platform integration … bad for consumers.

Got on ST platform for just that reason… they had promised open integration.

5 Likes

Can anyone in the Alexa Beta SDK comment on its capabilities to play music/audio? I’m thinking it’d be awesome if someone could build an easy app that takes API calls and plays audio files on the Echo. This would allow us to build SmartApps that can turn the Echo into a Sonos-like device. Thoughts?

Yep. There are no options to stream media in the beta sdk. The ASK (cute name for the SDK now) doesn’t seem to add them either. Pretty much all you get is the ability to map phrases to intents (with specific bits passed into the app) and return text to say back, and info to put on the card in the Echo app. Plus whatever you want to do for the intent that is app specific.

1 Like

Has anyone worked on smart apps that can integrate Echo with ST? Atleast to perform basic functions like turn lights on/off, lock/ublock door etc?

Lots of people are working on this, both officially with Amazon developer accounts and unofficially with hacking.

See the technical interface topic for much discussion:

[quote=“ashutosh1982, post:4, topic:18389, full:true”]
Has anyone worked on smart apps that can integrate Echo with ST? Atleast to perform basic functions like turn lights on/off, lock/ublock door etc?
[/quote]Yep, I have one working, slowly adding more stuff to it, but the catch is, you need a way to associate the user id you get in the service call from Alexa to a REST endpoint in Smartthings. It works fine if you hard code it, for the one user, but a general solution that Amazon will accept as an app is going to need a web service where the user can “log in” and do the oauth with Smartthings. I’ve not bothered to write that service yet.

But it’s kinda neat to tell alexa “tell smart house phrase good night.”

3 Likes

John, do you have your source available somewhere? I’m more than happy to replace my endpoints with smartthings endpoint to turn on/off lights. It’s still much better than emulated Philips Hue running in the background. Thanks!

1 Like

I don’t have light control done yet. This is a “weekend project” :smile: The code as far as I got was posted in the other Echo development thread, on github its at https://github.com/schettj/SmartThings/tree/master/EchoSDK

1 Like

Thanks for your work. I put this into place but haven’t been home to test it. I actually enjoy the Hue bridge because I don’t have to add the word Smart Things. But I would love it if I could add the Nest Thermostat device type to it so I can say “Alexa, tell SmartThings to turn my Nest to 68 degrees”.

1 Like

I don’t have a Nest, but would like find this syntax useful with the Hue Bridge Emulator…?

Alexa, dim temperature to 68%.

It’s a pretty easy spoof / workaround, I think!

Scout alarm is one of the first companies to sign up for Echo integration, it will be interesting to see what they do.

Meanwhile Amazon is not allowing monetization in the first wave, I know several developers holding back release until monetization is allowed.

1 Like

After some tweaking I added Switch & Switch Level capabilities to my Nest device type. I can now use the Hue Emulator bridge to “dim” the thermostat. However, looks like it rounds down to the nearest 10 degrees so I have to see if that can be resolved otherwise it’s not very useful!

Oh oh… Really? So Echo passes rounded 10% increments to Hue Bridge? This will be interesting to trace, but Amazon Echo forums should be able to confirm as well…

I don’t believe it’s Echo I believe it has to do with the node.js code doing the following conversion:

Math.floor(255 * lights[i].state.level / 100)
Math.floor((100 * rec.bri) / 255);

Seems the hue “bri” attribute needs to be converted to this larger # and then it’s back converted before making the command. Floor seems to round down 1 so 72 becomes 71. I’m not home to mess with the code and test with my voice but doing these calculations via js don’t seem to account for it. So it’s still possible Echo passes in increments of 10 as I noted when I said 66 or 68 it would pass 60 to the SmartApp. But when I said 71 it would pass 70.

1 Like

Seems to have resolved itself by changing these to Math.round. Although I don’t really see why because floor shouldn’t go all the way down to 60 if I said 68. Alexa is hearing me correctly too but after I went down to 50 degrees and back to 60 I was able to progress by 1 through all the 60s. Then I shot back to 72 and down to 68 without an issue. This previously didn’t work on Math.floor so I think that was the problem.

1 Like

I got my Echo last night. Very cool. Excited to see what we can do with it :smiley:!

7 Likes

Friction, part 1. The log in problem:

1 Like

Yeah I figured this out in about 10 minutes of getting early access.

What we all seem to be zeroing in on is having the ASK app (using a service hosted somewhere else, ie, your management service in the cloud for your app) create a user account for users of the ASK service, should they need additional info, or keep state, etc.

ASK app gets a request
Lookup user_id in cloud service
If found and registered, continue,
if not found, generate unique code, tell user "go to http://foo.com, enter your code XYZZY, and create an account to use this service"
If found but not registered "remember you must visit ttp://foo.com, enter your code XYZZY, and create an account to use this service"
if found and registered, proceed, saving state in the service for that user, etc.

On the cloud website:
Login or Create Account with Code
Login (normal user/pass for existing users)
Create Account
Enter code, look it up, if found have them create a user/pass, then take them to whatever form you need for data for your app (for example, doing an OAuth with SmartThings to get access to a REST endpoint.)

Not the cleanest UX, but doable.