Schlage Connect Locks - HA Integration Needs Attention

95% are switches and outlets so its all hard wired which will repeat whereas sensors do not repeat.

I have a bunch of z-wave switches, all of which are the Jasco ones from GE. The dimmers and fan speed switches seem to problematic at times. What brand do you have for the switches and outlets?

Mostly GE.

I just went through the exact same problem with the Aeotec Z-Stick and a Schlage Connect lock. I ended up moving it back to SmartThings.

Has it always worked fine? Any tips? Do you have any fan speed or dimmer switches from GE?

I have occasional issues with the older GEā€™s. Such as during an HA restart, they will be dead but a quick manual toggle gets it to initialize. Happens once every couple of months. No idea why. I guess the radio just loses sync. But the newer + models are fine. Other than that, works great.

I updated my Report sensor to account for master (aka press schlage to lock), and to account for HA lock/unlock since they were not reported. This works quite well. Of course you could change the section for users 1-6 as needed to make this work for your lock. Been using this for a few days, and it has worked flawless. Now get manual lock/unlock. code lock/unlock, and HA lock/unlock reporting, as well as Jammed. Not sure about battery since mine are doing ok. I think the code changes dont get reported either, but if they ever do, this should work.

      front_door_report:
        friendly_name: 'Front Door Report'
        value_template: >
          {% set number = states('sensor.lock_front_door_deadbolt_alarm_level') %}
          {% set alarm_type_value = states('sensor.lock_front_door_deadbolt_alarm_type') %}
          {% set entity_id = 'input_text.door_keypad_' + number + '_name' %}
          {% set user = 'Master' if number == '0' else states(entity_id) %}
          {% set alarm_type_value = '24' if (as_timestamp(now())-as_timestamp(states.lock.lock_front_door_lock.last_changed)) < 15 and (as_timestamp(now())-as_timestamp(states.sensor.lock_front_door_deadbolt_alarm_type.last_changed)) > 15  and (states.lock.lock_front_door_lock.state) == 'locked' else alarm_type_value %}
          {% set alarm_type_value = '25' if (as_timestamp(now())-as_timestamp(states.lock.lock_front_door_lock.last_changed)) < 15 and (as_timestamp(now())-as_timestamp(states.sensor.lock_front_door_deadbolt_alarm_type.last_changed)) > 15  and (states.lock.lock_front_door_lock.state) == 'unlocked' else alarm_type_value %}
          {% set alarm_type_general_actions = {
            '0':'No Status Reported',          
            '9':'Lock Jammed',
            '17':'Keypad Lock Jammed',
            '21':'Manual Lock',
            '22':'Manual Unlock',
            '23':'HA Lock Jammed',
            '24':'HA Lock',
            '25':'HA Unlock',
            '26':'Auto Lock Jammed',
            '27':'Auto Lock',
            '32':'All Codes Deleted',
            '161':'Bad Code Entered',
            '167':'Battery Low',
            '168':'Battery Critical',
            '169':'Battery Too Low To Operate Lock' } %}
          {% set alarm_type_lock_actions = {
            '18':'Keypad Lock',
            '19':'Keypad Unlock',
            '162':'Lock Code Attempt Outside of Schedule' } %}
          {% set alarm_type_code_actions = {
            '33':'Code Deleted',
            '112':'Code Changed',
            '113':'Duplicate Code' } %}
          {% if alarm_type_value in alarm_type_code_actions %}
            {{ alarm_type_code_actions[alarm_type_value] }} (Code {{ number}})
          {% elif alarm_type_value in alarm_type_lock_actions and number == '0' %}
            {{ alarm_type_lock_actions[alarm_type_value] }} with Schlage Button
          {% elif alarm_type_value in alarm_type_lock_actions  %}
            {{ alarm_type_lock_actions[alarm_type_value] }} with Code {{ number }} ({{ user }})
          {% elif alarm_type_value in alarm_type_general_actions %}
            {{ alarm_type_general_actions[alarm_type_value] }}
          {% else %}
            Unknown Alarm Type Value {{ states('sensor.lock_front_door_deadbolt_alarm_type') }}
          {% endif %}
