Possible Route to Home Kit?

my config.json has multiple platforms, so I have not pasted the "other stuff" but I will now for completeness:

{
"bridge": {
"name": "Homebridge",
"username": "< mac like numbers >",
"port": 51826,
"pin": "<your pin #>"
},

    "description": "My HomeBridge SmartThings, Hubitat and TCC",

"platforms": [

{
// each platform has one block here
},
{
// a 2nd platform, note the COMMA between blocks!
}
] // end of the platformS block.
}

In the config.json example on Tonyā€™s repo thereā€™s a comma after ā€œdirect_portā€: 8000 and there shouldnā€™t be. So Iā€™m past that and for some odd reason, the ā€œView the Configuration Data for Homebridgeā€ now works. Maybe there has to be the example in the config.json first?

Anyway, Iā€™m at this point

[3/21/2018, 7:41:13 PM] [Hubitat] Invalid Response from API call
[3/21/2018, 7:41:13 PM] [Hubitat] Unknown Capabilities: []
[3/21/2018, 7:41:13 PM] [Hubitat] Direct Connect Active On: ( 192.168.1.126:8005)

Why it says port 8005 is a mystery to me, when everything else is on port 8000. It also doesnā€™t say itā€™s listening, so thatā€™s a problem.

mine too

.129 is the server that is running HomeBridge.

I've done this before (ST on a RPI), but now I can't remember what I did as the final step to make it all work. Here is the log... I started with 2 devices.

When I go to enter the code into iOS, no bridge to be found. Here is what I have done (maybe I am missing something).

  1. Installed app;
  2. Installed homebridge;
  3. Installed plugin;
  4. Configured app;
  5. Created config.json
  6. Within config.json did the following: (a) changed username; (b) changed port; (c) changed pin. These are tips from Paul in the event you have to create a new homebridge setup to get iOS to see the hub.
  7. Try to add accessory by entering in 8 digit code.

.... and nothing.

I know it's something simple that I am missing.

YES!!!

a) changed username; (b) changed pin

That worked!

Now the Home app in IOS shows all of the devices.

Itā€™s clearly populating the Homekit DB because initially everything showed as good, then everything went Not Responding and now, slowly, they are showing as alive.

Since the SmartThings plugin for Homebridge uses port 8000, I am guessing Tony chose port 8005 for the Hubitat plugin for Homebridge. This allows both plugins to receive instant updates of device events from both hubs.

Makes sense. Seems automatic. If I remove my SmartThings config, Hubitat plugin uses 8000.

Still can get it working though. Will try what @csteele did.

1 Like

Iā€™ve tried changing the Homebridge port, username and password.
Iā€™ve updated Homebridge
Uninstalled and reinstalled the app.
Giving up for the night. Same result. I seeā€¦

[3/22/2018, 12:18:53 AM] [Hubitat] Initializing Hubitat platformā€¦
[3/22/2018, 12:18:53 AM] [Hubitat] Fetching Hubitat devices.
[3/22/2018, 12:18:53 AM] [Hubitat] update_method: direct

Then further down I seeā€¦

[3/22/2018, 12:18:54 AM] [Hubitat] Invalid Response from API call
[3/22/2018, 12:18:54 AM] [Hubitat] Unknown Capabilities: []
[3/22/2018, 12:18:54 AM] [Hubitat] Direct Connect Active On: ( 192.168.1.117:8005)

All my other Homebridge plugins work

In fact, I can even see logs going back and forth between the homebridge and hubitat.

But I cannot add the bridge to homekit.

SJust for clarity, you donā€™t see Homebridge in HomeKit? I have homebridge working, and have for some time, itā€™s just the Hubitat plugin giving me trouble. I canā€™t get it to listen for the hub.

If youā€™re struggling with Homebridge, here are the instructions I followed initially with first time success. They cover Mac which Iā€™m using, but the differences are in the node.js server which youā€™re already running.

If anyone else is struggling with node.js on a Raspberry Pi, here are some links for different types I got from Nate Schwartz on the ST forum.

ā€œIf you have an older Pi (B/B+ etc.) this guide should work

If you have a newer Pi(2./3 etc.) try this one (the node.js instructions are down
towards the bottom)ā€

