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

Seems to be working for me too thanks.

Only comment would be that when I first add a remote ST local device to the coordinator the status is wrong/not in synch. In fact it’s empty. After it changes state it is in synch.

I thought there was an initial state synch but I could be wrong. The coordinator device does not have a switch or level state listed. After on-off toggle switch is then listed but not until level changes does that appear. So it seems states are only being sent on change.

The Sync button does it too.

*Before I forget - I'm using the classic ST app (the new one is pretty, but... has some issues - for another time)

Sorry for the sparse replies - got everything working, had a few problem devices, but I think the updates have taken care of most.

I've got an aeon hem meter, model:cheap-o (but works-o), that I tried to add yesterday using the 'power meter' type and it threw some errors so I removed it, and the errors were replaced with errors :stuck_out_tongue:, only this time removing doesn't seem to do anything, so I added it back etc. etc.

Here's the error it throws (interestingly, the 'recently' in the ST app does show that its getting values from HE)

2019-03-27 04:04:31.408 pm [error](http://10.20.30.20/installedapp/configure/737)groovy.lang.MissingMethodException: No signature of method: user_app_shackrat_HubConnect_Server_Instance_546.unsubscribe() is applicable for argument types: (com.hubitat.app.DeviceWrapperList, java.lang.String, java.lang.String) values: [[Panel Meter], voltage, realtimeEventHandler] Possible solutions: subscribe(java.lang.Object, java.lang.String, java.lang.Object), subscribe(java.lang.Object, java.lang.String, java.lang.Object, java.util.Map) on line 474 (updated)` 

Also, the 'thing' displays in the list with a refresh icon to the left and a button with no text to the right. When I open it up, there is no tile at all, just blank grey-ish. I'm guessing this is a 'on the to-do list' item but figured I'd throw it out there.

One other thing - I was getting a lot of device not found errors and I found that changing the lines where this was present:

else if (enableDebug) log.warn "Ignoring Received event from Server: Device Not Found!"`

to:

else if (enableDebug) 
{
    log.warn "Ignoring Received event from ${clientName}: Device Not Found! - ${event.name} - ${params.deviceId}"
    log.warn "More data: ${event}"
}

This change (which is totally my n00b blundering about) really helped me track down which device was misbehaving. In my case it was something reporting power usage, so I looked in the HE log and matched it up in the ST log etc.

I so want to try this out.... Maybe in a week or two.

None of the Universal Drivers have Tile definitions. Two ST Only drivers have been created (so far) and are available to overwrite the Universal Driver, as announced here: [RELEASE] HubConnect - Share Devices across Multiple Hubs (no longer SmartThings!) - #271 by srwhite

I knew that. Just seeing if you were paying attention :innocent:

1 Like

Did I win?

Yes! Valuable candy prizes! :grin:

1 Like

I haven't been able to find something that directly says this, but is it the intention that the 'coordinator' actually be a second HE hub? I've got my ST hub and one HE hub and have been going under the assumption that this is a valid configuration - am I wrong?

It's valid.

It wasn't developed for that case, but of course it does work.

I would expect 'Other Hub' would be a smaller footprint, but I've never used that tool. At the time I arrived on Hubitat all the cool stuff was not yet released AND I joined my Hub to my already existing ZWave network. I had instant access to all the devices and didn't need Other Hub or HubLink. Eventually I factory reset the Hub and moved the whole house over in a (long) day. Couple days later I shut off SmartThings and never used it again til this weekend.

OtherHub and Hub Link are intended to assist with migration from ST to Hubitat. They seem to have/be doing a good job at that. HubConnect is targeting a different user. Me :smiley: In a Multi Hub scenario, I want a lot of the Apps to be running on it's own hub. But those Apps often want Attributes (states) that don't pass across HubLink.

Migration implies that someday, you're done with it and can remove ST and the App. HubConnect is intended to be permanently running between the Hubs.

The server hub (coordinator) must be a Hubitat hub. From there it really doesn't matter what the remote hubs are. I designed HubConnect with the intent that Hubitat hubs would be fully-functional secondary hubs. The SmartThings integration was mainly built to send SmartThings devices into Hubitat, but at the last minute I ported the bidirectional code over to that platform. That's why the Universal Drivers have no tiles. Originally, that integration was meant to be one-way.

Your setup is valid.

And others like you including Me, although your use case was the basis for some of the early changes. :wink:

Got it - thanks for the explanation! To be honest, the only reason I haven't completely switched over is the ST app, I'm not quite sold yet on the HE dashboard, but I can tell they're making strides, so its only a matter of time.

1 Like

Understandabe. I'm going to be adding official ST tiles support to the SmartThings drivers over the next couple weeks. Two have already been released (Switch & Pocket Socket) and others will follow.

I'm once again using the ST App (Classic) for these tests and I'm horrified. I can look at a device, and alter the SmartApp. That means anyone with the App can too. I've got kids that have no tech fear about 'breaking something'.

I don't understand how, after so long, they don't have an option to 'hide' the SmartApp tab or simply limit it to inform.

1 Like

The latest updates appear to have fixed the bidirectionality problems I was experiencing before--and I even got brave and added a Ring Doorbell from ST into HE. (Even braver, I modified the code to work with the "regular" Ring instead of the Pro--hope that was just out of the need to choose one device type for the picker and not any technical reason.)

The thermostat still doesn't seem to be working fully, but I deleted it before I did a lot of testing just so I didn't get flooded with errors in the logs. I'm going to stick with my existing solution for this until I have more time to play around, probably the one or two days in the Midwest where the weather is nice and I don't need any HVAC--should be coming up soon. :slight_smile:

TL:DR don't remember which Thermostat you're using. I don't own a Zwave Thermo so I can't migrate one to ST.

What I did do is find a horrible example of a Virtual Thermostat and installed that into ST.

From the IDE, it says it has:

temperature: 20 °C
heatingSetpoint: 23 °C
thermostatSetpoint: 23 °C
thermostatMode: heat
thermostatOperatingState: off

After making sure that I can change the temp on the ST App, I added it to HubConnect and the device correctly appeared under Devices. I clicked Sync on Hubitat's Device Info page for it and about One ST Delay later I got:

Current States
    coolingSetpoint : null
    thermostatMode : heat
    thermostatOperatingState : off
    heatingSetpoint : 23
    temperature : 20
    schedule : null
    supportedThermostatModes : null
    supportedThermostatFanModes : null
    thermostatFanMode : null
    thermostatSetpoint : 23

So, while the standard Hubitat Thermo offers more attributes, this horrid Virtual driver does populate the 5 it knows about. :slight_smile:

On ST's App, I tapped the slider to be 17 (its in C) and the mirrored device now reads:

Current States
    coolingSetpoint : null
    thermostatMode : heat
    thermostatOperatingState : off
    heatingSetpoint : 17
    temperature : 20
    schedule : null
    supportedThermostatModes : null
    supportedThermostatFanModes : null
    thermostatFanMode : null
    thermostatSetpoint : 17

At this moment, my test is NOT to find a superb Virtual driver and test 20 attributes. This is the test a few steps before that.. in which I verify what I expect to happen, does happen. To say it another way, the attribute:value pairs are sent as encoded text, and thus what letters make up the pair is less important (at this stage) than they do, in fact, get sent.

I then, on 'coordinator,' set the Heating Setpoint to 28 and as if by magic, the ST App shows 28

Received event from ZeeSmarts/TestSTthermo: [thermostatSetpoint, 28 °C, isStateChange: true]

ST IDE:
temperature: 20 °C
heatingSetpoint: 28 °C
thermostatSetpoint: 28 °C
thermostatMode: heat
thermostatOperatingState: off

If you mean me, I have the good fortune of owning a Zen Thermostat (you know, the one that gives you weird setpoints like 54.9 when you tell it go to to 55). However, I'm actually doing it the other way. It's paired to Hubitat, then sent from my "Zigbee hub" (remote) to my "Z-Wave because Zooz makes way-too-chatty-devices, naughty apps, and coordinator hub" (server). I'm then trying to send that (already a HubConnect Thermostat) to SmartThings (where it, of course, also creates a HubConnect Thermostat). I'll play around with it some more later, but it appeared that changes I was making on one platform didn't migrate to the other. I did hastily add tiles to the ST DTH to make it easier to see what I was doing, but I think the behavior was the same without them. :slight_smile:
In any case, I realize this isn't a ton of information, so I'll have to play around more and figure out how it failed. I'm also not opposed to using a custom driver and just sending across the few attributes that I care about, but I haven't read up on how to do that yet, either.

Which system is the Thermostat paired to? If you're going from a Thermostat conencted to ST linked to HE, that should work. However, if it's paired to HE and you're trying to control it from ST, it won't work. There are no tiles defined, although ST automatically adds them for certain capabilities. But without a formal definition in the driver code, none of the tiles actually do anything. Yet...

Attention SmartThings users....

I've released to more beta DeviceTypes with a full tiles UI for motion & contact sensors. You can grab them here:

To install, just import them over the existing Universal Drivers that are already installed.

Please report any issues! Thanks.

1 Like

Do we need to remove Hub Link and Smartthings Event Pusher before installing this?