Guide: Hubitat devices in Homekit through Hoobs, Homebridge and MakerAPI

This is a guide for controlling all of your devices in your iOS home app. My wife loves this approach much better than the Hubitat app dashboards.

This seems to be the 'optimal' (?) and fastest way to control all of your Hubitat devices in homekit.

This is specifically for Synology Docker, but I'm sure you can adapt accordingly to other environments

I could not find all of the documentation in one place so here is my attempt. If you have questions or ways to improve the following - dont be shy.

Credit to:

Getting started-

1. Hubitat MakerAPI App Configuration

  • Under the Hubitat Web Interface, Click on Apps in the left side menu.
  • Click on the button +Add Built-In App
  • Select Maker API from the list of apps
  • Enable Allow Access via Local IP Address
  • Tap Done and you are finished with the App configuration.
  • Go into the newly added Maker API app
  • Select the devices you would like to have available via HomeKit
  • Enable Include Location Events to support HSM and chaning of modes
  • In the URL to send device events to by POST field, enter the following:
    http://[IP ADDRESS OF YOUR DOCKER]:20011/event
  • Either create a new access token or find it at the bottom and save it for later
  • Note in the URL the api in the appurl for later

2. Get your docker credentials

  • You will need the user and group ID for hoobs to run
  • SSH into your synology
  • Type in "id" and you should see the uid and the gid

3. Install Hoobs

  • I'm assuming you know how to install docker and the text editor
  • In the docker, click on registry and search for hoobs
  • Choose hoobs/hoobs and download it
  • Go to the image and double click it to create the container
  • Open the container to edit and click on advanced settings
  • Enable auto-restart
  • Click on volume tab and add a folder called 'hoobs'
  • Enter "/hoobs" in the mount path
  • Click on Network tab and click the use same network as docker host checkbox
  • Click on environment tab and add the following three values
    • PUID and enter the uid from step 2 (probably 1026)
    • PGID and enter the gid from step 2 (probably 100)
    • TZ and enter your timezone database name
  • Click apply and then next then apply and run the container when wizard is finished
  • After the container crashes, stop the container (or wait 5 minutes and stop it manually)
  • In file station, browse to the hoobs folder and go into the etc folder
  • Edit and save the config.json file and change the port to 8081 (or other unused port)
  • Go back to Docker and start the hoobs container

4. Configure Hoobs and install MakerAPI

  • In a browser go to http://[IP ADDRESS OF YOUR DOCKER]:8081

  • If all goes well, you should see the Welcome to HOOBS page

  • Enter the form to create your HOOBS local account

  • If you need to restart the HOOBS service, you can in the three dots menu at the top right

  • Click on the log icon on the left to see the logfile

  • If all goes well you should see the following:

    HOOBS listening on port 8081.
    No plugins found
    Bridge is running on port 51826

  • To install MakerAPI click on the plugin icon at the bottom left* Click on search and type in makerapi and click install next to it

  • Copy and paste the the configuration below to replace the existing one line pre-filled configuration in the text box

      {
          "platform": "Hubitat-MakerAPI",
          "name": "Hubitat MakerAPI",
          "app_url": "http:///[IP ADDRESS OF YOUR HE BRIDGE]/apps/api/[MAKER APP API ID}/",
          "access_token": "[MAKER API ACCESS TOKEN]",
          "local_ip": "[IP ADDRESS OF YOUR DOCKER]",
          "local_port": 20011,
          "mode_switches": true,
          "hsm": true,
          "debug": true,
          "logFile": {
              "enabled": true,
              "compress": true,
              "keep": 5,
              "size": "10m"
          },
          "plugin_map": {
              "plugin_name": "homebridge-hubitat-makerapi"
          }
      }
    
  • Configuration notes

    • Careful with the IP address of your docker vs the HE Hub
    • You probably want to change debug to false after you get your homekit setup
    • You might not want home security manager on (HSM), so you can change that to false
    • Fore more information about the configuration file, use the MakerAPI instructions link above
  • Click save changes

  • Go to the logs and if all goes well, you should start seeing your devices and a note that

    • Makerapi is listening on port 20011
    • MakerAPI postURL successfully activated

5. Adding the devices to iOS (finally)

  • Go to the dashboard in HOOBS
  • Get your iPhone and add an accessory
  • You should see the HOOBS server, tap on that and scan the QR code
  • Add and setup the devices

All done! Hopefully this was helpful and saved time for someone else.

8 Likes

You can also use HubConnect along with NodeJS. That's what I do and it's flawless.

1 Like

Please pardon my ignorance but what does Hoobs provide with this setup? I ask because I have a homebridge container running on my QNAP NAS and use Hubconnect to send data to it, have used Maker API too. So all has been well and just curious what Hoobs may also provide. I understand there is a Hoobs container out there too that I haven’t tried.

HOOBS is an appliance-like distro, containing HomeBridge and some neat management tools. Coming from raw HomeBridge and editing config files in vi, it is night-and-day and highly recommended for new installs.

FWIW, I have HOOBS running in a Docker on my own Synology NAS. No problems in two months so far. The only difference is that I did some twiddling under the NAS's covers, and have my Docker containers running in MACVLAN mode. Not recommended for anyone who doesn't know Linux inside-out, because
docker does some wacky stuff when assigning IP addresses to containers and is dumb enough to knock itself off the network by issuing its own IP address to a Docker container. Ask me how I know.....

