Echo & Alexa User Discussions and Support Forums

When a person is not breathing, permanent brain damage begins after 4 minutes and death in 6 minutes after that. Can you count on help arriving before that time? Learning proper CPR techniques is easy and you can learn it in 30 minutes at CPR Test Center.

Setting Up HA-Bridge on Windows

0 Members and 5 Guests are viewing this topic.

Setting Up HA-Bridge on Windows
« on: March 21, 2017, 11:15:30 am »
I couldn't find a thread dedicated to the HA-Bridge so figured it was time to have one.
Most users running this hue emulator use it on Linux or a Raspberry PI and don't need any help setting it up.
However many Windows users are accustom to point and click setups.
All the write-ups I've come across are for Linux :( but it is far simpler to setup on Windows (in my opinion).
Just make sure you have the latest Java installed
Usually the only ones having a issue setting up is those already running some sort of server using port 80
The following is for setting up to trigger a batch file.

1: Simply download the file from BWS Systems place it in a folder called HABridge or what every you wish to call it.
2: Rename the file to ha-bridge.jar
3: Right click and select open
4: In a web browser (not IE) navigate to localhost.
the bridge uses port 80 by default so if you have another server running you'll need to change this.
that can be changed in the bridge control tab
5: Click on the add/edit tab and  first add a name for your device
7: scroll down to device type and select execute script/program
8: scroll down to on items row
9: click on the on target and expand it so you can read "the Call" this is where you add your batch file full path
10: in the same row at the far right click add.
11: Scroll down to the off items row and do the same for an off batch file if needed
12: Scroll back to the top and click add bridge device
that will bring you to the device page where you can test your on/off and even dim calls.
13: Next tell Alexa to discover devices or use the app to do it.

Note: Windows firewall tends to block java so you may have to go into your windows firewall inbound settings and edit the rule for java to allow it. if you need to do this Alexa will fail to find devices on your bridge.

14: With Alexa finding the device you just say Alexa "turn on Device Name" to run the batch file configured to the on item
Easy right?

I created a Windows frontend intended for X10 control, which if stuck I guess one could use it for initial setup. Just ignore the error about no x10 interface. Alex10.
The current Bridge is included in the setup and auto renames it for you. ;)

Re: Setting Up HA-Bridge on Windows
« Reply #1 on: May 29, 2017, 09:31:37 am »
Hi

Need your assistance, using goggle chrome can't seem to get to local host.


Appreciate your help
Mike
.

Re: Setting Up HA-Bridge on Windows
« Reply #2 on: May 30, 2017, 07:38:29 pm »
Use the IP of the PC the bridge is connected to.
I recently had issues with using localhost in that Alexa wouldn't see the devices
It may be a change in the latest bridge code update  that is affecting using localhost.

Re: Setting Up HA-Bridge on Windows
« Reply #3 on: September 29, 2017, 10:21:31 am »
Thank you so much for this guide - really helped me out!

I have a few quick questions I'm hoping you can help with...

 - How do I see that this is actually running? When I run with the .jar it definitely runs as I can load in browser, but I don't seem to be able to see that it is running? Also, am I okay just adding the .jar to startup to run when the system starts, or do I need the browser window left open (as I have now after setup)

 - is there any way to adjust the % dim levels? I have a weird bug with my lightwave switch which if I ask for 100% then it does nothing, but if I ask for 95% then it is essentially goes to 100%. So if I could set 100% as 95% then that would mean the command could be what I'm used to

- is there an easy guide on how to use Harmony hub with this - it seems additional steps are needed?

- is there any way to limit which Echo device controls which things (i.e. if in Living Room, then Lights does Living Room Lights, if in Kitchen, Lights does Kitchen Lights?)

- less urgent... is there any way to alter the response Alexa gives? "Ok" is fine, but I'm sure I read somewhere that you can overide this using this tool but I'm damned if I can find it now - feel like i imagined it!

Thank you once again - fab tutorial and very much looking forward to setting my own Alexa commands!!
« Last Edit: September 29, 2017, 10:26:46 am by vaderag »

Re: Setting Up HA-Bridge on Windows
« Reply #4 on: November 15, 2017, 07:39:19 am »
I couldn't find a thread dedicated to the HA-Bridge so figured it was time to have one.
Most users running this hue emulator use it on Linux or a Raspberry PI and don't need any help setting it up.
However many Windows users are accustom to point and click setups.
All the write-ups I've come across are for Linux :( but it is far simpler to setup on Windows (in my opinion).
Just make sure you have the latest Java installed
Usually the only ones having a issue setting up is those already running some sort of server using port 80
The following is for setting up to trigger a batch file.

