When I first installed my Level lock and set up the default leave/arrive automation in the Home app I was disappointed to find out that it still required user interaction.
How it worked:
- Leave house without locking door
- Drive away
- iPhone detects that I left
- iPhone sends me notification to confirm that I want to run the "Lock Door Automation"
If I have to manually lock it every time can you really consider it automated? Nope! This create bad HAUX for me and my housemates.
So what could I do? The main limitation here is that the lock is a "Secure HomeKit Device", so it is required that I authorize the actions it wants to take when run in an automation context.
After some reading through the HomeKit sub-reddit I found that this limitation doesn't exist when automating the lock in relation to another device! In simpler terms: if I tied the state of my lock to another device it would lock and unlock without confirmation. So for example I could say: If this light is turned on lock the door, if it's off unlock the door. But this is still less than ideal, now I can't use that light like a light!
....enter Homebridge Dummy 🎉
From their docs:
The first step is creating two dummy switches in Homebridge. One called "Lock Door" and another called "Unlock Door", no other settings are needed.
Next in the Home app I set it so that when anyone leaves the house it sets the "Lock Door" dummy switch to "on".
Then I set up another automation to sync the state of that dummy switch to the lock.
As an extra convenience I set up another automation that turns off all the devices in my living room when the last person leaves.
My arrival automations are very similar.
When anyone comes home it sets the "Unlock Door" dummy switch to "on".
That state is synced with the lock.
Then the final bit of nice HAUX is turning on the lights if nobody is in the living room.
For this automation I wanted:
- Only run after sunset
- Only run if the lights aren't already on
I don't think it's possible to do this directly in the Home app so I resorted to using another app call Controller that enables the full automation abilities of HomeKit.
After all of this we've finally creating an home automation workflow with amazing HAUX 🎉
These workflows do exactly what I want the to and should work for years to come!