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

The right up is Node Red with Smarthings using Samsung Automation Studio

I still say if this is just for migration from Smartthings then Hubconnect is possibly easier and better. I use Smartthings as a cloud aggregator for things like Arlo cameras that don't integrate with Hubitat.

1 Like

In a first step I need to migrate my compatible devices. I also want to use my three Arlo cams. If this isn't possible with Hubitat I do need a backup solution, which could be Node-Red.

Step by step....

When you are at that point hit me up in that other thread. I think we have diverted this one probably enough. Arlo is my main use for still having any involvement with smartthings. My setup is completely hubless now from smartthings.

Trying to install this between Hubitat Coordinator and SmartThings Remote. I'm pretty sure I have all the AppsCode and DriversCode loaded on both. In trying to create the 'connection' between the two I get the Connection Key from the HE Server. It says to Paste into the Remote hubs' configuration. But where is that exactly in SmartThings? Its also telling me to 'click the install button on remote client' but I dont' see that anywhere in ST either. Can anyone give a bit more detail on how to configure the ST side?
image

There's an Installation video for this at:

https://hubconnect.hubitatcommunity.com/

Beginning about 0:30 and then again at 0:45 the clues are offered. That video is using the Classic App which is not available any more. However, the idea of installing the App that was created within the IDE is shown, as well as the step to then run the App and Connect to Server Hub, after which the Key is needed.

Let me know if that provides the hints you need.

1 Like

I think this is the issue. I have the New App not the Classic App. And since the Classic App is not available any more, how to we install this?

SmartThings has made it harder and harder to install Groovy SmartApps. They completely hid the interface as of the November 2021 update.

After adding the code in the IDE, you need to install the SmartApp into your account (about 0:30 in the video). To do that, you can do either of:

  • Use the SmartThings App:
    Tap on the Automations tab, click on + in the upper right of the screen, select Add Routine and choose the Discover tab at the top. Scroll down (far down) to find the HubConnect Remote Client SmartApp.

OR

  • Use the beta SmartThings web interface at https://my.smartthings.com/
    Login with your SmartThings account, click the plus in upper right corner, select Add Groovy SmartApp and then select HubConnect Remote Client.

Then you can follow the video from about 0:42 onward.

3 Likes

Thanks @jlv ! That's got me working now :+1:

1 Like

Been a while but if I remember correctly:

Thanks, @thebearmay I figured it out, I had mixed up the files between remote client and remote hub for SmartThings.

It gets a bit confusing since the files needed for current installs on Hubitat vs SmartThings are in completely different folders on HubConnect.io, then instructions lately are a smattering of what everyone remembers and docs that are out of date, so a newbie piecing it all together in February of 2022 is hair loss inducing... someone (maybe I'll do it once I get it all working) needs to make an all new 'this is how you do it in 2022" detailed doc for HubConnect on both Hubitat and SmartThings, here's the steps in order, here's the links to the files. Right now there isn't one cohesive doc for that that applies today. It's an adventure!

Question for you, @jlv and @csteele or anyone else who knows:

My next question/confusion is it seems the next steps refer to getting "new drivers for HubConnect 2.0" and I see there are drivers for Hubitat and Smartthings in hub connect.io - but the instructions are vague on what you do in SmartThings.

For example, and evidence that my note above that docs don't make sense, the very next step in the SmartThings specific section in the docs that @csteele refer to in January, it says (and this is all on the "For SmartThings" page):

"Required; update all drivers:

All of the drivers have been upgraded with HubConnect 2.0. Follow the steps outlined in section #2 “Install the HubConnect Remote Hub driver” above.
All of the drivers can be found in the download section at hubconnect.to

Not all Device Types are currently supported in SmartThings with the tiles UI. For those that do not appear in the SmartThings driver list, use the drivers located in the Universal Drivers download section instead. These will not have a user interface, but they will work for automations."

This makes little sense because it tells you to refer to a section above that tells you how to do things in Hubitat when it's specifically talking about updating drivers in SmartThings. Confused.

After I've added the DeviceHandler (Rremote-Hub-Smartthings file from hug connect) and added the SmartApp (remote-client-smartthings.groovy) from hubconnect - does something now need to be done in SmartThings app or IDE for adding DRIVERS? What are all these device drivers for SmartThings in hub connect.io and where do you add them in SmartThings?

Thanks for the help!

Drivers are added to SmartThings when you mirror a device From Hubitat To SmartThings. Or, more generically, the remote side of any mirroring needs a HubConnect driver. If you are NOT mirroring a device to SmartThings, you are only mirroring devices FROM ST, then you need zero HubConnect drivers on the ST end (Except the hub driver itself.)

Driver code is added via ST's IDE... Device Handler tab.

Ah, thank you for that. I didn't realize that. Something for me to add in my new 'Newbie" docs that will hopefully help people in the future.

You are right, I'm only setting up HubConnect to mirror ST and control ST devices from Hubitat so it sounds like I don't need drivers on ST. This will be until I eventually move most everything to Hubitat.

Next steps are the authentication and following your analogies above of the freeway and bridges, wish me luck, but I bet I have another question coming up shortly, lol. Thanks for the quick responses!

Because we've tried over the years of HubConnect's life to simplify to just-a-recipe, the underlying actions are almost invisible. But it's probably still clear that somewhere, a device needs to exist and be working, before it can be mirrored. That surely indicates that it has a working driver. When it comes to the mirror action, it is less clear that creating that distant device will need a driver too. Where will it come from? It needs to be a HubConnect "stub" driver that is on the hub before the mirror action takes place. :slight_smile:

@csteele Makes sense...

Unfortunately I'm stuck again, tried to find more detailed instructions but can't.

I've successfully added the HubConnectServer to Hubitat and successfully added the HubConnect-Remote-Client (SmartApp and DTH) to SmartThings, and I've gone into the NEW SmartThings app, Automations - Routine - Discover, and found the Hubitat there, I've gone in and configured and selected all the devices that I want to add to the Hubitat to 'mirror', clicked through next and done, and it seems to be installed. Checking the 'connection' on Hubitat it verifies connected and installed, no errors.

But, when I go to devices in Hubitat, the only device that appears is the HubConnect Hub (the SmartThings Hub) itself. None of the SmartThings devices that I selected in the client SmartApp when I was doing the connection (locks, switches, etc) appear on the Hubitat under devices.

Am I missing another step? All of the drivers are in 'drivers code' (got that bundle imported at the beginning), I see all the HubConnect drivers.

Do I need to add SmartThings drivers to Hubitat? That is where docs get confusing... I've added the "HubConnectUniversalDrivers" so far...

No.

You're at the point where Live Logs are going to be your friend. Make sure that debugs are enabled for HubConnect.

On your browser connected to Hubitat, right click on Logs in the Left Menu and select open in new tab (or whatever specific words your browser uses.) Go back to ST and dive deep into the HubConnect selection menu to the point where you can see the specific devices you've selected. (You don't have to reselect, just be deep enough in the menus.) Click Done all the way out. This will cause the ST instance of the Remote Client to resubmit a full list of everything selected to your Hubitat hub. You'll see that in the live logs. You'll also see it trying to create the mirrored device. Any problem will be recorded there.

