[RELEASE] HubiThings Replica

Thanks, I'll try that as well.

Also having an issue between my ST and my new C8.
Not sure if it's related to yesterday's power outage and related OAuth issue I had, or the C8 migration (or both).

A switch in ST that is used to control some lights when I have days off was set at midnight, but did not get updated in HE, so the lights came on with their usual schedule.

I'm on an ethernet connection, but did change IPs on my C8 device, as I intend on using the C7 for other purposes.

EDIT: Definitely an odd issue. The particular switch is shared between ST, HE, and HA.

HA updated the switch via a Calendar automation (Need something like this native to HE) and it was reflected in HA and ST, but didn't show the correct value in HE.
After using Delete API it still wasn't being reflected. Pressed the refresh button in HE, and now it's showing the correct value.

1 Like

You should delete the API and rebuild as described above. ST would still have the old hub ID as part of the event path. Similar to any webCoRE piston that uses 'external endpoints'.

What you are probably seeing is the periodic refresh 'true-up' every three hours that doesn't use events.

1 Like

Hi
I'm getting this message when going to the Replica app -

" Unexpected Error

An unexpected error has occurred trying to load the app. Check [Logs] for more information.

Error: Cannot get property 'deviceId' on null object"

I think this is something to do with me deleting a Tuya device from ST before I removed it from Replica in HE, but not certain of that.

This is the error in the logs -
"java.lang.NullPointerException: Cannot get property 'deviceId' on null object on line 344 (method pageMain)"

Although I'm not sure what device it's referring to.

Any suggestions?

Thanks

if you reboot your hub, it probably will correct.

But this should be the code fix. Put the "?" on lines 344 & 345 as shown:

deviceIds.remove(smartDevice?.deviceId)
List hubitatDevices = getReplicaDevices(smartDevice?.deviceId)
1 Like

A reboot worked... I probably should've tried that!

Thanks

1 Like

REPLICA 1.3.07 RELEASE

New release Replica 1.3.07 supporting ST Natural order sorting [patch], bug fixes for Replica UI, and OAuth warnings for hub migrations. Install instructions here with HPM updated to match.

Replica 1.3.07:

  • Natural Order on device input dropdown selectors patch.
  • Replica UI bug fix for null devices.

OAuth 1.3.07:

  • OAuth warnings for hub migrations to C-8 etc.

REPLICA DRIVER BY BOB

Please see here for new @bthrock Sonos Replica device handler and information.

SAMSUNG DRIVERS+ BY DAVE

Please see here for new @djgutheinz device handlers and information.

Update 2023/04/23: Release 1.3.08. Change log here.

5 Likes

Hi when I do an update in package manager I get fatal error and it does a roll back. should I just install it manually?

Try doing a Repair in HPM

1 Like

That should solve it! The process will download all the apps & drivers again you have selected and reinstall on top of current.

Thanks did a repair on both Replica and manager with same results. It seems to be on this portion https://raw.githubusercontent.com/bloodtick/Hubitat/main/hubiThingsReplica/hubiThingsOauth.groovy

Not a HPM expert, so couple of questions:

  • Are you able to see the gitHub link from your desktop directly?
  • Are you running on a reasonably new Hubitat firmware version?
  • What hub hardware version are you running?
  • Any other HPM solutions failing?
  • Perhaps reboot your hub and try again?

There really is nothing special with HPM with this solution. The Oauth groovy does require the 'OAuth' flag to be set on Hubitat, but that should of been done for you the first time you loaded the solution. Also, the size of the code isn't small, but smaller than something like 'Echo Speaks' or 'webCoRE'.

Hopefully a reboot and then 'repair' will solve this.
Otherwise, you can manually install on top of existing code as the instructions state.

Ok thanks again, so I tried the above with same results I finally did a new install manually with another repair, rebooted and now the message for new updated is gone in HPM seem to have solved it for now.

1 Like

I have to say, I was a little disappointed with the lack of FEW integrations for some of my ST devices (mainly Wifi). Because as a newbie, I thought I could simply plug HE and migrate everything I had. That was not the case of course.
But after installing HubiThings, man oh man.. I couldnt be happier! I can control all my "missing" devices in HE now w/o any issues. I'd definitely pay a coffee to the developer for this.
I know I might be using 10% of HE power and community help, but I will get there.
Big thanks again.

4 Likes

Now with a question to the experts. I have 2 ST 360 Cams.
Similar to what we do inside ST app, that we can see the live feed from the cams.. capture screenshot, etc.. would it be possible to create a Replica driver with the same functionalities in HE ?
I imagine using a dashboard tile with the feed (in mpeg maybe) from these two cams.
Thanks in advance.

Authorize the device(s) in the OAuth application then build a HE Replica switch device. Replica will pull in the device capabilities. Copy that information:

and then paste into PM message using preformatted text </> (otherwise the forum will break the data) like so:

Summary

{"components":[{"id":"switch","version":1,"status":"live","name":"Switch","ephemeral":false,"attributes":{"switch":{"schema":{"type":"object","properties":{"value":{"title":"SwitchState","type":"string","enum":["on","off"]}},"additionalProperties":false,"required":["value"]},"enumCommands":[{"command":"on","value":"on"},{"command":"off","value":"off"}]}},"commands":{"off":{"name":"off","arguments":[]},"on":{"name":"on","arguments":[]}}},{"id":"switchLevel","version":1,"status":"live","name":"Switch Level","ephemeral":false,"attributes":{"level":{"schema":{"title":"IntegerPercent","type":"object","properties":{"value":{"type":"integer","minimum":0,"maximum":100},"unit":{"type":"string","enum":["%"],"default":"%"}},"additionalProperties":false,"required":["value"]},"setter":"setLevel","enumCommands":[]}},"commands":{"setLevel":{"name":"setLevel","arguments":[{"name":"level","optional":false,"schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"rate","optional":true,"schema":{"title":"PositiveInteger","type":"integer","minimum":0}}]}}},{"id":"firmwareUpdate","version":1,"status":"live","name":"Firmware Update","ephemeral":false,"attributes":{"lastUpdateStatusReason":{"schema":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":[]},"enumCommands":[]},"availableVersion":{"schema":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":[]},"enumCommands":[]},"lastUpdateStatus":{"schema":{"type":"object","properties":{"value":{"type":"string","enum":["updateSucceeded","updateFailed"]}},"additionalProperties":false,"required":[]},"enumCommands":[]},"state":{"schema":{"type":"object","properties":{"value":{"type":"string","enum":["normalOperation","updateInProgress","insufficientStorage"]}},"additionalProperties":false,"required":[]},"enumCommands":[]},"currentVersion":{"schema":{"type":"object","properties":{"value":{"type":"string"}},"additionalProperties":false,"required":[]},"enumCommands":[]},"lastUpdateTime":{"schema":{"type":"object","properties":{"value":{"title":"Iso8601Date","type":"string","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)?)$"}},"additionalProperties":false,"required":[]},"enumCommands":[]}},"commands":{"updateFirmware":{"name":"updateFirmware","arguments":[]},"checkForFirmwareUpdate":{"name":"checkForFirmwareUpdate","arguments":[]}}},{"id":"refresh","version":1,"status":"live","name":"Refresh","ephemeral":false,"attributes":{},"commands":{"refresh":{"name":"refresh","arguments":[]}}}]}

The controls and events probably will mirror, but the video itself is troublesome.

Hi there @djgutheinz!

I just wanted to express my gratitude for adding Sonos to HubiThings Replica. When I was using SmartThings, I had many Webcore pistons using Sonos that were incredibly helpful, and now that I've switched to Hubitat, the Sonos integration isn't as robust and is missing some features like recognizing stereo pairs, etc.

However, I did notice a small issue with the "Status" in the HubiThings Replica for each device. It doesn't seem to be working properly, as it displays "stop" instead of "playing". I actually use this feature in my Webcore pistons for various purposes, so I was wondering if there's a way to fix it? Thanks in advance!

HubiThings Replica Sonos Device Status
ST Sonso

Hubitat Sonos Device Status

Tagging @bthrock for support as author of the driver. :slight_smile:

2 Likes

First, I assume you are using the SmartThings Edge driver, yes? I only ask because when I look at the images you provided, I see evidence of a problem in more ways than just the "status." For example, your speaker is reported as "ungrouped," but the groupVolume is different (18) than the individual speaker volume/level (17), which isn't really possible.

If you are using the Edge driver, then I have to refer back to one of the "known issues" I mentioned in my original post wherein the SmartThings Edge integration intermittently stops reporting or responding properly (or incompletely) via the API or even in the device presentation in SmartThings' own app. This behavior has also handicapped my SharpTools dashboards, which are connected directly to the SmartThings API and don't use the replica driver in any way.

When I posted the replica driver, it was my understanding a fix was already in the works, however, according to some reports, the problem has gotten worse with the latest release (3-14-23) of the Sonos (Beta) driver. SmartThings engineers are very much aware, but haven't provided any updates as yet. A couple of people have reported that an ST hub reboot helps, but I've found that to be a temporary fix at best.

I've been debating for the past couple of days about how to handle this in my original post as the replica integration works for me about 90% of the time, but you sort of solved that for me. :wink: Unfortunately, I've had to postpone any further work on my webCoRE integrations using this driver as well.

Sorry I don't have a better answer for you...yet.

I am not the creator of this product. I am a user of it and ALSO greatly appreciate the capability as well as the great amount of work done to generate the work.

1 Like

Thanks @djgutheinz sorry for the confusion. I tagged you by mistake, should have been @bthrock.

1 Like