### Author Topic: Bridge Amazon Echo to Vera, on github!  (Read 638546 times)

#### wilme2

• Hero Member
• Posts: 1154
• Karma: +23/-13
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2310 on: August 30, 2017, 04:57:34 pm »
It could be your Synology unit.  In my case the problem was possibly traced to my Raspberry Pi 2 and not the HABridge setup.

I have been thinking about how to send periodic keep alive messages to make sure the HABridge is ready for a command.  Course, it could also be a Vera issue being ready for a command.  My Vera is busy, could be too busy for the HTTP command in some cases...
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)

#### JFalc

• Sr. Newbie
• Posts: 36
• Karma: +1/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2311 on: September 13, 2017, 10:45:44 pm »
Been wanting to integrate Echo with Vera. And luckily i found this today... uh.. been sleeping all this while?
So, this is a huge thread, and i believe lots have changed since the start of this thread and specifically with the setup.. Is there a post i can follow in here for easy directions? or even an external site link? please..
https://github.com/bwssytems/ha-bridge

Thanks for the link. Is this what most of the folks here have followed to setup Ha-Bridge for their vera automation? The steps in there are far more to fathom.. with explanation etc.. is there anything that showcases direct steps?

Page 139 of this thread has a step by step for RPi setup

http://forum.micasaverde.com/index.php/topic,31920.msg296007.html#msg296007

This setup has been working for me for quite some time now

#### wilme2

• Hero Member
• Posts: 1154
• Karma: +23/-13
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2312 on: September 15, 2017, 10:53:48 am »
It could be your Synology unit.  In my case the problem was possibly traced to my Raspberry Pi 2 and not the HABridge setup.

Funny enough, the problem is gone again.  No changes in my network or HA Bridge/Vera setup...
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)

#### chasiu

• Jr. Member
• Posts: 55
• Karma: +0/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2313 on: October 07, 2017, 12:06:50 pm »
Thank you for taking the time to write this up.  Everything worked great on the latest NOOBS 2.4.4 and ha-bridge-4.5.6.  The only thing I needed to change was enable SSH so I can remote in for headless operation.  That way I can start it up without taking it out of the closet.

But I need help with something.  I want ha-bridge to start on reboot.  I like it to be totally independent and worry free for my family so if there was a power failure it will start on reboot.  As of right now I need to do this after startup.

Using Putty SSH to the Raspberry Pi
/home/pi/habridge/habridge.sh

How can I automate this to work on reboot?  I am a script kitty so I really need step by step if possible.

Step by Step for setting up the bridge with a Raspberry Pi   (This was put together to instruct fellow novices on how to setup the Raspberry Pi)
I have no JAVA knowledge but general computer knowledge.
Thanks much to  Hero Member hmspain  who helped me troubleshoot and who put together the java lines needed to get it going.

This is what I did....

--Ordered a Raspberry Pi 3(Model B) kit from Amazon    (I didnt need a MicroSD-so I ordered the kit without the MicroSD, but you will need a MicroSD for this to work).

--Assembled it in the case, and put on the two heatsinks

--Put the microSD card in my Windows PC (not in the Raspberry Pi yet)

Unzipped it.  Ran SETUP to install it.
Used the program SD Formatter to format the micro-SD Card.

--(While in Windows 10) Unzipped the NOOBS_v2_0_0.zip file and copied its entire contents to the (recently formatted micro-SD card).

--(While in Windows 10) Right clicked on the drive and "ejected" the MicroSD card from my computer...

--Put the MICROSD card in the raspberry pi 3   (the slot is on the underside).

--Connected the Raspberry Pi 3 to a monitor/USB/Keyboard/Network Cable, and the power supply.

--Booted it up.    The NOOBS menu booted up and asked what operating system I wanted to install.  I chose  Rasperian (top choice).    (It gave me some warning that all files would be overwritten while the OS was installed onto the SD card).
(then it showed me the progress  1%    5%   etc --- took about 20 minutes).

--Then I waited for Rasperian OS install to finish.  It said it worked, so I then clicked for a reboot, and it rebooted into the new Rasperian operating system (which is now installed on Raspberry Pi)
I now have the graphical user interface working on the Raspberry Pi.

--While in RaspberryPi, after installing the O/S, I clicked on the command prompt icon and typed in ifconfig   This showed me the local IP address and MAC Address of the Raspberry Pi.   I copied the Mac address down.

--Then (Using my Windows Machine), I went into my ROUTER  (192.168.1.1 for me) and assigned that mac address to a specific IP address in the DHCP settings (192.168.1.120 for me) (this was under the DHCP settings of the router).

--Then I rebooted my router and made sure that the RP-45 device showed up as the specific IP address I assigned to it (192.168.1.120).

--Using the "raspberry" icon menu on the top left of the Raspberry Pi, I rebooted.

--Then I clicked on the 'bluetooth logo in the upper right hand corner to turn off Bluetooth
--Then I clicked on another logo in the upper right hand corner to turn off wifi  (I am using an ethernet cable)

--The I clicked on the two yellow folders at the top left corner of the Raspberry Pi GUI interface....and right clicked and created a new directory   'habridge' subdirectory in the pi/home   so it is now at  pi/home/habridge

-- (Using my Windows Machine), I downloaded the ha-bridge-3.1.0.jar file from   https://github.com/bwssytems/ha-bridge/releases       Then I renamed the file to:  ha-bridge-latest.jar

--------(if you have a USB stick (that is FAT32 formatted), you can download and create these files on a windows computer and copy them to your Raspberry Pi afterwards--that is probably the easiest)

--(Using my Windows Machine), I created a file using the NOTEPAD text editor in Windows that has the following two lines:

ps -ef | grep ha-bridge | awk '{print \$1}' | xargs kill > /dev/null 2>&1
java -jar -Dserver=192.168.1.120 -Dserver.port=8084 /home/pi/habridge/ha-bridge-latest.jar 2>&1 | tee /home/pi/habridge/habridge.log &

I saved the file as habridge.sh   (which saved it as   habridge.sh.txt -- so I had to re-rename it afterwards to just   habridge.sh).
-----I am a novice...I don't know what these lines really do...But please correspond your local ip address to the ip address. and your port to the port number (I am using 8084) (FYI I don't know why these two lines are significant or not...but I used them thanks to user hmspain...supposedly it closes the prior BRIDGE if it was already open, and then restarts.  Thanks so much Harrison for your help.)

--(Using my Windows Machine) I put the two files I created in Windows (habridge.sh and ha-bridge-latest.jar) on a USB stick (that was formatted as FAT32)

--I put the USB Stick into the Raspberry Pi. and copied the USB Stick two files into the pi/home/habridge    subdirectory.

--Then I rightclicked on the habridge.sh  and  ha-bridge-latest.jar   files on the RaspberryPi pi/home/habridge subdirectory, and changed the permissions to ANYONE (3 or 4 drop down boxes in the permission tab).

*FYI, if you are looking for it later, the USB stick shows up as a subdirectory of :    \media\pi

---Then I went into the the Raspberry Pi by clicking on the folder icons, and navigating to /home/pi/, and ran the   habridge.sh  file  by  "right click" on the habridge.sh file, click on COPY PATH, then open up the Command Prompt Terminal (command prompt icon at the top), and "right click" and "paste"....and then hit ENTER.
(now it should be running, but nothing will happen.)

--Now go BACK TO WINDOWS machine......  go into CHROME browser...type in your   ip address and port number into the browser as follows:    http://192.168.1.120:8084     and you get the GUI menu for the github server.

--Under the "Bridge Control" Tab at the top, there is a blank for a "VERA" ip address.   Now insert the IP address of your VERA and click ADD....then (at the top) click SAVE

--Now you need to go to the VERA DEVICES tab and add a few devices using the GUI.  (for each one you add, click "GENERATE BRIDGE DEVICE" box)

--Also, do the same for VERA SCENES --  add each scene you want to         (for each one you add, click "GENERATE BRIDGE DEVICE" box)

--Then I went to Alexa and said   ALEXA discover devices.

-- NOW IT ALL WORKS

