red wire goes to 3.3v pin in raspberry pi
brown wire goes to ground wire in raspberry pi
Orange wire goes to GPIO4 pin in raspberry pi you should use 10k resostor in series with the button .
then you follow configuration as in athe attached file
Remove battery cover first then remove battery . The front face of the keyfob is glued to the back , try to use sharp cutter and try to disjoint the face of the back .
I will share a video trying to discribe it
I red somewhere that will be added, but was not an official voice/post. Until yesterday was not. I wrote to Sherlock asking from them an integration to Internet (Mi home or any other way of using BLE through the iuinternet). If enough users write, maybe they will isten.
Hi guys, I’ll explain you how I got to control the lock with an esp8266.
I disassembled the lock trying to find some wires or some possibility to control the motor with MQTT protocol.
I found four wires going from the main board to the touch switch. (You can see them in the photo from zanerv)
I checked the wires and I realized about the code color: red -> positive, ground -> negative, withe -> data and yellow -> data. After this I tried to decode the protocol connecting the data wires from the touch switch to a ftdi usb adapter. I realized that when I pushed the switch to open it sent an 0 and when I pushed it to 1 it sent an 0 too, so I was confused.
After I have tried with serie protocol, I used a logic analyzer, and I realized that when I pushed to open, the switch down pulse from the yellow wire during 19 ms and when I pushed to close the pulse was down during 43 ms. So I discovered how it worked.
Knowing how it worked, I got a ESP8266 and I developed a program with arduino IDE to send both pulses to one pin depending of an mqtt message. This is the code: Xiaomi Sherlock MQTT code
I added also to the code the possibility to continue detecting the touch switch. So the pinout of the esp8266 will be the next:
And finally the project is finished, I tried to be as much specific as I can, if you need some more details just tell me and I’ll explain you! I don’t know if this one is the best solution but I have done it some days ago and until now it’s working really good
It’s totally true that it have incremented battery consumption, I have used it during one week and I have chargued it one time. It’s not too much at least for me, I’ll tell you all when I will experiment more chargue cycles.
For sure, I know all time the lock state because touching the phisical switch or doing it over MQTT, it goes across the esp8266.
I have tested it only for a week but it’s working really good, as soon as I connect the battery it connects to the wifi. I’ll update it using node-red and sensors as touch sensor, bluetooth beacons and wifi tracker.
The key solution it’s maybe easier but as much as I know, it is not compatible with all the lock versions, just with the last.
Hello guys, I have a vertical lock but i’m not able to mount the system vertically (no space with my door). Is there any solution so the key comes back in the vertical position by default after it finishes to close the door? (so i can open it from outside with my key?) Something like a configuration from the sherlock smartlock? Thanks
I think that the best solution it’s change the cylinder, using one with double clutch. It allows you to use one key inside and one key outside. It’s not expensive, it’s easy to install and it provides you safety because if the battery is out or for some reason the lock is not working, you will be able to open the door.
I’m currently trying to bypass the default horizontal detection by cutting a new corner on the last plastic circle so it will stop vertically instead of horizontally, I will come back here to show you the result
I forget to take photos but i successfully manged to make the sherlock S2 work with vertifical lock by stop up the 2 whole from the last mechanism circle which contains the metal part (the key). After removing the 2 whole, i have created one at 90° so the system stops vertically