2 Likes

ptdalen, do you have your configuration on Github anywhere? Iā€™ve scrolled through this and seen all the different posts but wondered if you had a unified setup.

Also It seems like a lot of people have made a lot of things for monitoring the locks and changing user codes, anyone have a simple example of just scheduling the locks to automatically re-lock on a schedule?

Iā€™m interested in having my locks re-lock after 10minutes if theyā€™re left unlocked after 9pm, and Iā€™m new to all of this HA stuff so just looking for anything to get me going in the right direction. Iā€™m working on trying to adopt some of the large configurations others have made and adapting them to my solution.

this should work for autolocking your door after 9pm if left unlocked for 10 mins - be sure to change ā€˜your_lockā€™ with the name of your lock :slight_smile:

automation:
- id: 'lock_after_10_mins_when_ after_9pm'
  alias: 'lock after 10 mins when after 9pm'
  trigger:
    platform: state
    entity_id: lock.your_lock
    to: 'unlocked'
    for:
      minutes: 10
  condition:
    condition: time
    after: '21:00:00'
  action:
    service: lock.lock
    entity_id: lock.your_lock
3 Likes

The packages folder contains 95% of my locks configuration. You will find a few automations for locks in my automations yaml as well

3 Likes

Oh man, this is the best.

Stuff like this makes me so excited to get more involved in building all this HA fun.

1 Like

Iā€™m going to try to install @ptdalen 's door-locks.yaml package soon, one question though: is there a Lovelace UI config available for it already? Im not using the old UI config, just Lovelace, has anyone have a template for this lock package on Lovelace? Would be great!

Hmm I planned on the same attempt (although I have kwikset locks not Schlage it should workā€¦) I hadnā€™t even considered Lovelace as a factor?

Circling back to changing the code length, Iā€™m testing @ptdalenā€™s lock package right now and I donā€™t see the option of changing the code length (the amount of digits for user codes), donā€™t see anything in the code either. I know it will reset all codes when you do but it would be great if this was added. Is this in the pipeline still? How would I add that feature? Thank you for all the work and sharing it.

You can change the code length under ā€œConfiguration -> Zwaveā€ find the lock and then under settings you should find many possible settings, one of which is code length. Like you already noticed, changing the length, will erase all codes. I was working on getting this in my package, but felt like these kinds of settings are usually something youā€™d set up once, and leave, and had a higher possibility that someone would erase their codes accidentally. Also, might just be me, but the only time I ever have issues with my locks is when Iā€™m changing Zwave settings. Not every time, but sometimes.

I have not gotten into lovelace too much yet, but love the idea. If anyone puts something together, please share. :slight_smile:

1 Like

@ptdalen I donā€™t want to jinx it but I think I just got your door lock package working and I am THRILLED. Iā€™m a noob to all of this but your code was so clean and well commented that even I was able to figure it out which is no small feat. Pro tip for anyone following this thread @ptdalen created one and two lock versions of his code so you donā€™t have to spend a bunch of time deleting extra locks and associated code (like I did before noticing it was available)

Three questionsā€¦

  1. It added 30 ungrouped sensors up along the top of my UI for keypad 1-15. ā€œTurn keypad 1 offā€, ā€œTurn keypad 1 onā€, ā€œTurn keypad 2 offā€, etc. What are those and did I mess something up to make them ungrouped? entity_id is ā€œsensor.keypad_1_temp_lock_turn_offā€

  2. Has anyone had success using this with the ios notify component? Iā€™m sure I need to change something in the message title template but Iā€™m at a loss on where to start.

       - service: notify.ios_garrett_iphone
         data_template:
           message: >-
             {% set object_id = trigger.to_state.object_id %}
             {% set code_slot = object_id[7:-18] %}
             {% set usercode_input = 'door_keypad_' ~ code_slot ~ '_code' %}
             {% set usercode = states['input_text'][usercode_input].state %}
             {% set name_input = 'door_keypad_' ~ code_slot ~ '_name' %}
             {% set name = states['input_text'][name_input].state %}
             {% set start_input = 'door_keypad_' ~ code_slot ~ '_date_start' %}
             {% set start = states['input_datetime'][start_input].state %}
             {% set end_input = 'door_keypad_' ~ code_slot ~ '_date_end' %}
             {% set end = states['input_datetime'][end_input].state %}
             The pin code {{ usercode }} is now temporarily enabled for {{ name }} from {{ start }} to {{ end }}.
    
           title: >-
             {% set object_id = trigger.to_state.object_id %}
             {% set code_slot = object_id[7:-18] %}
             {% set switch_input = 'door_keypad_' ~ code_slot ~ '_front_switch' %}
             {% set switch_name = states['input_boolean'][switch_input].attributes.friendly_name %}
             Beach House: Temporary code enabled on {{ switch_name }}
    
  3. Executing the Delete Door Code command isnā€™t working for me right now. Iā€™ll dig a little deeper into the thread and see if others have had the same problem. Iā€™m using a Schlage BE469.

