Xiaomi Sherlock Smartlock

Hi any update on this?

Hi is this reliable? I use a similar hack (nodemcu and 10k resistor) and it works, but many times I have to repeat the command (and I s not consistent, sometimes 1 time, sometimes 2 sometimes 3 and even 4). It always works but never know how many times I have to give the open (or close) command

1 Like

Sonoff switch you mean Sonoff SV?

I use my spare fob sometimes and it has the same issue as my esp32 + hacked fob (signal “sent” but no response from door"). So I wonder if it is more of a receiving issue than a transmission issue? The repeats I have set up get it eventually, but add to the lag. I’m still VERY happy with it overall after a few teething issues.

Battery life update: I have not recharged it yet since March 2019. I would estimate I unlock and relock the lock about 2 x lock, 2 x unlock per day (so pretty low usage). I’m impressed with battery life!

My 1st setup. :slight_smile:

And my ESPhome code:

esphome:
  name: sherlockw2
  platform: ESP8266
  board: d1_mini

  comment: versao 1 - 04/fev/2020

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_pass
  use_address: 192.168.50.249


# Enable logging
logger:

# Enable Home Assistant API
api:
  password: !secret api_pass

ota:
  password: !secret ota_pass


web_server:
  port: 80

switch:
#################
#     home door
#################
  - platform: gpio
    pin:
      number: D3
      inverted: yes
    id: relay
  - platform: template
    name: "porta_fechar"
    icon: "mdi:door-closed-lock"
    turn_on_action:
    - switch.turn_on: relay
    - delay: 500ms
    - switch.turn_off: relay
  - platform: template
    name: "porta_abrir"
    icon: "mdi:door-open"
    turn_on_action:
    - switch.turn_on: relay
    - delay: 500ms
    - switch.turn_off: relay
    - delay: 100ms
    - switch.turn_on: relay
    - delay: 500ms
    - switch.turn_off: relay
#################
#     RESTART
#################
  - platform: restart
    name: "shLock Restart"
    id: shLock_led
# LED
  - platform: gpio
    pin: D7
    id: green_pin
    name: "Led Verde"
    icon: mdi:lightbulb
    restore_mode: ALWAYS_ON

sensor:
  - platform: wifi_signal
    name: "shLock WiFi"
    id: shLock_wifi
    icon: mdi:bluetooth
    update_interval: 60s
  - platform: uptime
    name: "shLock Uptime"
    icon: mdi:bluetooth
  - platform: dht
    model: DHT11
    pin:
      number: D5
      mode: INPUT
    temperature:
      name: "shLock Temperatura"
      id: shLock_temp
      icon: mdi:temperature-celsius
    humidity:
      name: "shLock Humidade"
      id: shLock_Humid
      icon: mdi:water-percent
    update_interval: 60s
    
text_sensor:
  - platform: version
    name: "shLock esp version"
    
binary_sensor:
  - platform: status
    name: "shLock esp status"

no member of my family can activate the Sherlock smart app.
They download the app, activate all permissions and location is open. Enter the phone number (message is: Verify code request failed)
then we try with the email. email link i avtivated. we enter new password (message is: the client session is expired, please try again) All this is done in 60sec of time. Then we try again (message is: Mailbox is bound)
This is the same on 2 diferent phones android 9.0 and 1 iphone. Has anyone have this problem, any fix. Thank you

For those that are having connection issues between the keyfob and the lock, what I did that reduced a lot the number of failure attempts (not completelly but I can say that maybe 90% of the cases are correct the first time and the other 10% are solved with a second attempt) was to increase a little bit the time that the button is pressed and also increasing the pause between clicks to close.

My code for ESPHome is:

esphome:
  name: main_door
  platform: ESP32
  board: lolin_d32

wifi:
  ssid: !secret nombre_wifi
  password: !secret password_wifi

logger:
api:
ota:

switch:
  - platform: restart
    name: "main_door_restart"
  - platform: gpio
    pin:
      number: 0
      inverted: yes
    id: relay
  - platform: template
    name: "close_main_door"
    icon: "mdi:gate"
    turn_on_action:
    - switch.turn_on: relay
    - delay: 700ms
    - switch.turn_off: relay
  - platform: template
    name: "open_main_door"
    icon: "mdi:gate"
    turn_on_action:
    - switch.turn_on: relay
    - delay: 700ms
    - switch.turn_off: relay
    - delay: 200ms
    - switch.turn_on: relay
    - delay: 700ms
    - switch.turn_off: relay

I hope this can help you as well.

1 Like

Hi I want to ask if the skerlock s model is compatible with Xiaomi Multimode ZigBee 3.0 WIFI Bluetooth Mesh HomeKit Smart Home Gateway Compatible with Xiaomi Zigbee 2.0.

I finally made it but unfortunately can not open the door because double click does not activate in sonoff, closing the door with one click works ok. Any solution for this?

Hi Klagio,

Yes, for me it is reliable. Probably because the power is not suplied by a battery cell, it is getting constant power and it is also close to the device.
Maybe something is jaming the signal?

Regards,

Tamas

Hi Russ,

If you just want to unlock the door like me, then reverse the lock operation in the app to unlock on one click.
If you would like to use the double click option, you can just use a micro controller (like Arduino mini, nano or any module you find) to repeat the signal like in the code above. Will draw some example for you how to hook it up.

Cheers,

Tamas

Hi Russ,

I think this is the easiest hook up to get both lock and unlock function enabled. If you use an Arduino board which has an output of 3v (like the UNO), you don’t even need the stepdown module(on the second drawing). It requires very little programing and an extra Arduino and sonoff board.kep

Regards,

Tamas

1 Like

Ok, I think this should be useful, thank you. Is there arduino to buy that is already programmed for double signal?

Now I see that you use only to unlock?

And you use the single signal to unlock?

I also use only unlock but use the default settings (so I guess double signal, and perhaps that’s the problem??

Need to check if single signal is more reliable

Unfortunately no, but it is fairly easy to program, I did not go for this solution, but I think is enough to apply ground to the connection of the key twice with 500ms delay with Arduino.


If you have someone who if familiar programming in C, you could use only 1 sonoff and just send the signal once when the relay is open and twice when it is closed.

Yes, I have the setup on the pics and use 1 click to open. You can change it in the app.

where is tis in the app, “Reverse Lock Direction”?

Yes, that is the one

Yes, that was it: doing OPEN with single signal it gets all the time. Now I have a doubt that my settings for CLOSE are not correct which do you use?
Below mine


  - platform: template
    name: "close_door"
    icon: "mdi:gate"
    turn_on_action:
    - switch.turn_on: relay
    - delay: 500ms
    - switch.turn_off: relay
    - delay: 100ms
    - switch.turn_on: relay
    - delay: 500ms
    - switch.turn_off: relay