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

:+1:

I would add to the above that if you are using custom devices websockets provides a few advantages as well.

Since, when using the websockets connection, all events come over for the device whether defined in hub connect or not, it is much easier to set up custom devices. You really don't need to do any of the custom device definitions in hubconnect at all (just pick the closest supported device). As long as the stub driver has the right capabilities and command support, it just works.

1 Like

Ah. That explains something. I have some virtual devices that I have written a rule to sync every 2 minutes to keep things up to date.
Perhaps I'll try websockets and see what happens.
Thanks for the response. Much appreciated.

I noticed a bunch of stuff was out of sync on my remote HE yesterday, and today I found out about the sync command on the HubConnect device drivers... Is it worthwhile to schedule a sync on a regular basis (e.g. once a day or once a week or something) to try to head off any of these issues in the future?

It was mainly impacting my motion lighting rules running on the remote hub, because the remote hub thought the lights were on already, thus never turning them on, or the motion sensors were showing as active already and not changing, etc.

I made a preliminary webcore piston to run sync on all 91 of my HubConnect devices, but it took ~34 seconds to iterate through them all.

This should never be needed. I actually advise against it as it adds unnecessary load on the remote hub.

If you are using http with custom drivers, please make sure you defining all of the attributes that you want the device to see. That will ensure that the events are subscribed and delivered to the remote hub.

If you switch to WebSocket you can cheat the system and have all of the attribute events forwarded to the custom device, as @JasonJoel mentioned.

No.. If your HubConnect system is connected properly and you are using stock drivers it is not necessary. It shouldn't be necessary for custom drivers too, if the attributes are properly defined.

It is also a surefire way to crash your hub. The only time a bulk sync should be needed is if one of your hubs has been down for an extended time causing the virtual devices to be out of sync with physical devices... This can also happen if you have to restore a hub from a backup.

Otherwise do not do this!

1 Like

Got it, i'll keep the sync command in my pocket for future one-off fixes, just in case.

1 Like

I've changed to websockets and I'm now seeing more info from devices on my remote in the client logs. Much better.
I think this IS the way to go.

I think so too. And if Hubitat removes that "unsupported feature" I may just give up and go to Home Assistant. lol

If you do, feel free to create a HubConnect Remote Client for HomeAssistant for the rest of us. :rofl:

Not a bad idea, actually - I could use that right now on my HA system. Although once MQTT is finished in Hubitat it won't be that necessary.

Same here. My RV has a control system that's powered by it. Would love to connect the two.

I've honestly thought about this, but their device models are so different, I'm not exactly sure how this would work (I'm not nearly as proficient in Home Assistant as some others are, but for devices like a 2-in-1 motion and temperature sensor in Hubitat, I'm pretty sure you would need two Home Assistant entities, which is fine going in that direction...but then say you have a similar device paired directly to HASS and want to get it into HE as a single device. How would it know?).

I once thought the same thing, but if I was holding my breath waiting for that, I'd have passed out by now. :slight_smile:

Eh, it's steadily coming along... :grinning: Just takes time, as everyone has day jobs.

I’m seeing some strange behavior with the Homebridge hub (on HubConnect) disconnecting many times a day since the update to 1.5 (or 1.5.3, not sure). I think I’ve narrowed it down to Samsung Buttons I had synced to Homebridge for temp monitoring. I say this in case anyone else has noticed this issue. I removed them from the HubConnect app for now to see if it stops the disconnects from occurring.

Can you get me the logs of the homebridge plugin? I can tell you based on that if the button is the root cause.

1 Like

Will do. I appreciate your help. I’ve been trying for days to figure out the cause and just noticed today that it happens when someone is taking a shower. The button also turns on the shower light. Once it’s pushed, the hub goes unresponsive. Once I disconnected the button, no more problems.
Edit: I had these buttons on the Makerapi version as well and never had a problem. I just switched because I bought a second hub.

Just a quick note... HubConnect 1.6 is just a few days away!

In addition to some enhancements to filter duplicate events from the websockets, custom drivers have received an internal top-down overhaul to fix some navigation issues. Custom drivers have selector support for several additional capabilities, they now are created with all attributes fully populated, plus some other tweaks.

There's also a new restart services tool that will reset the connections between hubs. This is especially useful if a websocket connection has stopped responding or is acting flakey.

HubConnect can now automatically remove unused virtual devices from the remote hub when they are no longer selected for sharing.

Reports & Utilities are now split..

Sorry for the fast track releases, however this one will be the last one before Christmas, except for critical bug fixes. It will also likely be the final release of HubConnect 1.x. My focus after the holidays while I have some free time will be to get v2 in the first quarter of next year, before camping season arrives. :slight_smile:

9 Likes

Wow, that's a nice set of new features. Good job!

As a result of v1.5 I imagine everyone has the Import URL filled. The upgrade (when it's released) SHOULD just be click intensive: click into the app/driver code, click import, click import, click save.. click App Code/Driver Code.. repeat. :slight_smile:

When everything is imported, visit HubConnect Server for Hubitat and you'll see the green message that a new version needs to have Done clicked. Click Done and enjoy v1.6.

I may be missing something - please let me know.
But could you add the ability to pass a RM Connector Variable?
I am using them to store values, but I don't see a way to add it or create a custom device. I believe they now report themselves as an actuator (but not much else).