UPDATE Looks like I need to try and update zwave; currently stumbling around trying to figure out how to do that.

Really really appreciate all the work you put into this. Canā€™t thank you enough!

I just looked at how the groups are made in the old ui and recreated them in lovelace with entity cards. Here is one page I created for the lock codes. I have configuration menu and status cards on a different page, but I think you get the idea.

  • title: Lock
    panel: true
    icon: mdi:lock-smart
    id: doorlock
    cards:
    • type: custom:layout-card
      layout: horizontal
      cards:
      • type: entities
        title: Entry Code 1
        entities:

        • input_text.door_keypad_1_name
        • input_text.door_keypad_1_code
        • input_select.door_keypad_1_access_schedule
        • input_datetime.door_keypad_1_date_start
        • input_datetime.door_keypad_1_date_end
        • input_boolean.door_keypad_1_front_switch
        • script.door_keypad_1_delete
      • type: entities
        title: Entry Code 2
        entities:

        • input_text.door_keypad_2_name
        • input_text.door_keypad_2_code
        • input_select.door_keypad_2_access_schedule
        • input_datetime.door_keypad_2_date_start
        • input_datetime.door_keypad_2_date_end
        • input_boolean.door_keypad_2_front_switch
        • script.door_keypad_2_delete
      • type: entities
        title: Entry Code 3
        entities:

        • input_text.door_keypad_3_name
        • input_text.door_keypad_3_code
        • input_select.door_keypad_3_access_schedule
        • input_datetime.door_keypad_3_date_start
        • input_datetime.door_keypad_3_date_end
        • input_boolean.door_keypad_3_front_switch
        • script.door_keypad_3_delete
      • type: entities
        title: Entry Code 4
        entities:

        • input_text.door_keypad_4_name
        • input_text.door_keypad_4_code
        • input_select.door_keypad_4_access_schedule
        • input_datetime.door_keypad_4_date_start
        • input_datetime.door_keypad_4_date_end
        • input_boolean.door_keypad_4_front_switch
        • script.door_keypad_4_delete
      • type: entities
        title: Entry Code 5
        entities:

        • input_text.door_keypad_5_name
        • input_text.door_keypad_5_code
        • input_select.door_keypad_5_access_schedule
        • input_datetime.door_keypad_5_date_start
        • input_datetime.door_keypad_5_date_end
        • input_boolean.door_keypad_5_front_switch
        • script.door_keypad_5_delete
      • type: entities
        title: Entry Code 6
        entities:

        • input_text.door_keypad_6_name
        • input_text.door_keypad_6_code
        • input_select.door_keypad_6_access_schedule
        • input_datetime.door_keypad_6_date_start
        • input_datetime.door_keypad_6_date_end
        • input_boolean.door_keypad_6_front_switch
        • script.door_keypad_6_delete
      • type: entities
        title: Entry Code 7
        entities:

        • input_text.door_keypad_7_name
        • input_text.door_keypad_7_code
        • input_select.door_keypad_7_access_schedule
        • input_datetime.door_keypad_7_date_start
        • input_datetime.door_keypad_7_date_end
        • input_boolean.door_keypad_7_front_switch
        • script.door_keypad_7_delete
      • type: entities
        title: Entry Code 8
        entities:

        • input_text.door_keypad_8_name
        • input_text.door_keypad_8_code
        • input_select.door_keypad_8_access_schedule
        • input_datetime.door_keypad_8_date_start
        • input_datetime.door_keypad_8_date_end
        • input_boolean.door_keypad_8_front_switch
        • script.door_keypad_8_delete
      • type: entities
        title: Entry Code 9
        entities:

        • input_text.door_keypad_9_name
        • input_text.door_keypad_9_code
        • input_select.door_keypad_9_access_schedule
        • input_datetime.door_keypad_9_date_start
        • input_datetime.door_keypad_9_date_end
        • input_boolean.door_keypad_9_front_switch
        • script.door_keypad_9_delete
      • type: entities
        title: Entry Code 10
        entities:

        • input_text.door_keypad_10_name
        • input_text.door_keypad_10_code
        • input_select.door_keypad_10_access_schedule
        • input_datetime.door_keypad_10_date_start
        • input_datetime.door_keypad_10_date_end
        • input_boolean.door_keypad_10_front_switch
        • script.door_keypad_10_delete
      • type: entities
        title: Entry Code 11
        entities:

        • input_text.door_keypad_11_name
        • input_text.door_keypad_11_code
        • input_select.door_keypad_11_access_schedule
        • input_datetime.door_keypad_11_date_start
        • input_datetime.door_keypad_11_date_end
        • input_boolean.door_keypad_11_front_switch
        • script.door_keypad_11_delete
      • type: entities
        title: Entry Code 12
        entities:

        • input_text.door_keypad_12_name
        • input_text.door_keypad_12_code
        • input_select.door_keypad_12_access_schedule
        • input_datetime.door_keypad_12_date_start
        • input_datetime.door_keypad_12_date_end
        • input_boolean.door_keypad_12_front_switch
        • script.door_keypad_12_delete
      • type: entities
        title: Entry Code 13
        entities:

        • input_text.door_keypad_13_name
        • input_text.door_keypad_13_code
        • input_select.door_keypad_13_access_schedule
        • input_datetime.door_keypad_13_date_start
        • input_datetime.door_keypad_13_date_end
        • input_boolean.door_keypad_13_front_switch
        • script.door_keypad_13_delete
      • type: entities
        title: Entry Code 14
        entities:

        • input_text.door_keypad_14_name
        • input_text.door_keypad_14_code
        • input_select.door_keypad_14_access_schedule
        • input_datetime.door_keypad_14_date_start
        • input_datetime.door_keypad_14_date_end
        • input_boolean.door_keypad_14_front_switch
        • script.door_keypad_14_delete
      • type: entities
        title: Entry Code 15
        entities:

        • input_text.door_keypad_15_name
        • input_text.door_keypad_15_code
        • input_select.door_keypad_15_access_schedule
        • input_datetime.door_keypad_15_date_start
        • input_datetime.door_keypad_15_date_end
        • input_boolean.door_keypad_15_front_switch
        • script.door_keypad_15_delete
      • type: entities
        title: One Time Use Code 1
        entities:

        • input_select.door_keypad_16_access_schedule
        • input_text.door_keypad_16_name
        • input_text.door_keypad_16_code
        • input_boolean.door_keypad_16_front_switch
        • script.door_keypad_16_delete
      • type: entities
        title: One Time Use Code 2
        entities:

        • input_select.door_keypad_17_access_schedule
        • input_text.door_keypad_17_name
        • input_text.door_keypad_17_code
        • input_boolean.door_keypad_17_front_switch
        • script.door_keypad_17_delete
      • type: entities
        title: One Time Use Code 3
        entities:

        • input_select.door_keypad_18_access_schedule
        • input_text.door_keypad_18_name
        • input_text.door_keypad_18_code
        • input_boolean.door_keypad_18_front_switch
        • script.door_keypad_18_delete
1 Like

Care to share your status and config cards too?

Hi @garrettshannon, Iā€™m looking to add @ptdalen component to my HA as well but havenā€™t been able to find the one lock version you mention. Do you have a link to it by chance? I was about to start deleting all the code for lock 2 and 3 like you did and then happened to see your response. Thanks!