HA Bridge FAQs

audiofreak9 edited this page Nov 12, 2018 · 32 revisions

General FAQs

General

Q: Why did you build the Home Automation Bridge?

A: This bridge was built to help put the Internet of Things together.

Q: Explain to me what it does and how it is used?

A: See the wiki page Basic concept

Q: What does the ha-bridge integrate/work with?

A: The ha-bridge has helpers to build devices for the gateway for the Logitech Harmony Hub, Vera, Vera Lite or Vera Edge, Nest & HAL and the ability to proxy all of your real HUE bridges behind this bridge. Alternatively the bridge supports custom calls as well using http/https/udp and tcp such as the LimitlessLED/MiLight bulbs using the UDP protocol. Binary data is supported with UDP/TCP. Also script or command execution are supported as well.

Q: What is the prefered method to auto-start the ha-bridge?

A: The preferred start-up method for next gen Linux systems (this includes the Raspberry Pi), is systemctl. The README details configuration of the systemctl method. You can also start the ha-bridge from the command line, but this may cause problems with setting the default configured HTTP port 80 used to access the ha-bridge configuration page. NOTE ON RC.LOCAL: Due to the way network subsystem is brought up on the Pi, it uses the new systemctl to start services. The old style runlevel setup, which rc.local is part of does not get the benefit of knowing if the network has been fully realized. Starting ha-bridge from rc.local on next gen systems will cause unexpected results and issues with discovering registered devices.

Q: Does discovery of the ha-bridge by Alexa or Google Home require a physical device?

A: The ha-bridge requires a physical Amazon Echo (Gen1 or 2), Echo Plus, Dot (Gen 1 or 2), Tap, Show, Spot or Google Home or Mini device and does not work with prototype devices built using the Alexa Voice Service e.g. Amazon’s Alexa AVS Sample App and Sam Machin’s AlexaPi. The AVS version does not have any capability for HUE Bridge discovery!

Q: Can I control Philips HUE bulbs directly with the ha-bridge?

A: The ha-bridge software does not control Philips HUE devices directly. A physical Philips HUE Hub is required for that, by which the ha-bridge can then proxy all of your real HUE bridges behind this bridge.

Q: Can voice commands other than: ON, OFF and DIM/BRIGHT be used?

A: NO, the ha-bridge emulates a Philips HUE bridge. The interactions between a Philips HUE and and Amazon Echo are determined by Philips and Amazon. They are not changeable by the ha-bridge, so only: ON, OFF and DIM/BRIGHT verbal commands are available.

Q: Can I change Alexa’s reply from ‘OK’ to something else?

A: NO, the ha-bridge emulates a Philips HUE bridge. The default response by Alexa for Philips HUE is ‘OK’ and is not changeable by the ha-bridge.

Q: Can I get Alexa to respond with information, like temperature or device state?

A: NO, the ha-bridge emulates a Philips HUE bridge. The default response by Alexa for Philips HUE is ‘OK’ and is not changeable by the ha-bridge.

Q: Can I use the ha-bridge with official and third party apps that work with Philips HUE?

A: YES, the ha-bridge can be discovered and used by most official and third party apps that work with Philips HUE. Note that if automatic discovery of the ha-bridge by the app fails, you may need to use manual IP entry in the app. This is rarely necessary, as most if not all apps will auto discover the ha-bridge. Most of the official and third party apps require to the HA-Bridge to be running on port 80 for discovery.

Q: The HUE app says I need to update the firmware version, how do I do that?

A: The ha-bridge version >= 4.0.0 Bridge Control page has an Emulate HUE Hub Version input. Check Philips release notes webpage for the latest firmware version.

Q: How come the Philips HUE app ver 2 can’t create rooms on the ha-bridge?

A: The ha-bridge only emulates the Philips HUE bridge functionality, not the memory at this time. You can configure one device on the ha-bridge using the the Multiple Call Construct to replicate rooms.

Q: Can I use Homebridge and/or Apple HomeKit devices with the ha-bridge?

A: Not yet, however connectivity between Homebridge and/or Apple HomeKit has been requested a few times. We are currently looking at how Homebridge automatically finds the udp and/or tcp commands and configures for the user.

Q: How do I update the ha-bridge jar file?

A: This answer assumes you use the preferred systemctl method to auto-start the ha-bridge. It also assumes you decided to rename the ha-bridge jar file simply “ha-bridge.jar”, so you do not have to update the startbridge.sh file each time.

  1. We need to stop the habridge service (if running):
    $ sudo systemctl stop habridge
  2. Navigate to where you installed ha-bridge, (use your folder name if not “habridge”):
    $ cd habridge
  3. Then rename the existing ha-bridge.jar to something you’ll remember or understand:
    $ mv ha-bridge.jar ha-bridge-ARCHIVE.jar
  4. Download the release you wish to update to, (where {VERSION} is the version number):
    $ wget https://github.com/bwssytems/ha-bridge/releases/download/v{VERSION}/ha-bridge-{VERSION}.jar
  5. Now rename the downloaded file, (where {VERSION} is the version number):
    $ mv ha-bridge-{VERSION}.jar ha-bridge.jar
  6. Lastly we need to restart the habridge service:
    $ sudo systemctl start habridge

Q: How does the new item entries work?

A: Urls now are created with specifiic information per call. All devices have the multi command construct:

[{"item":<a String that is quoted or another JSON object>,"type":"<atype>"."count":X."delay":X."filterIPs":"<comma separated list of IP addresses that are valid>"."httpVerb":"<GET,PUT,POST>","httpBody":"<body info>","httpHeaders":[{"name":"header name","value":"header value"},{"name":"another header","value":"another value"}],"contentType":"<http content type i.e application/json>"},{"item":<another item>,"type":"<aType>"}]

Here are the fields that can be put into the call item:
String or JsonElement item; Required
Integer count;
Integer delay;
String type; Required
String filterIPs;
String httpVerb;
String httpBody;
String httpHeaders;
String contentType;

Delay is the time in milliseconds to wait until the execution of the next item in the multi commands.

Count is how many times to repeat the current command item and the delay time is used in between the executions.

For the type field, it should be one of these (it is the first value in the array):

public class DeviceMapTypes {

	public final static String[] CUSTOM_DEVICE = { "custom", "Custom"};
	public final static String[] VERA_DEVICE = { "veraDevice", "Vera Device"};
	public final static String[] VERA_SCENE = { "veraScene", "Vera Scene"};
	public final static String[] HARMONY_ACTIVITY = { "harmonyActivity", "Harmony Activity"};
	public final static String[] HARMONY_BUTTON = { "harmonyButton", "Harmony Button"};
	public final static String[] NEST_HOMEAWAY = { "nestHomeAway", "Nest Home Status"};
	public final static String[] NEST_THERMO_SET = { "nestThermoSet", "Nest Thermostat"};
	public final static String[] HUE_DEVICE = { "hueDevice", "Hue Device"};
	public final static String[] HAL_DEVICE = { "halDevice", "HAL Device"};
	public final static String[] HAL_BUTTON = { "halButton", "HAL Button"};
	public final static String[] HAL_HOME = { "halHome", "HAL Home Status"};
	public final static String[] HAL_THERMO_SET = { "halThermoSet", "HAL Thermostat"};
	public final static String[] MQTT_MESSAGE = { "mqttMessage", "MQTT Message"};
	public final static String[] CMD_DEVICE = { "cmdDevice", "Execute Command/Script/Program"};
	public final static String[] HASS_DEVICE = { "hassDevice", "HomeAssistant Device"};
	public final static String[] TCP_DEVICE = { "tcpDevice", "TCP Device"};
	public final static String[] UDP_DEVICE = { "udpDevice", "UDP Device"};
	public final static String[] HTTP_DEVICE = { "httpDevice", "HTTP Device"};
	public final static String[] DOMOTICZ_DEVICE = { "domoticzDevice", "Domoticz Device"};
	public final static String[] LIFX_DEVICE = { "lifxDevice", "LIFX Device"};
}

Q: How does the new filterIPs work?

A: Filter Ip example:

Turn on Lights in Bedroom 1 (http://api.call.here/1) - Restricted to Echo 1 (10.1.1.1)
Turn on Lights in Bedroom 2 (http://api.call.here/2) - Restricted to Echo 2 (10.2.2.2)
Turn on Lights in Bedroom 3 (http://api.call.here/3) - Restricted to Echo 3 (10.3.3.3)

Device: "Lights"
On URL: [{"item":"http://api.call.here/1", "httpVerb":"POST", "httpBody":"value1=1&value2=2","type":"httpDevice","filterIPs":"10.1.1.1"},{"item":"http://api.call.here/2", "httpVerb":"POST", "httpBody":"value1=1&value2=2","type":"httpDevice","filterIPs":"10.2.2.2"},{"item":"http://api.call.here/3", "httpVerb":"POST", "httpBody":"value1=1&value2=2","type":"httpDevice","filterIPs":"10.3.3.3"}]

Q: How do I use the new editing features to make a Multi-Command?

A: The new editing allows you to generate a URL in one tab and keep adding to that URL by switching tabs before you add the device.

For Example:

  1. go to vera devices tab, generate your first device in the list
  2. this takes you to the edit tab
  3. go to another tab and generate another device.
  4. you will see that it appended the new device!

Voila!

You can do this to an existing device by editing it and then going to another tab.

Q: Why doesn’t Google Home find my ha-bridge and goes to the meethue.com website?

A: 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.

Q: Will my FireTV stick/box control the ha-bridge?

A: No. The FireTV requires an actual Echo or Echo Dot to be present for Home Automation control.

Q: My Echo 2nd Gen does not find the ha-bridge?

A: The Echo 2nd Gen sometimes has issues finding the ha-bridge. Please look here at the trouble shooting wiki page Trouble Shooting

Q: Ha-bridge errors when running with Java9?

A: You have to add `—add-modules java.xml.bind` to invoke the ha-bridge using Java9.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.