Echo & Alexa Forums

HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc

0 Members and 1 Guest are viewing this topic.

luma

Fellow echotalk user Arm has created the amazon-echo-ha-bridge which is a Java application that emulates a Hue/WeMo hub.  The user can create virtual "lights" that Echo will discover using it's native Hue/WeMo support.  You can configure the "lights" to send HTTP REST commands to other systems in your house.  By leveraging this capability, I'm now able to use Echo to control SmartThings lights, launch activities with my Logitech Harmony, or play music and adjust the volume on my Sonos.

Currently this support is limited to actions you might take with a Hue light.  You can say "turn on the <xxx>", "turn off the <yyy>", or "set the <zzz> to 50%" (or whatever value).  These are utilizing the on/off/dim verbs that Echo understands for light controls, so it works best for activities that would make sense in this sort of sentence.  "Alexa, set the thermostat to 78 percent" might be OK and kinda understandable for setting the temperature, but locking the door with "Alexa, turn on the front door" is probably a little awkward.

Getting this running in your environment is highly dependent upon what you are trying to control.  If you have a Vera system check out Arm's thread here for integration help.  If you have SmartThings, there's a great guide here that includes a step-by-step process for setting up the amazon-echo-ha-bridge software.  It isn't super easy to get going if you aren't a web developer, but the ST guide in that link walks you through creating the virtual lights in a fairly straightforward way even if you aren't.  I'd recommend taking a look even if you aren't using SmartThings.

For my own configurations I'm using another automation tool called EventGhost.  EventGhost is a general-purpose automation tool for Windows that allows me to receive commands directly from the amazon-echo-ha-bridge and to control Harmony, Sonos, and a bunch of other things in response.  If you wind up deciding to work with EventGhost, I've sketched out a rough outline of the process on Reddit here.

What amazes me the most with this stuff so far is how fast and responsive it is.  I can say "Alexa, turn on Netflix" and the command is processed and sent through 4 different software systems within a second or two.  We're all awaiting better application support on the Echo but the amazon-echo-ha-bridge allows you to start tying together other systems simply by leveraging the limited HA capabilities Echo already offers.
« Last Edit: May 27, 2015, 10:01:59 pm by luma »

Offline jwlv

  • *
  • 1470
Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #1 on: May 28, 2015, 02:06:33 am »
Wow, that sounds amazing! So essentially, it's a relay from Echo to a virtual Hue/Wemo to any Internet of Things device, whether Echo supports it or not.

I haven't looked it over yet, but I intend to very soon!

There's a project that I've been wanting to make with an Arduino, some servos, and Echo. This should make things a bit easier. :)
« Last Edit: June 18, 2015, 03:21:41 pm by jwlv »

dworkman

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #2 on: June 29, 2015, 05:47:15 pm »
This is fantastic.

I have ADT Pulse controlling my zwave devices.  Any idea if I can modify this somehow to have Echo send commands to the Pulse system?

Thanks.

jeffstahl

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #3 on: June 29, 2015, 09:57:47 pm »
This is the answer to my dreams!!!  Both Sonos and Harmony are essential to breaking into the automation market.  I am just waiting for these features. The fact that you have the emulator working for these tools, it sounds like it is just a matter of time. 

I am currently using Philips HUE, but I want to invest in a full house solution for automation.  I wished I knew for sure which system will be focused as a long term solution with Echo.  SmartThings seems a bit limited today compared to other systems on the market.  Keep up the good work!!!

luma

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #4 on: June 30, 2015, 09:46:58 am »
This is fantastic.

I have ADT Pulse controlling my zwave devices.  Any idea if I can modify this somehow to have Echo send commands to the Pulse system?

Thanks.
To the best of my knowledge, ADT Pulse has no open API.  It's a closed off, locked-up system designed to keep you paying their monthly fee.  Unless you want to get creative with screenscraping, I don't see any natural path towards integrating ADT Pulse with anything.
« Last Edit: June 30, 2015, 05:20:17 pm by luma »

litfoo

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #5 on: August 20, 2015, 03:57:54 pm »
luma - this is awesome. My primary purpose for my Echo was to some day be able to control my Sonos and Harmony Hub via Voice

Have managed to execute the jar file for the armzilla Hue emulator and have Eventghost running. A little unsure as to how to get the Webserver plugin setup within EG at present - have set my 'HTML documents root' folder - but when I click on OK the Log shows:

Error starting plugin: Webserver
Traceback (most recent call last) (1700):
  File "C:\Program Files\EventGhost\eg\Classes\PluginInstanceInfo.py", line 177, in Start
    self.instance.__start__(*self.args)
  File "C:\Program Files\EventGhost\plugins\Webserver\__init__.py", line 3663, in __start__
    self.server = MyServer(RequestHandler, port, certfile, keyfile)
  File "C:\Program Files\EventGhost\plugins\Webserver\__init__.py", line 842, in __init__
    HTTPServer.__init__(self, address, requestHandler)
  File "SocketServer.pyc", line 400, in __init__
  File "C:\Program Files\EventGhost\plugins\Webserver\__init__.py", line 858, in server_bind
    HTTPServer.server_bind(self)
  File "BaseHTTPServer.pyc", line 108, in server_bind
  File "SocketServer.pyc", line 411, in server_bind
  File "<string>", line 1, in bind
error: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions


Also, when running command prompt as admin, and the zip from http://svideo.org/HarmonyHubControl.zip, I am sending in:

C:\Echo\HarmonyHubControl>HarmonyHubControl.exe my email address my password 192.168.1.114 list_devices

however got this error back:

LOGITECH WEB SERVICE LOGIN     : FAILURE
ERROR : harmonyWebServiceLogin : Logitech web service response does not contain a login authorization token

C:\Echo\HarmonyHubControl>

any ideas as to why I am getting this failures for EG and HHC?

thanks


*update* - issue was with AVG Antivirus - disabled AVG, ran the command again and got a successful login - re-enabled AVG and it still works :)

However, sent in some commands based upon Activity IDs which appear successful at cmd prompt - however the activites are not actioning - any ideas?
« Last Edit: August 21, 2015, 02:07:46 pm by litfoo »

monty617

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #6 on: August 31, 2015, 01:34:39 pm »
With the newly announced SmartThings integration I would recommend using the SmartThings IDE to create a virtual switch to push commands to either IFTTT or Harmony Hub directly. Very easy to do and you can use the native "Turn On" / "Turn Off" Echo voice commands.

luma

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #7 on: August 31, 2015, 02:41:46 pm »
Totally agreed.  The native ST Echo integration is fast and works well.  There are still some edge cases where I'm using the amazon-echo-ha-bridge but for most situations I've moved all my lights over to the native integration.

monty617

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #8 on: August 31, 2015, 04:43:17 pm »
Best part being with their open API you technically don't even need their hub to create virtual switches to tie to IFTTT, although their new hub should release next week and I have even had great success with V1.

litfoo

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #9 on: September 02, 2015, 04:43:06 pm »

Thanks for the feedback luma and monty617

Am quite a novice at this so was looking if one of you could do a step my step guide which could benefit me and other novice users.

I own an ECHO and Harmony Hub but no Smarthings Devices as am in UK.

So just need to know how to be able to give voice command to Echo using Native ST Echo integration to engage my following Harmony Activities:

LOGITECH WEB SERVICE LOGIN     : BYPASSED
HARMONY COMMUNICATION LOGIN    : SUCCESS
HARMONY COMMAND SUBMISSION     : SUCCESS
PARSE ACTIVITIES AND DEVICES   : SUCCESS
Activities Available via Harmony :

-1 - PowerOff
10592131 - Watch Virgin TV
10592132 - Movies\/TV Shows
10592133 - Movies\/TV - Projector
10592134 - Virgin on Projector
10592135 - Play Xbox 360
10592136 - Xbox 360 - Projector
10601713 - Sonos - Living Room
10671115 - Watch TV - Bedroom
13466022 - Play PS4
13469952 - Play PS4 - Projector

Hope this is ok

litfoo



litfoo

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #10 on: October 10, 2015, 03:13:56 pm »
Would be great if someone could help me out as I do not have a Smart thing Hub

Am still having the same issues with EventGhost -can't seem to get the Webserver up and running

Error:



Config:



And when the EG Webserver is running I am a little unsure as to the full path I should be using for the Harmony Command

At the moment my HarmonyHubControl.exe sits in C:\Echo\HarmonyHubControl

so i have entered C:\Echo\HarmonyHubControl\HarmonyHubControl.exe myemail@gmail.com mypassword 192.168.1.100 start_activity 1234567 but it does not work



I can get the commands to work if, from a command prompt, go directly into the folder and then run the .exe command with my email/password/ip etc combination

Hope someone can help

Cheers,

litfoo
« Last Edit: October 10, 2015, 03:26:53 pm by litfoo »

litfoo

Re: HOWTO: Using Echo to control SmartThings, Sonos, Harmony, etc
« Reply #11 on: November 23, 2015, 11:20:46 am »
can someone offer some advice as to the correct path I need to use for the 'Windows Command' in EG

this is the last step I need to get Alexa > Echo Bridge > EventGhost> HarmonyHubControl

thanks
« Last Edit: November 24, 2015, 03:36:55 pm by litfoo »