[RELEASE] HubiThings Replica

Finally got around to adding my Samsung fridge. Thank you very much. :slight_smile:

2 Likes

REPLICA 1.3.11 RELEASE

New release Replica 1.3.11 supporting the SmartThings Virtual Devices API allowing user to build their own ST Virtual devices (see examples below). Expanded UI support editing rules using buttons to enable/disable logging & periodic refresh.

Install instructions here with HPM updated to match.

Replica 1.3.11:

  • Support for building your own Virtual Devices
  • Mute logs/Disable periodic refresh buttons on rules.
  • Updated to support schema.oneOf.type drivers (support for Samsung Microwave)

Replica Switch 1.3.1:

  • Auto off functionality

Replica Location Knob 1.3.4:

  • Weather Icon updates

SAMSUNG DRIVERS+ BY DAVE

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

CUSTOM ST UI EXAMPLES:

Replica Configuration (Example 1):


SmartThings Virtual Device custom:

Replica Configuration (Example 2):


SmartThings Virtual Device custom:

4 Likes

Hello,
I want to thank you for creating such an awesome app to make the transition from Smarthings to Hubitat that much easier. I've been able to replicate most of my z-wave and zigbee devices without issue. The only problem I'm having is with my light sensors. I have a Xiaomi Mijia Smart Home Light Sensor. It works fine in SmartThings, but I can't seem to find a corresponding Replica driver for light sensor.

I'm using the Replica Multipurpose sensor, but it doesnt show the 'illuminance' property in WebCore. Is there an available Replica light sensor that will expose this property? Thank you.

Send me the JSON structures inside your current Replica driver. I can see what properties are missing. Please post them like this:

Please remind me how do I update a Microwave driver?
I tried all possible options via HPM. Everything was somewhat updated (I hope, it did not brake)
except for the Microwave driver.

Thanks. Here is the driver summary information for Replica Multipurpose Sensor (from 'Driver's Code' in Hubitat portal):


Replica Multipurpose Sensor
replica
AccelerationSensor, Actuator, Battery, Configuration, ContactSensor, Refresh, TemperatureMeasurement, ThreeAxis
2023-07-09 2:08:40am EDT


Summary

capabilities: {"components":[{"attributes":{"illuminance":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"unit":{"default":"lux","enum":["lux"],"type":"string"},"value":{"maximum":100000,"minimum":0,"type":"number"}},"required":["value"],"type":"object"}}},"commands":{},"ephemeral":false,"id":"illuminanceMeasurement","name":"Illuminance Measurement","status":"live","version":1},{"attributes":{"battery":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"unit":{"default":"%","enum":["%"],"type":"string"},"value":{"maximum":100,"minimum":0,"type":"integer"}},"required":["value"],"title":"IntegerPercent","type":"object"}}},"commands":{},"ephemeral":false,"id":"battery","name":"Battery","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"],"type":"string"}},"required":[],"type":"object"}}},"commands":{"checkForFirmwareUpdate":{"arguments":[],"name":"checkForFirmwareUpdate"},"updateFirmware":{"arguments":[],"name":"updateFirmware"}},"ephemeral":false,"id":"firmwareUpdate","name":"Firmware Update","status":"live","version":1}]}

1 Like

The Summary post above is capabilities for my Xiaomi Mijia Smart Home Light Sensor (using replica multipurpose sensor driver above). I copied this from Hubitat 'Device Details' screen. Please let me know if I should copy from a different location. thanks

1 Like

Good evening @Bloodtick_Jones and everyone else who has worked on or uses this app...

Is anyone using this to integrate motion from Ring doorbells and/or cameras? I use this app for ST presence sensors and it has been working great for those. I thought I'd try to integrate my assortment of Ring cameras and doorbells but haven't been able to get them to trigger motion... I currently use the "Unofficial Ring Connect" app, but figured I could eliminate that and get everything through this app...

I have the Ring cameras and doorbells (multiple locations) all subscribed, and the virtual devices on my Hub... Just not getting the motion events like I wanted.

I'm using the "Replica Motion Sensors" driver for the cameras and the "ReplicaMotionSensingDoorbell" driver by @djgutheinz for the doorbells, but getting no motion events on any of the devices... They do show battery status and "online" status... Just no motion.

Are there better drivers I should be using? Am I expecting something that might not be possible?

Thanks. :slight_smile:

Hey guys. Did anyone find a way to turn off display lights with hubitat for a Samsung air conditioner?

@Bloodtick_Jones Hope you are doing well... just checking if you had a chance to see why the 'Replica multipurpose sensor' does not support the 'Illumination' property. Thanks

Update your driver to this and go to the device and select "config". LMK if it works and it will be included next HPM release.

Sorry, I haven't completed the oven updates or included the oven in HPM. Hoping to get into this soon, just have some 'things' going on that Hubitat is taking second place. I will need to work with you again on the Oven driver to get it working properly.

Do you see motion in SmartThings? If so, it should be available to be replicated over. If not, probably not. Send the information from the Device "data" section like this and hopefully I can tell.

Thank you and no problem.
I will wait for the instruction(s) when driver will be ready for testing,

1 Like

Thank you for the reply. Yes I see the motion events in SmartThings but can’t figure out why I’m not getting them through this app…

Here is the data from one of the devices.

  • capabilities: {"components":[{"attributes":{},"commands":{"refresh":{"arguments":[],"name":"refresh"}},"ephemeral":false,"id":"refresh","name":"Refresh","status":"live","version":1},{"attributes":{"DeviceWatch-DeviceStatus":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"badProperty":{"type":"string"},"deviceScheme":{"enum":["MIXED","TRACKED","UNTRACKED"],"type":"string"},"reason":{"enum":["INVALID-ACCESS-TOKEN","INTEGRATION-OFFLINE","DEVICE-OFFLINE","DEVICE-DELETED","DEVICE-UNAVAILABLE","DEVICE-UNDISCOVERED"],"type":"string"}},"required":[],"type":"object"},"value":{"enum":["online","offline"],"type":"string"}},"required":["value"],"type":"object"}},"DeviceWatch-Enroll":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"additionalProperties":false,"properties":{"hubHardwareId":{"maxLength":255,"title":"String","type":"string"},"protocol":{"enum":["zigbee","zwave","bluetooth","lan","cloud","unknown","ocf","mqtt"],"title":"DeviceHealthProtocol","type":"string"},"scheme":{"enum":["MIXED","TRACKED","UNTRACKED"],"type":"string"}},"title":"DeviceHealthEnroll","type":"object"}},"required":["value"],"type":"object"}},"checkInterval":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"badProperty":{"type":"string"},"deviceScheme":{"enum":["MIXED","TRACKED","UNTRACKED"],"type":"string"},"hubHardwareId":{"pattern":"^[0-9a-fA-F]{4}$","type":"string"},"offlinePingable":{"enum":["0","1"],"type":"string"},"protocol":{"enum":["zigbee","zwave","bluetooth","lan","cloud","unknown","ocf","mqtt"],"title":"DeviceHealthProtocol","type":"string"}},"required":[],"type":"object"},"unit":{"default":"s","enum":["s"],"type":"string"},"value":{"maximum":604800,"minimum":0,"type":"integer"}},"required":["value"],"type":"object"}},"healthStatus":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"data":{"additionalProperties":false,"properties":{"badProperty":{"type":"string"},"deviceScheme":{"enum":["MIXED","TRACKED","UNTRACKED"],"type":"string"},"reason":{"enum":["INVALID-ACCESS-TOKEN","INTEGRATION-OFFLINE","DEVICE-OFFLINE","DEVICE-DELETED","DEVICE-UNAVAILABLE","DEVICE-UNDISCOVERED"],"type":"string"}},"required":[],"type":"object"},"value":{"enum":["online","offline"],"type":"string"}},"required":["value"],"type":"object"}}},"commands":{"ping":{"arguments":[],"name":"ping"}},"ephemeral":false,"id":"healthCheck","name":"Health Check","status":"live","version":1},{"attributes":{"audioOnly":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"type":"boolean"}},"required":["value"],"type":"object"}},"sdpAnswer":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"additionalProperties":false,"properties":{"id":{"type":"string"},"sdp":{"type":"string"},"turn_pwd":{"type":"string"},"turn_url":{"type":"string"},"turn_user":{"type":"string"}},"required":["id","sdp"],"type":"object"}},"required":["value"],"type":"object"}},"stunUrl":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"pattern":"^(stun?):((?:[a-zA-Z0-9.-]|%[0-9A-F]{2}){3,})(?::(\d+))?((?:\/(?:[a-zA-Z0-9-.~!$&'()+,;=:@]|%[0-9A-F]{2}))*)(?:\?((?:[a-zA-Z0-9-.~!$&'()+,;=:\/?@]|%[0-9A-F]{2})))?(?:#((?:[a-zA-Z0-9-._~!$&'()+,;=:\/?@]|%[0-9A-F]{2})))?$","title":"URL","type":"string"}},"required":["value"],"type":"object"}},"supportedFeatures":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"additionalProperties":true,"properties":{"audio":{"type":"string"},"bundle":{"type":"boolean"},"order":{"type":"string"},"video":{"type":"string"}},"type":"object"}},"required":["value"],"type":"object"}},"talkback":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"type":"boolean"}},"required":["value"],"type":"object"}}},"commands":{"end":{"arguments":[{"name":"id","optional":false,"schema":{"type":"string"}}],"name":"end"},"sdpOffer":{"arguments":[{"name":"id","optional":false,"schema":{"type":"string"}},{"name":"sdp","optional":false,"schema":{"type":"string"}}],"name":"sdpOffer"},"startTalkback":{"arguments":[{"name":"id","optional":false,"schema":{"type":"string"}}],"name":"startTalkback"},"stopTalkback":{"arguments":[{"name":"id","optional":false,"schema":{"type":"string"}}],"name":"stopTalkback"}},"ephemeral":false,"id":"webrtc","name":"webrtc","status":"live","version":1},{"attributes":{"stream":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"title":"JsonObject","type":"object"}},"required":["value"],"type":"object"}}},"commands":{"startStream":{"arguments":[],"name":"startStream"},"stopStream":{"arguments":[],"name":"stopStream"}},"ephemeral":false,"id":"videoStream","name":"Video Stream","status":"live","version":1},{"attributes":{"motion":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"value":{"enum":["active","inactive"],"title":"ActivityState","type":"string"}},"required":["value"],"type":"object"}}},"commands":{},"ephemeral":false,"id":"motionSensor","name":"Motion Sensor","status":"live","version":1},{"attributes":{"battery":{"enumCommands":[],"schema":{"additionalProperties":false,"properties":{"unit":{"default":"%","enum":["%"],"type":"string"},"value":{"maximum":100,"minimum":0,"type":"integer"}},"required":["value"],"title":"IntegerPercent","type":"object"}}},"commands":{},"ephemeral":false,"id":"battery","name":"Battery","status":"live","version":1}]}
  • commands: {"setBatteryValue":[{"name":"battery","type":"NUMBER"}],"setMotionValue":[{"name":"motion","type":"ENUM"}],"setMotionActive":[],"setMotionInactive":[],"setTemperatureValue":[{"name":"temperature*","type":"NUMBER"}],"setHealthStatusValue":[{"name":"healthStatus*","type":"ENUM"}]}**
  • description: {"allowed":null,"components":[{"capabilities":[{"id":"refresh","version":1},{"id":"healthCheck","version":1},{"id":"webrtc","version":1},{"id":"videoStream","version":1},{"id":"motionSensor","version":1},{"id":"battery","version":1}],"categories":[{"categoryType":"manufacturer","name":"Camera"}],"id":"main","label":"main"}],"createTime":"2023-07-29T16:16:35.651Z","deviceId":"aa3d69fa-921f-495c-a32d-54d0a0e285c5","deviceManufacturerCode":"Ring","label":"Ring Camera Sparrow Back Slider","locationId":"df94c616-3f24-4672-92ba-0160b03a207e","manufacturerName":"SmartThings","name":"c2c-ring-camera-battery","ownerId":"275e6aa9-338f-f384-8071-9b988d4a62c7","presentationId":"SmartThings-smartthings-c2c-ring-camera-battery","profile":{"id":"dec0a022-4fe5-4126-95b2-c195ac60a4a8"},"restrictionTier":0,"roomId":"c73022f3-3b93-4e2e-88aa-68a047796375","type":"VIPER","viper":{"endpointAppId":"viper_ad579820-0aec-11ea-b29a-77541b727eda","manufacturerName":"Ring","modelName":"stickup_cam_v4","swVersion":"cam-11.0.34"}}
  • health: {"deviceId":"aa3d69fa-921f-495c-a32d-54d0a0e285c5","lastUpdatedDate":"2023-07-29T16:16:36.579Z","state":"ONLINE"}
  • replica: {"deviceId":"aa3d69fa-921f-495c-a32d-54d0a0e285c5","componentId":"main","replicaId":1397,"type":"child"}
  • rules: {"components":[{"command":{"label":"command: setMotionValue(motion)","name":"setMotionValue","parameters":[{"name":"motion","type":"ENUM"}],"type":"command"},"trigger":{"additionalProperties":false,"attribute":"motion","capability":"motionSensor","label":"attribute: motion.","properties":{"value":{"title":"ActivityState","type":"string"}},"required":["value"],"type":"attribute"},"type":"smartTrigger"},{"command":{"label":"command: setBatteryValue(battery)","name":"setBatteryValue","parameters":[{"name":"battery*","type":"NUMBER"}],"type":"command"},"mute":true,"trigger":{"additionalProperties":false,"attribute":"battery","capability":"battery","label":"attribute: battery.","properties":{"unit":{"default":"%","enum":["%"],"type":"string"},"value":{"maximum":100,"minimum":0,"type":"integer"}},"required":["value"],"title":"IntegerPercent","type":"attribute"},"type":"smartTrigger"},{"command":{"label":"command: setHealthStatusValue(healthStatus)","name":"setHealthStatusValue","parameters":[{"name":"healthStatus*","type":"ENUM"}],"type":"command"},"mute":true,"trigger":{"additionalProperties":false,"attribute":"healthStatus","capability":"healthCheck","label":"attribute: healthStatus.*","properties":{"value":{"title":"HealthState","type":"string"}},"required":["value"],"type":"attribute"},"type":"smartTrigger"}],"version":1}**
  • status: {"components":{"main":{"battery":{"battery":{"timestamp":"2023-07-29T16:16:36.607Z","unit":"%","value":10}},"healthCheck":{"DeviceWatch-DeviceStatus":{"data":{},"timestamp":"2023-07-29T16:16:36.607Z","value":"online"},"DeviceWatch-Enroll":{"value":null},"checkInterval":{"data":{"deviceScheme":"UNTRACKED","protocol":"cloud"},"timestamp":"2023-07-29T16:16:35.968Z","unit":"s","value":60},"healthStatus":{"value":null}},"motionSensor":{"motion":{"timestamp":"2023-07-29T16:16:36.607Z","value":"inactive"}},"refresh":{},"videoStream":{"stream":{"value":null}},"webrtc":{"audioOnly":{"timestamp":"2023-07-29T16:16:36.607Z","value":false},"sdpAnswer":{"timestamp":"2023-07-29T16:34:56.953Z","value":{"id":"687ca60e-c258-4df4-8047-cdfb2e5bb386","sdp":""}},"stunUrl":{"timestamp":"2023-07-29T16:16:36.607Z","value":"stun:stun.st-av.net"},"supportedFeatures":{"timestamp":"2023-07-29T16:16:36.607Z","value":{"audio":"sendrecv","bundle":false,"order":"audio/video","video":"recvonly"}},"talkback":{"timestamp":"2023-07-29T16:16:36.607Z","value":false}}}}}
  • triggers: {"inactive":[],"active":[],"setTemperature":[{"name":"temperature","type":"NUMBER"}],"setBattery":[{"name":"battery","typ**

Everything looks correct with the rules, and the device status and capability is showing support. Turn on device logging in the 'Device Config'->'Advance Config' section like this:

And then trigger the device motion. That will output the raw event and status data into the logs. If you see something 'there' we can chase more in HubiThings, if you see nothing then SmartThings is not sending the event and not sure what we can do.

Ok, I enabled all levels of logging and specifically selected a device in the drop down... Nothing appeared in the logs except for the following when I activated that camera...

app:13972023-08-02 15:22:27.273debugHubiThings Replica deviceIds not found []
app:13972023-08-02 15:22:16.570debugHubiThings Replica deviceIds not found []
app:13972023-08-02 15:22:15.636debugHubiThings Replica deviceIds not found []

Definitely no motion events... Whats weird is earlier I enabled debug logging and saw some events in the logs which indicated other devices were getting motion "inactive" but not "active".... Here's what that looked like...

app:13972023-08-02 13:45:28.757infoHubiThings Replica received 'Ring Side Yard' status ● trigger:motion ➢ command:setMotionValue:inactive
dev:23972023-08-02 13:45:28.751infoRing Side Yard motion is inactive

Saw several of these... On several of the "Ring" devices but never saw any "active" events...

This sounds a lot like the weirdness with Arlo Cameras and motion. I think if you deauthorize and then authorize in ST itself (not HubiThings) will often have it event trigger for a ‘while’. It has been sometime since I visited the topic. But this sounds very similar.

Can you get ST to always trigger a routine with motion consistently? I would think those would have the same problem.

Hi @Bloodtick_Jones
I tested your update and it is working great both in the Xiaomi Mijia light sensor and the Aeon Multisensor!

I now see the illuminance property in WebCore and have been able to test pistons that execute when the illuminance changes. Thanks so much for adding support for this capability. Overall, you have an excellent product.

2 Likes

Thanks for the suggestion... I created some routines in ST using the motion of the Ring devices and they don't work... So it appears to be an integration issue between ST and Ring... I had high hopes for this, but it looks like a no go... I'm going to re-read the Arlo comments and see if there are any ideas there... :frowning: