AskHome - Alexa/SmartThings programmers kit. Alexa can do anything


(I got a hair cut from Alexa) #1

Hi Guys,

In real life you view your home as a structure filled with rooms, people, and objects. This kit helps you use Alexa to interact with your house by talking about those things - and not a list of devices. …which is great if you are helping someone non-technical make a smarthome. This is not a supported release, but a “share”. I’m sharing what I’ve done, and giving you the code so you can try it yourself if you want.

Here is a short video with a few sample interactions from my home -

and the kit code: documentation, smartApp, cut/pastes for alexa skills and lambda is here – The demo code is configured to work with some things at my house…to make it YOUR AskHome, you’ll have to program your house into it.

The AskHome kit is for groovy programmers, and not really for non-programming end users to configure. (Look for @MichaelS new upcoming version of Alexa Helper (AskAlexa) if you don’t code, its going to be awesome.) But once configured anybody can talk to Alexa and interact simply.

Configuring by programming is extremely flexible and not complicated, but it’s not a fill in the blank smartapp either. Basically it’s one smartApp with capabilities functions, other subroutines, and the means to connect it to Alexa. You put the nouns, operators and function calls right in the smartApp in a switch/case structure…and also add those nouns to Alexa’s lists so that she knows the right important words and phrases to pass on through the system to your smart app. By adding your own extra subroutines, you really can do ANYTHING with this. Since all the logic is in the smartApp text file…it’s easy to take a copy off line for backup.

Tell me what you think. Ask questions.


[RELEASE] Alexa Helper
FAQ: Amazon Echo: The Official SmartThings Integration is here! (Initial SetUp FAQ)
Amazon Echo - Current summary of what/how it integrates with ST? (May 2016)
Alexa Smart Home Extensions to Skill Kit
Amazon echo for late adopters?
CoRE and Piston Rules Engine, first design steps
Discontinuation of MyQ Connect Community SmartApp
Filtrete 3M-50 Wi-Fi Thermostat. Version 2.0 Released 12/17/2016
Cortana (Xbox, Windows (Phone/OS) Integration (with Simple SmartThings App)

Makes 10

(Michael Hess) #3

Awesome! + a few

(Jason "The Enabler" as deemed so by @Smart) #4

That is sweet!

(Bobby) #5

This is tooooo coooool. Thanks for sharing!

(Michael Hess) #6

HAHAHA, just showed that to my wife now that I’m home for lunch, My Alexa was very confused.

(I got a hair cut from Alexa) #7

I can imagine that…I was hearing responses in stereo when I was making captions on the video. And of course, since I have those things referenced in the video, they were all being operated by my echo or dots as I worked through the video. I should have been using headphones. :wink:

(Jimmy) #8

:astonished: Wow!

(Jason "The Enabler" as deemed so by @Smart) #9

Are you meaning that @MichaelS is designing a smart app that does this and is plug and play?

(I got a hair cut from Alexa) #10

I wish we could make them plug and play. :wink: His will be more geared toward those that don’t code, mine toward those that do code. In his you’ll fill in inputs in the smart app, on mine you’ll fill in groovy code. Each has their strengths for their target audience. Both require basically the same, multi-step configuration on the Alexa Developers website though, and both require you install a smart app in your smartthings account.

(Micheal ) #11

That Michael indeed…the app is called Ask Alexa, and will compliment Alexa Helper for those that want to control items with more than simply on/off commands. See more toward the bottom of the Alexa Helper thread: [RELEASE] Alexa Helper

To be clear, Keith helped me get started on the Developer side, but his app and mine are fundamentally different.

(Jason "The Enabler" as deemed so by @Smart) #12

Well, I’m not a programmer, but I have started climbing the learning curve on groovy.

I am going to give it shot using Keith’s, and I look forward to your release.

Especially with it working along with Alexa helper.

(Micheal ) #13

To learn programming, Keith’s would be a good start. However, it is not for the faint of heart. He does lay out the code very well so you could follow it rather easily. Adding new functionality, however, for a non-programmer may be frustrating. However, the community is always open to assisting.

I may accelerate the release of my version as once you have a taste of what the Alexa can do you will want more.

(Dan P Parker) #14


(Jason "The Enabler" as deemed so by @Smart) #15

I’m not entirely unfamiliar with coding. I’ve never taken a big interest in the past. I always preferred the hands on side of the business of electronics. But, I have programmed.

I’m faintly familiar with c++ and java.

I decided to start by taking a device handler and modifying it to do exactly what I want it to do.

I’ve always learned best by example. So, I look at code that works and attempt to replicate it in other ways without the lame copy and paste. I try to understand what it is doing instead of just doing.

So, I’m modifying a zigbee device handler by analyzing mostly zwave code.

Yes, they are different, but since they run within the confines of groovy it helps me understand more. Weird, but it works for me.

Kind of like how I modified Alexa helper to respond the way I wanted.

So, I’m going to jump in and give it a shot.

(Micheal ) #16

Good luck! That is how I got started…

(I got a hair cut from Alexa) #17

I love Echo’s and Dots…they really are the coolest toys.


Bookmarked for when I get home.

(Convinced ST will never be unbroken…) #19

I am having a little trouble here. First of all it would appear the output function in lambda-node.js is missing a trailing “}”.

Second, when I test the skill the request looks good, but I get “The response is invalid” in the response.

And when I try it on the Echo itself I get “Sorry, I am having trouble accessing your Casper skill right now” (I renamed everything to Casper instead of ‘home’).

I suppose there is some confusion of appID and token as I am seeing different values in the EDIT info of the app in the IDE, The sim’s fields, and the APP ID field in the SmartApp installed on my device.

So although this seemed simple an hour ago… I could use a little help… thanks!

(I got a hair cut from Alexa) #20

Hi Scottinpollock.

cut and paste error by me. …you want the context.succeed in there too. I’ve updated the node.js. There were 2 lines missing at the end.

 context.succeed( { response: response } );



Try it with that fix and see what you get. If it doesn’t work, take the JSON from below the skills test window on the left side over to lambda, paste the json into the test window and test. (Actions/Test) not just the Test button. See if Lambda is talking to your smartapp ok.

For the id in the lambda node.js, don’t use the id and secret in the App settings Oauth of your smart app…on the right side of the editor use Set Location and Install, go to the bottom and get the endpoint id out of the url and the token there. Look for errors below…the code window.