[RELEASE] HubConnect - Share Devices across Multiple Hubs (no longer SmartThings!)

I started over like 20 times already, not working, I'm in the na02, I have ST and HE server hubs in the same unmanaged switch, port 5 and 6, plus the other 2 HE hubs are in the same switch, between HE hubs everything is fine but not with ST, I never get the connected in green when adding the key created in the server, I even tried choosing ST, HE LAN or HE Internet, all got errors( I know it's wrong choosing HE for ST hub) . The 4 hubs are in the same LAN with reserved IPs, is not something that I don't know how to install the code in ST because I still have WebCore, NST Manager, Neato and others installed and running fine.

Any troubleshoot recommendation?

Ok, let's try step at a time....

First, On your "Server" Hubitat Hub, confirm you have a HubConnect Server Instance for SmartThings... mine looks like:

Then under devices, confirm you have one too:

18%20PM

The IP address (cut off in my screen cap) must match your SmartThings hub, of course.

If Not, go back and redo those steps.

Yes, I have

image

It's online because I just re created it

image

In ST IDE, let's confirm you have only one instance of the App..

My Locations: on the right side of your Hub is SmartApps, click that and there should be only one HubConnect app..

If not, click edit and delete them.

Yep, just one

The next step is in/on the SmartThing app... which I can't screen cap easily.

First, I opened a browser to my "server" hub and went into the ST server Instance and grabbed the Key.

In the ST App, I clicked Automation at the bottom, SmartApps at the top tab and HubConnect Remote Client.

Then I clicked Connect to server Hub and entered the IP address of the Hubitat Hub. Tapped on "not connected" and the Key field shows, I paste in the Key and again tap on not connected which should become 'connected.'

And here is when everything goes wrong, I did exactly your procedure and got this

I can still click save but then I get those weird errors in the logs.

Which weird errors?? the Line 562 errors ?

Those are for the "health pings" and would affect if "Online" goes away.. nothing harmful.

Yes, line 562, but never gets connected, now the app on the server is offline for ST

20190324_195554

Please paste in the HubConnect Remote Client groovy again (I want to make sure the line number is exactly correct in this next:)

line 629, comment it out ( with // ) so it looks like:

def appHealth()
{
// sendGetCommand("/ping")
}

Save and Publish. (Another thing I had to re-remember today.. Publish!! :slight_smile: )

Just now.. I went into Automation, SmartApp, HubConnect I got this log entry on Hubitat:

2019-03-24 05:01:39.436 pm info Setting remote hub URI: https://graph.api.smartthings.com:443/api/smartapps/installations/72...............................

And these on ST's Live Logs:

5:01:53 PM: info Subscribing to events..
5:01:53 PM: info HubConnect Remote Client Initialized
5:01:53 PM: info HubConnect Remote Client Updated

I get the Hubitat logs when I tap Connect to Server Hub...

I get the ST logs when I press the final save.

Let me do the oath now

Edit: done

Still getting this error

Maybe it's very local connection, I can't put the hubs more near than this :joy:

1 Like

You've pasted two Line 562 error messages, "Throwable" and "TimeoutException"

Which one are you getting?

I meant the error on the ST app after pasting the key with no connected,
image

but if I click save then save without choosing any devices the app says it's fine and I get this in the logs

I never get the connected here

image

"Timeout" is what you get when they can't talk to each other. You've got two solid indicators.. the Periodic Ping (appHealth) [which we just disabled with // ] and they ip+key.

Can you hit your Dashboards from outside your home?? ST is cloud, therefore the connection is made from ST Cloud to Hubitat Cloud and then to your hub.

Maybe you're not allowing Hubitat Cloud access?

I'm pretty sure nothing is wrong with the network, as I said, I have everything in one unmanaged switch, the 4 hubs have reserved IP, the router is Google WiFi and this doesn't have any complicated configuration, just the basic, like reserved IP or port forward, but nothing else. I had in the past Tomato installed in 2 Netgear R7000 but I got better coverage with Google WiFi at the cost of no advanced features like VPN, bi LANs, and a lot of other security features.

Don't worry @csteele , I will uninstall everything, I wanted to transfer some ST stuff to my HE hub and eliminate native hublink from other HE hubs but it was working like that just fine, so the world is not ending for me. Thanks for trying! :slight_smile:

How I know this?

edit: maybe you found the problem, I just installed dashboard and I got this from the cloud link

image

but how this happend? I factory reset this hub, then registered and I did the HubConnect install

:slight_smile:

I'm feeling better about the HubConnect instructions at any rate. :smiley: