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

I noticed on the Hubitat server side that we now have the option to select whether or not there's actually an ST hub connected to the account/location. Out of curiosity, I tried to get this working with an ST 'location' I created that does not have a hub on it. Could not get the ST app to function properly, with tons of errors like this when I actually submit the server key.

3:29:33 AM: error java.lang.NullPointerException: Cannot get property 'id' on null object @line 1875 (connectPage)

Which corresponds to the following in the source:
// Send our connect string to the coordinator String connectKey = new groovy.json.JsonBuilder([uri: (accessData.connectionType == "http" ? apiServerUrl("/api/smartapps/installations/${app.id}") : callBackAddress), name: location.name, type: "remote", token: state.accessToken, mac: location.hubs[0].id ?: "None", customDriverDBVersion: state.customDriverDBVersion]).toString().bytes.encodeBase64()

In the past I used a legit location, even though the hub was not actually powered on for years, despite technically being associated. I'm guessing there's a portion of the processing that doesn't work if you don't have a hub tied to the location, but I'm curious if there's a workaround, possibly... many other features still work fine in ST without a hub, as I think Samsung is trying to move as many people as possible away from hub-based automations. I can tie my Arlo cameras into this new location easily, but can't get the last piece of the puzzle connected.

How do you get HubConnect all I get are drivers on HPM?

You can download directly if HPM isn't working for you. Downloads - HubConnect Apps

How do you log in ?

Yes, that is correct. Only Drivers are available via HPM. The Apps are Licensed differently and reside on HubConnect.TO.

Put another way... HubConnect install is like building a highway, BEFORE allowing cars and trucks to use it. You need to download the Apps code from HubConnect.TO and add them to your Hubitat hub and Remote. Then perform the key exchange and get the 'highway' built. Then, when you're ready to 'remove the orange cones to open your highway to cars and trucks' (mirrored devices) you can use HPM or the Import List or the same HubConnect.To resources to deploy drivers.

Visit: https://hubconnect.to/ and click Register in the Upper Right Corner to create an account.

2 Likes

Thanks for the tip. I've added support for eTRV + battery capability, original Arlos camera support and Ring to the system now. Shame the code isn't hosted on github, i've no idea how to submit code suggestions in the current system.

Curious what you have added/changed, because the Arlo support was already there. I've been using it for years.

v2 only has support for "device.ArloProCamera", "device.ArloQCamera" and "device.ArloQCamera" not the original "device.ArloCamera".
I simply added a line for the missing capability on the remote client.

1 Like

Aaaah got it. Anyone using ST without an actual hub? To regain control of my arlo, it might just be worth it to go buy one. Sure wish we could dissect that integration.

Similar question here: Anyone has any success to setup HubConnect with SmartThings Cloud account without using a local SmartThings Hub? I have a Samsung appliance that control directly using the SmartThings mobile app without a local SmartThings Hub. I would like to integrate that in HE if possible. I read other threads, some folks say that this can be done. But following the HubConnect installation, it only has instructions on how to setup hub-to-hub steps. If anyone successfully setup on HE hub-to- ST Cloud Account integration, please share instructions please!

Yes, finally, just now, I got it to work. I had to modify the ST Remote Client code to get it to work, but adding one char fixed it and I was able to 'mirror' a simple switch.

For some reason I was unable to get a the SmartApp to be detected. I have no idea exactly what I did... well I know what I did, but not why it worked this time. The next hurdle was that, after pasting the Key, "next" cycled back to "next". I found that for hub-less accounts, there's no Location:Hub.

For v2.0RC2:
line 1875 column 272, insert a ?

change this snippet:
mac: location.hubs[0].id ?: "None",
to this:
mac: location.hubs[0]?.id ?: "None",

Yep, a ? after the hubs[0] without disturbing anything else.

Screen Shot 2020-10-23 at 2.48.48 PM

More specifically, on Server, I created a new Instance and added a bogus (placeholder) IP address, then I selected SmartThings as type of hub. The screen refreshes and displays a key. I delete the IP address (placeholder) and click inside the Key to update/select it.

I then transfer that Key to ST and (with the modification above,) it connects and then clicking Verify on Server confirms.

Screen Shot 2020-10-23 at 2.19.47 PM

Resulting in:

Screen Shot 2020-10-23 at 2.25.11 PM

This is my 2nd ST Account, specifically setup to be Hub-less vs an account with the ST hub powered down.

I have ZERO ST devices, although I was able to 'mirror' a switch from HE to ST, easily. Meaning I can't test Arlo, etc. because I have none of that.

1 Like

@csteele congrats on getting this to work. Your success sure help and benefits many others, like me. I have some challenges to follow instructions, please don't mind me to ask many questions, I am completely new to this HubConnect. First, I need update my HubConnect version to v2.0RC2. I download the code from here: Downloads - HubConnect Apps. I added the Apps Code for "HubConnect Server for Hubitat" and "HubConnect Server Instance". I tried to add the Drivers Code "HubConnect Remote Client for SmartThings", I believe this is the file that you said you need to insert ? in line 1875, However, with or without the ?, I can't even save the file and it givse me this error:


Am I downloaded from the wrong place? I tried to cut and paste code from the download file and import using the link, both give me the same error!
Question 2: When you said "I then transfer that Key to ST", what do you mean? Is there a place in ST Cloud account or the mobile app that I put in this key? Sorry, a bit lost here, I would imagine that the Cloud account would need login ID and password store somewhere rather than the key? Please shed some lights here. Thanks again for your help.

For SmartThings, using the IDE:
Driver Code goes into "My Device Handlers"
App Code goes into "My SmartApps"

Seems like you have that backwards.

I've said this in this thread a few times, but for your Hubitat HubConnect Server Hub, you'll be installing Three portions of Code.. Two Apps, one Driver.

For your SmartThings HubConnect Remote, you'll be installing TWO portions of code.. One App, One Driver.

I've even created a Video for people to watch and follow along... get your finger poised over the Pause button :slight_smile:

There's even Installation Instructions too.

I decided to use the 1.6.4 version, and I keep getting this problem:

When I click "connect to server hub" on the Smart Things App I get the server details with "Not Connected ::"

Any idea what I'm doing wrong?

Darn, now that I can make HubConnect work, Arlo (Connect) on the ST side is saying that I "don't own any devices on this account." Odd message. Then below, states it was unable to connect. Must be something stale on the back-end from a previous attempt. I'll have to check the IDE.

Yep, I had to destroy an Arlo connect integration in the IDE, and now it works. Out of curiosity, does anyone know what device-type I would use in HubConnect to get the Arlo Security Motion/Light to work? They can be handy as well. My memory is foggy on those, maybe they can integrate natively with HE.

Only v2.0 will work with the NEW ST App.

You're about a week late to install v1.6.4 I'd say. :slight_smile:

v1.6.4 will work fine with Hubitat to Hubitat.. but ST shut that door for all of us.

Guess it's v2.0 then!

2.0 has been working great for me so far between my C4/C5/Fake-ST, so I'm glad I made the switch a few weeks back. 1.6.4 was working on my real ST hub/location, even though the hub has been disconnected from the internet for almost 3 years.

I can connect my Arlo Security Lights as either dimmer or motion, but not both. I guess I'd have to build something from scratch or modify the Arlo Pro driver.