Lastly, if these help you get the Hubitat plugin working, come back here and help me figure out what Iā€™m doing wrong! :stuck_out_tongue_winking_eye:

I believe Homekit uses Bonjour to locate the services.
Using Bonjour Browser on my Mac, I can see Homebridge is announced:

scap

Showing both Homebridge and it's details. (As well as the Lutron Smart Bridge Pro, that I don't have connected to Homekit. )

Like @justin.bennett I was seeing HomeBridge function, along with messages, both in Hubitat Live Logging and in HomeBridge confirming a conversation was occurring. What I wasn't getting was the announcement in Bonjour and altering username + pin in config.json, I saw it begin to announce. After that, the Home app on my phone found it easily.

Iā€™ve changed my username and pin multiple times now with no success.

Random question - I saw this log when running homebridge

X-HM://0023ISOVECD4N.

This appears after initiating the hubitat platform, but prior to displaying the pin numberā€¦ never saw this before.

Mine has it too.

2018-3-21 20:31:15 > Setup Payload:
2018-3-21 20:31:15 > X-HM://0023ISYXI563H
2018-3-21 20:31:15 > Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

This isnā€™t a hubitat issue, rather a homebridge issue. Reviewing the homebridge GitHub, some users have success when removing the ā€˜Persistā€™ directory and then rebooting.

I will try this tonight when I get home as I believe the iOS device must be on the same network to connect with homebridge.

1 Like

Yes, you can safely delete the accessories and persist directories and contents. All you really need in .homebridge is one file: config.json

It recreates the rest on startup. I probably should have tried that tooā€¦

1 Like

Cool! More things to try late tonight when Iā€™m tired and not thinking straight :joy: . Thanks to you both for the suggestions.

Figured it outā€¦ you need to disable IPv6

Now onto the next issue all devices are detected and work for about 3 minutes and then respond with ā€˜Not Respondingā€™

Restarting homebridge gets them responding but then they stop responding.

1 Like

Success!

For me, a combination of two issues

  1. Troubleshooting while half-awake
  2. I was forgetting to return to the previous page and click ā€œDoneā€ after clicking ā€œView the Configuration Data for Homebridgeā€, and so the API key entered in the config.json file never matched what the app was expecting when I tested Homebridge! :angry::crazy_face:

Once I did things the RIGHT WAY, everything just worked as I had originally expected it would. Homebridge has never been a challenge, except for setting up the Wink plug-in, so I was baffelled that I might have to change the password or PIN, as Iā€™ve not had to do that for any of the other three plug-ins Iā€™m running. Indeed, I didnā€™t have to do it in this case either. When it didnā€™t help anything yesterday, I changed them back so I didnā€™t have to reconfigure HomeKit rooms.

Now I just need to get an Apple TV 4 and I should be able to setup some automations to give me, at the very least, local ON/OFF control of Insteon from Hubitat. Slowly moving away from ST reliance. Still need that Hue Bridge Integration though. Iā€™m looking forward to that arriving soon.

1 Like

I just found this:

Hopefully this amazing software will help simplify everyones life when configuring/managing your homebridge config

2 Likes

Thanks Tony. I have that bookmarked. Have been meaning to try it.

So far working great. [Correction] Sengled Element Plus bulbs werenā€™t dimmable via HomeKit, but discovered they wereā€™t dimmable via the driver settings either. Found that the Zigbee White Color Temperature Bulb driver (for these bulbs anyway) must have a value saved in the Transition Time field of the driver or they wonā€™t respond to dimming by the driver settings, even though Rules are able to adjust the brightness level with a fade time.

I have some virtual switches linked to rules that tell them to turn off after 1 second. Found that the plugin wasnā€™t updating them and they were getting stuck on, but the polling and update methods that @pdlovelace put in for the ST plugin still work. Thanks for keeping that intact. Does it make a difference if I put in the update method, or have you set that to default to direct?

So if anyone is unfamiliar with the ST Hombridge Plug-in, you can just put in a polling rate in seconds and update method and that will refresh. HomeKit at the interval you set.

For example, Iā€™m using this in my config.json file, just after the access token.

ā€œpolling_secondsā€: 10,
ā€œupdate_methodā€: ā€œdirectā€

Thanks again for your hard work. Really appreciate this effort. Have a great vacation!