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

I found it and downloaded it from:

https://hubconnect.to/download/category/4/Universal-Drivers.html

It's there close to the bottom, alphabetically. I was able to download it.

Thanks. I had an old url saved to github.
Changed it to this site now.
Thanks again.

The "old URL" is probably for v1.6.4 and it's still valid as that is the "Official Release Version".

The HubConnect.to site is where v2.0 (and beyond) will be released, including the current RC1 "Public Beta" code. The GitHub site will be reduced to only the 'stub' drivers in that future.

In other words, you'll want to keep both, perhaps.

1 Like

Architecture question -- I have a 5 hub setup that is hub and spoke -- 4 hubs that control devices and do "remote/local" automation and 1 server hub that collects all the devices for dashboarding and "global" automation. Works great.

Here's my question: I only use SmartThings for Presence, but because I manage Presence on one of the 4 remote hubs (not the HE server hub), I'd like to hubconnect directly from ST to the remote HE hub, bypassing the HE server. If I did this though, one of my HE remote hubs would essentially be acting as a Hubconnect server hub to the ST remote hub.

Is this architecture workable? Would I essentially install another instance of Hubconnect on the remote hub? Or should I just suck it up and force the presence sensors to take two hops--ST to HE server, HE server to HE remote?

Thanks in advance for any advice?

I have a three hub system, one HE server, one HE remote and one ST remote. I have noticed that my ST hub is always showing offline on my HE server hub. I can control the devices on my ST remote hub so even though it says it is offline everything is working.

I tried deleting the remote device off the server hub and them reconnecting but it still shows offline on the HE server hub. The remote hub says it is online and when I open up the remote hub in the apps it says Connected!. If I click verify connection it will say the remote ST hub is not connected, but the Connected! does not go away.

If I understood correctly from reading post above, to reestablish a connection I delete the ST remote device off the server hub. I then just go through the motions of reconnecting the server to remote. No need to actually transfer the key? Is there a step I am missing?

Is the goal to shave off 10ms from the Presence notification?? How many Events per Second are you seeing on the Server Hub? Is there some lag occurring there?

I personally have not tried a single hub as both Server and Remote. A long time ago (in computer minutes :slight_smile: ) I read a post here from someone saying they were doing it... and why.

In general, yes. But also, in general, you will be seeing Error Logs.

Have you tried the "Send Connection Key" option already?

Screen Shot 2020-06-22 at 7.18.17 AM

Where is this? When I select the ST remote from the apps page on server hub and then connect to remote hub I see below. When I first open it I only see connected! If I click the verify connection I see the message in red.

In the logs since I removed the ST remote device and reconnected I have seen the following.

2020-06-22 10:56:35.634 am Switching connection to ST Remote to http

2020-06-22 10:54:07.353 am )Switching connection to ST Remote to http

2020-06-22 10:53:58.628 am Initialize virtual Hub device..

I found there there were additional logs

2020-06-22 10:56:36.107 am Subscribing to events..

2020-06-22 10:56:34.920 am [info]HubConnect Server Instance Initialized

)2020-06-22 10:56:34.649 am [info]HubConnect Server Instance Updated with settings: [clientIP:192.xxx.x.x, clientName:ST Remote, remoteType:smartthings, localConnectionType:http, hasSTHub:false, updateDeviceIPs:false, removeDevices:false, enableDebug:false, receiveHSM:false, pushModes:false, receiveModes:false, pushHSM:false]

2020-06-22 10:54:08.774 am Subscribing to events.

2020-06-22 10:53:57.941 am HubConnect Server Instance Initialized

2020-06-22 10:53:57.795 am HubConnect Server Instance Updated with settings: [clientIP:192xxx.x.a, clientName:ST Remote, remoteType:smartthings, localConnectionType:http, hasSTHub:false, updateDeviceIPs:false, removeDevices:false, enableDebug:false, receiveHSM:false, pushModes:true, receiveModes:false, pushHSM:false]

2020-06-22 10:51:17.381 am Setting event communication status from remote hub: [status: paused]

2020-06-22 10:50:30.276 amST Remote is offline.

I've been using the "Local" communications method between Hubitat and SmartThings and just now did a Disconnect and then reconfigured the connection, including passing the new Key over.

app:973 2020-06-22 08:18:23.845 am trace Received ping from ZeeSmart.
app:973 2020-06-22 08:17:23.947 am trace Received ping from ZeeSmart.
app:973 2020-06-22 08:16:23.857 am trace Received ping from ZeeSmart.
app:973 2020-06-22 08:15:24.754 am info Subscribing to events..
app:973 2020-06-22 08:15:24.686 am info HubConnect Server Instance Initialized
app:973 2020-06-22 08:15:24.597 am info HubConnect Server Instance Updated with settings: [clientIP:192.168.7.54, clientName:ZeeSmart, remoteType:smartthings, localConnectionType:http, hasSTHub:true, updateDeviceIPs:false, removeDevices:false, enableDebug:true, receiveHSM:false, pushModes:false, receiveModes:false, pushHSM:false, useProxy:false]
app:973 2020-06-22 08:15:19.468 am trace Creating hub Device ZeeSmart... hub-192.168.7.

The last 2-3 logs I see is the same as yours now...

and I'm showing Online:

Screen Shot 2020-06-22 at 8.22.38 AM

In the Hub device for SmartThings, I'm showing:

Screen Shot 2020-06-22 at 8.23.44 AM

So then I decided to Remove that Device. Which put the connection to Paused.

I then went into the Server Instance and into selecting devices. and then one more level. I didn't pick any devices, jut got deep enough into the menu system to be able to click Done all the way out. The Hub device was recreated and the connection once again shows Online.