1: Simply download the file from BWS Systems place it in a folder called HABridge or what every you wish to call it.
2: Rename the file to ha-bridge.jar
3: Right click and select open
4: In a web browser (not IE) navigate to localhost.
the bridge uses port 80 by default so if you have another server running you'll need to change this.
that can be changed in the bridge control tab
5: Click on the add/edit tab and  first add a name for your device
7: scroll down to device type and select execute script/program
8: scroll down to on items row
9: click on the on target and expand it so you can read "the Call" this is where you add your batch file full path
10: in the same row at the far right click add.
11: Scroll down to the off items row and do the same for an off batch file if needed
12: Scroll back to the top and click add bridge device
that will bring you to the device page where you can test your on/off and even dim calls.
13: Next tell Alexa to discover devices or use the app to do it.

Note: Windows firewall tends to block java so you may have to go into your windows firewall inbound settings and edit the rule for java to allow it. if you need to do this Alexa will fail to find devices on your bridge.

14: With Alexa finding the device you just say Alexa "turn on Device Name" to run the batch file configured to the on item
Easy right?

I created a Windows frontend intended for X10 control, which if stuck I guess one could use it for initial setup. Just ignore the error about no x10 interface. Alex10.
The current Bridge is included in the setup and auto renames it for you. ;)
I ran the alexa10 on my one computer just to use it as so windows would startup bridge at reboot.
That part worked great.  However my computer would run so slow after starting this.  If i exited or shutoff the alexa10 software my computer would run back to normal.
    On a side note, do you know where the bridge info is stored on my computer?
I'm now having an issue non related to alexa10 that I need to reboot the bridge or change the ipaddress of the bridge since it wont run on a computer I set the ipaddress to?

Re: Setting Up HA-Bridge on Windows
« Reply #5 on: November 16, 2017, 07:30:43 am »
@ Vanderag
Sorry for the slow reply some how i over looked your post
Java apps display they are running in task manager however they don't display the program name so if you habe more then one java program running you cant tell which is which.
You don't need to keep your browser open for the bridge to run it runs regardless
Dim levels can be sent with the bridge in a number of ways it is best to read the help file for this and the harmony hub issue or post to the HA-Bridge issue board if the help file doesn't provide an answer.

@ Mihinc
Bridge info is stored in the data folder of the folder the jar file is located in.
So if you used Alex10 it will be in C:/Alex10/data.
Bridge info is stored in the  config file  device info  contained in the bridge is in the device  file.

Re: Setting Up HA-Bridge on Windows
« Reply #6 on: November 16, 2017, 07:45:03 am »
If you used Alex10 merely to get the bridge to auto start and dont have any actual x10 devices the reason your pc is running slow with Alex10 open is it is looking for a x10 PC transceiver. And a extra x10 service(X10nets) is running.

Re: Setting Up HA-Bridge on Windows
« Reply #7 on: November 16, 2017, 11:59:23 pm »
If you used Alex10 merely to get the bridge to auto start and dont have any actual x10 devices the reason your pc is running slow with Alex10 open is it is looking for a x10 PC transceiver. And a extra x10 service(X10nets) is running.
So it's not possible unless I have a x10 pc receiver?  Anyway to delete part of the code you made to make it work without a x10 pc receiver ;)

Re: Setting Up HA-Bridge on Windows
« Reply #8 on: November 17, 2017, 10:29:39 am »
Alex10 doesnt need to be running for the bridge to work.
It was originally created just to allow x10 easy setup with the bridge.
I dont understand what your using Alex10 for or why you feel its need without x10. I can alter the code but i need a better understanding of what your looking for.

Re: Setting Up HA-Bridge on Windows
« Reply #9 on: April 21, 2018, 03:02:46 pm »
I couldn't find a thread dedicated to the HA-Bridge so figured it was time to have one.
Most users running this hue emulator use it on Linux or a Raspberry PI and don't need any help setting it up.
However many Windows users are accustom to point and click setups.
All the write-ups I've come across are for Linux :( but it is far simpler to setup on Windows (in my opinion).
Just make sure you have the latest Java installed
Usually the only ones having a issue setting up is those already running some sort of server using port 80
The following is for setting up to trigger a batch file.

1: Simply download the file from BWS Systems place it in a folder called HABridge or what every you wish to call it.
2: Rename the file to ha-bridge.jar
3: Right click and select open
4: In a web browser (not IE) navigate to localhost.
the bridge uses port 80 by default so if you have another server running you'll need to change this.
that can be changed in the bridge control tab
5: Click on the add/edit tab and  first add a name for your device
7: scroll down to device type and select execute script/program
8: scroll down to on items row
9: click on the on target and expand it so you can read "the Call" this is where you add your batch file full path
10: in the same row at the far right click add.
11: Scroll down to the off items row and do the same for an off batch file if needed
12: Scroll back to the top and click add bridge device
that will bring you to the device page where you can test your on/off and even dim calls.
13: Next tell Alexa to discover devices or use the app to do it.

Note: Windows firewall tends to block java so you may have to go into your windows firewall inbound settings and edit the rule for java to allow it. if you need to do this Alexa will fail to find devices on your bridge.

14: With Alexa finding the device you just say Alexa "turn on Device Name" to run the batch file configured to the on item
Easy right?

I created a Windows frontend intended for X10 control, which if stuck I guess one could use it for initial setup. Just ignore the error about no x10 interface. Alex10.
The current Bridge is included in the setup and auto renames it for you. ;)


hi also if i download ha bridge ..then make a folder then put the file in it and call it ha bridge jar ..and try to open it it does nothing but take me back to the original site and downloads the file again  .not even sure where i found this but it its a windows batch file that i press to start the ha bridge then i have to go to google and put in http://localhost:8081/#!/ thats the only way i no how to start the ha bridge ,,,in less i am doing something totally wrong

Re: Setting Up HA-Bridge on Windows
« Reply #10 on: April 22, 2018, 08:02:02 am »
You don't need to rename the ha-bridge.jar file since your not using it with my front end app (but the batch file may require that).
Just click on the Jar file to run it or run it from a command line.
Note: if you run from a command line when you close CMD ha-Bridge will stop/close as well.
HA-Bridge doesn't open a typical application window you have to open your browser to http://127.0.0.1

The bridge runs on port 80 by default but it sounds like the batch file you found changes that to 8081( or you change it form the bridge UI )
So the address for the bridge would be http://127.0.0.1:8081
The only way to view the bridge is from a browser.


Re: Setting Up HA-Bridge on Windows
« Reply #11 on: April 23, 2018, 09:42:28 am »
hi yes back again now that i have the bridge up and running and turning lights off and on
echo dot can not find ha bridge ..but i am on port 8081 so how do i get ha bridge to start on port 80
using batch file java -jar -Dserver.port=8081 ha-bridge.jar   have tried changing it to java -jar -Dserver.port=80 ha-bridge.jar  but then if i go to http://localhost:80 it will not start the bridge i have to put in http://localhost:8081/#!/
but then it defaults to 8081 ...
i no you can start it from cmd ..as see it on here all the time apart from no one ever put what i need to put in cmd to start it  ..so do you know how i start ha bridge in cmd on port 80
thanks again for your help
also looking to find out hex codes ..ie udp://192.168.1.3:8899/0x4100 turns off but all light did try changing 0 to 1up 4 no difference  is there a way to see what codes are being sent from  LimitlessLED MiLight Remote v2.1.11 as this works
perfect so if i could see what codes it was sending i could input them into ha bridge
« Last Edit: April 23, 2018, 10:19:59 am by sheriffdude »

Re: Setting Up HA-Bridge on Windows
« Reply #12 on: April 23, 2018, 09:55:03 am »
Start the bridge open the URL then click on the "Bridge Control" tab.
Scroll down to web ServerPort and change that to 80 from 8081
then scroll back to the top and click save.

There is no need to change your port if the bridge is running 80 is just a common port used. if your running another server on 80 you could mess things up by switching to it.
Switching ports will not help Alexa see your devices.
The most common reason Alexa doesn't see devices in the bridge is ones firewall rules for Java.
the easiest way to remedied that is to  stop the bridge. Then go into your firewall inbound rules and delete all java rules.
once all Java inbound rules are deleted restart the bridge.
A pop up will display asking for permission click to allow.
Clicking allow auto creates a new inbound rull for Java.

Re: Setting Up HA-Bridge on Windows
« Reply #13 on: April 23, 2018, 10:26:52 am »
Start the bridge open the URL then click on the "Bridge Control" tab.
Scroll down to web ServerPort and change that to 80 from 8081
then scroll back to the top and click save.

There is no need to change your port if the bridge is running 80 is just a common port used. if your running another server on 80 you could mess things up by switching to it.
Switching ports will not help Alexa see your devices.
The most common reason Alexa doesn't see devices in the bridge is ones firewall rules for Java.
the easiest way to remedied that is to  stop the bridge. Then go into your firewall inbound rules and delete all java rules.
once all Java inbound rules are deleted restart the bridge.
A pop up will display asking for permission click to allow.
Clicking allow auto creates a new inbound rull for Java.

have tried this when u save and go back it is still on web server 8081 so i cant change it to 80 ..also firewall is fine but did as you said just to try it even turned of firewall ..but alexa still can't find ha bridge 

Re: Setting Up HA-Bridge on Windows
« Reply #14 on: April 23, 2018, 11:25:45 am »
have tried this when u save and go back it is still on web server 8081 so i cant change it to 80 ..also firewall is fine but did as you said just to try it even turned of firewall ..but alexa still can't find ha bridge 
Then your doing something wrong or port 80 is already in use.
If your still using a batch file to start the Bridge it is possible it is setting the port. open the batch file with note pad and see what calls it is making.
if you see 8081 in the text change that to what ever port you wish to use then save the file.
Besure the bridge is closed not running before using the batch file again (use taskmanager to besure it has stopped)
Post to the HA-Bridge Github issues the developer may have more things for you to try.
Also there are several threads about Alexa not seeing devices so read them the answer may be in one of them. ;)