SmartThings Community

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

alexa
home
echo
smartapp_voice
ask
(Michael Hess) #6

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

2 Likes

(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:

3 Likes

(Jimmy) #8

:astonished: Wow!

1 Like

(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?

1 Like

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

2 Likes

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

6 Likes

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

1 Like

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

2 Likes

(Dan P Parker) #14

Outstanding!!!

1 Like

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

1 Like

(Micheal ) #16

Good luck! That is how I got started…

3 Likes

(I got a hair cut from Alexa) #17

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

3 Likes

#18

Bookmarked for when I get home.

0 Likes

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

0 Likes

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

0 Likes

(Convinced ST will never be unbroken…) #21

Bingo!

Thank you so much for this. It was the last remaining piece to my new found love for SmartThings because of Alexa.

-SiP

3 Likes

(Jody) #22

Great Job!

3 Likes

(I got a hair cut from Alexa) #23

By the way, it’s pretty easy to support multiple locations with AskHome. You just duplicate what you did the first time, and change the Ask word (Invocation name) to Cabin or Work or whatever on the copy. “ask cabin to shut off the water”

Your other locations can even be in the same smartthings location. …, add just the devices in the polebarn to the new copy of the SmartApp/Skill/Lambda combination and say things like “ask polebarn to turn off the lights”

And if your friends will give you a token & id to their smartThings AskHome app…your Alexa can control their stuff too. You can even use a different invocation name when you talk about their devices than what they use. (you’ll need their list of nouns too for the Alexa skill part) Great for helping out old parents by remote control. “Ask moms-house to water the lawn.” (you know, like when she’s on vacation with your brothers family and grand kids or something.)

1 Like

#24

Very nice, well done!

2 Likes

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

@N8XD

I can’t seem to get the right appID or the Token.
I get an error when running the simulator to get them

this is the error i get.

grails.validation.ValidationException: Validation Error(s) occurred during save():

  • Field error in object ‘physicalgraph.device.Device’ on field ‘name’: rejected value [null]; codes [physicalgraph.device.Device.name.nullable.error.physicalgraph.device.Device.name,physicalgraph.device.Device.name.nullable.error.name,physicalgraph.device.Device.name.nullable.error.java.lang.String,physicalgraph.device.Device.name.nullable.error,device.name.nullable.error.physicalgraph.device.Device.name,device.name.nullable.error.name,device.name.nullable.error.java.lang.String,device.name.nullable.error,physicalgraph.device.Device.name.nullable.physicalgraph.device.Device.name,physicalgraph.device.Device.name.nullable.name,physicalgraph.device.Device.name.nullable.java.lang.String,physicalgraph.device.Device.name.nullable,device.name.nullable.physicalgraph.device.Device.name,device.name.nullable.name,device.name.nullable.java.lang.String,device.name.nullable,nullable.physicalgraph.device.Device.name,nullable.name,nullable.java.lang.String,nullable]; arguments [name,class physicalgraph.device.Device]; default message [{0} cannot be null]
1 Like