Homebridge integration Q

It’s weird, it all checks out in that JSON configurator, but if I copy it into the Homebridge config I still get the same error. Any other ideas?

:point_up:

Are you copying the entire JSON configuration with what comes from the Homebridge app into the validator? You need to validate the entire Homebridge JSON config.

Yup. Copied the whole thing and it says Valid JSON. I’m assuming this isn’t a wide spread thing, which leads me to believe it has something to do with the inputs that I copied from the Hubitat app (I checked twice and they are correct copies), or something else that is preventing this connection. Open to any and all other ideas.

Right, but I don’t understand what that means specifically. The error log scrolls so I have a hard time isolating the red (errors) and then copying them. I can download the whole thing, but it’s long and I have no idea what items may be sensitive to paste on a message board.

Is there a particular error that I should look for?

Not sure how the log is scrolling so fast when it says it cannot start? There has to be an error about it not starting.

And Yes it probably is something you have put in there or the way to the UI is formatting the JSON for that plugin, the instructions say to copy/paste the exact JSON from the HE app into the config for the plugin. I am not sure why you refuse to follow the instructions.

I was going to try and test breaking my config but the UI wont even let you save the config with invalid JSON, not sure about if you use the UI to change values.

I tried to put in some invalid values and see if I could break mine but it continues to work. You probably have something else going on, maybe not installed correctly, not sure. There is probably an error in the logs that says what the problem is. Hence the purpose of the logs.

Any errors, or in particular anything about what the problem is, not being able to start.

I’m not refusing to follow your advice — I literally did what you asked me (copied exactly from Hubitat into the HB config, without using the UI). Everything checks out when I copy the full JSON (the Hubitat plug-in part as well as my other plugins) into the JSON config, but it won’t let me save it in the HB config (it gives me a Config Error: Invalid JSON — again, this was copied from the JSON checker). As a result, I have to back out of the HB configuration (ie not save the JSON because it won’t). This is essentially square one for me — it’s where I get an error message in the status, and my HB does not work unless I turn off the Hubitat app. Could there be an issue with the cut and paste from the JSON checker to HB (ie. not sure if spacing matters, or fonts, or if either can get messed up given that I’m doing this via cut & paste on my phone)

As for the error logs, I understand that this is probably a big piece. What I don’t understand is what to look for in terms of a start up error. I see errors ranging from “connection error”, “failure error, does not contain package json”, “address already in use” and a dozen others. Some of these errors reference other plugins (that typically work fine if I turn off the Hubitat plugin).

How about trying one of the other Homebridge integrations? I use this one and it works very well:

For the plugin install on the Homebridge side, you can simply install from within Homebridge. Go to plugins and search for Hubitat. Install the Homebridge Hubitat Makerapi (homebridge-hubitat-makerapi v0.4.15 (2021-05-24)) plugin.

Use the tool here to help build your JSON for the plugin - https://dantapps.github.io/

Enter your hub IP address and then check the box for "Add MakerAPI Config?".

After that is done, you should have the JSON needed for the plugin. Copy and paste from the tool into the plugin. Once that is done, restart Homebridge and you should be good to go.

1 Like

You leave out key details. If you tried to copy the config and then get errors saving it you are doing something wrong. This is critical info to people trying to help you.

You should take the ENTIRE config (select Config at the top of the HB UI). Put that in a JSON Validator. Make sure it checks out. If not, fix it and get it to save.

Then go to Plugins, find the Hubitat plugin, select the Wrench icon, then select JSON config.

This will be JUST the Hubitat plugin config. Erase the entire thing. Paste in the full config created from the HE app plugin. Save.

Both of those config screens should not allow you to save an invalid config. So if it wont let you save it, something is messed up. You can use a JSON validator to help find the issues.

I would not edit the config file directly on the filesystem. Use the HB UI JSON editor. When I said not to use the UI I meant not to use the plugin config screen where you can click checkboxes, etc...

I literally did exactly as you described in terms of the copy and paste. I got everything to check out — HB allows me to save and the JSON config reports the full JSON is valid (ie all plugins, including Hubitat). However, I still see the same error in the HB status “Not Running - View Logs”.

To this, I’m sure you’ll say again “what do the logs read” and to my original response, “there are dozens of errors; some involve plugins that typically work when Hubitat is off, some involve what appears to be connection issues, others report things like address already in use”. If you can help me identify the ones that are important/relevant, I can try to parse those out to provide more context around the issue.

Appreciate it man! I may end up going this route

1 Like

I would delete the Hubitat plugin from HB totally.
Then verify your HB logs for any errors, make sure everything else is working properly.
Then from the HB UI, on the plugins tab search for and install the Hubitat (Tonesto7) plugin again.
Do not configure it at all, just restart HB and see what happens.
Then use the individual plugin JSON config to paste in the config for this plugin.
Restart HB again.

If you don't know what errors are important just paste in all the errors (the full error message) and we can try and figure it out. If you are worried about posting something sensitive on here you can always create a unlisted/private pastebin and dump the entire log in there, and PM me the link.

Before you do anything else, remove all plugins from HB and restart as @jtp10181 suggests. Make sure that HB runs properly on its own before adding anything.

I would also suggest using the child bridge option for your HB plugins. That way if a plugin fails to load it doesn’t interfere with your other plugins and HB will still start. I’m also using this plugin with HB-ui-x and have been for years now with no issues. I imagine you will get this figured out since you have other plugins running successfully.

1 Like

Will do, thanks! I’ll also send log shortly, if removing it doesn’t work.

Thanks for the feedback. Quick question though, if the other plugins worked before I installed the Hubitat plugin, and they continue to work if I Disable the Hubitat plugin, is it really necessary to delete them all? If so, I’m willing to do whatever, but I’m also trying to minimize the work in reinstalling them if removing them isn’t completely necessary based on the above.

No. The goal is to eliminate the Hubitat plugin you currently have installed.

Yes you can try this also when you setup the Hubitat plugin again. I set mine up before this was available so I have left it on the main bridge, but I moved all my other plugins to child bridges. If I was setting it up new right now, I would use the child bridge option.

That will add some extra config into the JSON for that plugin so make sure you dont wipe that out when modifying the config.

            "_bridge": {
                "username": "XXXXXX",
                "port": 31614
            },

I enabled the child bridge after the fact and it worked fine. I can’t remember if I had to re-room everything. It seems likely.

Yes, all devices will be re-created so any custom icons or rooms will be lost. This is why I have left mine alone for Hubitat. All the other plugins only had 1-2 devices so it was not a problem.