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

I hate to tell you this, but it gets worse! :sleepy:

2 Likes

Thanks, I must have missed that post initially. I hadn't been paying much attention to this thread because HubConnect was working perfectly for me so I had no need to mess with it until I upgraded this past weekend.

Chased down something in another thread here:

And then started to think I should look at the original lock driver and NOT the Hubconnect one. It seems the hubconnect driver is missing the "type" from the lock driver.

Original event log in Yale zigbee driver:

Hubconnect driver (2.0)

The type column is missing.

I'm also having problems with Rule Machine or the built in "Notifier" app recognizing when a code is entered...wondering if this has something to do with this integration also?

Here are two 'captures' of the Event Stream for a single device:

Screen Shot 2020-09-30 at 5.59.48 PM
This one, above, is the result of automation, so called "digital".

The second one is me, physically turning on the switch:
Screen Shot 2020-09-30 at 6.00.27 PM

The data you seek is not included in the Event.

Here are two more Events...

Screen Shot 2020-09-30 at 5.58.20 PM Screen Shot 2020-09-30 at 6.00.08 PM

Remember, the Event Stream was 'invented' for Dashboard and contains data useful on the dashboard.

1 Like

ok second question.

So what I think I'm seeing here is that the hubconnect lock driver is not creating the "lastCodeName" event. I have code that when put on the hub with the zigbee lock reacts when the "lastCodeName" event happens:

subscribe(lock, "lastCodeName", lockHandler)

that same code on the remote hubconnect hub connected to the same lock does not catch the event. As you can see here this is the event on the hub with the zigbee lock:


There is a lastCodeName event.

This is the log on the hubconnect lock (same lock):


Notice the event name is now "lock"

HubConnect v2.0 RC Drivers Added to Hubitat Package Manager

This is a HubConnect Drivers for Hubitat Only announcement.

A HPM Manifest has been added for HubConnect's v2.0 (RC2) Drivers. While HubConnect has a set of SmartThings Drivers, there's no HPM for ST and thus this addition to HPM will not help with SmartThings.

HPM_HubConnect

Enjoy HubConnect

15 Likes

Can I like this more than once? Amazing @csteele this will make installation from hours to minutes!

1 Like

Thanks again for a brilliant app.
Something I've noticed after the update.
When I do a check it still shows 1.6 for example as the current drivers.
Loaded is showing 2.0.
Just an observation.

it's a dozen or so posts back.

Thanks. I'm up to date but missed the earlier post.

1 Like

I had to make the following changes in the SmartThings HubConnect server SmartApp and button device driver. This was necessary to get HubConnect to send button events from SmartThings to Hubitat properly.

In the HubConnect Remote Client, I modified the deviceEvent() function by changing the event for pushed and held buttons as follows. Previously the code only had the sendEvent in the else clause.

if (event.name == "pushed" || event.name == "held")
{
childDevice.sendEvent([name: "button", value: event.name, unit: unit,
descriptionText: "${childDevice.displayName} ${event.name} is ${event.value} ${unit}",
isStateChange: true, data: ["buttonNumber": event.value]])
}
else
{
childDevice.sendEvent([name: event.name, value: event.value, unit: unit, descriptionText: "${childDevice.displayName} ${event.name} is ${event.value} ${unit}", isStateChange: event.isStateChange, data: data])
}

In the HubConnect button device handler I had to add a "Holdable Button" capability to allow me to choose pushed or held actions on buttons when adding automations in SmartThings.

I'm sure there's a more elegant way to change the code but this works for me :slight_smile:

All this was started when an Inovelli switch stopped working in SmartThings and I moved it over to Hubitat. I wanted to replicate as many as possible of the original ST automations but I had issues sending the button states to SmartThings.

My setup is as follows: The Hubitat switch is an Inovelli switch that exposes multi-taps as buttons. I could not find a way to send those button events through HubConnect. I then created a virtual button in Hubitat and added RuleMachine rules to push or hold the virtual button when the corresponding physical button was pushed or held. If there's an easier way to do this, please enlighten me!

Excellent. Is your ST hub updated to the latest 000.032.00010?
My ST just updated yesterday and now I'm seeing this in the logs


but Hubconnect seems to be working, so not sure what the logs mean.
Both client & server Hubconnect apps says connected(in green), so not sure what's up

I am on 32.10 and not seeing any error messages.

nevermind, I have too many hubs. My ST hub is fine, it was my hubitat #3, oh wait maybe #4. Dang always get them mixed up.
Anyway I fixed it by upgrading everything from the Hubconnect website for ver 2.0 latest release.

2 Likes

I'm afraid you lost me there :joy:

1 Like

I keep getting this error on my client hub:

2020-10-06 08:11:44.581 pm errorgroovy.lang.MissingMethodException: No signature of method: user_driver_shackrat_HubConnect_Remote_Hub_371.updateDeviceIdList() is applicable for argument types: (java.util.HashSet) values: [[]] (updateDeviceIdList)

any ideas?

Also, I am using Netatmo connect, which is working great. I am then forwarding the wind and rain measurements through hub connect which is not working? The devices show up on second hub but no readings all I get are nulls. Any ideas?

I was using v1.6 and for fun I experimented by sharing some contacts with my my ST hub. They showed up as devices but were not recognized by STHM. So I thought I'd try v2.0...
First, should I be using RC1 or RC2? I went with RC2.
I basically deleted all the old install because I get confused with multiple drivers and apps having the same names!
Followed the instructions to the letter. One thing confused me: when it talked about installing drivers on the ST hub I thought it meant drivers for the shared devices? But this other driver showed up, "HubConnect Remote Hub for SmartThings", which wasn't part of my old install. Hubitat didn't like it so I put it in the IDE as a Device Handler. Also installed the ST client of course!

Everything seemed good, installed the app in ST and opened it up, prompted for the key (twice as it happens). Back to Hubitat and did the add hub routine. Verify connection and the error message shown - what "Install" button on the remote client?
Meanwhile over in the ST app it also said error not found, even though it seemed to find the IP address of my Hubitat hub. Tried both the new app and Classic.

Any idea what's happening?

The names are identical to make it easy to just copy the new code over the old. Just open the v1.6 code and paste in the new. Rinse, repeat.

Yes, the HubConnect Remote Hub for SmartThings driver is an added step to the ST install.

Thanks for the reply. Any suggestions why it won't connect?
Also why does it ask for the key twice?