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

Offline wilme2

  • Hero Member
  • *****
  • Posts: 1021
  • Karma: +18/-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!

Offline 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

Offline wilme2

  • Hero Member
  • *****
  • Posts: 1021
  • Karma: +18/-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!

Offline chasiu

  • Jr. Member
  • **
  • Posts: 54
  • 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
Login
/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.

Thanks for your help.

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)

--(While in Windows 10) Downloaded SDFormatterv4.zip file from  www.sdformat.org   
  Unzipped it.  Ran SETUP to install it.
  Used the program SD Formatter to format the micro-SD Card.

--(While in Windows 10) Downloaded the NOOBS_v2_0_0.zip file from www.raspberrypi.org  (downloads)

--(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.

Offline jswim788

  • Hero Member
  • *****
  • Posts: 538
  • Karma: +29/-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.

Offline chasiu

  • Jr. Member
  • **
  • Posts: 54
  • 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.

Offline 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. :-\

Offline wilme2

  • Hero Member
  • *****
  • Posts: 1021
  • Karma: +18/-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!

Offline 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!

Offline 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.

"

Offline 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.