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

Well.... The physical vs digital attribute (for devices that support it) is always in listed in the descriptionText field on the event socket event.

Example:
descriptionText: "Computer Room Hall Light was turned on [physical]"
descriptionText: "Computer Room Hall Light was turned off [digital]"

So the driver very well could do a quick check on that field and then create the event on the repeated side a little better.

I'll do a quick custom driver when I have time and see if I can make it work.

descriptionText is passed unmolested.

  sendEvent("${clientIP}:${event.deviceId}", (Map) [name: event.name, value: event.value, unit: event.unit, descriptionText: event.descriptionText, isStateChange: true])

it receives from the EventStream and just injects everything right into the local hub. The hub doesn't 'decode' descriptionText into anything. It too just slaps it into the DB and thus those words show in the Device Info page: Events table.

lastCodeName is another example. It's always been in descriptionText, but that's kinda useless for RM to use. The point I'm trying to make here is that HubConnect is really mirroring. It injects what it gets fron 'that hub' into 'this hub' -- but we need that physical/digital value in RM to be tested.

Yeah. So since "type" isn't a field passed in the event stream we can't get digital/physical without some code to look at the descriptionText and injecting the type field before it passes it along. Probably more work than it is worth.

Side note... Anyone ever see where the 'stub' device stops logging events altogether? Commands work fine, but no event logged (even when doing the commands from the stub device)...

Basically it looks like the event stream has stopped working, but everything shows as OK on the connection...

Still tracking that one down. No matter what I do, I don't see any device events coming from that hub. :frowning:

Any thoughts on how to try and kick start it? I've already tried rebooting both hubs.

debugs might be off on that hub.. they are individually set/reset. There's a 'button' to turn them on on all hubs: HubConnect Server, HubConnect Utilities, Enable Debug.

My server's logs are full of pings at the very least: (search for ping)

app:332019-09-17 03:05:39.514 pm traceReceived ping from ZeeHomebridge.
app:4562019-09-17 03:05:33.786 pm traceReceived ping from ZeeSmart.
app:4572019-09-17 03:05:25.007 pm traceReceived ping from ZeeRadioFour.
app:32019-09-17 03:04:59.397 pm traceReceived ping from ZeeRadioUpper.
app:22019-09-17 03:04:42.510 pm traceReceived ping from ZeeRadioLower.
app:332019-09-17 03:04:39.473 pm traceReceived ping from ZeeHomebridge.
app:4562019-09-17 03:04:33.883 pm traceReceived ping from ZeeSmart.
app:4572019-09-17 03:04:25.021 pm traceReceived ping from ZeeRadioFour.
app:32019-09-17 03:03:59.415 pm traceReceived ping from ZeeRadioUpper.
app:22019-09-17 03:03:42.528 pm traceReceived ping from ZeeRadioLower.
app:332019-09-17 03:03:39.481 pm traceReceived ping from ZeeHomebridge.
app:4562019-09-17 03:03:33.253 pm traceReceived ping from ZeeSmart.

yeah, I get a ton of pings from the hub, just no events from it.

I think everything is fubared on my setup now anyway.

If you delete the connection and remake it, you have to let it rebuild all devices you pass across too, don't you? Otherwise the DNI is wrong, and nothing connects internally?

I assume that's the case since if I do a sync on an old existing device it says:
dev:14122019-09-17 05:11:11.882 pm errorjava.lang.IllegalArgumentException: null on line 103 (sync)

That sucks... Luckily I wasn't using too many of the stub devices in RM rules, as I'll have to redo all of those now I guess. :frowning:

HubConnect does use the brute force method for building Remote devices.. it simply sends a list of everything and relies on the receiving end to check and do nothing on duplicate. It's LAN traffic so it's "free" relative to Z-devices speed. But that's also where the answer will be. It will either build duplicates, where only the DNI is different or will skip.

I've done what feels like 10,000 tests with HubConnect over the past 6 months or more. Somewhere in there I distinctly remember doing that. deleting a HubConnect Remote Hub from the server's list of devices. Just can't remember what followed.

I'll try it now with my Development hub. It's only got two devices :slight_smile: one in each direction.

Can you look at that, please? On your Server, Device list, pick the device for your 'silent hub' -- does it say: switch ON ??

12%20PM

if not, can you click on?

No worries... I've just tried it, and I assure you the devices never update again on my system.