-- (If you add more devices later, you need to just tell Alexa to   Discover Devices, so she gets on board with the new additions.

Thanks again to hmspain for his generous assistance and to all who created this file/habridge.

Hope this works for you.

(If this works as I expect it should), this should only take about one hour start to finish.

#### jswim788

• Hero Member
• Posts: 636
• Karma: +40/-2
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2314 on: October 07, 2017, 09:41:01 pm »
The github README.md file has the instructions on how to make it start on boot.  Find this page: https://github.com/bwssytems/ha-bridge, then go down and look for the section that starts "System Control Setup on a pi (preferred)".  The step by step instructions are there to have it start on boot.  Basically create a systemctl service file, reload the daemon, and start the habridge.  Just follow the instructions.

#### chasiu

• Jr. Member
• Posts: 55
• Karma: +0/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2315 on: October 08, 2017, 08:52:05 am »
Thank you, I will try that.  Still a little confusing but I will read it a few more times.

One other question I have is about getting Google Home to work.  I set up the ha bridge to port 8080 because that is what my first build was setup to.  But I was reading that Google Home won't work unless it is on port 80.  Will me changing the port cause it not to work with the Echo?  Would I need to discover devices again and have duplicates to delete?  As of right now Google Home app does not see the ha bridge or devices.  Is there anyway around this?  I tried port forwarding on my router but it only forwards to the WAN. I don't see a way to forward a internal port number.

The github README.md file has the instructions on how to make it start on boot.  Find this page: https://github.com/bwssytems/ha-bridge, then go down and look for the section that starts "System Control Setup on a pi (preferred)".  The step by step instructions are there to have it start on boot.  Basically create a systemctl service file, reload the daemon, and start the habridge.  Just follow the instructions.

#### cypher

• Newbie
• Posts: 2
• Karma: +0/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2316 on: October 11, 2017, 04:42:00 am »
Would it be possible to run HA-Bridge on a Synology NAS without Docker?

I've read through most of this thread, but I couldn't find anything definitive about such a setup.

Asking cause I've just bought a Synology 216j, which cannot support Docker.
(Yeah I probably should have done more research first, but my original intention was to run HA-Bridge on a Pi, before it belatedly struck me that hey, since my NAS is gonna be turned on 24/7, it'd make sense to have HA-Bridge running off it.)

I'd try it myself, but I figure I probably shouldn't open the NAS packaging, so I could still attempt to return/sell it if it definitely can't run HA-Bridge.

#### wilme2

• Hero Member
• Posts: 1154
• Karma: +23/-13
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2317 on: October 13, 2017, 11:09:36 am »
Would it be possible to run HA-Bridge on a Synology NAS without Docker?

I've read through most of this thread, but I couldn't find anything definitive about such a setup.

Asking cause I've just bought a Synology 216j, which cannot support Docker.
(Yeah I probably should have done more research first, but my original intention was to run HA-Bridge on a Pi, before it belatedly struck me that hey, since my NAS is gonna be turned on 24/7, it'd make sense to have HA-Bridge running off it.)

I'd try it myself, but I figure I probably shouldn't open the NAS packaging, so I could still attempt to return/sell it if it definitely can't run HA-Bridge.

It is a Java app, so can run on just about anything.  I assume the 216j is linux based like other Synology, so it should run.  But you will have to install Java and configure the bridge.  See the github link on the first page which has FAQs...
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)

#### cypher

• Newbie
• Posts: 2
• Karma: +0/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2318 on: October 17, 2017, 03:25:32 pm »
Would it be possible to run HA-Bridge on a Synology NAS without Docker?

I've read through most of this thread, but I couldn't find anything definitive about such a setup.

Asking cause I've just bought a Synology 216j, which cannot support Docker.
(Yeah I probably should have done more research first, but my original intention was to run HA-Bridge on a Pi, before it belatedly struck me that hey, since my NAS is gonna be turned on 24/7, it'd make sense to have HA-Bridge running off it.)

I'd try it myself, but I figure I probably shouldn't open the NAS packaging, so I could still attempt to return/sell it if it definitely can't run HA-Bridge.

It is a Java app, so can run on just about anything.  I assume the 216j is linux based like other Synology, so it should run.  But you will have to install Java and configure the bridge.  See the github link on the first page which has FAQs...

Alright, I'll give it a try then. Thanks for the advice!

#### battars

• Sr. Newbie
• Posts: 34
• Karma: +2/-1
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2319 on: October 18, 2017, 03:29:09 pm »
Thank you, I will try that.  Still a little confusing but I will read it a few more times.

One other question I have is about getting Google Home to work.  I set up the ha bridge to port 8080 because that is what my first build was setup to.  But I was reading that Google Home won't work unless it is on port 80.  Will me changing the port cause it not to work with the Echo?  Would I need to discover devices again and have duplicates to delete?  As of right now Google Home app does not see the ha bridge or devices.  Is there anyway around this?  I tried port forwarding on my router but it only forwards to the WAN. I don't see a way to forward a internal port number.

The github README.md file has the instructions on how to make it start on boot.  Find this page: https://github.com/bwssytems/ha-bridge, then go down and look for the section that starts "System Control Setup on a pi (preferred)".  The step by step instructions are there to have it start on boot.  Basically create a systemctl service file, reload the daemon, and start the habridge.  Just follow the instructions.

From what I'm reading, Google Home no longer works, since it now works via meethue.com instead of locally.

"ISSUE: Google Home now seems to not support local connection to Philips Hue Hubs and requires that it connect to meethue.com. Since the ha-bridge only emulates the local API, and is not associated with Philips, this method will not work. If you have an older Google Home application, this may still work. YMMV.

"

#### SpecialSwell

• Sr. Newbie
• Posts: 28
• Karma: +0/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2320 on: October 31, 2017, 12:41:38 am »
Has anyone been able to get GH to work since meethue.com has been implemented? I still have complete and total failure of my bridge.

#### holger_40

• Sr. Newbie
• Posts: 33
• Karma: +0/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2321 on: November 25, 2017, 07:04:00 pm »
Would it be possible to run HA-Bridge on a Synology NAS without Docker?

I've read through most of this thread, but I couldn't find anything definitive about such a setup.

Asking cause I've just bought a Synology 216j, which cannot support Docker.
(Yeah I probably should have done more research first, but my original intention was to run HA-Bridge on a Pi, before it belatedly struck me that hey, since my NAS is gonna be turned on 24/7, it'd make sense to have HA-Bridge running off it.)

I'd try it myself, but I figure I probably shouldn't open the NAS packaging, so I could still attempt to return/sell it if it definitely can't run HA-Bridge.

It is a Java app, so can run on just about anything.  I assume the 216j is linux based like other Synology, so it should run.  But you will have to install Java and configure the bridge.  See the github link on the first page which has FAQs...

Alright, I'll give it a try then. Thanks for the advice!
I have an older Synology NAS, a 210j with limited ram.  I installed PCLoadLetter version of headless java 8, it acts like a package. HA Bridge installs after that, and it works well and responds quickly.

#### litby

• Jr. Member
• Posts: 90
• Karma: +1/-0
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2322 on: December 01, 2017, 11:08:02 am »
Apologies for this OT-ish post.

Today I upgraded to v5.0 and started with a clean slate on a Debian 9 VM. Everything works fine except that my Harmony won't pair with the ha-bridge. There is nothing in the log that there are  any requests coming in from the harmony. The app says it has found a Hue briDge and asks to press the button like others have reported. I have tried the "search for Hunter device" workaround but that doesn't help.

The only thing showing in the log is

Code: [Select]
2017-12-01 16:34:02,435 [main] INFO  com.bwssystems.HABridge.upnp.UpnpListener - Traceupnp: SSDP M-SEARCH packet from 192.168.2.2:502552017-12-01 16:34:02,435 [main] INFO  com.bwssystems.HABridge.upnp.UpnpListener - Traceupnp: send upnp discovery template 1 with response address: 192.168.2.2:80 to address: /192.168.2.2:502552017-12-01 16:34:02,436 [main] INFO  com.bwssystems.HABridge.upnp.UpnpListener - Traceupnp: send upnp discovery template 2 with response address: 192.168.2.2:80 to address: /192.168.2.2:502552017-12-01 16:34:02,437 [main] INFO  com.bwssystems.HABridge.upnp.UpnpListener - Traceupnp: send upnp discovery template 3 with response address: 192.168.2.2:80 to address: /192.168.2.2:50255
(.2 is the ha-bridge IP). Nothing from the Harmony hub which is .73.

I can't seem to be able to change the logging level. When I change to e.g. "trace" and click on "update logging levels" I get a green confirmation box but then it reverts back to "info".

It's running on port 80, IP address is that of the local machine and the UPnP port is 5000. My Amazon Echo had no problem pairing. My "real" Hue bridge had no problem pairing with the Harmony.

My router (Sophos XG) doesn't support UPnP but I don't see why it would be involved since we're on a LAN.

No firewall or anything. Any ideas?
« Last Edit: December 01, 2017, 11:12:35 am by litby »

#### conchordian

• Sr. Member
• Posts: 320
• Karma: +4/-1
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2323 on: December 06, 2017, 10:59:40 pm »
For those with problems after updating to V5.0.0 of https://github.com/bwssytems/ha-bridge/releases then you need to click 'renumber devices' on the bridge, and then forget, and rediscover the devices on the Alexa page.

#### wilme2

• Hero Member
• Posts: 1154
• Karma: +23/-13
##### Re: Bridge Amazon Echo to Vera, on github!
« Reply #2324 on: January 19, 2018, 04:36:56 pm »
I moved from Vera3/UI5 to VeraSecure/UI7 and the reconfigure of this bridge took just a few minutes.

This bridge is awesome and it is a shame more Vera users don't consider it.  155 pages, and the forum admins haven't given it its own sub-forum?  I realize they have a "native" Alexa skill, but not nearly the same.  This is far preferable IMO, and competition should be encouraged.
Long Live UI5!  (OK finally made the switch to UI7 in January 2018, and am pretty happy....)