Here's an example from a few moments ago, where I did the same... I have only one fake device over on ST, but the process doesn't care :slight_smile:

app:339 2022-02-05 10:05:49.663 am trace HubConnect Dimmer pseudoDimmer (192.168.7.54:65cfec75-b1d1-4825-a319-b4518bcc0f0d) exists... Skipping creation..
app:339 2022-02-05 10:05:36.754 am trace Received ping from ST Hubless.
--- Live Log Started, waiting for events ---

HubConnect Utilities:
Screen Shot 2022-02-05 at 10.08.57 AM

Here is example of the issue...

I've followed the threads and docs above and gone into the 'client' SmartApp in SmartThings App, following instructions to select the devices I want to use with HubConnect, and you'll see here after selecting, at the bottom, as the instructions say, it lists the drivers it wants me to be sure to have on the hub. (I do, next screenshot). I then hit next and done and according to docs, the devices are supposed to be created and mirrored on the Hubitat server. But that doesn't happen. You can see below the devices only shows the SmartThings Hub, none of the devices I selected in the SmartApp are coming over.

Here's a more complete "set" of logs...

app:339 2022-02-05 10:12:43.257 am trace Creating Device HubConnect Dimmer - pseudoSTDimmer... 192.168.7.54:65cfec75-b1d1-4825-a319-b4518bcc0f0d...
app:339 2022-02-05 10:12:28.144 am trace Received ping from ST Hubless.
app:339 2022-02-05 10:11:38.910 am info  Deleting device pseudoDimmer as it is no longer shared with this hub.
app:339 2022-02-05 10:11:16.533 am trace Received ping from ST Hubless.
app:339 2022-02-05 10:10:37.606 am trace HubConnect Dimmer pseudoDimmer (192.168.7.54:65cfec75-b1d1-4825-a319-b4518bcc0f0d) exists... Skipping creation..
--- Live Log Started, waiting for events ---

From the bottom, is another mirroring of devices that exist.. it skips the create. Next up is me deleting the device from the ST end. And at the top is what to expect when a "new mirror" occurs. (When I first created that fake ST device, I happened to name it too similar to a device I had on my Hubitat hub already... so I took this opportunity to improve the naming :slight_smile: )

Ok, thank you, did the above - literally the 4th time I've done this, and now finally the devices appeared in Devices.

So bizarre!

Working on a new instructions doc with links to everything one needs for both Hubitat and SmartThings, your excellent instructions combined into a new doc of "here is exactly what you do in February of 2022 to connect SmartThings to Hubitat" - hopefully it will save the next person doing this hours of combing threads and outdated docs.

THANK YOU again for the quick responses!

Unfortunately I didn't have the debug and logs running previously, so after you told me how to do the above, once I did have them on, the logs reported 'devices existed' and then when I went back to Devices, sure enough they were there this time. Not sure why the previous 3 times doing the same thing didn't create them, but now I know how to use logs! Thank you!

the Device page isn't dynamic... meaning there's no automatic update when the list changes, you have to refresh.