2 Likes

The homebridge-config-ui-x tool makes it pretty simple to get a homebridge server running as well.

3 Likes

That's what I use. Also, you can use hb-service to load multiple instances of homebridge as services. This is useful if you have multiple Hubitats. Homebridge plugins are shared across the instances.

Question:
What is the advantage of using this approach to get control in an IOS device,
Hubitat (via MakerAPI) -> Homebridge (under HOOBS, running on a Synology NAS) -> HomeKit (running on an IOS device)
versus the other approach:
Hubitat (via HubConnect) -> Homebridge (running on a RPI, or similar) -> HomeKit (running on an IOS device)
aren't both these approaches very similar?

I assume by HomeConnect, you mean HubConnect?

There's no functional difference. @dan.t wrote both plugins for HomeBridge, and the HOOBS plugins are the same as the HomeBridge plugins.

In terms of plugins, if someone isn't using HubConnect, then the MakerAPI plugin makes for an easier setup.

Yes, I meant HubConnect (Which I've fixed).

The interface from HubConnect offers a number of advantages, I believe because it's going through a very robust program , which may even be improved in the future.

I'm not a big IOS fan, but I've been asked to make up a "control platform" for someone who is. The Home routine seems basic, but very functional. Apparently there are also other packages that are even more comprehensive that the Home routine on an IPad.

Really - the two options are great options and I have tried both. The other option I have tried is the homebridge for hubitat app too.

HubConnect adds a lot of functionality and if you have multiple hubs alongside hubitat (like smarthings which many do) is probably the best option.

I prefer HOOBS/MakerAPI option as it is the fastest integration. It is nearly instant with a small footprint. MakerAPI is a Hubitat focused tool and is solid. Now that hubitat is my only hub (other than my apple tv homekit), I'm focused on stability and speed. As I have been a former smarthings, wink, and homeassistant....I have moved towards one 'brain' which is hubitat and one 'ui' which is homekit.

,

Edit: @dan.t explained it in simpler terms:

1 Like

This is great. Thank you for posting.

As a total noob, would you have any tips on the best way to kick start this on Windows10 server? I already have NodeJS + Sonos HTTP running there for better Sonos control through HE and would like the easiest path to get HomeBridge running on it as well.

oznu has a great set of directions for doing this on Windows 10 server ....

1 Like

I set this up successfully once but deleted it and have been getting "accessory not found" when I try to re-add HOOBS as an accessory in iOS for the last few days. After some googling, I thought I would share what I found as the fix, as it was not obvious to me. Context: your phone and the hoobs device are connected wirelessly.

Make sure you are on the same Wi-Fi network as HomeBridge is. Yes the Wi-Fi bands matter too.

The bands part is what I didn't catch at first. Hope this helps anyone else who may run into trouble setting this up.

Hello and thanks for sharing this Hubitat/homebridge bridge through MakerAPI,

I'm new in home automation and even more in the HE environment. So i followed what was presented here but I keep getting the same connection error that seems to send info from the homebridge to the Hubitat:

[2020-09-18, 10:00:23 a.m.] [Hubitat_MakerAPI hhm:0.4.11] attempt connection to ws:///eventsocket
[2020-09-18, 10:00:23 a.m.] [Hubitat_MakerAPI hhm:0.4.11] HE Eventsocket encountered error: getaddrinfo ENOTFOUND eventsocket Closing socket
[2020-09-18, 10:00:23 a.m.] [Hubitat_MakerAPI hhm:0.4.11] HE Eventsocket is closed. Reconnect will be attempted in 5 second.

Would anyone know what turned wrong?

There's a superb/excellent tool from @dan.t to assist in creating a working config for HomeBridge:

https://dantapps.github.io/

He recently added the "I need this for HOOBS" toggle to make it even simpler/better.

For MakerAPI You only need two pieces of info.. the IP address of the always-on system that will be running Homebridge. And a copy of the first URL found at the bottom of the MakerAPI screen.

Couple clicks later and you'll have a paste-able config that HOOBS will just eat right up.

Thanks @csteele!!
I made a mistake when I first configured the homebridge. It run super smoothly now

1 Like

This might be a dumb question, but if I don't have a Synology NAS, could I install HOOBS on a raspberry pi and use MakerAPI to connect Hubitat to HOOBS to homekit?

Yes, you sure can!

If you’d like to try a different image, @csteele has created a raspberry pi image with node-red and homebridge.

Just a heads up for anybody using regular Docker not on Synology, I ran into issues with the mdns implementation within the official hoobs/hoobs distribution. It appears the Homebridge is using their own HAP stack which doesn't provide a means of defining which network interface to broadcast its services. The container appeared to be running fine, as well as handling the MakerAPI, but I just couldn't add the accessory in Home Kit. Performing a network scan for Bonjour services just would not find Hoobs' HAP on my docker host no matter what I seemed to do.

In any case, rather than reverting to installing on yet another Pi, the "easy" Docker method was to provide the container with its own IP address on the LAN using a bridge network configured with macvlan. The benefit of doing so is not just that the Hoobs install will then have its own ip address, but it also alleviates port conflicts many of us might have with other containers. And of course, since the mdns stack has direct access to the LAN, the HAP is actually visible to your Home Kit device when trying to add the accessory.

2 Likes