Playing around with Amazon Echo (technical interface discussion)

So I got into the Amazon Echo beta SDK, they still don’t want people sharing code and such - so I wanted to share what I can without getting into any details that they shared with us.

NOTE: Not going to get into the SDK, docs, code, etc - until they say we can… sorry… if you are in the SDK and PM me I’d be happy to chat

I made a quick video of the Echo driving my lights and sonos, https://www.youtube.com/watch?v=8_N83OkPBdw

You could probably do all this with just a smartthings app, but I used a bridge app to do the communication between smartthings web services and the amazon cloud.

I used some smartthings REST API sample code I found to make a quick endpoint to drive my house with oauth for auth.

Then made a simple app with just a couple commands; turn on some lights, turn off some lights, play the X, pause the X, etc.

As soon as amazon says it’s ok to share code I’ll post a write-up of the whole thing in detail… but at this point, I think it’s great and people are going to find it pretty easy to build really cool stuff.

(not sure if they will allow 3rd party apps, or they will bring them all in-house like they did with the wemo stuff)

So this might not be relevant - just points to more reasons they don’t want people discussing the SDK. It’s still super early.

14 Likes

It says the video is private :frowning:

Can you elaborate on your bridge app and why you chose this over a SmartThings app?

Oh crap - sorry - I think it’s public now…

The main reason was that I’m not comfortable in java, so doing the communication with the amazon cloud was way easier for me to write in a rails app.

1 Like

Hmm… might I recommend that all ST users that have an Echo submit feedback on integration if you haven’t already done so. As the Echo users out there who have submitted any sort of feedback know, Amazon is very quick to respond and appears to be taking the feedback seriously. With the small-ish install base right now, you basically have a direct line to them…so I recommend using it!

I’m waiting on my Echo,but it’s on back order…

@troy Very awesome stuff. I had applied to the Echo beta SDK, but haven’t heard anything. I’m excited to see if they do integrate with ST. If they do, I’ll be getting a third Echo for sure.

Slightly OT, but Amazon recently announced a radio-style streaming service, Prime Stations, bundled with Amazon Prime. It seems like a great potential complement to an Echo, but right now it looks to be mobile-only.

1 Like

My Echo Just Shipped. Now I just wish they would respond to my request to join the SDK beta. Hearing that it’s Java based has be excited that is my main programming language now (used to be c++)

Been doing Groovy for my Smart Things Hub and really want to figure out how to integrate my Echo with my SmartThings. Then I can say “Alexa open my garage” and it would :smile:

2 Likes

I just started playing around with the SDK. I am glad they took their time with it, because it actually feels pretty solid! We should connect regarding the SmartThings app! Would be a shame to duplicate efforts.

2 Likes

The echo ships with the prime music enabled and it’s the default, I was able to get to the web interface to add a playlist… it’s not nearly as cool as spotify yet, all the “popular” playlists are kinda basic and short.

I like being able to follow a popular list for a genre that people are curating, and usually on spotify they are like 100-300 songs, and on prime they are all like 50 songs or less.

1 Like

Well my Harmony “spotify action” fires up my PS3, Denon Receiver and B&W Nautilus speakers so I doubt the Echo with Amazon music will compare :smile:

Jealous of everyone’s SDK access. I don’t have any idea why they didn’t allow me to join. I wonder how they decide on who gets access and who does not :frowning:

1 Like

Me too! Another 2 months.

@troy This Engadget article says that the NDA just ended for SDK developers. Is that true? Can we get some more info about what you have working? Maybe the community can even work up a full ST app for Echo…

1 Like

Sure, I’ll take that as authoritative for now :smile:

Here is the main file that’s doing the work of the json parsing and responses;

You can check out the rest of the repo… it just sends REST on/off commands to the typical basic oauth rest sample that’s out there for the smartthings side.

That happens here

If anyone recreates all this in smartthings that would be cool, but right now this app is like 99.9% ready to be multi-tenant, so it doesn’t need to be recreated.

its at http://echo-command.herokuapp.com

All we need to add is a way to get “your” smartthings oauth url into it, probably take 15 mins in a PR if someone wants, or I’ll try it next week or so - as I get more time

also check out utterances and intents in this folder:

6 Likes

This is exciting! I’ve had mine for about a week, been looking forward to this integration. Great work!

So, how does one actually get this on the Echo? I’ve authorized with SmartThings but not really sure what the next step is here.

1 Like

I’m at Amazon AWS Loft for a 3 1 hour seminar + networking time in San Francisco…

99% of attendees are male, but Alexa voice is female. Hmmm. :confused:

3 Likes

Need more women in IT and CS. Of course, Alexa might sound more like Pierce Brosnan then. :smile:

1 Like

Based on yesterday’s seminar, what are the odds of a ST integration?

PS. If Alexa’s voice doesn’t cut it, you could always try this male recorded voice, which is sarcastic and hits on the lady of the house.