Author Topic: Announcing Native Amazon Echo integration  (Read 195453 times)

Offline martin12345

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +48/-4
Announcing Native Amazon Echo integration
« on: October 30, 2015, 01:59:01 pm »
I have written a native Amazon Echo integration for the Vera - i.e. it gets added as a Device Link, and the devices can be controlled just by saying "Alexa, turn Living Room on", "Alexa increase the temperature in the living room" and so on. It doesn't require you to be running any local server like the bridge solution - it all runs from the Amazon cloud. There's a video of it in action here;

https://www.youtube.com/watch?v=VVx0TixLDVk

The list of commands that you can use is documented by Amazon here;

https://www.amazon.com/gp/help/customer/display.html?nodeId=201751280

June 5th - Note: Amazon have been slow in certifying any smart home skills, so I have published steps for creating your own (uncertified) skill at https://github.com/mmillmor/AmazonEcho-to-Vera/blob/master/SetupSteps.pdf

Martin
« Last Edit: June 08, 2016, 03:31:56 am by martin12345 »

Offline MDoc

  • Jr. Member
  • **
  • Posts: 76
  • Karma: +3/-3
Re: Full Amazon Echo integration
« Reply #1 on: November 01, 2015, 12:49:51 am »
Can you do more than just simulate a switch (on/off).  For example, can you ask what the temperature of a thermostat is or if a door is locked?  I'm pretty happy right now with by bridge, but it would be nice to get full intergration.

Offline martin12345

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +48/-4
Re: Full Amazon Echo integration
« Reply #2 on: November 01, 2015, 04:39:20 am »
At the moment the Echo only understands on, off and dim, which code fully supports. The code also supports running scenes by asking Alexa to turn the scenes on (e.g. Alexa, turn on the Watch Movie Scene). If Amazon expand the vocabulary to allow thermostats, locks, pulling back current conditions and so on, then the code can very easily be updated to support that.

Martin

Offline martin12345

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +48/-4
Re: Announcing Full Amazon Echo integration
« Reply #3 on: November 01, 2015, 05:02:20 am »
I added requests for these questions to the Amazon developers forum;

https://forums.developer.amazon.com/forums/forum.jspa?forumID=149&start=0

Martin

Offline BOFH

  • Sr. Hero Member
  • ******
  • Posts: 2409
  • Karma: +112/-140
Re: Announcing Full Amazon Echo integration
« Reply #4 on: November 01, 2015, 11:11:34 am »
OK, added Amazon Echo to my 'Check for pricing on Black Friday' list. :)

Which Oauth server are you using and what platform? I can run one on either BSD or WHS2011 as I have both already deployed 24/7 with other functions and have spare cycles
Vera3 UI5 UI7 Edge Plus
Trane TZEMT400AB32 | Schlage BE369 FE599 | GE 45601 45602 45603 45604 45606 45609 45631 | Intermatic HA01C HA03C HA05C HA07C CA600 CA3000 | Aeon DSC06106 | Telguard GDC1 | Foscam FI8910W FI8905W FI9821W | D-Link 930L | Wanscam JW0011 | ZModo ZPIBH13W

Offline martin12345

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +48/-4
Re: Announcing Full Amazon Echo integration
« Reply #5 on: November 01, 2015, 11:17:24 am »
OK, added Amazon Echo to my 'Check for pricing on Black Friday' list. :)

