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

The problem is that my blocker devices are Leviton WiFi switches, which don't have a public API. That's why I haven't even purchased a hub yet...

I'm running two C7's my plan was to run all my automations on the second hub and have all the devices connected to the first, current s/w versions on both. The porblem I'm having is that state changes are not reflecting on Hub 2. for example, if a motion sensor shows active on Hub 1 it's not showing in Hub 2. This occurs with open/closed sensors as well. I tried different drivers and it didn't seem to help. Any ideas how to fix this?

Am I crazy (Don't answer) or did I read something about having to host our own "code cloud" to have custom apps, drivers etc. in smartthings?That is once their done FUBARing their platform
I bought another RPi in anticipation of keeping hubconnect and other custom ST apps/drivers

I can't imagine they have any actual people signing up.

That's an understatement. I'm about ready to try setting up hubconnect, but I'm thoroughly lost on where to start and how to proceed. This will definitely be the biggest thing I've attempted so far.

Start with this:


Take it slow. Don't try adding devices until you are sure you have everything communicating. It's really not difficult as long as you follow the instructions and take it slow.
2 Likes

I figured out the change from a device isn't coming over to the hub automatically but it will show up if you push the synchronize button on the device from the Primary hub. Is there a way to make this happen automatically?

Also is there a way to show child devices on a Zigbee device like you can on a zwave device?

It is normal to have the Attributes be 'mirrored' -- that's at the fundamental layer, exactly what HubConnect does. Events are generated on one hub, by a real device, or a dashboard action, or a rule runs, or... Events get sent via Hubitat's websocket feature out to whatever is Listening. In this case, HubConnect is Listening on the "Other" hub. (Unless of course, you're using the http (oAuth) method of communications.) The listening hub hears every Event on the connection and checks to see if that device ID is in the selected list, if not it's dropped, but if it is, the Event is stuffed into the top of that hub's Event Processor.

The Hub processes the Event, and if there's a result, it causes an Event and back it goes.

The only way to break that is to not have a full 'highway' between the two hubs. Look on each Hub's Device List and specifically at all the devices using a HubConnect Hub Driver:

Screen Shot 2020-09-11 at 2.16.11 PM Screen Shot 2020-09-11 at 2.16.02 PM

and verify the switch is ON.

Yes, components are devices. Mirror the devices NOT just the parent.

Example:

Screen Shot 2020-09-11 at 2.18.21 PM

Do not bother mirroring the Parent.. instead, mirror only the two child devices individually. They will appear on the Remote as individual devices.

In other cases, the Parent is a Device and the Child is another... mirror both.

Screen Shot 2020-09-11 at 2.20.26 PM

So if I initially set it up using OAuth, The physical device changes would not be reflected on the Server hub? If thats the case is there a way to change it after the fact so that it isn't using OAuth?

http (oAuth) is a communications method that subscribes to each device and to the pre-defined attributes associated with the Device.

For example, there are at least 4 Motion drivers in the HubConnect suite. If you use one, and pick a driver that doesn't have the Capability you need, you'll have to re-select the device under the correct option.

That Aeon MultiSensor will show in each of the 4 Motion menus.. only the Omni has the complete list.

You could have a real Dome motion, and pick it under the Omni option, but on the other hub, you'd see buttons and options that just won't work. So we built the Drivers to do as broad a set as works, without making it too confusing. The moment it got confusing, we split the driver. :smiley:

Yes, just reset the Remote then the Server Instance and re-select the connection options. Transfer the new Key and Bob's-your-Uncle.

Screen Shot 2020-09-11 at 2.32.50 PM
Screen Shot 2020-09-11 at 2.33.27 PM

I do it several times a month so it's probable I'm doing it on autopilot by now... maybe I glossed over a step but the important one is.. the Device Selections aren't affected.

It still isn't reflecting client changes in the Server unless I push the refresh button. I'm doing something wrong.

I'm running V2 RC2. On the client side install It won't let me create the App until I set up OAuth in the Apps Code install. The instructions don't say to do the OAuth on the client but I can't find a work around...

I deleted the app from the client and started over.

Are you using Hubconnect Proxy by chance? I noticed that if my main hub reboots, device events from it will not make it to my remote hub unless I restart the proxy. I will say I’m not sure if this happened before I containerized hubconnect proxy or not - I wasn’t relying on those events on my remote hub as I am now, and my main hub was always up before 2.2.3 came along :frowning:

I didn’t have any issue with this when I was using the proxy. I went back to hub to hub event socket (no proxy server) after 2.2.3 came out. I tried it both ways and discovered that my hubs were faster without the proxy server.

Interesting. Maybe I'll remove it from the mix - if I can figure out how to do that. Ha.

You can toggle it from proxy to socket from the driver page, and toggle it back if you want the proxy again. Works perfectly. It’s really been the most solid program on my hubs. Once it’s set up correctly it just works; through shutdowns, reboots, updates. I wish everything worked as well as this.

1 Like

Mine doesn't for some reason, I have a C7 server and C4 remote and it works perfectly until a reboot. Then you have to open the apps and click done to get it working again, events work before this but the state changes don't get sent to the remote.

I'm looking but can't find it. I see the settings if I click the gear for the App, but don't see how to modify those.

HubConnect has a device for each connected Hub:

Screen Shot 2020-09-12 at 8.39.32 AM

Simple to find searching for "Remote Hub"...

Click into the device and you'll find the:

Screen Shot 2020-09-12 at 8.41.16 AM

There's also an On and an Off button that can disable the device's communications:

Screen Shot 2020-09-12 at 8.44.57 AM

It's good to check that it's On. Both ends.

1 Like

Never knew that’s what toggle socket did. Thanks guys!

1 Like

Are you on HubConnect 2.0?
You can also set up rules in RM to notify you if the connection changes to disconnected or error from socket. You can also put the on/off switch on a dashboard with the attributes as well. Makes it easier to keep an eye on.