I’ve e-mailed Schlage asking for an API and this is the response I got:
Hello,
Thank you for being a Schlage customer. We do not have a public API for Schlage smart locks at this time. I have shared your request for an API with our product team. Your feedback is helpful as we consider future product enhancements.
I reverse engineered some of the app… it authenticates using AWS’s Cognito SAML API… which I couldnt get through… the rest was web sockets for communication which I didnt bother but once getting beyond the auth I appeared promising.
Would really appreciate some method of integrating the Schlage wifi locks into HA. I need the user-friendly features of the Encode line (setting up time-window PIN codes via the app, that kind of thing) that you can’t really get with the Z-Wave line of locks. But it would still be nice to have the lock status available in HA, and be able to lock the door based on HA events.
I am also really keen on having the Schlage Encode integrated. Its a great, easy to use lock, but with home assistant it would be so much better. I emailed Schlage requesting a public API but got the standard response that they will pass on the request. Any smart people who can solve this one and get through the AWS Cognito API?
They had the Schlage Encode WiFi on sale so I bought one after reading about issues with the Z-Wave. Love the lock can get it to do some things with Alexa but cannot wait until HA can work with it.
Then went into Customization’s and changed “people_home (binary_sensor)” Device Class to Window and Alexa see’s it as OPEN when everyone is home and CLOSED when you leave. So now when the wife and I go out it auto locks the door. Even if it is already locked it’s not a problem. There is no way for Alexa to do a state check (open or closed) you can only trigger on a state change so you can lock / unlock with a routine.
UPDATE: Alexa will not auto unlock through a routine so this is good to lock up only.
Alexa cannot report back to HA but can control lights exposed to it so yes… would look something like this.
Binary sensor exposed to Alexa as Window (Open = Home, Closed = Not Home)
Using Alexa Routines…
Binary sensor state changes to Open (we are home)
Alexa opens lock
Alexa turns on chosen light
OR you could just have Alexa do the lock and HA do the light upon arrival. I’m sure there are many other other possibilities.
I just wish Alexa could check the condition of the “window” state and not just be triggered when it changes.
When we get the Schlage Encode into HA of course we don’t need this work around. It does make me happy I bought the lock though so far so good and at least I have some control from HA.
UPDATE: Alexa will not auto unlock through a routine so this is good to lock up only.
1: My Schlage Lock is integrated and controllable by Alexa
2: Alexa has no way of knowing if I and my wife are home or not
3: I use person.vinny and person.faith and assigned my trackers to them, I use bluetooth and nmap to increase accuracy
4: I made a binary sensor called people_home using the person.vinny & faith
5: I went into Customization and changed the entity people_home binary sensor device class to window
6: I then exposed that entity to Alexa. It see’s it as people_home “window” is “open” when we both are home or “closed” when we both are gone.
7: I wrote an Alexa routine to lock my schlage lock when it see’s the “window” goes from open to closed
Unfortunately Alexa will not automatically open the lock so you cannot run a routine to unlock when you return but at least I know I’m not forgetting to lock up.
It’s a bit of work, probably took an hour but it has been working perfectly. Whenever we go out my schlage app notifies me the door has locked within a minute or 2 of us leaving if I forget it.