Which Oauth server are you using and what platform? I can run one on either BSD or WHS2011 as I have both already deployed 24/7 with other functions and have spare cycles
I used oauth2-server-php (https://github.com/bshaffer/oauth2-server-php), but there's nothing unique about it - just have an auth page which accepts your vera credentials and stores the username and the hashed password that you need for remote authentication of your vera, and allow that to be retrieved by an access_token. I have the steps for deploying it documented on the project github page (https://github.com/mmillmor/AmazonEcho-to-Vera).

Martin 

Offline dlca1

  • Sr. Newbie
  • *
  • Posts: 33
  • Karma: +0/-2
Re: Announcing Full Amazon Echo integration
« Reply #6 on: November 01, 2015, 12:41:05 pm »
martin12345-- thanks for sharing this.

If somebody has the bridge running, can you help share your thoughts about the practical benefits of using this solution instead? What does "full integration" get us?

Some I can think of.
PROS
- Don't have to run the bridge service.
- Uses the more "official" way of integrating with echo
- Is more future proof, in case Amazon decides to disallow use of the bridge hack.

CONS
- Need to find or run an oauth server
- Need to send commands to Amazon for processing. (I'm not positive, but believe the bridge runs the commands locally without requiring a trip to Amazon)

Offline jcf6288

  • Sr. Newbie
  • *
  • Posts: 36
  • Karma: +5/-0
Re: Announcing Full Amazon Echo integration
« Reply #7 on: November 01, 2015, 01:57:16 pm »
I have had this setup for about a month.  I also have the hamony hub so now my daughter (4/6) can turn on the Wii or TV just by saying "Alexa turn on the the Wii".  The bridge is running on Rasberry Pi B with Raspbian since it also have Java pre-installed.  The webpage shows your vera and will automatically pull all devices and scenes so it only takes a minute or 2 to setup up few commands.  There is also a guy on youtube, Ellery Coffman, that uses his own SDK with amazon to send commands to an older HA software.  It's neat, but like Richard said, I want AUTOMATION not REMOTE CONTROL.  There are other solutions out there, however the Echo has great voice recognition and an array of microphones, so I find that it picks voice command well.  I bought my echo early for only 100 dollars.  So if you can get it for that I recommend it.  170 is too much depending on what you use it for.

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5625
  • Karma: +157/-380
Re: Announcing Full Amazon Echo integration
« Reply #8 on: November 01, 2015, 04:00:33 pm »
I use the bridge on a PI, it works great and the same bridge lets my Harmony Home Remote turn on and off lights via the harmony remote. I think this will not add any extras and will remove my remote control of the lights.

I'm curious to see what others say but at this time I don't see an advantage of this over the Bridge.

Offline martin12345

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +48/-4
Re: Announcing Full Amazon Echo integration
« Reply #9 on: November 12, 2015, 10:04:53 am »
Hi Martin

  Will this run on U I5..

    Don

The code uses the new login technique that was introduced in UI6. But UI5 was very much easier to authenticate, and 75% of the code could be removed - most of it is about the authentication. Just change the code to switch lights with the code for UI5 which has the username and password in the URL, and don't call the code to get the Vera Session.

Martin

Offline qwen3579

  • Full Member
  • ***
  • Posts: 245
  • Karma: +9/-4
Re: Announcing Full Amazon Echo integration
« Reply #10 on: November 12, 2015, 10:23:16 am »
Ohhhh..... this is going to be good.  ;D

Offline joer.

  • Full Member
  • ***
  • Posts: 128
  • Karma: +1/-0
Re: Announcing Full Amazon Echo integration
« Reply #11 on: November 12, 2015, 10:28:05 am »
How quick are commands if it needs to go the cloud and back?

Offline martin12345

  • Sr. Member
  • ****
  • Posts: 320
  • Karma: +48/-4
Re: Announcing Full Amazon Echo integration
« Reply #12 on: November 12, 2015, 12:02:30 pm »
How quick are commands if it needs to go the cloud and back?
The way UI7 authentication works needs 6 web service calls just to log in. In total a call to turn on a light takes about 3.5s once the code is initiated. There is also the time for the Echo to hear the speech and understand it. It takes about 5s after you say something for the light to actually switch - more if your Vera is being sluggish.

Martin

Offline tadr

  • Full Member
  • ***
  • Posts: 130
  • Karma: +6/-2
Re: Announcing Full Amazon Echo integration
« Reply #13 on: November 12, 2015, 12:18:51 pm »
How quick are commands if it needs to go the cloud and back?
The way UI7 authentication works needs 6 web service calls just to log in. In total a call to turn on a light takes about 3.5s once the code is initiated. There is also the time for the Echo to hear the speech and understand it. It takes about 5s after you say something for the light to actually switch - more if your Vera is being sluggish.

Martin

That seems exceedingly slow.  Is this an authentication issue?  I use the bridge software on a raspberry pi and my lights come on almost instantaneously.  Certainly no more than a second or so.

Offline integlikewhoa

  • Master Member
  • *******
  • Posts: 5625
  • Karma: +157/-380
Re: Announcing Full Amazon Echo integration
« Reply #14 on: November 12, 2015, 12:19:50 pm »
That seems exceedingly slow.  Is this an authentication issue?  I use the bridge software on a raspberry pi and my lights come on almost instantaneously.  Certainly no more than a second or so.

I have been following along and thinking the same thing. Haven't found that advantage yet.