[Solved] Share smart lock with multiple SmartThings hubs?

I’m looking for a solution to share a smart lock (Yale Z-wave) with multiple SmartThings hubs.

Use case: I live in a condo building with 3 units. I’ve set up a dedicated SmartThings Hub to control smart locks in the common area (keeping it separate from my personal hub). This works great, and each tenant can use the SmartThings app to control and manage door codes. However, I’d love to be able to control (or at least lock/unlock) the door from my personal hub in order to tie in with my other devices (specifically I’d like to use my Brilliant Switch to “buzz” visitors in).

I searched through Google and this forum, but wasn’t able to find a solution that allowed sharing devices to multiple hubs.

I’m a developer, so I wouldn’t be opposed to programming a custom solution with Groovy (or perhaps IFTTT). I came across this which might be helpful: https://github.com/SmartThingsCommunity/SmartThingsPublic/blob/master/devicetypes/smartthings/testing/simulated-lock.src/simulated-lock.groovy

Just wanted to check if someone else has solved this before going down the wrong path.

Thanks!

Can’t be done directly. Nothing to do with SmartThings: a zwave device can belong to only one network and even if it is added as a secondary (which you can’t do with two smartthings hubs), for security reasons only the primary has the necessary security key code.

However, there’s nothing at the present time to prevent you from doing it indirectly, although you have to be using the classic app to do so. And they have told us that the classic app will be going away eventually, although no timeline.

Also, you might be able to do it by being a guest on the common space hub that controls the lock, although I’m not really sure on that one. Guest privileges get complicated and have changed with the new app.

Anyway, I’m going to leave it up to others to discuss the various proxy options.

I figured out a solution that works pretty well for me and didn’t require any custom programming. I ended up using the free Stringify app (https://www.stringify.com) which supports multiple SmartThings connections, unlike IFTTT which I tried first.

Here’s what I did in case it helps anyone else. Assuming you have 2 hubs in 2 separate locations or accounts:

  1. Add the physical lock to the 1st hub (like normal).

  2. Create a Simulated Lock in the 2nd hub:

  • Log in to the IDE: https://graph.api.smartthings.com
  • Under “My Locations” choose the 2nd location.
  • Under “My Devices” click the “New Device” button.
  • Set Type to “Simulated Lock”.
  • Make up a Name and Device Network ID for the simulated lock.
  • Make sure to select the 2nd location/hub for this device, so it gets added to the right place.
  1. In the Stringify app:
  • Authenticate both SmartThings accounts/hubs in “Things”. Make sure to check access for Physical lock on hub 1, and the simulated lock on hub 2.
  • Create the following 2 “Flows” to lock and unlock the physical lock from the simulated lock:
    • When Simulated is unlocked -> Unlock Physical
    • When Simulated is locked -> Lock Physical
  • Create the following 2 “Flows” to update the status of the simulated lock to match the physical lock (e.g. if someone unlocks it with a key):
    • When Physical is unlocked -> Unlock Simulated
    • When Physical is locked -> Lock Simulated

This way, both locks (the simulated and physical) should remain in sync across hubs.

Here’s an example of how it looks in Stringify:

It seems to be working quite well so far, and works almost instantly with very little delay.

2 Likes

Nice! :sunglasses:

Can you be more specific about the account structure you are using? I know there are multiple hubs, but are they under the same smartthings account but on different locations?

Or Are they on two different accounts but one account has guest privileges on the other?

Or Are they two completely separate accounts?