[RELEASE] HubiThings Replica

Still getting my feet under me after moving household and getting 10+ years of things back in place. I will take a look and see what is possible, but will take some time to respond back on this request.

3 Likes

Good morning
I have read this entire post and I am very impressed with your knowledge. Thank you very much for sharing your work with us. Congratulations!!
The app works perfectly, I had a few devices that were left on the Smartthings hub; now, they are all accessible via Hubitat. I would like to know why the app limits it to 20 devices.
Thanks again!

Hi Grimard,

While there is a 30 device limit per Oauth (a restriction imposed by SmartThings), HubiThings Replica allows you to configure multiple Oauth applications with as many as 30 subscribed devices each, so you can add as many devices as necessary.

Screenshot 2023-11-28 at 07-01-30 HubiThings Replica

While there is no formal limit on the number of SmartThings devices you can connect to Hubitat via HubiThings Replica, from a practical standpoint, too many devices —or too many noisy devices, such as energy monitoring plugs—could potentially impact hub performance.

I hope this answers your question.

1 Like

Hi, tanks a lot for the answer!

Hi, I would like to know if I mirrored some hubitat devices on ST hub, if I could be able to use the healthstatus capability of those devices? On hubitat, this capability is not there and I would like to use it so I would like to know if ST hub could read those capability or if its just returning the capabality as the Hubitat hub read it... I have some ST devices that are mirored on hubitat hub and those capability works fine so just asking!
Thanks!

The healthStatus is one way only from SmartThings (ST -> HE). There is no HE -> ST solution since as you state, HE doesn't support this attribute in its native drivers. The topic has been discussed with Hubitat support a couple of times, but really went nowhere. Not sure why this concept is so difficult, but not my circus, and not my monkeys.

To add to a community driver, you only need to add to the metadata section and then some logic to set:

attribute "healthStatus", "enum", ["offline", "online"]

1 Like

thanks, its as I tough :slight_smile: yes I made a request for it to be added to native but not sure if it will be done (I must not be the first one). For the line of code to add it to drivers, I add the capability "HealthCheck" to metadata with the attribute "healthStatus", "enum", ["offline", "online"] but I cannot see the capability so it must missed something to update it. Since I m not a dev (make my best to learn but...) I cannot make it works for now.

I have started seeing the following error with my Replica Dimmers, but not Replica Switches:

groovy.lang.MissingMethodException: No signature of method: java.lang.Long.call() is applicable for argument types: () values: []
Possible solutions: wait(), abs(), abs(), any(), wait(long), and(java.lang.Number) on line 98 (method on)

The problem actually appears to be at line 96 (in sendCommand()), which reads:

Long now = g_mEventSendTime[device.getId()] = now()

No equivalent of this line exists in Replica Switch, so I tried commenting it out and everything works again. Is this the right fix, or am I breaking something else?

Pushed the fix to update to 'now' and not 'now()' on line 98. Please update via HPM or direct pull. Good catch.

parent?.deviceTriggerHandler(device, [name:name, value:value, unit:unit, data:data, now:now])
1 Like

Hi I've been trying to mirror a garage door opener which goes fine and seems to stay until i do a refresh on the create an oath page, then it disconnects just can not figure out why its does this.
the garage opener is mesh from another Hubitat hub in the garage to my main Hubitat hub in the house, and I'm trying to use it in SmartThings app to run the garage door. Is this something can be done? The opener is set up on the zooz Zen17.

Can you expand this comment?

Are you saying the 'real device' is assigned in SmartThings. You are mirroring the SmartThings device to Hubitat "A", then mesh mirror to Hubitat "B"?

GarageDO <-> ST <-> HE-A <-> HE-B

It sounds like the real device is on HE, meshed to another HE that he’s trying to send to ST. The opposite direction of what this integration if for afaik. The only thing that I use ST for is bringing events into HE from my Samsung oven, but if virtual switches can still be created in ST and imported via your app to HE, then that may be useful for controlling the garage door.
Although I don’t understand why one would want to take a local operation and make it cloud dependent, to each their own.

garage door opener Zooz -> Garage habitat A then mesh -> Hubitat B in the house and Relica mirrored to SmartThings App. it works fine up and stays up until I do a refresh then disconnects right away.

Thanks that's Correct its because she likes to still use the SmartThings app for a few things

1 Like

Got it, this is a use case that happens with mesh that doesn't have a direct solution. What is happening is the mesh wants to make the DEVICE in Hubitat B look exactly like everything in Hubitat A. That includes the "Data" area of the DEVICE. Replica stores its controlling information in the "Data" area (in the case of the DEVICE in Hubitat B), but it is wiped clean by the mesh function and you lose connection since there is no longer information for Replica to act with.

The only real solution at this time would be to mirror ST on Hubitat A "also", note can have multiple Hubitats mirroring with the same ST device. Another way (but will sometimes still wipe) is to turn off the "Regularly sync with source device" on Hubitat B.

image

1 Like

Ok, thank you. I kind of figured the mesh might have something to do with it being the only two devices being affected were mesh devices. So at tis point ihave no issue setting up replica on the garage b hub direct to the smarthings hub. You see no drawbacks with this setup, right?

Shouldn't be a problem at all. I routinely test (or at least did) on three Hubitat hubs acting on various devices across two ST hubs.

Ok thank you I really like the app thank you for your work on this it's very helpful. And thank you for the input appreciated. Update That seemed to work perfect again thanks.

2 Likes

Hi Not sure if this is suppose to happen I set up my garage door and garage door lock on the garage hub A mirrored to the SmartThings hub with Replica all good, then I set up one light switch on house hub B mirrored to the same SmartThings hub everything works fine, but when i check on the Hubitat house hub B in Replica under (Create Virtual Device, Mode or Scene ) the two mirrored devices garage door and lock show up with no device listed as in the below screenshot but all works fine, if I delete them from Hub A it removes them from the garage Hub B replica and disconnects. Below is a screenshot from Hub B the lock and garage door are from Hub A this is where I'm not sure if they should even show here. Are the two Replica's tied together?

Yea, this is expected behavior (but I don't like it).

All virtual devices in a SmartThings location (and/or hub) are global to that location. I found no way to 'tag' the virtual device with any information that could be used to say 'this application created this virtual device'.

So the 'Create Virtual Device, Mode or Scene' queries the ST location and brings back all virtual devices including ones created by 'other' means. Since it knows nothing about the mirror on the other HE hub, it will display it as you described.

and WOW, honestly didn't know anyone was using these functions. I was kinda just messing around with building of virtual devices in the ST UI. Glad it is being used. :slight_smile: