I had originally posted this on Reddit, am reposting on here for greater exposure.;
I have read many posts in the community concerning the ability to control door locks using Google Assistant so I figured I would share the method I discovered which requires no custom device handlers, smartapps, IFTTT, webcore, etc. This is on a hub v3 and a Kwikset Obsidian Z-wave lock.
Here are the steps I used:
Create a virtual switch using Smarthings IDE. I named the switch "Door Lock" You will need to create 4 automations: When "Door Lock" is ON set "Kwikset Obsidian" to Locked When "Door Lock" is OFF set "Kwikset Obsidian" to Unlocked When "Kwikset Obsidian" is Locked turn "Door Lock" to ON When "Kwikset Obsidian" is Unlocked turn "Door Lock" to OFF
Naturally you probably wont have the same model lock so replace “Kwikset Obsidian” with your particular lock.
Now when you are in Google Assistant you can say “Turn Door Lock ON” and it will lock the door and “Turn Door Lock OFF” and it will unlock the door. Once you have verified that both commands work, you will need to create 2 routines.
I named the first routine “Lock Door” and set it to turn “Door Lock” ON. The next routine is named “Unlock Door” and is set to turn “Door Lock” OFF.
And it is as easy as that. Now you can say “Hey Google Lock Door” and it will lock or say “Hey Google Unlock Door” and the door will unlock. You can also ask Google “Is Door Lock ON?” to check the lock/unlock status. I would suggest naming the Unlock command something unique like “Unlock Door 1234” or similar to prevent any random people gaining entry just by saying “Unlock Door”.
Being able to control the lock using Google Assistant has many uses. For instance I can create a routine named “Goodnight” and have it turn all lights and devices off and either tell me the lock status or lock the door. Or I could say “Hey Google Im Leaving” and then after 45 seconds have it lock the door behind me and turn all the lights off. Its also convienient as hell to be able to say “Hey Google Unlock Door” when my camera notifies me that my wife is walking up the stairs.