Page 3 of 24

Re: Integration with Amazon Echo

PostPosted: Sat Jul 11, 2015 3:46 pm
by ArthurD123
I've got this all working -- except the query string parameters. Is there a way to:

A) Make Alexa be ok/happy with the 302 response?

B) Send the request as a POST so that Indigo will take appropriate action on the HTTP request?

And a bonus question, C) Way to make Alexa forget about all existing "connected home" devices? The "forget settings" only removes groups it seems, but not the [pseudo-]devices themselves...

FWIW, chances are I'm going to just write a real "ASK" plugin for Amazon Echo using their API instead of going this route. For now, though, I'm just looking to get something working and see how promising it is before I venture completely towards writing a real ASK plugin...

Re: Integration with Amazon Echo

PostPosted: Sat Jul 11, 2015 4:11 pm
by ArthurD123
Okay, you can ignore questions B and C. But question A remains, though I'm about to dive into the Java source now to see if it can be rectified there...

As far as how I figured out B --> I realized that the special "_method" query param is actually for Indigo, not for the Java web service. For Action Groups, you must use "_method=execute" (instead of 'put'). Changing this took care of it for me.

For C --> The second time I cleared all connected devices, it did remove the devices as expected... I also had to delete the data directory to "reset" what the Java server already 'knows about'.

Question A remains, however -- how can I make Alexa be OK with the 302 response (which is also slower for some of my larger action groups, seems to be crashing the Java thread most of the time).

Re: Integration with Amazon Echo

PostPosted: Sat Jul 11, 2015 4:56 pm
by ArthurD123
Well, I at least figured out how to make the Java app *always* respond with success so that Alexa likewise always sees success. Attached is a screenshot of the Java code changes that I made. I then re-compiled (cmd: mvn package) and used the resulting new JAR file.

Fairly successful for day #1 of Alexa/Indigo integration! :-)

Re: Integration with Amazon Echo

PostPosted: Sat Jul 11, 2015 11:59 pm
by discgolfer1138
fwiw, I found that having spaces in my device names was making the java app return error responses. The devices would still respond as expected, but the java app's console would show warnings regarding unexpected characters in the request url. For example, I had to change the name of my 'Living Room' lights to 'living-room', then everything was happy... Alexa now performs the command and, after a brief pause, says 'OK'.

Re: Integration with Amazon Echo

PostPosted: Sun Jul 12, 2015 3:27 pm
by wideglidejrp
I have had the Amazon Echo for a few days now and can see great potential with it. The IFTTT recipes are great. I have great respect for what ArthurD123 did with Java. I suspect t most of us could not do that. Certainly, not me. We really need a new channel for Indigo on IFTTT. I assume Matt or Jay have filled out the channel partner inquiry form at https://docs.google.com/forms/d/1dlH6aA ... 8/viewform Looks to me like Amazon Echo can make Indigo home automation even greater than it already is.

Re: Integration with Amazon Echo

PostPosted: Mon Jul 13, 2015 10:01 am
by jay (support)
wideglidejrp wrote:
We really need a new channel for Indigo on IFTTT.


viewtopic.php?p=95080#p95080

Re: Integration with Amazon Echo

PostPosted: Sun Jul 19, 2015 8:41 am
by webdeck
I ran into the spaces problem as well. The issue is that URLEncoder changes spaces in a URL to plus signs, but the Indigo REST API doesn't handle the plus signs, and instead wants spaces encoded as %20. So what I do is after encoding the URL, I replace the plus signs with %20.

Code: Select all
URLEncoder.encode(loc).replace("+", "%20")

Re: Integration with Amazon Echo

PostPosted: Fri Jul 24, 2015 9:20 pm
by mattmullen
Hey Indigo gurus,
Some of the folks on the Homeseer forums have been able to get the Echo to talk to Homeseer via the Restful api. Could somebody who knows about this stuff take a look and see if it could bre adapted to Indigo?

http://board.homeseer.com/showthread.php?p=1189626

Thanks, Matt

Re: Integration with Amazon Echo

PostPosted: Fri Jul 31, 2015 10:45 am
by mreyn2005
I just got my Echo and I am planning to port my SiriProxy plugin from a couple years ago into the Alexa Skills Kit SDK. The only issue I am having right now is accessing Indigo from the internet. I have not made my Indigo accessible outside the LAN, and I don't really want to have to. BUT, I believe I will have to in order to get the SDK plugin to work, as it runs from Amazon Web Services. There are a few youtube videos of people having their Echo work with their insteon setups. I was planning to ask these folks if they have to open their LAN so AWS can see their HA system. I might bite the bullet and use Reflector or something of the like, if there is no better way...

Stay tuned.

Matt

Re: Integration with Amazon Echo

PostPosted: Sat Aug 01, 2015 10:07 am
by mreyn2005
Yeah, so... the Homeseer thread above makes it clear that we do have to make Indigo available to the interwebs in order for an ASK plugin to access it.

Question: Would people be ok with this/still want this plugin?

Matt

Re: Integration with Amazon Echo

PostPosted: Sat Aug 01, 2015 10:10 am
by DVDDave
Sure, Matt. A lot of us forward our router to Indigo rather than use a reflector. Thanks for looking into this.

--Dave

Re: Integration with Amazon Echo

PostPosted: Sat Aug 01, 2015 10:52 am
by manoncloud9
I am all for it. Would love to test if you need any testers.


Sent from my iPhone using Tapatalk

Re: Integration with Amazon Echo

PostPosted: Sat Aug 01, 2015 12:40 pm
by colovin
You can add me to the yes list and would be happy to test if you are needing beta testers.

Re: Integration with Amazon Echo

PostPosted: Sun Aug 02, 2015 3:43 pm
by mreyn2005
Um, so yeah. It works. :D :shock: :D

R.I.P. SiriProxy... Helllo Amazon Echo! :o

https://github.com/msreynolds/askIndigo

This guy (Thrag) does a much better job of explaining the whole Alexa Skill Kit plugin and publish portion...
He is making unauthenticated calls to HomeSeer over the internet (yikes!), but the basics are there.
I used his lambda function as a starting point (thanks!):
http://board.homeseer.com/showthread.php?p=1189626

If you can chew through that, look at my github project for the lambda code and speech assets (you will make a zip file instead of pasting code inline on the lambda online editor):

I ended up using the Go Prism Reflector, mostly because A) its $29/year, and B) it is integrated with Indigo, and C) it's served over https on port 80. No router fuss, better security than NATing, etc. In conjunction with Digest authentication, I feel we're in the realm of reasonable security.

Currently tracking issue for dealing with upper and lower case device naming schemes that typically vary by user
https://github.com/msreynolds/askIndigo/issues/1

Currently tracking issue for building the zip file via shell script and zip utility
https://github.com/msreynolds/askIndigo/issues/2

As always, this is a work in progress. I haven't tested it very much yet, so be gentle. I am sure there are bugs. I plan to fix them as I plan to use this in my own home.

I am pretty stoked to have voice control for Indigo back! Let me know what you guys think! I am seeing ~3-5 second round trip from the time I complete my request to Alexa to the time the action has completed in Indigo! That is from Echo -> AWS Lambda -> indigodomo.net -> Indigo all over https using Digest Auth.

\m/ rock on
Matt

Re: Integration with Amazon Echo

PostPosted: Sun Aug 02, 2015 10:50 pm
by HowmaNoid
Looks like they've opened things up in both directions. Now you can pull info available to Echo from any of it's sources into Indigo.

http://www.engadget.com/2015/08/02/amaz ... d=rss_semi

This is starting to look very interesting..