Schlage Encode Wifi

Count me in as another interested member

Assuming it is just a simple http based api it should be fairly simple to reverse engineer. I don’t own one yet or I would do it.

I’ll put some money in the donation box if somebody would make an integration :heart_eyes:
Also, homekit isn’t working right? I must have not done enough research, because I wanted to open the door using a shortcut with my iPhone triggered by a NFC sensor by the door… :tired_face:

I have an Encode, it woks pretty well with the phone app, and it shows up in wifi clients for my router. It took me two tries to get it working, probably because of user error in setting up. I had to delete it from the app and reset the lock and start over.

I need to be able to work the lock when the house is not online so i really need HA integration

Hey guys any update on this?

Hey guys…

I’ve spent the last couple days reverse engineering their app and some of the API calls and I’m close…

Here is what I’ve found…

The auth uses Amazon Cognito and SRP… I was able to find the identity pool ID, app secret from the iOS app hard coded.

The one issue I’m running into now is the secret hash validation for the SRP… everything after that SRP uses bearer authorization and should be smooth sailing.

If there are any really developers who want to take a crack I’m happy to share what I got to.

I believe the only issue is something missing from the hash calculation for the SRP but that seems like something not too hard to figure out but it’s beyond the time and skill I have…

Going to shift my focus to making this brine tank sensor HA enabled

5 Likes

great man! that lock is the only smart device not compatible with my home assistant set up.
I can’t wait to be able to use a NFC tag to open the door with :heart_eyes:

Thanks for the work, and updates!

Just need someone who is able to develop this… I can help with the findings but I’m no programmer capable of making this an integration.

1 Like

Can you share your findings?
Any bash or powershell scripts you can share?

I have not looked inside the lock but I’m tempted to consider replacing the original control board with an ESP32 or equivalent and a small servo controller. Consider that a lock is a very simple device. It moves a bar back and forth and senses the movement.

I would also like to add a solar panel on the door. I expect that unless the doorway is used a lot, or us in a dark location, a solar panel should be able to keep batteries charged.

I just got one of these as well. I went with the WiFi since I don’t have any z-wave devices and didn’t want to add any just for this lock. I’d really love to just be able to see the door status and don’t really care about the lock/unlock from HA right now. One of the routes I tried to go down was to get the lock into the Ring app with the hopes that it would then show up there. To do this I had to pair it with the Amazon Key app. The lock now shows up in the Ring App but does not show as an entity for the Ring integration. Any thoughts on how to get this? It could be a round about way to see the lock in HA.

Maybe there’s hope.
https://theresnomon.co/the-current-state-of-api-access-to-your-schlage-encode-locks-7e981f404501

5 Likes

As proper integration isn’t available I thought I would share a solution I’m working on using Alexa integration with Home Assistant. Allowing Home Assistant to lock the door.
Basically, you use a virtual switch in Home Assistant to change the state of a virtual Home Assistant sensor that Alexa monitors. When Alexa sees the state of that sensor change (i.e. to closed) you have an Alexa routine lock the door.
You don’t need an Amazon Alexa device to use this BTW, just the Alexa app and Amazon account on your Android (maybe iOS device too).

This is the virtual switch, which when in the ‘off’ state will trigger the sensor to change to ‘closed’ and the Alexa Routine. Add this to your configuration.xml.

  front_door_lock_alexa_switch:
    name: Front Door Lock HA Switch
    icon: mdi:door-closed-lock

This is the virtual sensor which Alexa will watch.

- platform: template
    sensors:
      front_door_lock_ha_alexa_switch_sensor:
        friendly_name: "Front Door Lock HA Switch State Sensor"
        device_class: door
        value_template: '{{ is_state("input_boolean.front_door_lock_alexa_switch","on") }}'

Next enable Home Assistant Cloud, Alexa Integration and ensure that the Front Door Lock HA Switch State Sensor is synced to Alexa.

Configure the Schlage Encode integration within the Alexa app on your mobile device.
Setup a Routine in the Alexa to Lock the Front Door when it sees the “Front Door Lock HA Switch State Sensor” in the Closed state.

One problem I’m still working on is that this only works once as Front Door Lock HA Switch and Sensor won’t automatically open again if the front door is actually unlocked. You will need an Automation in Home Assistant to change the virtual switch back to the On state (Sensor Open) every x seconds or something. Or maybe Alexa changes the HA switch state back to Open when is see’s it was open. Not sure yet, but wanted to share my progress as is.

For now the workaround is this automation which reset the switch (effectively turning it into a momentary switch) 10 seconds after it is used.
Add this Automation via the HA GUI using this yaml.

alias: Reset Front Door Lock Switch State
description: 'Resets switch after 10 seconds so it can be reused'
mode: single
trigger:
  - platform: state
    entity_id: input_boolean.front_door_lock_alexa_switch
    to: 'off'
    for: 00:00:10
condition: []
action:
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.front_door_lock_alexa_switch

P.S. Thanks to @MarVin for the idea

If you still have this info can you send it to me. I have a pretty strong background with AWS.

Cheers!

2 Likes

Going to bump just because this would be very useful. The Encode is a really great, easy to use lock and I’d love to integrate it into my HA install.

2 Likes

FYI I sent in a suggestion / question to Schlage on their website about local API access and got this reply:

Thank you for contacting Schlage Support to suggest local API support. Unfortunately, although we love the idea, we aren’t able to add it to our development calendar at this point due to competing priorities. If or when that changes, we’ll reach out with more information. We appreciate your insights and suggestions, keep sending them our way!

I still suggest everyone does it to make their opinion heard on the matter.

3 Likes

I tried using mitmproxy between my phone’s Schlage app and the internet, but I couldn’t capture the lock status nor lock change requests. #16 mentions web sockets are used for communication, so maybe mitmproxy is having trouble with those, even though it says web sockets are supported. If anyone has instructions for sniffing the lock status or lock change request traffic, I’d love to see them!

Regarding #31 and #47, Yonomi is closed to indvidual developers (which is the TL;DR of the blogpost in #47). I think something like Nabu Casa would have to step in, get the Yonomi integration working, and then HA would integrate with Nabu Casa.

I’m not sure if this has already been discussed anywhere, but Schlage does (at least now) have a developer portal, specifically listing Schlage Home devices as an API integration option.

https://developer.allegion.com/developer/en/index.html

I’ve requested access and they are supposed to review the request within 24 hours.

3 Likes

Nice! Just requested as well.
Thanks for pointing that out!