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).
- Installed app;
- Installed homebridge;
- Installed plugin;
- Configured app;
- Created config.json
- 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.
- 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!
I believe Homekit uses Bonjour to locate the services.
Using Bonjour Browser on my Mac, I can see Homebridge is announced:
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.
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 . 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
- Troubleshooting while half-awake
- 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!
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!