I deleted the connection, removed the client app from the client hub, added the client app back on the client hub, remade the connection, and added a few of the devices back (passing physical devices from server to client hub). The stub devices already existed on the client and I saw the error in the log that they could not be created - as expected.

I see in the server log that it is sending the new event data over to the client hub.

But the device never updates on the client hub. It's really like if it can't create the device, it doesn't know where to send the event.

I'm just going to delete everything and re-create. Which really sucks, but that is the exact same thing I had to do last time the devices stopped updating a few months ago. Never could find any way to get them talking again that time either.

God I wish there was a way to mass delete devices. I now have to go through click hell deleting ~60 devices.... :frowning:

EDIT: Oh, and then I hve to re-add everything to google home, and put back in the right room......... :cry:

+1

Almost done rebuilding... I would love to know how to avoid doing this. Maybe when Steve gets back we can discuss...

This is at least the 3rd time I've had to wipe everything out and redo it from scratch due to devices no longer updating. I will say the last time was a while ago, maybe April or May... So that's good at least.

I've never had it (unintentionally) happen. I've only done it as a test. :slight_smile:

I did it just now... delete the Hub Device off Server, on remote, in Connect to server Hub, click done, and the logs on Server say it recreated the Hub device.. and it had. I then went to the device selection page on the Remote hub and clicked done on out. Server logs show 'skipped' for everything. I deleted a device, did it all again and the device got recreated on Server with the same DNI.

Don't know... But having to delete the devices and re-create them is no fun. I need to avoid that at all costs in the future.

On a positive note, though, everything is working (and updating) correctly now that I rebuilt it from scratch... I see the events in the logs as expected, and stub devices show event history.

No idea why the events stopped flowing in the first place. Or why rebooting the hub, or remaking the connection didn't fix it. That is the real mystery.

1 Like

I have a Nest thermostat. I have the proper thermostat driver installed. On Smartthings side, I use Actiontiles and actiontiles is not displaying anything for the humidity attribute. I see the driver support humidity, but is it not working yet on the hubconnect side to report the humidity level reported from Nest?

Forgive if this has been asked before... I have two Arlo cameras connected to Smartthings and use Hubconnect to sync them to HE. One thing I can't get to work is motion detected by the cameras. It doesn't seem those events are passed on to HE?

I do feel as if I've heard about this before.. and a fix.. but I can't find it...

I don't have any Arlo gear... thus I cannot advise you regarding a ST + Arlo config.

For HubConnect, the real devices are on ST and are Selected via the HubConnect app to be sent to HubConnect's server. The server needs to have the Arlo driver available, so that it can build a virtual device on it's end to mirror the ST driver.

The HubConnect-Arlo-Camera universal driver has Motion Sensor built in and it's waiting to mirror a motion event that would come into HubConnect Remote Client running on ST.

It's not easy to read but the 'definition' of an Arlo camera on the ST Remote Client is:

"arlocamera": [driver: "Arlo Camera", selector: "arloProCameras", attr: ["switch", "motion", "sound", "rssi", "battery"]],

...of which: attr: ["switch", "motion", "sound", "rssi", "battery"]], is where Motion is included as a mirrorable (sic) attribute. Thus IF Smartthings were to see a motion event from an Arlo camera, it would be given to HubConnect allowing it to be mirrored to Server.

Because I don't have Arlo, can you tell me if you are seeing Arlo Motion Events in ST Live logging?

@csteele,

I am trying to use the fan controller from a ST remote hub with actiontiles. The device handler works fine when I use it from the ST app but when I attach it to Actiontiles Actiontiles will not even turn on the fan. Actiontiles only recognizes the Switch action and none of the other commands. This is understandable and would be minimally acceptable until i rebuild the dashboards directly in HE but even that doesn't work. Have you had any experience with actiontiles?

LJ

Any idea why in my hub logs I am see the following error on the HubConnect Server Instance for to my ST hub from HE:

httpGet() request failed with error 500

I'm sorry, but my knee jerk reaction is... "Is ST cloud down?"

Maybe that was what it was. This morning that error is no longer showing up in the logs.

All, I just uploaded a new version 0.2.11 of the homebridge-hubitat-hubconnect plugin with the following changes:

  • Added thermostat fan switch support (thanks @swiss6th )
  • Added ping/pong for websockets (thanks @asj ) to fix out of sync issues after a hub reboot