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

Put me down as super-excited! Thank you!

2 Likes

I think I followed the directions exactly, but I get "OAuth not enabled" errors (probably reasonable to assume I need to enable it on at least the child server app?). Even after doing that, when I try to put in the IP for my server hub in the Remote Client, the screen goes blank after putting in my key, and [error] org.apache.http.client.ClientProtocolException: null on line 574 (connectPage) gets logged. Am I doing something wrong? I'm sure I just didn't read something carefully enough. :slight_smile:

In any case, I'm quite excited for this app, so thanks for your work on it! I bought a third hub (trying this with it now!) to move all my lighting automations off my "main" hub--that's how excited I am. :slight_smile:

1 Like

36%20PM

31%20PM

that help?

2 Likes

Didn't seem to, but if I accidentally enabled it on both, would it hurt? :slight_smile: (Because I did.)

EDIT: Deleted and reinstalled everything and I'm good.

1 Like

It does appear that I missed a step in the instructions!

You must enable oAuth on both the Server Instance app and the Remote Client in order for the connection keys to be generated.

I'll get the installation instructions updated tonight,

1 Like

I've installed accordingly, as far as I can tell, but seeing this error.

app:52402019-03-21 10:35:50.427 pm errorUnable to create the Hub monitoring device: com.hubitat.app.exception.UnknownDeviceTypeException: Device type 'HubConnect Beacon Sensor' in namespace 'shackrat' not found.   Support Data: [id: "hub-192.168.1.26", name: "HubConnect Hub", label: "Hub_2"]

Have I done something wrong here?
This is on my Main hub, not remote.

1 Like

We changed the name of that Driver only today.. must have missed it somewhere...

1 Like

I am getting the following error when I try to setup my ST SmartApp

5:59:19 PM: error java.lang.reflect.UndeclaredThrowableException @line 562 (sendGetCommand)

I get it after I enter the IP address and before I am able to paste the key.

I enabled Oauth in the HE Server instance and the ST client app.

1 Like

I copied in the driver again and updated the name :slight_smile:

1 Like

Line 310?

1 Like

Hold on a sec everyone. That change was definitely made today. It looks like I didn’t push the latest changes from my office Mac.

I’m out with the family for dinner but will check as soon as I get home.

3 Likes

Good practice run at least. I'll remove until ready :+1:

One question I have though.
I have the two Hubs, call them Hub_1 and Hub_2.

all my physical devices are connected to Hub_1, this hub has very few apps.
I'm using Link to Hub and Hub_2 has all the virtuals of Hub_1, and all apps controlling them (kind of split the hubs between hardware and software).

Which way around would I be best installing this? It would appear that Hub_1 (with the devices) should be the Remote, and Hub_2 the Master?

2 Likes

I've pushed the corrected Server Instance file.

For those that ran into the issue, just re-import the code, go into the remote hub that you already configured then click Done. The virtual hub device should be created automatically.

2 Likes

Generally, yes, the overarching idea is that "Server" is the radio-less "coordinator." Therefore "server" would go on the hub where you plan on running the Apps that need visibility of the devices. Because it's bidirectional, technically it doesn't matter but.. at least here at the beginning, it sure would be easier to have similarity until the 'crowd' is large enough to experiment.

The radios are, in my opinion, the precious resource here. Of equal concern is 'bad reputation apps.' Ideally those would be as far apart as possible :smiley: That's precisely what caused me to consider the three hub architecture. Having been running in a three hub scenario for several months, I continue to have had zero crashes. But my radio hubs are snappier in the big picture. There's simply more cpu cycles to manage the radio queue, it seems, without those bad ol' apps eating cpu. :slight_smile:

I originally posited that I'd be able to reduce down to a pair of hubs, once I better understood the load and exactly which apps were truly 'bad' in this architecture. The fact you wanted to start with two is great. :slight_smile:

2 Likes

Cheers @csteele,

Exactly my thoughts, just wanted to be sure :+1:

Since splitting things up here, I cant believe how much more stable things have been. Until now, I've been using the Link to hub but had too many workarounds in place to cover all devices, this should really help!!

Sleep time here, but really looking forward to installing again in the morning. A lot of changes ahead :wink:

Thanks
Roy

1 Like

Hmmm, I am still having issues.

Here is my setup. I have HE hub as the server and a Smartthings Hub as client.

I have installed all of the Apps on the HE side and enabled OAuth on Server Instance.

I added the Remote Client on ST and enabled OAuth on it.

I added the Server app on HE and initialized it. Entered the IP address of ST hub and copied the Connection Key. It shows Online after clicking Done on the HE side.

I've installed the SmartApp on the ST side. When I go to enter the IP address and key in the SmartApp on the ST Side, I am presented with the following errors and the app hangs.

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:51 PM: error java.lang.reflect.UndeclaredThrowableException @line 562 (sendGetCommand)

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:35 PM: error java.lang.reflect.UndeclaredThrowableException @line 562 (sendGetCommand)

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:03 PM: info Subscribing to events..

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:03 PM: info HubConnect Remote Client Initialized

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:03 PM: info HubConnect Remote Client Updated

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:02 PM: info Subscribing to events..

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:02 PM: info HubConnect Remote Client Initialized

[c63f6aa3-af76-409d-bf41-311dd7ad7f8b](https://graph-na02-useast1.api.smartthings.com/ide/logs#c63f6aa3-af76-409d-bf41-311dd7ad7f8b) 7:44:02 PM: info HubConnect Remote Client Installed

Am I missing a step or is there something else going on?

Scott

1 Like

Did you install the Remote Hub driver onto the Server?

1 Like

Yes. I have the following installed:

APPS on HE:

HubConnect Server for Hubitat
HubConnect Server Instance (OAuth enabled)

Driver on HE:
HubConnect Remote Hub

App on Smartthings:
HubConnect Remote Client (OAuth enabled on this as well)

Edit: Just got to thinking. I have Hublink App enabled and running. Could that be causing some sort of conflict?

1 Like

The SmartThings remote client is a different code base than the Hubitat remote. Double check that you import the correct one as there are some very minor differences..

In the meantime I’ll do some more testing just Incase ST changed something in the cloud.

1 Like

Yeah, I have HubConnect Remote CLient for Smartthings installed as a Smart App.

I have Hub Link built-in app installed and running on Hubitat. Could that be causing a conflict? Didn't want to uninstall it until I got yours up and going,

1 Like