[RELEASE] HubiThings Replica

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:

@Bloodtick_Jones

Correction on my last post... The cameras and doorbells ARE triggering motion inside ST... There is some issue getting that data to Hubitat through the integration...

I tried something else. I created virtual motion sensors inside ST and then created routines to activate them upon motion from the Ring devices... Those routines worked perfect each time...

I then add those virtual motion sensors to HubiThings and used the replica motion sensor... The motion events did not show up in the HubiThings devices...

So I'm back to thinking it is something in the HubiThings integration... Maybe a setting or something I am not doing right... Although I have deleted, re-added and tried several things with the app...

As a side note, my ST presence sensors are working fine in HubiThings and sending data... Its just not getting motion events...

Do you see the devices 'subscribed' in the OAuth section under status of HubiThings?

They are all subscribed... The actual Ring devices and the virtual motion sensors I created in ST that are also connected to routines in ST. Those routines activate motion on the virtual devices and mirror the Ring devices in ST... I can subscribe to all of them but the devices on my Hubitat hub don't seem to get the motion events...

I anyone else using HubiThings to mirror motion? Maybe there is a specific thing with just that type of event? Like I mentioned, I get presence sensor updates just fine... I don't have much else in ST to play with other than that... I do have a bunch of TV's but I'm using @djgutheinz 's local TV drivers for those...

There shouldn't be any specific, the SmartThings API gives an option to 'subscribe' to all events a device supports. HubiThings uses that by default and your really can't change without changing the Groovy code. I have motion sensors that work fine and that 'test' you did setting this to your device logs that information regardless of the type of event.

Can you setup a virtual switch in ST and toggle that on and off and see it change in HubiThings? If that works (which it should/will) you probably can then trigger that on/off similar to your virtual motion sensors.

Ok, weird test results here...

I created a virtual switch in ST not connected to anything else... I subscribed it in HubiThings and created a "replica switch" mirror device... I did NOT initially enable any logging.... I would switch the virtual switch in ST on and off and got no mirror response in the Hubitat device. I even hit "refresh" the in the Hubitat replica device and it never changed from the off status even though the ST virtual device was on.

I then enabled logging... I unchecked the "disable info logging" and checked the "enable event and status info logging" as you showed above...

I switched the virtual device in ST off and on with no status change on the Hubitat replica switch... However, this time, when I hit refresh from within the replica switch device, the status changes and would match the ST side.... I switch it on/off in ST and nothing changes in the Hubitat device until I manually hit refresh again on the Hubitat device page... A page reload does not change anything... I have to hit "refresh".

When I do hit refresh from the Hubitat device page, it refreshes all the devices I have subscribed to and prints that in the log... Outside of that log entry from the refreshes, no other logging was observed no matter if i had it enabled or disabled...

OAuth appears to be working and I even re-authorized that to be sure... I'm debating removing the entire app and re-installing but don't want to mess up my presence automation...

UPDATE - For anyone who is having issues with this app... After all the tries and messing around with various things, I deleted the replica devices (all of them including the ones that were working) and removed the OAuth child app.... I re-installed it, re-authorized through Samsung and now ALL the devices in ST are working and mirroring to Hubitat correctly...

It was something messed up either with the app or how OAuth was setup or something... Didn't get it working until I deleted and re-installed that portion of the app...

Thanks @Bloodtick_Jones for guiding me through different tries!

1 Like