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

Maybe i need some more coffee, but im having a hard time setting up the HubConnect app to connect to smartthings. I started last night and was making progress, but got to the point where in HE i was adding a server and kept getting an error saying Oauth needed to be enabled, even though it was. And on the ST side it is asking for a Server Connection key and i dont see where i get that.

So i thought i should start over, i must have missed something. Deleted the apps and driver in HE. But now after i install the apps code, no new app shows up in the list of Apps. ive tried 3 times this morning. Im not sure what im missing. ive installed dozens of apps/DTH in smartthings and this process isnt all that different, but im not sure where im missing something. I cant even get the app to show up in the Apps list in HE.

any tips or tricks, or ideas? Im not sure where im going wrong and am getting frustrated. I know it should be easier than this but im getting stuck

Welcome to HE.

Did you enabled oauth in HE and ST?

You get the key when adding hubs on the server app, then you use the key on the remote hub.

Did you follow the instructions on the PDF? It's in the github.

https://github.com/HubitatCommunity/HubConnect/blob/master/HubConnect%20Installation%20Instructions.pdf

Oauth is (was?) enabled in both but for some reason it doesnt seem to save in HE? I enabled it again in HE and it looks good now, but its still not showing up in my list of Apps. I see both apps in the Apps code and see that Oauth is still enabled on the server instance but i dont see it in the list of Apps.

that PDF is what ive been using, yes

The 20000 ft overview is...

Add the 2 App code to Your Hubitat Hub you picked to be Server. Add 1 Driver code too. Server needs oAuth enabled. Install User App (click done.)
05%20AM

On SmartThings, add 1 App code. Enable oAuth. "Publish for Me"

At this point BOTH systems should have an App displayed.

On Hubitat, Server App, create a remote Hub (Your name for it, it's IP address, type -- ST, Hubitat or Homebridge) Save the KEY, click done.

At this point, the list of Apps will show HubConnect and child apps for the hub you just created:
50%20AM
Click Server and you should see the same list: (but with your hub names, of course)
21%20AM

On your SmartThings hub, In Automation (Not Marketplace) open the HubConnect Remote Client then Connect to Server Hub, and enter your Hubitat Server Hub's IP address and paste in the KEY you captured above.

I thought i had it all worked out. Ive got the apps installed and ST is showing up in HE and was online. I left to get lunch and now its showing offline, even though my ST app tells me it is online.

As is mentioned, Online is the initial state and a fail of the 'ping' will shift it to Warning, then Offline. Therefore, Offline is the believable state.

The connectivity is LAN based. Both Hubitat 'Server' Hub and SmartThings 'remote' are on the same LAN and should have no trouble communicating.

What are your Logs saying?

app:42  2019-04-16 09:24:00.088 am trace Received ping from ZeeRadioLower.
app:644 2019-04-16 09:23:53.073 am trace Received ping from ZeeHomebridge.
app:41  2019-04-16 09:23:48.087 am trace Received ping from ZeeRadioUpper.
app:488 2019-04-16 09:23:44.260 am trace Received ping from ZeeSmart.

it looks like its trying to bring in all of the ST devices i authorized but failing, then it shows the hub is offline. I cant add an image, though, i get an error "sorry you cant put an image in a post"

If you have no connectivity, fix that first. The list of devices is unnecessary at the stage you are describing.

If the hub is Offline, you must get that fixed before any form of device exchange could be attempted.

ST is online, i can control devices and ping it from the PC im setting up HE on. SE shows its connected as the client.

i removed all but 1 device and now it shows online in HE but the device i added isnt showing up yet.

"Online/Warning/Offline" are states of the communications between the Hubs, specifically for HubConnect. Yes, I'm assuming your hubs are powered on and otherwise working. However, it's clearly telling you that the two hubs are unable to exchange http: traffic.

Imagine the simplest example of this... you tell Hubitat Server instance that your ST hub is at 192.168.1.111 and in reality it's at 192.168.1.121 You would be able to work with either in your browser because you have them bookmarked etc. But they would be unable to establish a conversation between each other.

Did you added the key to ST HubConnect app?

yes. it shows online now and i only have a few devices in ST authorized for hubconnect but i still cant get them into HE

Did you added the drivers for those devices? In HE hub

no. im working on that now. it says its optional in the instructions but others make it sound like its not optional

If you authorize devices PRIOR to connectivity, they didn't get created.. go into your SmartThings HubConnect Remote app and verify you have the drivers listed, pre-installed on your Server hub.

Then click Done again.

This is why the devices are not showing up. Install the drivers in HE then re authorize the devices in ST so they can show up in HE.

ok ive got the drivers and device handlers installed on both sides. now i think im ready to re-add the smartapp in smartthings and authorize some devices. i hope...

1 Like

Ok im up and running! Thanks for the help! The instructions could be a little more clear that you really do need to install the drivers and that after the app code is installed, to go to the app and add a new one. but im set now, time to bring some stuff into HE and set up a sharptools panel!

4 Likes

I've been typing a response for the better part of 20 minutes, but I see that you've got it worked out now. So for that I say congratulations!

I would love to have your input as to how I can refine the instructions to help prevent other from going through the same experience.

Currently it's worded as follows..

Since the majority of communications flow from remote hub to server hub, this step is largely unnecessary. For any devices linked from the Server hub to the Remote hub, HubConnect will still alert which drivers are needed at the time of device selection.

I'm open to suggestions..

And welcome to HubConnect!