I can’t remember if ha-bridge automatically creates the data folder or not, but I could have sworn it wasn’t created for me, so you an just create it yourself:
I am using HaBridge installed on the same Pi as an AIO HASS install with no HTTPS.
In this example the entity ID of the light I want to control is light.kitchen - you will need to change this to your lights ID in the three fields for BODY.
Fields to fill in
NAME: Kitchen Light
(Whatever you put in for this is what Alexa will discover and call it, unique name for each device. Does not need to be in any way related to the HASS ID.)
TARGET: Encapsulated
DEVICE TYPE: Custom
Because I have it on the same device as Hass I use localhost - you might need to use your Hass IP address instead of localhost.
ON URL: http://localhost:8123/api/services/light/turn_on
DIM URL: http://localhost:8123/api/services/light/turn_on
OFF URL: http://localhost:8123/api/services/light/turn_off
Adjust for your password, include “quotes”
HTTP HEADERS: [{"name":"X-HA-Access", "value":"YOUR_HASS_PASSWORD_HERE"}]
HTTP VERB: POST
CONTENT TYPE: application/json
Change these three to reflect light entity ID
CONTENT BODY ON: {"entity_id":"light.kitchen"}
CONTENT BODY DIM: {"brightness":"${intensity.byte}", "entity_id":"light.kitchen"}
CONTENT BODY OFF: {"entity_id":"light.kitchen"}
I don’t have a thermostat, no heater or air-conditioner here.
What is it you want to do? What is it you can do? Set temperature?
I have a device set up to control volume of an AV-Receiver using the dim command. Turn On and Turn Off both run HASS scripts. Volume needs to be sent as a decimal value between 0 and 1.
To work out commands, first go to the dev tab and work out your domain and service. See screen shot - Notice the domain/service is the last bit of the URL. Down below in the service fields you can see the first part of the Content Body Dim has a red dot next to it.
Great write up @BarryHampants and one that is much needed for setting up and using HA-Bridge. There is little information on HA-Bridge so this will be very helpful.
If anyone can add examples to this thread on their setup and usage it would benefit many users.
Just to be clear I’ve simply copied and pasted the instructions from @jbardi.
Truthfully, I’ve been waiting for someone with a bit more knowledge to do it.
I just wanted the information to be a bit easier to find and in its own thread.
And this works on both Echo & Google home. Google home answers a bit different so she will say “Themostat set to 22 percent brightness” which is a bit strange but it works (sets setpoint to 22C).
I followed your instructions, but I receive this error
Request Error, Pleae look in your habridge log: error {“type”:6,“address”:"/lights/1",“description”:“Error on calling url to change device state”,“parameter”:"/lights/1state"}
p.s. I checked in Postman a program to check if POST commands are correct, and they are …???
I think that I may have just talked to you about this on another site, but I can move it here since others can help too:
Did you take a look at the log? Are you able to get to HA bridge on port 80?
Are you using SSL on HASS? If you’re using letsencrypt, you’ll need to upgrade to a newer version of Java, since the one on most pi’s is an older version that doesn’t trust letsencrypt.
I managed needed to update latest Java to have letsencrypt.
Now it works with Alexa. But GH is not picking up the device…?
How does GH pick up 2 Hue? I have a hardware hue bridge, and now HA bridge. But the latter is not picked up by GH… Do I have to put anything in configuration, or?
Yes correct, it’s not showing in the GH app.
I have all 12 devices of the HUE Bridge, but this one of HA Bridge (only one as test) is not showing up.
Do I need to unlink the HUE from the GH app and pair again? I can do it, its just a pain to reapprove all the devices with their respective rooms.
EDIT: I wonder if someone has 2 hardware HUE Bridge, how it works in Google Home app. When I click the sign PLUS to add new devices, it shows only NEST and SMARTTHINGS, since HUE is already present with hardware HUE Bridge
Since i updated my home assistant to 0.38.X, i started encountering issue with HA bridge. Now the HA bridge is very unstable. It would work for some time (like 20 min) after i restart the service, but after then all devices couldn’t work. I have no clue what is going on here. Anyone can help?
With 4.1.4 it looks like the Add/Edit screen has changed from the examples above. Could anyone post an example of what to enter into the new screen? The way I can turn on a light (EZControl XS1) is: