Schlage Connect, Smartthings, and Hass.io

I am trying to integrate a Schlage Connect door lock, into Hass.io using Smartthings.

I followed this tutorial:
Smartthings Hass.io MQTT Broker

I am able to lock the door, but not unlock it.
The button in hass.io will allow me to click the lock slider, which works, but it immediately goes back to unlock state. (The door stays locked.)
My sensor works as well, showing me locked, and unlocked states.

Here is my configuration.yaml

#Lock
    lock:
      - platform: mqtt
        name: Schlage Century Touchscreen Deadbolt Door Lock
        state_topic: "smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/state"
        command_topic: "smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/cmd"
        payload_lock: "lock"
        payload_unlock: "unlock"
        optimistic: false
        qos: 1
        retain: true

# Sensor
sensor:
  - platform: mqtt
    state_topic: "smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/state"
    name: Front Door

When I use my smartthings app:
SmartThingsBridge logs:
info: Incoming message from MQTT: smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/cmd = unlock
info: Incoming message from MQTT: smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/cmd = locked
info: Incoming message from SmartThings: smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/state = locked
info: Incoming message from SmartThings: smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/state = unlocked

1 Like

Your Smartthings Bridge log shows the payload_lock should be “locked”, you should update your configuration.yaml to payload_lock: “lock”. It has to match the MQTT message exactly, including case sensitive.

1 Like

I’ve updated my payloads.

payload_lock: “locked”
payload_unlock: “unlocked”

It now works.
Thanks for your help!

So a new issue.
The door has been randomly locking on its own.
These are the events from the Smartthings api page:

I haven’t created any automations for the lock yet.
Only added to my RPi at this point.

As you can see I unlocked it using my code named “Family”
Everything that follows are from the MQTT broker.
I have autolock turned off on the deadbolt.

After doing a bit of research, seems lot of people have this issue.
Many have reported that changing retain: true to retain: false fixed their issues.
I have updated my configuration.yaml, and will test today.

#Lock
lock:
  - platform: mqtt
    name: Schlage Century Touchscreen Deadbolt Door Lock
    state_topic: "smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/state"
    command_topic: "smartthings/Schlage Century Touchscreen Deadbolt Door Lock/lock/cmd"
    payload_lock: "locked"
    payload_unlock: "unlocked"
    optimistic: false
    qos: 1
    retain: false

Update: MQTT is still randomly locking the door.

So even after setting the retain to false, it seems the retain: true flag was still active.
What others reported is MQTT would randomly restart, and upon seeing the retain: true, would relock the door.

Uninstalling, then Reinstalling MQTT addon seems to have cleared my retain flag, and I dont seem to be getting anymore random lock events.

Thanks this thread has been very helpful.

I have used this to get my Yale Conexis L1 lock into HA.

Smartthings Bridge:

info: Incoming message from SmartThings: smartthings/Front Door Lock/lock/state = unlocked
info: Incoming message from SmartThings: smartthings/Front Door Lock/lock/state = locked

This is working perfectly and updates instantly.

Config:

lock:
 - platform: mqtt
   name: Front Door Lock
   state_topic: "smartthings/Front_Door_Lock/lock/state"
   command_topic: "smartthings/Front_Door_Lock/lock/cmd"
   payload_lock: "locked"
   payload_unlock: "unlocked"
   optimistic: false
   qos: 1
   retain: false

Sensors:

- platform: mqtt
  state_topic: "smartthings/Front_Door_Lock/lock/state"
  name: Front Door Lock

My issue is that the state in HA is always “unlocked”, any idea what I have done wrong?

Can anyone help?

I had similar issues develop after updating Hassio.

So I switched to using WebCoRe with SmartThings, and IFTTT.

Hassio has limited my ability to add devices due to no python script support, so i’ve abandoned it for now.
Hopefully this will change in the future.

I automate homes for a living.
A SmartThings hub, with WebCoRe, and IFTTT is pretty much all you need.
There as exceptions to that, but in general I try to use devices supported in some way by SmartThings.

(I also install Control4, Vantage, etc)

@Simmo Hmm, interesting, I have installed a Conexis L1 today and I can see locked/unlocked not working properly even though I believe the information is being received by the Z-Wave hub.
Had any luck?

Hi,

I finally got it to work a couple of weeks ago by using it as a switch rather than a lock, here’s my working code:

platform: mqtt
name: "Front Door Lock"
state_topic: "smartthings/Front Door Lock/lock/state"
command_topic: "smartthings/Front Door Lock/lock/cmd"
payload_on: "locked"
payload_off: "unlocked"
retain: true

I hope it helps!

1 Like

Thanks, @Simmo, it certainly does!