Correct on both accounts. As suggested if HomeKit Arrival flips a linked virtual switch that talks to Hubitat you can have the switch state trigger lock/unlock on the Hubitat side but that could still be problematic from a security perspective.
Out of boredom Iām trying to see if I can mitigate some of the potential security issues by finding the right combination of authentication factors I feel safe to initiate an auto-unlock.
To be safe, right now none of my rules actually involve my door lock at all, just have hubitat sending me different text messages based on events so I can determine how fast, how reliable, and how precise different variables are for a few weeks. If it doesnāt work then no biggie but if I can find a good combination I am not opposed to taking it live during specific hours of the day.
A few examples of things Iām tracking include:
When iOS determines I have arrived home a virtual switch is turned on in hubitat which sends a text to my phone saying āPresence Arrivalā, and an additional virtual switch turns on in Hubitat for 3 minutes before turning itself off.
When iOS determines I have left home the original virtual switch is turned off in hubitat which sends a text to my phone saying āPresence Departureā.
When my Nest Hello doorbell recognizes my face, it turns on a child presence sensor for just me which I use as a trigger for a fourth virtual switch telling Hubitat to send the text āYour Face Recognizedā.
When my iPhone is connected/disconnected to my home wifi, yet another virtual switch is toggled and Hubitat texts āconnected to homeā or ādisconnected from homeā
When the face switch is activated by my Nest doorbell recognizing me, a rule looks to see if the 3-min arrival switch is also active, then it looks to see if the Wifi connection switch is Also active. If all three items are true then Hubitat texts me āAuto Unlockā.
Anyway thatās only a couple of the things Iāve been monitoring/tweaking the last two weeks.
Assuming I find a good combination 4-5 of fast and reliable factors Iāll monitor the āAuto Unlockā texts for an additional 2-3 weeks straight with no changes and if the results are solid Iāll open a few small windows of time during the day that actually triggers a real unlock.
Might require a few iterations before I feel comfortable turning it on officially but we are pretty serious about our social distancing at my house so Iām in no rush as Iāve got nothing better right now. Haha.
Wasted some time this afternoon starting the conversion of all these virtual switches over to hubitat-generated local endpoints instead. Was able to get state changes of devices in Apple Home to trigger the local endpoint on my network through custom iOS personal shortcuts/automations.
Even though the url is not exposed externally I was able to set it up in a way that even if Iām not connected to my network, the endpoint call gets sent from one of my HomeHubs (Apple TV, HomePod) that are on my network so it works regardless of my location.
Probably wonāt keep that active if I ever get to real door unlocks but makes my life a lot simpler in my text message testing and eliminates a bunch of other virtual switches I was using to communicate between Hubitat and Homebridge.