I haven't really used SmartThings for a few months so I thought I'd remind myself about switching communications methods. I went into the Server Instance and clicked the Disconnect button under the Key. HubConnect reconfigures and offers me the connection options again.

Screen Shot 2020-06-22 at 8.30.25 AM

This time I picked HubAction and got the Key into ST. I finished all the ST config work and it showed Online... while the server Instance was waiting for me to click Verify. I did and it verified and it's online again.

Screen Shot 2020-06-22 at 8.32.11 AM

Just went through what you did but just going into the server app and clicking out to recreate the remote device did not bring the ST remote back online.

I had to disconnect the remote ST hub and pass over the key. After that it re-connected. It seems to be back up now. Although it was still working before it just said it was offline.

Thanks for your help.

Yes and Yes -- haven't measured the events per second.

I'm going to give it a shot. Will let y'all know what I learn.

I can't always reproduce the issues seen. Clearly if mine was behaving oddly, I'd do all of what I suggest for myself (and have done, a hundred times during collaboration with Steve on the development.) Therefore all I can really do sometimes is document what I'd do if I saw that problem. Or what I did the last time I saw that problem, back during development. Version 2.0 has a lot of effort added around this very set of issues.. how to make the initial connection process much more resilient... how you can't get a new key without going through the whole communications options again, etc.

Good luck, you've got a more positive attitude about slicing an invisible (but real) from a practical viewpoint than I've had. :smiley: For me, with Presence being a 'human speed' event... several times a DAY vs per minute, I can't say I've ever wondered if the tires of the car are on their first or second rotation when we come or go :smiley: I have never measured it, but I'd guess I have a +- 2 second variance over a weeks worth of coming and going. I'm using Homebridge for Presence but it's a parallel connection to my ST connection, with Apple cloud vs ST cloud being roughly equal.

I'm pretty sure I couldn't detect the difference between one Hubitat hop or two :smiley:

Literally LOL. Your cynicism is well placed and well taken. I've been having trouble with Presence response -- HE not recognizing we're home for a minute or two. So I've been trying to eliminate any sources of waste or extra hops in the process. You do give me pause whether I'm looking in the right places though. Will have to have a think.

When do the logs say Presence was detected initially (on ST) and when did that Event hit the logs on your target Hubitat Hub?

If that's more than a few tenths of a second, I'd be surprised. But that is all the time you could potentially remove from the equation by altering the HubConnect flow.

I'm pretty sure there's more 'in-the-cloud-time' than there is HUb-to-Hub time. For both of us. I've got Apple's detection of my iPhone, out somewhere in their cloud, that informs my HomeKit, which in turn sends a message over Homebridge to my "coordinator" hub. Everything to the moment my in-home HomeKit device is informed is Cloud time. I can't do anything about that... anything practical that is. :smiley:

I have SmartThing's presence fobs in each of our cars... with AA battery 'enhancements' connected via Zwave to a Hub which then sends that presence info to my "coordinator" and it's a lot slower than the Apple path but there's no cloud. It's just it takes that long to re-pair to the mesh and let itself be known.

I'd investigate where the minute is being frittered away. From the moment ST gets it's message to the moment you see it on Hubitat is not the MOST likely place to find a delay, I expect.

1 Like

First run, forgot to upgrade the "server hub" drivers...duh. So I think I have everything upgraded from 1.6.4 to RC1. I'm getting this error on the remote client:

[dev:1869](http://192.168.13.46/logs#dev1869)2020-06-22 01:55:39.609 pm [warn](http://192.168.13.46/device/edit/1869)Connection to Server Hub has failed with error [failure: null: Name or service not known]. Attempting to reconnect...

[dev:1869](http://192.168.13.46/logs#dev1869)2020-06-22 01:55:39.551 pm [info](http://192.168.13.46/device/edit/1869)Attempting websocket connection to Server Hub (0)

[dev:1869](http://192.168.13.46/logs#dev1869)2020-06-22 01:55:39.419 pm [trace](http://192.168.13.46/device/edit/1869)Initialize virtual Hub device...

That's on the remote hub driver on the client side. When I go into the "HubConnect Remote Client" app and then into "Connect to server hub" I see that the "Local LAN IP address of the server hub:" is "null" and any attempt to change it and it automatically reverts back to "null"

EDIT: It's now fixed. What I had to do was go into the "HubConnect server for hubitat" on the main hub. Under connected hubs, Click on the client hub. Then "Connect to remote Hub" on the next screen. Then there is a switch for "Send connection key and automatically configure the remote hub" Turn that on and click connect. It refreshed everything and the error is gone. Leaving this here for others that may get that error.

1 Like

It lasted all of 3 hours. I just noticed it says my ST hub is offline again. Looking in the logs I started getting the following message @ 3:17PM and it is repeating every 5 or so minutes

2020-06-22 05:27:01.200 pm [error] ST Remote is offline.

[edit]3:17 is just as far back as my logs go so it could have disconnected sooner

I mentioned I switched to http(oauth) to try and duplicate your situation. After, I switched back to HubAction... and have been running that way since... which is a far more local connection. It's possible with http(oauth) that ST's cloud is interfering.. but I imagine someone else would have spoken up.

Verify that you have the right version of everything. Run an App and Driver Version Report...

Screen Shot 2020-06-22 at 3.00.39 PM

The Installed column should be all 2.x while the Latest column will be inaccurate, showing all v1.x

1 Like

OK, I deleted my ST connection on Hubitat and HE and started over. I selected simply SmartThings as the communications method...

How did you answer this question:

Screen Shot 2020-06-22 at 3.06.18 PM

I left it as you see it, (no, there's no ST hub active) and once moving the Key it came up. I noticed there's no Hub Device on ST and that reminded me of the 'old days' -- the v1.6 days :smiley:

I'll monitor and see if I see disconnects.