[RELEASE] HubiThings Replica

oh ok. thanks.
would it be possible to add color capability in custom virtual device ?

in fact, if I find the root cause of the Hue-ST integration issue, I will not need to replicate the device from Hubitat. But I have no idea on that...

Sorry, can't help you there.

It has been a moment, but you might try uncommenting line 1530 in the Replica application and see how far it gets you. As @bthrock mentions, color blubs are a challenge between HE & ST so I must of had my reasons to not drill into it. But give it a try and I can look at this later week.

1 Like

Interesting! Just as a check, I had tried to create a virtual bulb using Todd's SmartThings API Browser+ earlier today and that failed. But uncommenting line 1530 allowed me to create a Virtual Color Bulb.

I haven't tried replicating an actual bulb yet, but it looks viable just from a quick glance at the capabilities. This may well be exactly what @ilkeraktuna needs!

I wonder what other virtual devices SmartThings has working now?

EDIT: The Virtual RGBW (Line 1540) was also created successfully, though I haven't yet tested either virtual device by mirroring them via HubiThings.

Capabiities
capabilities: {"components":[{"attributes":{"switch":{"enumCommands":[{"command":"on","value":"on"},{"command":"off","value":"off"}],"schema":{"additionalProperties":false,"properties":{"value":{"enum":["on","off"],"title":"SwitchState","type":"string"}},"required":["value"],"type":"object"}}},"commands":{"off":{"arguments":[],"name":"off"},"on":{"arguments":[],"name":"on"}},"ephemeral":false,"id":"switch","name":"Switch","status":"live","version":1},{"attributes":{"color":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"maxLength":255,"title":"String","type":"string"}},"required":[],"type":"object"}},"hue":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"minimum":0,"title":"PositiveNumber","type":"number"}},"required":[],"type":"object"},"setter":"setHue"},"saturation":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"minimum":0,"title":"PositiveNumber","type":"number"}},"required":[],"type":"object"},"setter":"setSaturation"}},"commands":{"setColor":{"arguments":[{"name":"color","optional":false,"schema":{"additionalProperties":false,"properties":{"hex":{"maxLength":7,"type":"string"},"hue":{"type":"number"},"level":{"type":"integer"},"saturation":{"type":"number"},"switch":{"maxLength":3,"type":"string"}},"title":"ColorMap","type":"object"}}],"name":"setColor"},"setHue":{"arguments":[{"name":"hue","optional":false,"schema":{"minimum":0,"title":"PositiveNumber","type":"number"}}],"name":"setHue"},"setSaturation":{"arguments":[{"name":"saturation","optional":false,"schema":{"minimum":0,"title":"PositiveNumber","type":"number"}}],"name":"setSaturation"}},"ephemeral":false,"id":"colorControl","name":"Color Control","status":"live","version":1},{"attributes":{"level":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"unit":{"default":"%","enum":["%"],"type":"string"},"value":{"maximum":100,"minimum":0,"type":"integer"}},"required":["value"],"title":"IntegerPercent","type":"object"},"setter":"setLevel"},"levelRange":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"unit":{"default":"%","enum":["%"],"type":"string"},"value":{"additionalProperties":false,"properties":{"maximum":{"maximum":100,"minimum":0,"type":"integer"},"minimum":{"maximum":100,"minimum":0,"type":"integer"},"step":{"maximum":100,"minimum":1,"type":"integer"}},"required":["minimum","maximum"],"type":"object"}},"required":[],"type":"object"}}},"commands":{"setLevel":{"arguments":[{"name":"level","optional":false,"schema":{"maximum":100,"minimum":0,"type":"integer"}},{"name":"rate","optional":true,"schema":{"minimum":0,"title":"PositiveInteger","type":"integer"}}],"name":"setLevel"}},"ephemeral":false,"id":"switchLevel","name":"Switch Level","status":"live","version":1},{"attributes":{"availableVersion":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"type":"string"}},"required":[],"type":"object"}},"currentVersion":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"type":"string"}},"required":[],"type":"object"}},"lastUpdateStatus":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"enum":["updateSucceeded","updateFailed"],"type":"string"}},"required":[],"type":"object"}},"lastUpdateStatusReason":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"type":"string"}},"required":[],"type":"object"}},"lastUpdateTime":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"pattern":"^(?:[1-9]\\d{3}-?(?:(?:0[1-9]|1[0-2])-?(?:0[1-9]|1\\d|2[0-8])|(?:0[13-9]|1[0-2])-?(?:29|30)|(?:0[13578]|1[02])-?31)|(?:[1-9]\\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)-?02-?29)T(?:[01]\\d|2[0-3]):?[0-5]\\d:?[0-5]\\d(?:\\.\\d{3})?(?:Z|[+-][01]\\d(?::?[0-5]\\d)?)$","title":"Iso8601Date","type":"string"}},"required":[],"type":"object"}},"state":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"enum":["normalOperation","updateInProgress","insufficientStorage","updateRequested"],"type":"string"}},"required":[],"type":"object"}},"updateAvailable":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"type":"boolean"}},"required":[],"type":"object"}}},"commands":{"checkForFirmwareUpdate":{"arguments":[],"name":"checkForFirmwareUpdate"},"updateFirmware":{"arguments":[],"name":"updateFirmware"}},"ephemeral":false,"id":"firmwareUpdate","name":"Firmware Update","status":"live","version":1},{"attributes":{},"commands":{"refresh":{"arguments":[],"name":"refresh"}},"ephemeral":false,"id":"refresh","name":"Refresh","status":"live","version":1},{"attributes":{"fade":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"additionalProperties":false,"properties":{"afterAction":{"properties":{"afterActionType":{"enum":["KeepCurrent","TurnOff","Circadian","CustomCommands"],"type":"string"},"afterCommands":{"items":{"properties":{"arguments":{"items":{"type":"integer"},"type":"array"},"capability":{"type":"string"},"command":{"type":"string"},"component":{"type":"string"}},"type":"object"},"type":"array"},"timeZoneId":{"pattern":"^[A-Z+\\-][A-Za-z0-9_\\-+:/]{0,50}$","type":"string"}},"type":"object"},"duration":{"default":30,"maximum":60,"minimum":5,"type":"integer"},"effects":{"items":{"properties":{"capability":{"type":"string"},"end":{"maximum":9999999,"minimum":1,"type":"integer"},"start":{"maximum":9999999,"minimum":1,"type":"integer"}},"type":"object"},"type":"array"},"fadeType":{"enum":["WakeUp","WindDown"],"type":"string"},"startTime":{"pattern":"^[0-9]{10}$","type":"string"},"state":{"enum":["Stop","Run"],"type":"string"}},"required":["state","fadeType","duration","effects"],"type":"object"}},"required":["value"],"title":"Fade","type":"object"},"setter":"setFade"}},"commands":{"setFade":{"arguments":[{"name":"fade","optional":false,"schema":{"additionalProperties":false,"properties":{"afterAction":{"properties":{"afterActionType":{"enum":["KeepCurrent","TurnOff","Circadian","CustomCommands"],"type":"string"},"afterCommands":{"items":{"properties":{"arguments":{"items":{"type":"integer"},"type":"array"},"capability":{"type":"string"},"command":{"type":"string"},"component":{"type":"string"}},"type":"object"},"type":"array"},"timeZoneId":{"pattern":"^[A-Z+\\-][A-Za-z0-9_\\-+:/]{0,50}$","type":"string"}},"type":"object"},"duration":{"maximum":60,"minimum":5,"type":"number"},"effects":{"items":{"properties":{"capability":{"type":"string"},"end":{"minimum":1,"type":"number"},"start":{"minimum":1,"type":"number"}},"required":["capability","start","end"],"type":"object"},"type":"array"},"fadeType":{"enum":["WakeUp","WindDown"],"type":"string"},"state":{"enum":["Stop","Run"],"type":"string"}},"required":["state","fadeType","duration","effects"],"title":"LIGHT_FADE_MAP","type":"object"}}],"name":"setFade"}},"ephemeral":false,"id":"synthetic.lightingEffectFade","name":"Lighting Effect Fade","status":"proposed","version":1}]}
1 Like

