My name is Aaron Tinsley

An eclectic collection of thoughts and projects on a variety of (mostly) tech topics.

[How To] Control your OpenHAB Items using the Amazon Echo

Hello Echo

Above photo by MjZ Photography / Foter / CC BY-NC-ND

Introduction

Having a digital personal assistant, like Jarvis from Iron Man, is the ultimate geek dream.  Over the past few years, most of the major tech companies have attempted to turn this dream into reality.  Apple has Siri, Microsoft has Cortana, and Google has Google Now.  Even some smaller companies have tried their hand:  SoundHound recently launched their Hound app which focuses on natural language processing and a speedy response to your queries.  All of these companies have something in common, though.  They’re all focused on using your mobile phone as the input device.

Amazon has taken a different approach with their Echo “smart speaker”.  The Echo is a stylish, cylindrical speaker which is meant to be displayed on a coffee table, kitchen counter, or your nightstand.  However, the important part of Echo is what it’s doing: listening.  Simply speak the trigger word at any time (“Alexa” by default) to make the Echo spring to life and await your command.  That’s why it’s the perfect home automation controller.  It’s hands-free!

In this post, I’m going to show you how to control your OpenHAB items using the Amazon Echo.  Let’s begin!  Here’s a video demonstration of what you can do with this.

Prerequisites

First thing’s first.  Get your Echo all set up and decide where you’d like it to sit.  I played around with mine for about 15 minutes before I decided to get down to business and set it up with OpenHAB.

You’ll need to download a great little piece of software from GitHub named Amazon Echo HA Bridge.  The author, Armzilla, uses this to control a Vera from his/her Echo, but we’re going to use it to control OpenHAB.  Download the latest release to your OpenHAB PC.  I’m using version 0.1.2.  You’ll also need Java 8 installed in order to run the software.

Finally, we’ll need a Chrome extension named Postman.  We’ll use this to upload our settings into the Echo HA Bridge.  You may use another REST client if you wish, but I won’t cover that in this guide.

Control your OpenHAB items using the Amazon Echo

Step 1: Run the Amazon Echo HA Bridge

Linux users: You’ll need to open up port 1900 for UDP in order for the Echo to be able to discover the HA Bridge.  Follow this link to learn how to use iptables to open ports.

Okay, enough beating around the bush.  Let’s get into it!  The first thing we need to do is run our Amazon Echo HA Bridge.  Open a command prompt window and navigate to the folder where you stored the Amazon Echo HA Bridge .jar file.  (Or use this shortcut! Navigate to the directory in Windows Explorer, then hold shift and right click in the white space.  Choose option “Open command window here”.  See below picture for an example!)

Open a command prompt by shift+right clicking
Click image to expand.

 

Then, you’ll want to enter this command in the command prompt window.  NOTE: You may need to replace the .jar filename and the IP address with your own!  You should enter the IP address of the PC you’re running it on.

java -jar amazon-echo-bridge-0.1.2.jar --upnp.config.address=192.168.1.240
Warning: If you’re running the Bridge on the same PC as your OpenHAB server, you’ll probably need to change the port that it listens on. This is because OpenHAB and the Echo HA Bridge both default to port 8080.

To change the port the Echo HA Bridge is listening on, add this flag to the end of the command:

–server.port=<port>

Enter the command in the command prompt.
Click image to expand.

After you run the command, there will be a bunch of output which you can ignore unless you run into issues.

Output from command prompt.
Click image to expand.

Step 2: Load configuration data into the Amazon Echo HA Bridge

This is where the Postman Chrome extension comes into handy.  We need to upload our configuration data in JSON format using a RESTful API.  Don’t freak out!  It’s not that hard.  I’ll walk you through it.

When you open Postman, you need to make sure the settings are correct.  You need to make sure you’re in POST mode, have the correct address filled in (It should be http://<ip address>:8080/api/devices), and have raw data and JSON selected.  Questions?  Refer to the picture below!  I’ve highlighted all of the critical areas.

Postman Settings
Make sure your settings match mine! Click on image to expand.

Now we need to post the data.  Refer below for an example of a setting I’m using.  Lights is an OpenHAB Group that turns all of my lights either on or off.  “All the lights” is the string that your Echo will react to.  Make sure this is a good description for your light or item.  Examples could be “deck light”, “living room light”, “hallway light”, or even something cool like “netflix” if your OpenHAB is able to control your TV!

Note that if you’re running the Echo HA Bridge on a different PC than your OpenHAB, you’ll need to replace both spots where it says “localhost” with your OpenHAB IP address.  You also may need to change the ports from 8081 to something different, depending on which port your OpenHAB is listening on.

{
"name" : "all the lights",
"deviceType" : "switch",
"onUrl" : "http://localhost:8081/CMD?Lights=ON",
"offUrl" : "http://localhost:8081/CMD?Lights=OFF"
}
Postman with the JSON ready to send
Click image to expand.

When you are finished making your changes, click “Send” on Postman.  It will scroll down and show you some output from the HA Bridge so you know it worked.  You’ll need to scroll back up and repeat the process for each and every device you want to control with your Amazon Echo.

Postman output
Click image to expand.

When you’re finally done uploading devices, go to Chrome or your browser of choice and navigate to http://<Amazon HA Bridge IP>/api/devices.  You should see all of your loaded devices there.

Loaded Devices
All of your loaded devices should show here.

Step 3: Load settings into your Amazon Echo

On your phone, launch the Echo app.  Open the Settings page and scroll all the way down where it says “Connected Home”.  Click the button that says “Add new devices” and wait!  The Echo should find all of the devices you uploaded into the Echo HA Bridge.  Congrats!  Now you can tell your Echo to “turn the kitchen light on” or “turn all the lights on”, or whatever you configured!  Kick back and tell Alexa what you want her to do while you’re watching TV, entertaining friends, or doing the dishes!

Devices loaded into Echo app
The devices are now loaded into Echo and ready to be used!

Questions? Comments? Concerns?  Comment below and I’ll do my best to help!  We’re all in this home automation journey together.

 

81 comments

    1. Gary,

      Great job on your system! Looks like I’ve got some catching up to do :).

      Thanks for your addition! I’ll add it to the article when I get a chance.

  1. Great work, this seems promising. A couple of comments:
    Your steps above stop short of showing how to integrate the Amazon Echo HA Bridge into OpenHAB
    The Amazon Echo HA Bridge initializes on port 8080 which is the same port by default as OpenHAB. Curious what work-around you used for this?

    1. Dave,

      You know what? I hadn’t thought about that. I run my OpenHAB on 8081 because I used to have an application running on 8080 (though I don’t remember what it was).

      I’ll update the article explaining how to bind the HA Bridge to another port.

  2. Great work!
    A question: do you know if is possible to pass to openhab the text string recognized from speech, in order to analyze the text in openhab and avoid to configure each object in Echo?
    Thank you!

    1. Luca,

      It is possible, though it’s very clunky right now. The communication between the Echo and Amazon’s servers is encrypted, so there’s no way to snoop on that traffic. The workaround is to open up a Chrome browser, navigate to the Amazon Echo history page on Amazon’s website, and then inject some javascript to pass new commands on to OpenHAB. I’ll write an article about it shortly, but you can go to Zach Feldman’s blog to get started.

    1. John,

      It’s probably because the Echo HA Bridge isn’t documented very well :P. I didn’t even know about a Configuration page! On the GitHub readme, the instructions are to POST JSON to /api/devices, but it doesn’t make any mention of a Configuration tool. That’s why I used Postman.

      I’ll check it out. I’d love to update the article with a simpler process to make it more accessible. Thanks for the tip!

  3. Please mention that Amazon Echo will only detect devices if the echo bridge host machine is connected to the LAN wirelessly with the same SSID. echo bridge doesn’t seem to support host machines connected to LAN wired (i.e. through ethernet cable). Also, no device detection if a network has 2.5GHz and 5GHz wireless networking with different SSIDs, and Amazon Echo and host are on them respectively. I almost pulled my hair out before finding this out after hours of frustration.

    1. Mega,

      The machine I run the HA Bridge on is connected to the router via Ethernet (and not WiFi). Could there potentially be something else going on?

      The issue between 2.4 GHz and 5 GHz sounds like it could be a VLAN issue. I’m not sure if your router gives you an option to change those settings, but it might be something worth looking into. Unfortunately, I don’t have a computer with 5 GHz WiFi so it makes it very difficult for me to test. Can you ping the Echo from the machine that’s connected to 5 GHz?

      I’m sorry to hear you got so frustrated! The whole point of this installation is that it should be relatively quick and painless.

  4. Great to see that this is possible, but I’ve tried configuring a test case on my Raspberry Pi, and when that failed, on my Mac, both connected to the same wifi network, only 2.4 GHz, and still, Echo fails to ever find the new test device (even though it does show up when I query /api/devices. I’m at my wits end. Anyone else running into a similar problem? Any way to test if it really is a port issue (doesn’t seem to be, since it fails on both devices, and I have opened up UDP 1900 fully, though there is no restrictive firewall on the Pi to begin with). Thanks!

    1. I solved my own problem… Had to add this gem on my personal setup, which immediately allowed Echo to find my devices. Hooray :) Hopefully this helps someone else:

      -Djava.net.preferIPv4Stack=true

      Full command line:

      java -jar -Djava.net.preferIPv4Stack=true amazon-echo-bridge-0.1.3.jar –upnp.config.address=192.168.1.240

      1. Emmanuel,

        Kudos to you.. not only for figuring out the solution to your problem, but also for coming back here and sharing it!

  5. All I want to accomplish is the ability to control actions on my Harmony Hub like turn on TV, etc. I think I have the echo-ha-bridge running but I cant wrap my head around installing the OPENHAB and adding the Harmony, whats the easiest way to do this? I have the following items as well to choose form if needed: MAC OSX Server box, Physical HUE Hub, WINK Hub, Harmony Hub, Android Tablet.

    Any direction is appreciated. I take direction well and I am pretty tech savvy.

    1. Hi Teddy,

      I’m VERY close to having the Echo working with Indigo on the Mac. Indigo can interface with EVERYTHING.

      John Ray at Mac dot com.

      — John

      1. John,

        If you do a write-up after figuring Indigo out, please comment back with the link. I’ve never used Indigo but have heard it mentioned alongside OpenHAB when discussing up-and-coming home automation software. I’d be interested to read an article if you write one.

    2. Teddy,

      This question is probably too broad to answer in a comment (especially because I don’t have a Harmony Hub), but I’ll do my best.

      This is a somewhat ugly solution, but since I don’t have a Harmony Hub it’s the best I can come up with for now. I’ll be using a very simple example of two activities “Power Off” and “Watch TV”. These activities should already be defined on your Harmony Hub. I have no way of testing this so there may be an error or two. Come back if it doesn’t work and I’ll try to help.

      Here’s a general overview of what you’ll need to do:
      1. Download the OpenHAB runtime with demo configuration and unzip it
      2. Download the OpenHAB Addons and place org.openhab.binding.harmonyhub-1.7.0.jar into your /openhab/addons folder.
      3. Open openhab.cfg in the /openhab/configuration/ folder and add the following lines:

      harmonyhub:host=<local ip address of your hub>
      harmonyhub:username=<your logitech username>
      harmonyhub:password=<your logitech password>
      

      4. Open demo.items in /openhab/configuration/items/ and add the following.

      Switch HarmonyTvSwitch
      

      5. Open demo.rules in /openhab/configuration/rules and add the following two rules to the bottom

      rule "TV On"
      when
      	Item HarmonyTvSwitch received command ON
      then
      	harmonyStartActivity("Watch TV")
      end
      
      rule "TV Off"
      when
      	Item HarmonyTvSwitch received command OFF
      then
      	harmonyStartActivity("Power Off")
      end
      

      6. Now upload the configuration into your HA Bridge. Your onUrl property should be

      http://<OpenHAB IP>:<OpenHAB Port>/CMD?HarmonyTvSwitch=ON

      and offUrl property should be

      http://<OpenHAB IP>:<OpenHAB Port>/CMD?HarmonyTvSwitch=OFF

      Here are some good resources:
      OpenHAB Harmony Hub Binding wiki
      Configuring the OpenHAB Runtime – Visit here when you want to learn more about OpenHAB. The learning curve is a little steep, but it’s by far the best home automation software I’ve ever used. Stick with it!

      And if you don’t want to stick with it, you can wait for John to get the Echo working with Indigo :)

      1. I downloaded the files you linked above but none of the specific files your want me to edit exist. (openhab.cfg, demo.items, demo.rules) The directories you refer to are there but not those files. Am I to be making new files with these values?

        SOrry!

          1. I found all the other files in the new download link however there is no openhab.cfg file in the location you stated.

            Do I just create a blank file?

  6. What am i missing here?
    First I fail to see how openhab connects to the bridge. Did I miss a step. It seems like alexa connects to the bridge running and can sent rest URLs directly to the zwave devices. i don’t see where opehhab comes into play(which is the part I’m probably missing)

    The bridge runs on another port, and the URL is just the rest URL of the On/Off command for the zwave device.
    When i ask alexa to turn off dining room light, it says it is not responding.
    I have the bridge set up and listening, I have it in the echo app.
    When i ask her i see the following in the command terminal:

    2015-07-18 20:41:00.955 INFO 6970 — [io-33125-exec-4] com.armzilla.ha.hue.HueMulator : found device named: Dining Room Light
    2015-07-18 20:41:01.124 INFO 6970 — [io-33125-exec-5] com.armzilla.ha.hue.HueMulator : hue state change requested: xlCBsOlvJ07oOm6RO8ugXGFNVlfrMS8wnXqYsW6g from 172.16.1.215
    2015-07-18 20:41:01.125 INFO 6970 — [io-33125-exec-5] com.armzilla.ha.hue.HueMulator : hue stage change body: {“on”: true}
    2015-07-18 20:41:01.128 INFO 6970 — [io-33125-exec-5] com.armzilla.ha.hue.HueMulator : calling GET on URL: http://172.16.1.241:8080/CMD?DiningRoom_Light=100
    2015-07-18 20:41:01.135 INFO 6970 — [io-33125-exec-5] com.armzilla.ha.hue.HueMulator : GET on URL responded: 401
    2015-07-18 20:41:18.469 INFO 6970 — [io-33125-exec-2] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207
    2015-07-18 20:41:25.165 INFO 6970 — [io-33125-exec-6] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207
    2015-07-18 20:42:18.474 INFO 6970 — [io-33125-exec-7] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207
    2015-07-18 20:43:18.493 INFO 6970 — [io-33125-exec-9] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207
    2015-07-18 20:43:25.182 INFO 6970 — [io-33125-exec-8] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207

    1. Rich,

      OpenHAB doesn’t really connect to the Bridge. The Bridge does an HTTP GET call to OpenHAB at the appropriate time. I see that I did a poor job of explaining that, and will go back and edit the article when I get a chance.

      Is your OpenHAB at http://172.16.1.241:8080? Is your item named DiningRoom_Light? If the answer to those questions are both “yes”, what happens when you open http://172.16.1.241:8080/CMD?DiningRoom_Light=100 in a browser on the same PC that the Echo HA Bridge is running on?

  7. Aaron,

    Thanks for the reply.
    Yes and yes are the answers to your questions.
    I ran that command from the browser and it requested my user/pw for openhab. Once entered, the light went on.

    I did switch it up a bit…once i reread the article, i created an item in openhab called DiningRoomLightEchoSwitch of type switch and wrote a rule (on change if ON then send command(diningroomlight,100) if OFF then send command(diningroomlight,0)

    But same concept, just one extra hoop to jump through it seems.

    So do you think its the authentication? Do you have your openhab pw protected?

  8. I do notice in the bridge console that it is doing a “GET” which is maybe why echo doesn’t have a response…the GET succeeds in a rest tool, but there is no payload response.

  9. It’s almost like it does a GET, waits for a response, then probably would send the on/off URLs
    However since GET has no response, perhaps it doesn’t send the command and echo seems to not know about it.

    2015-07-18 21:25:29.509 INFO 7602 — [io-33125-exec-2] com.armzilla.ha.hue.HueMulator : calling GET on URL: http://172.16.1.241:8080/CMD?DiningRoomLightEchoSwitch=ON
    2015-07-18 21:25:29.518 INFO 7602 — [io-33125-exec-2] com.armzilla.ha.hue.HueMulator : GET on URL responded: 401
    2015-07-18 21:26:25.820 INFO 7602 — [io-33125-exec-3] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207
    2015-07-18 21:27:25.474 INFO 7602 — [io-33125-exec-5] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207
    2015-07-18 21:27:46.546 INFO 7602 — [io-33125-exec-6] c.armzilla.ha.upnp.UpnpSettingsResource : upnp device settings requested: amazon-ha-bridge from 172.16.1.207

    Response to a GET(for this URL http://172.16.1.241:8080/CMD?DiningRoomLightEchoSwitch=ON) in a REST tool(note no payload but it does succeed)
    Status
    200 OK Show explanation Loading time: 18
    Request headers
    CSP: active
    User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.134 Safari/537.36
    Content-Type: text/plain; charset=utf-8
    Accept: */*
    Accept-Encoding: gzip, deflate, sdch
    Accept-Language: en-US,en;q=0.8
    Cookie: ext-graphWindowSizer=o%3A; ext-automationWindowSizer=o%3Awidth%3Dn%253A430; ext-configWindowSizer=o%3A
    Response headers
    Date: Sun, 19 Jul 2015 01:12:32 GMT
    Content-Length: 0
    Server: Jetty(8.1.3.v20120522)
    Raw
    Response
    Word unwrap Copy to clipboard Save as file
    Response does not contain any data.

  10. I had to embed the user:password@URL into the ON OFF urls of the bridge.

    On another note; i’m running the bridge in Ubuntu…do you know how to auto start the bridge each time in linux?

    Thanks

  11. Can anyone confirm the server port command works? I have

    java -jar amazon-echo-bridge-0.1.3.jar –upnp.config.address=192.168.1.200-server.port=8081

    And the server continues to start with 8080.. did I miss something??

    Thanks ahead of time

        1. I had the same issue. I only had a single hypen or it was two strange non-standard hyphens that the web page has… don’t copy and paste. Working great for me after deleting and retyping.

  12. Aaron, this is really nice!! thanks for the write-up!!
    I now have my first insteon light switch working now with the echo and openhab..

    I am not sure how to edit the device list. Is there an easy way to edit the api/devices?
    or is it easier to clear the data folder and start over?

    Now if I could just get my insteon sprinklers setup in openhab, I will be set to go!!

    Thanks again.

    1. Jay,

      No problem! I’m glad it helped. As far as editing the device list for the Bridge, the honest answer is I don’t know. I did my initial setup and have mostly left it alone since then. I may pore over the source code and look for the answer. The only time I’ve spent in the source code thus far was to figure out how to change the listening port.

      All of the commenters have made one thing clear… I’m way behind some of you in home automation! Good luck with your sprinkler system!

  13. Hi Gang,

    So getting *some* progress here, but had a few questions about the mechanics of device entry:

    1) So let’s say you make a “boo boo” while entering a device…is there a way to “delete” it from the bridge?

    2) Also, does Postman want fully-qualified URLs with codes, or will it accept quotes, spaces, etc. verbatim?

    Thanks,

    -S

    1. Learned a lot in this process and am answering my own questions for those who may have similar questions:

      1) The only real way to do it is to open the Echo App, go to Settings–>Connected Home, and scroll to the bottom. Hit “Forget All Devices” (don’t worry, it will preserve persistent devices like *actual* HUE hardware). Then you can start over with posting the soft devices.

      2) Definitely fully-qualified *localhost* URLs (not on port 8080), with codes in place of special characters.

      Example: “onUrl” : “http://localhost/ph-cgi/formula?formula=ph_macroparm(%27IRR_ON_MANUAL%27,6,15,0,0,0)”

      Hope this helps someone.

      -S

  14. Aaron Tinsley (a.k.a. “Self-Proclaimed Super Geek, Extraordinaire”),

    THANK YOU THANK YOU THANK YOU! Your instructions above with a lot of tinkering and help from another patron of your fine site here got this totally off the ground for me. I am now of the “Techno Bob” caliber among friends and get serious “rolling eyes” and laughter from my family! You are a technopath…possibly a demigod…hard to tell, but either way, thanks.

    SOME INFO FROM MY EXPERIENCE:

    1) POWERHOME/PHCA: I am using a home-automation integration platform called Power Home (power-dash-home-dot-com), and a while back worked with another technopath (GadgetGuy on the power-home forums), to setup a *very* cool mobile/Android app called PHCA, complete with highly-detailed and rendered sections of the house…pretty fun. Anyway, when I saw this my first question was, “I wonder if I can use my already present PHCA macros, accessible via HTTP in PowerHome, to take control of Insteon, X1, and other types of hardware already integrated with PowerHome?”. The short answer is, “Yes”, but if you’re using PowerHome, make *sure* to enable the web browser. PHCA uses sockets where this app uses HTML. I also suggest if you’re not using a web interface to go ahead and make 127.0.0.1 the only valid address from which requests can be solicited as I did.

    2) ECHO BRIDGE PLAYS NICELY WITH OTHERS: I *do* actually have a smattering of HUE-proper hardware in my mix, so there was some question as to how the two bridges would play together, and what the Echo App might think of them. The short answer is it’s crazy-graceful. When discovering the virtual hardware on the Echo Bridge, it just *added* the devices into the whole package along with the already existent HUE lights. They can be grouped however you want and operated in harmony. I have an Insteon light switch on one light in a room, and three HUE lamps in a torchiere. I group them together under “Family Room Lights” and can turn them all off with a simple “Alexa, turn on Family Room Lights”. It’s seamless.

    3) BLACK-JACK: Another user has mentioned a 21-device limit in PowerHome’s forum. I thought I read something on another forum to that effect surrounding the Echo Bridge…does anyone else know anything about this, and whether it’s been circumvented?

    4) PERSISTENCE: Obviously, setting *everything* up every time the machine decides to apply updates isn’t going to stand for long, so was wondering if anyone had any ideas or solutions around keeping device configurations persistent so that when re-launching the server they are still present and happy.

    5) WOULD YOU CLASSIFY THAT AS A DESIGN PROBLEM OR A LAUNCH PROBLEM: Was wondering if anyone has yet come up with a graceful way to launch the server automatically. So far, I’m just putting a batch file together and considering building an install set; however, it would really require a way to re-load the configs for the devices (mentioned in number 3 above) to be truly launched.

    6) AMNESIA ERROR CORRECTION: While forgetting all devices in Echo and re-starting with the loading of devices technically works, it’s not particulary convenient. If there were a way to “delete a device”, or “replace a device” … well, it’s a move to a more mature solution.

    Regardless, this information has been for yours truly nothing short of FlipMazing! Tubacular! Fantasmagasm! …and Fawsome! (This called for the coining of not one but *four* entirely new terms for “Extastical”….ok, five).

    Thanks again,

    -S

    1. Spencer,

      Hah! You gave my wife and I quite a laugh. I am most certainly a technophile (and a super geek!), but a demigod I am not.

      I was unable to get to a PC until now, but I’m glad you found answers to your problems! Unfortunately, I haven’t had much time to tinker around with this particular piece of software because I’ve been migrating my whole home software stack to a new server. I’m lacking answers to all your questions, but here are a few notes.

      • I should check out Power Home (though I’m extremely happy with OpenHAB).
      • I haven’t ran into any device limit for the HA Bridge, but currently only have 5 decides loaded into it.
      • The persistence issue is an interesting one. The HA Bridge just released 0.2.0 and may have solved this for us, but if not, I have designs on using a separate python script to launch the HA Bridge and load the JSON into it.
      • I’d say it’s probably a design problem, but it’s hard to fault armzilla when he’s already given us such a sweet little piece of hardware

      I’m happy it’s worked out for you! As always, thank you for answering your own questions. There’s nothing worse than Googling a problem, just to find that someone else had fixed it and didn’t provide the solution.

  15. Really like the video and some tutorials. I have veralite as controllet but it’s very slow. I am able to use the echo bridge HA. Thanks.

    I’d like to be able to install openhab. What’s the basic installation do I need to do? Do you have a simple tutorial on how to install openhab?

    I have veralite, echo and harmony hub. Kindly please direct me.

    Thank you appreciate any help.

    Cheers,
    Perry

  16. Thanks for the tutorial!

    Other people probably figured out how to have Alexa dim lights without needing it explained to them, but I thought I would comment and potentially save someone some time:

    As of 0.1.3, the Echo-HA-Bridge supports dimming. In the Configurator page, use these URLs:

    On URL: http://:8080/CMD?Light=${intensity.percent}
    Off URL: http://:8080/CMD?Light=OFF

    I got it working tonight with 0.2.1 and OpenHAB 1.7.1, both running on Windows 10.

  17. Hi! Awesome article – thanks very much!
    Just wondering how alexa connects to the bridge?
    The bridge has loaded… configurator.html is setup and testing the ‘on’ and ‘off’ commands works fine… Alexa, however, cannot discover the device.
    The ports are open, I’ve tried the “-Djava.net.preferIPv4Stack=true” addition, but nothing seems to work and device discovery on the Alexa app only finds the Wemo devices. Advice greatly appreciated!

    1. Lauren,

      The Bridge makes itself known via a service called UPnP, which may not be enabled on your router. You ‘ll want to check on that first. Other than that, is it possible that the Echo and the PC running the Echo HA Bridge are on different subnets?

    2. Hi Lauren,

      Is the Echo connected to a 5 GHz network? I had a similar issue and moved the Echo to my 2.4 GHz network and it was then able to see the devices from the HA Bridge.

  18. Folks might be interested in this hue simulator versus the java version:

    https://github.com/johnray/hueAndMe

    I wrote it to address several issues with the Java bridge and to integrate with the Indigo HA system. You don’t need to use the Indigo integration to use this, however. Dead simple to setup and run if you’ve got a system with Python. No modules required.

  19. So I am running OpenHAB within Rasperry Pi and I saved the .jar file in my OS X and I run it within OS X terminal and I get the following error. Can you please let me know how I can fix that?
    java -jar amazon-echo-bridge-0.2.1.jar –upnp.config.address=192.168.1.105
    Exception in thread “main” java.lang.UnsupportedClassVersionError: com/armzilla/ha/SpringbootEntry : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at org.springframework.boot.loader.LaunchedURLClassLoader.doLoadClass(LaunchedURLClassLoader.java:163)
    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:136)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:46)
    at java.lang.Thread.run(Thread.java:745)

    1. Mona,

      I’ve replied on your SO post, but here it is again just for reference:

      You’re trying to run the Jar file using Java 7, while it was designed to run on Java 8. Install Java 8 and run the Jar to fix the error.

      Thanks.

      Aaron

  20. Also when I run it from Raspbian I get the following error. If you can help me figure what is wrong or missing I’d really appreciate:
    However even when running within Raspbian I get this error:

    asticsearchAutoConfiguration : Closing Elasticsearch client
    2016-01-24 23:07:58.279 INFO 2411 — [ main] org.elasticsearch.node : [Bres] stopping …
    2016-01-24 23:07:58.336 INFO 2411 — [ main] org.elasticsearch.node : [Bres] stopped
    2016-01-24 23:07:58.337 INFO 2411 — [ main] org.elasticsearch.node : [Bres] closing …
    2016-01-24 23:07:58.413 INFO 2411 — [ main] org.elasticsearch.node : [Bres] closed
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
    at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:14)
    … 6 more
    pi@raspberrypi /opt/openhab/echo $

    1. Mona,

      If I had to guess, I’d say it’s because The Echo HA Bridge is trying to bind to port 8080. That’s also the port OpenHAB uses by default, so there could be a conflict. Run the jar like this. I would try port 8081 to begin with.

      java -jar amazon-echo-bridge-0.2.1.jar --upnp.config.address=[Raspberry Pi IP Address] --server.port=[Port]

  21. You are right, I was already running OpenHAB demo on the same port. I did sudo reboot and ran the command and now it is working

  22. At the end of Step 2, when I browse to Postman I see this:
    {
    “timestamp”: 1453683941233,
    “status”: 400,
    “error”: “Bad Request”,
    “exception”: “org.springframework.http.converter.HttpMessageNotReadableException”,
    “message”: “Required request body content is missing: org.springframework.web.method.HandlerMethod$HandlerMethodParameter@53cb13b3”,
    “path”: “/api/devices”
    }

    And then when I go to raw mode and enter the following:
    {
    “name” : “all the lights”,
    “deviceType” : “switch”,
    “onUrl” : “http://localhost:8080/CMD?lights=ON”,
    “offUrl” : “http://localhost:8080/CMD?Lights=OFF”
    }

    after send I get this error:
    {“timestamp”:1453684328774,”status”:400,”error”:”Bad Request”,”exception”:”org.springframework.http.converter.HttpMessageNotReadableException”,”message”:”Required request body content is missing: org.springframework.web.method.HandlerMethod$HandlerMethodParameter@53cb13b3″,”path”:”/api/devices”}

    Any idea what this could be?

  23. Hi,

    I’m going bananas over this :) Probably to much fiddling around. I got Openhab to work with my LG TV. Wehn I try Armzilla to connect Echo it either gives me a blanc page while testing or XML error. In my items file in openhub I have:

    Group TV_Living “Tv Room” (LgTv)
    Switch LgTvPower “Power Command” (GF_Living) {lgtv=”ON:Tv Room:POWER”}
    Switch LgTvMute “Mute” (GF_Living) {lgtv=”ON:Tv Room:KEY_MUTE, OFF:Tv Room:KEY_MUTE”}
    Number LgTvVolume “lgVolume [%.1f]” (GF_Living) {lgtv=”INIT:Tv Room:VOLUME_CURRENT, INCREASE:Tv Room:VOLUME_UP, DECREASE:Tv Room:VOLUME_DOWN, *:Tv Room:VOLUME_SET”}
    Number LgTvChannel “Channel [%.1f]” (GF_Living) {lgtv=”INIT:Tv Room:CHANNEL_CURRENTNUMBER, INCREASE:Tv Room:CHANNEL_UP, DECREASE:Tv Room:CHANNEL_DOWN, *:Tv Room:CHANNEL_SET” }
    String LgTvChannelName “Channelname [%s]” (GF_Living) {lgtv=”INIT:Tv Room:CHANNEL_CURRENTNAME”}
    String LgTvGetChannels “getchannels [%s]” (GF_Living) {lgtv=”INIT:Tv Room:GET_CHANNELS, ON:Tv Room:GET_CHANNELS”}
    String LgTvGetApps “getapps [%s]” (GF_Living) {lgtv=”INIT:Tv Room:GET_APPS, ON:Tv Room:GET_APPS”}
    String LgTvAppExecute “excuteapp” (GF_Living) {lgtv=”*:Tv Room:APP_EXECUTE”}
    String LgTvAppTerminate “terminateapp” (GF_Living) {lgtv=”*:Tv Room:APP_TERMINATE”}
    Switch LgTvConnStatus “connstatus ” (GF_Living) {lgtv=”*:Tv Room:CONNECTION_STATUS”}

    Can anyone please give me an example URL I should use to get this working? Openhab, Armzilla and Lovely Alexa so she will start Netflix :)

    I tried:
    {
    “name” : “Netflix”,
    “deviceType” : “switch”,
    “onUrl” : “http://127.0.0.1:8080/CMD?TV_Living=excuteapp”,
    “offUrl” : “http://127.0.0.1:8080/CMD?TV_Living=terminateapp”
    }

    But also:
    http://localhost:8080/rest/items/LgTvAppExecute?jsoncallback=callbackapp

    In my sitemap I have: (works great via webpage)
    Switch item=LgTvAppExecute label=”AppExecute” mappings=[Netflix=Netflix]
    Switch item=LgTvAppTerminate label=”AppTerminate” mappings=[Netflix=Netflix]

    I must say, I have 0 coding experience :)

    Kind regards,
    Frank

    1. Frank,

      Your URL should directly address the item, not the group it’s in. I haven’t tried controlling string items (just switch items), but you can try this.

      http://localhost:8080/CMD?LgTvAppExecute=[value]

      [value] should be a URL-encoded string. To URL encode a string, go to this link, type your string in the “Plain” box, and then hit the button that says “URLEncode”. It will output the URL-encoded string in the “Encoded” box.

  24. Hi Aaron, great post!
    have you developed the separate python script to launch the HA Bridge and load the JSON into it? Would you mind sharing this?

    1. Keesak,

      I haven’t created this script because my config has been persisting after reboots, so it isn’t really needed. Are you having trouble with your config resetting after a reboot?

  25. Hello Aaron,

    Followed your write-ups and got both “Echo ha Bridge” and “openHap” to run. Added my only test device called “Harmony TV” into Echo Bridge and Amazon Echo found it when I did a “scan devices”. When issued a verbal command to Alexa, “Turn on my Harmony TV”, I got the following in openHab console:

    [ERROR] [o.o.c.s.ScriptExecutionThread :50 ] – Error during the execution of rule ‘TV On’: Index: 0, Size: 0

    Any idea what this is about? Thanks. I am so close. Please help.

  26. Hi,

    I am new to openHab. I am using Amazon Ha Bridge with openHab for verbal commands to Amazon to control my harmony hub. Connection to hub looks good. I just have a rule error that not sure what to do.

    When issued a verbal command to Amazon Echo, “Alexa, turn on Harmony TV”, I got the following in openHab console:

    [WARN ] [.w.internal.servlet.CmdServlet] – Received command ‘ON’ for item ‘HarmonyTVSwitch’, but the item does not exist in the registry

    My demo.items file has below switch:

    /* Harmony Hub */
    String Harmony_Activity “activity [%s]” { harmonyhub=”*[currentActivity]” }
    Switch item=Harmony_Activity mappings=[PowerOff=’PowerOff’, Movies=’Movies’, TV=’TV’]

    Switch HarmonyTVSwitch “Switch”

    my rule has the following:

    // Rule for Harmony Hub
    rule “TV On”
    when
    Item HarmonyTVSwitch received command ON
    then
    harmonyStartActivity(“TV”)
    end

    rule “TV Off”
    when
    Item HarmonyTVSwitch received command OFF
    then
    harmonyStartActivity(“PowerOff”)
    end

    I do have all the Harmony Hub jars in addons folder. Please help. Thank you.

    1. Juan,

      I’ve never seen that error, but a quick Google search yielded this. Could it possibly be due to some weird encoding when you’re editing the OpenHAB config? Are you using the OpenHAB designer or another tool?

      1. I am using nano to edit these files. So frustrating. It seems like no one is using this out there. I am pulling my hair out at the moment. Thanks for replying and trying.

  27. OK I got it to work

    I changed my switch to the following text below. To be clear, I put the string below in my “demo.items” file.

    /* Harmony Hub */
    String Harmony_Activity “activity [%s]” { harmonyhub=”*[currentActivity]” }
    Switch Harmony_Activity mappings=[PowerOff=’PowerOff’, Movies=’Movies’, TV=’TV’]

    Switch HarmonyTvSwitch “Switch”

    I posted this same question in openHab forum and a fellow openHaber named “27maximilian” suggested the string above. My goodness. I have been pulling my hair out on this issue.

    Aaron, can you put this in your write up so that the next person would still have his hair? :)

    Also thank you Aaron for doing the original write up. You are da man.

    Juan

  28. When I browse to the URL I see this:
    Browse to http://144.92.129.230:8080/api/devices
    What I see :
    [{“content”:[],”totalPages”:1,”last”:true,”totalElements”:0,”numberOfElements”:0,”first”:true,”sort”:null,”size”:0,”number”:0}]
    Can you please let me know what is missing?

  29. 2016-03-09 02:55:51.294 INFO 13971 — [pool-1-thread-1] o.s.c.support.DefaultLifecycleProcessor : Stopping beans in phase 0
    2016-03-09 02:55:51.314 INFO 13971 — [ main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-starter-actuator-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-starter-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-autoconfigure-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-starter-logging-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/jul-to-slf4j-1.7.11.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/log4j-over-slf4j-1.7.11.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/logback-classic-1.1.3.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/logback-core-1.1.3.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/snakeyaml-1.14.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-actuator-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-core-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-starter-web-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-boot-starter-tomcat-1.2.3.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/tomcat-embed-core-8.0.20.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/tomcat-embed-el-8.0.20.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/tomcat-embed-logging-juli-8.0.20.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/tomcat-embed-websocket-8.0.20.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/jackson-databind-2.4.5.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/jackson-annotations-2.4.5.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/hibernate-validator-5.1.3.Final.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/validation-api-1.1.0.Final.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/jboss-logging-3.1.3.GA.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/classmate-1.0.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-web-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-aop-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/aopalliance-1.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-beans-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-webmvc-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-expression-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-data-elasticsearch-1.1.2.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-context-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-tx-4.1.6.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spring-data-commons-1.9.2.RELEASE.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/commons-lang-2.6.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/commons-collections-3.2.1.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/joda-time-2.5.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/elasticsearch-1.3.2.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-core-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-analyzers-common-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-codecs-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-queries-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-memory-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-highlighter-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-queryparser-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-sandbox-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-suggest-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-misc-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-join-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-grouping-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/lucene-spatial-4.9.0.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/spatial4j-0.4.1.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/antlr-runtime-3.5.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/asm-4.1.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/asm-commons-4.1.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/jackson-core-2.4.5.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/slf4j-api-1.7.11.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/jcl-over-slf4j-1.7.11.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/httpclient-4.3.6.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/httpcore-4.3.3.jar!/, jar:file:/home/pi/hue/amazon-echo-bridge-0.2.1.jar!/lib/commons-codec-1.6.jar!/]
    2016-03-09 02:55:51.336 INFO 13971 — [ main] utoConfigurationReportLoggingInitializer :

    Error starting ApplicationContext. To display the auto-configuration report enabled debug logging (start with –debug)

    2016-03-09 02:55:51.340 ERROR 13971 — [ main] o.s.boot.SpringApplication : Application startup failed

    java.lang.IllegalStateException: Tomcat connector in failed state
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
    at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:14)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
    at java.lang.Thread.run(Thread.java:745)

    2016-03-09 02:55:51.350 INFO 13971 — [pool-1-thread-1] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown
    2016-03-09 02:55:51.382 INFO 13971 — [pool-1-thread-1] o.s.b.a.e.ElasticsearchAutoConfiguration : Closing Elasticsearch client
    2016-03-09 02:55:51.384 INFO 13971 — [pool-1-thread-1] org.elasticsearch.node : [Zach] stopping …
    2016-03-09 02:55:51.457 INFO 13971 — [pool-1-thread-1] org.elasticsearch.node : [Zach] stopped
    2016-03-09 02:55:51.459 INFO 13971 — [pool-1-thread-1] org.elasticsearch.node : [Zach] closing …
    2016-03-09 02:55:51.502 INFO 13971 — [pool-1-thread-1] org.elasticsearch.node : [Zach] closed
    2016-03-09 02:55:51.515 INFO 13971 — [pool-1-thread-1] com.armzilla.ha.upnp.UpnpListener : UPNP Discovery Listener Stopped
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.IllegalStateException: Tomcat connector in failed state
    at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:157)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:288)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
    at com.armzilla.ha.SpringbootEntry.main(SpringbootEntry.java:14)
    … 6 more
    pi@raspberrypi:~/hue $

  30. I solved the previous issue but when I write this http://144.92.129.230:8080/api/devices in front of POST in Postman and click on the send button I receive this. How can this be fixed possibly?
    {
    “timestamp”: 1457494300298,
    “status”: 400,
    “error”: “Bad Request”,
    “exception”: “org.springframework.http.converter.HttpMessageNotReadableException”,
    “message”: “Required request body content is missing: org.springframework.web.method.HandlerMethod$HandlerMethodParameter@53cb13b3”,
    “path”: “/api/devices”
    }

  31. Hi Aaron, I got it eventually working with Postman as well, but when I run the Amazon Echo Alexa discovery it doesn’t find the “all the lights” nor shows it in the demo. Please have a look at this screenshot and let me know if you know of a solution?
    http://imgur.com/xmnilAC

  32. This is what I have written in Postman:
    http://imgur.com/7iZHneg
    As I said above, Alexa discovery doesn’t detect the object I post over Postman or configurator even though it is shown in the Amazon HA Bridge configurator panel. Thanks for looking into this!

  33. Aaron,
    I ordered a Amazon Dot (smaller version of the echo). Should be getting it in a few days. Are you still using this method with OpenHab? I currently have my 1.8.2 version of OpenHab running on a raspberry pi 3. Would I run the Amazon Echo HA Bridge on my Windows 10 pc or on the raspberry pi?

Leave a Reply

Your email address will not be published. Required fields are marked *