@Bloodtick_Jones
I just tried using the virtual color bulb from line 1530
it ceates a devce on ST and links to my actual bulb, but it does not control the actual bulb from ST.
If I choose "switch" , it works , but choosing color bulb does not work.

I assume you created rules for the devices, such as:

FWIW, I had some success mirroring one of my RGBW bulbs in Hubitat with SmartThings' Virtual RGBW bulb, with On-Off, Level, and color temperature all working as expected. Setting the color, however, was a problem.

If it's not an error in my rules (I did build them in a hurry), then I suspect it might have to do with the fact that SmartThings and Hubitat have distinctly different approaches to setting colors. @Bloodtick_Jones should be able to offer more insight on this, but as I recall it was something that had to be worked around with the Replica Color Bulb driver.

actually, I didn't create any rules.
I just created a virtual color bulb on ST and bind it to the real Hue Bulb on Hubitat.
Then I tried controlling the bulb from ST app. Does not work.
So how does yours work ?

After you've "mirrored" the real bulb and the virtual one, you need to create rules, similar to the ones in the image I posted above, as there are no default rules built into HubiThings for the color bulbs. Click on Configure HubiThings Rules in the app, select your Hubitat device (the real Hue bulb), and work through the dropdowns and selectors to build your own rules.

Even if you add rules, however, you're probably not going to get the results you want because there is no way that I know of to build rules that can bridge the differences in the colorControl capabilities between SmartThings and Hubitat,

If you're interested in familiarizing yourself with the rule-building process anyway, you could start with just the On-Off commands, as in the image below.

1 Like

This is correct, there will be no rules in place and need to be added by hand. I probably can add some additional code to help, but not in position todo that this week. Again not sure how far we can match color bulbs between the systems via mirrors.

A another direction would be to use a replica color bulb driver and then use HE functions to mirror that against your physical bulb. The replica driver would have logic to convert ST<->HE deltas.

1 Like

@Bloodtick_Jones , @bthrock

thanks. I added following rules.
on/off and level commands work but hue & saturation settings do not work.

A another direction would be to use a replica color bulb driver and then use HE functions to mirror that against your physical bulb. The replica driver would have logic to convert ST<->HE deltas.

I didn't understand this.
Do you mean, change the Hue bulb driver on HE ?

This is an odd 'thing' but it should work.

1.Set up a ST virtual to HE virtual using the ST device you created against a virtual device using Dave's Generic Color Bulb driver.

Get that working, then:

2.Using the native HE "Mirror" application, mirror the new HE Virtual Dave Bulb against your physical HE device.

Replica is much stronger using ST devices -> HE virtual devices. The other direction has a lot of caveats like this.

To fully mirror the device, you also need to create rules going from Hubitat→SmartThings. You have them only one way for now. Still, that won't fix hue & saturation for all the reasons we've discussed.

No, he's talking about mirroring your existing Hue bulb in Hubitat to a virtual Replica bulb, and then mirroring that to SmartThings via HubiThings. It's an interesting thought, but given the challenges I've had mirroring color bulbs to SmartThings, it's not something I'd do. There are just too many moving parts for me to see that working well for me. :smirk:

If I were you, I would see if the people in the SmartThings community can help you resolve your Hue→ST integration problems first, as it may be a minute before @Bloodtick_Jones can look at this issue and see if there's a workable solution.

1 Like

ok.
I am already waiting for a solution from Smartthings support and/or Philips Hue support.
But meanwhile, I'd like to understand why setting on/off rules work and why color commands do not work in Hubithings.
Any idea ?

So I took a look this morning and it appears the ST Virtual devices color controls do not work and do not pass anything back to HubiThings. This is something I can not fix. Sorry, this won't work with HubiThings. The best you can do is using a virtual dimmer and have on/off/level control.

You might try the Mira solution which is different approach, but I see that even Corey is not claiming to support color blub mirrors.

2 Likes

thank you.
in fact the best approach is making Hue work with Smartthings.
I've opened tickets to both Philips Hue support and ST support. Waiting...

2 Likes

REPLICA 1.4.00 RELEASE

New release of Replica 1.4.00 with initial support for Home Assistant device replication. Releasing the base application early to ensure no SmartThings issues are reported before releasing the HA supporting package.

Install instructions here with HPM updated to match.

Replica 1.4.00:

  • Startup fixes to ensure safe start from new code and hub reboots
  • Several changes to base code to allow for Home Assistant to be enabled within same application.

Replica 1.4.00:

  • Bug fix for safe(r) authorization and rewrite to support Replica changes for HA

Replica Temp-Humidity-Pressure Sensor 1.3.5 @bthrock:

  • Supports attribute "pressure"
  • Supports capability "Relative Humidity Measurement"
  • Supports capability "Temperature Measurement"

SAMSUNG DRIVERS+ BY DAVE

Please see here for new @djgutheinz device handlers and information. These are available in HPM for installation and updates.

1 Like

Has anyone tried the newer SmartTag2 to see if they can be integrated? Really want to use them for our dogs and if they leave the area, also anyone know of a device that can be connected at home that will connect to these Tags so that when phones are unavailable it can still detect if the tags are present?

They cannot, as they are not supported within the SmartThings API. Lots of discussion on this over the years in the SmartThings community, including this ongoing post:

2 Likes

Agree with @bthrock, the difference now is with Replica 1.4 the vast integration solutions with Home Assistant should be available. If you can find something solving the problem in this forum with a viable HA solution, we will be able to bring it into Hubitat. After my toil bringing Roborock to HE it was obvious this was an easier future path to bridge, since HA allows for complete access to containers and the OS. Just easier to bridge then to build.

My first driver will be AppleTV and HomePods and it has basically replaced Echo Speaks for good voice responses and cool controls of AppleTV. Should be ready in a week if the latest update doesn’t delay.

3 Likes